Skip to content

Repository files navigation

Core Concepts and Visual Outputs

The table below shows the features implemented so far, along with their actual visual outputs from the scripts.

Topic Visual Output Topic Visual Output
01. Reading and Displaying Images 02. Reading and Displaying Videos
03. Reading and Displaying Webcam 04. Built-in Image Filters
05. Cropping and Resizing Images 06. Drawing Shapes and Text
07. Warp Perspective 08. Joining Images
09. Color Detection 10. Contours and Shape Detection
11. Face Detection

Getting Started

If you want to run these scripts locally, follow the setup instructions below.

Setup

Make sure you have Python installed on your system, then install the required dependency using pip:

pip install opencv-python

Running the Scripts

You can run any of the scripts directly from your terminal. For example, to test the face detection module, run:

python 11_face_detection.py

Technical Notes and Takeaways

  • OpenCV processes images in BGR format instead of the standard RGB. Forgetting to convert the color space can lead to unexpected color shifting during processing.

  • The coordinate system is slightly confusing at first. The origin (0,0) is at the top-left corner, meaning the Y-axis goes down instead of up. It takes a second to get used to when drawing shapes or placing text over an image.

  • Warp perspective transforms are highly effective for preprocessing tasks like document scanning or correcting camera angles.

  • The basic Haar Cascade face detection works great for front-facing views, but it easily loses track if you tilt your head too much or if the lighting changes drastically. If you want to detect other things like eyes, smiles, or profile faces, OpenCV actually hosts a bunch of pre-trained XML files directly in their official GitHub repository so you do not have to build them from scratch.

  • Combining color filtering with contour detection makes it straightforward to build basic object tracking systems without heavy machine learning models.

About

Step-by-step OpenCV and computer vision core concepts implemented in python.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages