Welcome to the Computer Vision through OpenCV tutorial! This repository contains a collection of Python scripts and resources designed to teach you the fundamental concepts of Computer Vision using the OpenCV library.
The tutorials are organized into modules, each focusing on a specific area of Computer Vision.
Learn the essentials: reading images and videos, understanding dimensions, resizing, cropping, and basic geometric transformations like rotation and translation.
Explore techniques to enhance images, including blurring, sharpening, and noise reduction using various filters (Gaussian, Median, Bilateral).
Understand morphological operations like Erosion, Dilation, Opening, and Closing, and their applications in image processing.
Discover methods to detect edges in images using operators like Canny, Sobel, and Laplacian.
Learn how to perform arithmetic (addition, subtraction) and bitwise operations on images, essential for masking and blending.
Analyze image histograms and apply intensity transformations like Histogram Equalization and Power Law transforms to adjust contrast and brightness.
Dive into advanced topics like image segmentation and feature detection/matching (Harris Corners, ORB, BRISK).
Work with video streams: object tracking (CamShift), background subtraction, and video processing.
Understand image compression techniques.
- Navigate to a module folder (e.g.,
tutorials/01_basics_and_io). - Read the
README.mdto understand the concepts. - Run the Python scripts to see the code in action.
- Note: You may need to adjust image paths in the scripts if you run them directly, as the directory structure has changed. Ideally, run scripts from inside their respective folders.
This project uses Poetry for dependency management which ensures a reproducible environment.
-
Install Poetry: If you haven't already, install Poetry by following the official guide.
-
Install Dependencies: Navigate to the project root and run:
poetry install
-
Run Scripts: You can execute scripts within the Poetry environment using
poetry run. For example:poetry run python tutorials/01_basics_and_io/image_rotation.py
Alternatively, spawn a shell within the environment:
poetry shell python tutorials/01_basics_and_io/image_rotation.py