Metadata-Version: 2.4
Name: cvlite
Version: 1.1.0
Summary: Computer vision examples for Google Colab, with an explanation of every function used
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: opencv-python>=4.5
Requires-Dist: matplotlib
Requires-Dist: pandas
Requires-Dist: scikit-image>=0.19
Requires-Dist: pillow
Requires-Dist: torch
Requires-Dist: transformers>=4.26
Requires-Dist: pyperclip

# cvlite

Ready-to-run Google Colab code for 8 computer vision topics, with an explanation of every function each one uses.

## Install

```python
!pip install cvlite
import cvlite
```

Installing cvlite also installs everything the code needs: NumPy, OpenCV, Matplotlib, pandas, scikit-image, Pillow, PyTorch, transformers and pyperclip. In Colab these are already present, so only cvlite itself (and pyperclip) is downloaded.

## Use

```python
cvlite.labs()                                # list the 8 labs
cvlite.code(3, "/content/photo.jpg")         # copy ready-to-run code for lab 3 (with your image path) to the clipboard
cvlite.print_code(3, "/content/photo.jpg")   # print the code instead
cvlite.explain(3)                            # aim, steps, theory and every function used, explained
cvlite.run(3, "/content/photo.jpg")          # run lab 3 straight away
cvlite.get_code(3, "/content/photo.jpg")     # the code as a string
cvlite.usage()                               # this help
```

In Colab and Jupyter, `cvlite.code()` shows a **Copy code** button (browsers only allow copying after a click), then you paste into a new cell. In a terminal or a Python script it copies straight to the system clipboard.

| Lab | Input | Topic |
|-----|-------|-------|
| 1 | image | Colour models: RGB, CMYK, YCbCr, HSV, Grayscale and all their channels |
| 2 | image | Histogram equalization and the equalized histogram |
| 3 | image | Edge detection: Sobel, Laplacian, Canny |
| 4 | image | ROI identification (Otsu, morphology, contours). Change `num_rois` in the code to pick how many |
| 5 | image | GrabCut segmentation with the entire image as the ROI |
| 6 | image | Region analysis (watershed segmentation): shape, PCA orientation, GLCM texture, description, CSV |
| 7 | video | Object tracking (CSRT, or MIL if CSRT is missing) with trajectory |
| 8 | video or image | Scene caption with BLIP (needs internet; a GPU is optional) |

Lab 6 writes `region_measurements.csv` and lab 7 writes `tracking_output.mp4` into the current folder (`/content` in Colab).
