A collection of four small, self-contained computer vision exercises with Python/OpenCV.
Detects colored objects in a static image (detect_image.py) or a video stream (detect_video.py) by converting frames to HSV, thresholding for a color range, and outlining the largest matching contour. detect_video.py extends this to track several colors (red, green, blue, yellow) simultaneously frame by frame.
Counts coins on a tray from a set of sample photos. Segments the tray via HSV color thresholding, detects circles with the Hough Circle Transform, and classifies each detected coin as big/small and inside/outside the tray, overlaying the counts on the image.
Three scripts on keypoint detection and matching with SIFT:
corner_harris.py- corner detection (Harris) alongside SIFT keypoints on a single image.feature_matching.py- SIFT + FLANN-based matching between a query and a train image, with Lowe's ratio test.video_feature_matching.py- extends matching to a video: tracks a query image's location frame-by-frame using SIFT/FLANN matches, drawing its outline once enough good matches are found.
Trains a convolutional neural network (Keras) on CIFAR-10 image classification, with data augmentation (flip/translate/rotate), batch normalization, and dropout. After training, generates a PDF report with the model architecture diagram, loss/accuracy curves, a confusion matrix, and the final test accuracy.
opencv-python
numpy
keras / tensorflow
scikit-learn
matplotlib
Each project is standalone - cd into its folder and run the script directly, e.g.:
cd color-detection
python detect_image.pyThere are some scripts that read sample images/videos, which you can find in a local samples/ folder inside that project's directory or use your own.