Objective
Develop a real-time 2D object recognition system using classical computer vision techniques, incorporating thresholding, morphological filtering, segmentation, and feature extraction. Additionally, implement deep neural network--based classification for comparison with the traditional approach.
Approach
Thresholding -- Placed objects on a white background and converted color image frames to grayscale, and separated the foreground and background by thresholding pixel intensity.
​
Clean-up -- Applied morphological filtering techniques like dilation and erosion to remove noise and fill gaps in image frames.
​
Segmentation -- Identified and highlighted distinct regions using connected component analysis.
​
Feature Extraction -- Computed key features such as the axis of least central moment, Hu moments, bounding box size ratio, and percentage area filled.
Training -- Collected feature vectors from multiple known objects and stored them in a database for future reference.
Classification -- Extracted feature vectors from new image frames and matched them to the database using sum of squared distances measure. A confusion matrix was created to analyze the performance.
DNN--based Classification -- Thresholded image frames were processed through a pre-trained model to generate embedding vectors, which were then stored in a dedicated database for each object. New image frames were classified by matching their embedding vectors against this database. The performance of this approach was evaluated using its own confusion matrix and, as expected, the DNN-based classification outperformed the traditional method.