This project implements an object detection and recognition system in MATLAB.
The approach is based on shape feature extraction and comparison between query objects and a set of reference images.
The system can:
- Detect objects in an input image
- Extract multiple geometric features
- Compare detected objects with a reference library
- Classify and label objects with bounding boxes on the query image
- Preprocessing: Convert RGB images to clean binary masks
- Shape Features (8-element vector):
- Area
- Eccentricity
- Aspect Ratio
- Solidity
- Perimeter
- Circularity
- Extent
- Euler Number
- Weighted Matching: Compare query object features with references using weighted error scores
- Visualization: Show bounding boxes and predicted labels on the query image
- Place your reference images in the folder specified in
reference_folderreference_folder = 'path_to_reference_images';
- Set your query image path in the code:
query_image_path = 'example.jpg';
- Run the project:
main
- The script builds a feature library from reference images.
- It extracts 8 shape features for each object in the query image.
- Features are compared with the library using weighted errors.
- The best match is displayed on the image with bounding boxes and labels.
- Extend feature extraction with texture and color features
- Replace manual weights with learned weights (ML-based optimization)
- Support video input for real-time object detection
- Improve robustness against noisy or complex backgrounds
Author: Shady Nikooei
Digital Image Processing