Projects

ComVis Core

Computer Vision
Python
OpenCV

Computer Vision qualification project: Image processing, feature extraction, pattern recognition.

Comvis Core is a project that explores the core techniques of Computer Vision (CV), including image processing, feature extraction, and pattern recognition. It demonstrates the foundational steps required to enable a machine to interpret and analyze visual data.

This project was developed as a qualification case to teach Computer Vision as a laboratory assistant. The code showcases how to transform raw pixel data into meaningful information using classic CV algorithms. By working through these cases, I gained a deeper understanding of image manipulation, spatial filtering, feature detection, and classical machine learning application in image recognition.

Tech Stack: Python with libraries OpenCV (cv2), NumPy, and Matplotlib.


Key Features

Image Processing with Thresholding and Filtering

Image Thresholding

  • Grayscale Conversion → Transforms the color image into a single-channel grayscale representation to simplify processing.
  • Image Thresholding → Implements various techniques (BINARY, TRUNC, OTSU, etc.) to segment an image based on pixel intensity.
  • Spatial Filtering → Applies different blurring techniques (Mean, Gaussian, Median, Bilateral) to smooth the image and reduce noise.

Edge and Feature Detection

Edge Detection

  • Laplacian Detection → Uses the Laplacian operator to identify areas of rapid intensity change, highlighting edges in the image.
  • Sobel Filters → Applies Sobel operators in the X and Y directions to calculate the gradient and separately detect vertical and horizontal edges.
  • Canny Edge Detection → Implements the advanced Canny algorithm, which is highly effective at detecting a wide range of edges by suppressing noise and using hysteresis thresholding.

Shape and Object Detection

Shape Detection

  • Adaptive Thresholding → Uses Gaussian Adaptive Thresholding to create a sharp binary image, which is crucial for contour detection, even under uneven lighting.
  • Contour Finding → Identifies and extracts contours (boundaries of shapes) in the binary image using cv2.findContours.
  • Geometric Classification → Implements a custom function that uses the number of contour vertices (cv2.approxPolyDP) and the aspect ratio to accurately classify shapes (triangle, square, rectangle, pentagon, circle, oval).

Pattern Recognition with Face Recognition

Face Recognition

  • Face Detection → Uses a pre-trained Haar Cascade classifier to quickly and accurately detect faces within images.
  • Model Training (LBPH) → Trains a Local Binary Pattern Histograms (LBPH) Face Recognizer using a collection of grayscale face images.
  • Real-time Prediction → Predicts the identity of faces in test images, drawing bounding boxes and displaying a confidence score.