
MATLAB Code For Object Detection in a Cluttered Scene Based Point Feature Matching
by admin in Computer Vision System , Image Processing and Computer Vision , MATLAB Family on July 26, 2020This code shows how to detect a particular object in a cluttered scene, given a reference image of the object. This code uses an imbedded pictures in Matlab that you can change it any time.
Overview:
This code presents an algorithm for detecting a specific object based on finding point correspondences between the reference and the target image. It can detect objects despite a scale change or in-plane rotation. It is also robust to small amount of out-of-plane rotation and occlusion.
This method of object detection works best for objects that exhibit non-repeating texture patterns, which give rise to unique feature matches. This technique is not likely to work well for uniformly-colored objects, or for objects containing repeating patterns. Note that this algorithm is designed for detecting a specific object, for example, the elephant in the reference image, rather than any elephant. For detecting objects of a particular category, such as people or faces, see vision.PeopleDetector
and vision.CascadeObjectDetector
.
Step 1: Read Images:
Read the reference image containing the object of interest.
Read the target image containing a cluttered scene.
Step 2: Detect Feature Points:
Detect feature points in both images.
Visualize the strongest feature points found in the reference image.
Visualize the strongest feature points found in the target image.
Step 3: Extract Feature Descriptors:
Extract feature descriptors at the interest points in both images.
Step 4: Find Putative Point Matches:
Match the features using their descriptors.
Display putatively matched features.
Step 5: Locate the Object in the Scene Using Putative Matches:
estimateGeometricTransform
calculates the transformation relating the matched points, while eliminating outliers. This transformation allows us to localize the object in the scene.
Display the matching point pairs with the outliers removed
Get the bounding polygon of the reference image.
Transform the polygon into the coordinate system of the target image. The transformed polygon indicates the location of the object in the scene.
Display the detected object.
Step 7: Detect Another Object:
Detect a second object by using the same steps as before.
Read an image containing the second object of interest.
Detect and visualize feature points.
Extract feature descriptors. Then Match Features. Display putatively matched features.
Estimate Geometric Transformation and Eliminate Outliers
Display Both Objects
See the Video:
Click here.
Recommended For You:
- MATLAB Code For Tracking Pedestrians from a Moving Car
- MATLAB Code For Object Detection in Image of a Cluttered Scene
- Matlab Code For Car Number Plate Recognition System
- Matlab Code for Recognition of License Plate
- Car License Plate Detection Using Morphological Operators
- Car Number Plate Detection Using MATLAB and Image Processing
- Fruit Classification Interactive Program
- MATLAB Code For Reading Car Plate Number
- Matlab Code For Eye Color Detection
- MATLAB Code For Face Recognition Based on Histogram of Oriented Gradients (HOG)
- MATLAB Code For Detecting and Counting Cars Using Gaussian Mixture Models
- MATLAB Code For Video Pattern Matching
Codes and Articles:
- Noise Measurement with Matlab
- Resize an Image in Matlab
- Autopilot Model-Based Design for ARP-4754A, DO-178C and DO-331
- Finite Element Gui Matlab, 2d Linear Elements
- Noise Analysis and Measurement of Noise Statistics with Matlab
- MATLAB Code For Object Detection in Image of a Cluttered Scene
- Servo Motor Control using MATLAB
- Aircraft Power Network in Simscape Electrical with AC and DC networks
- Getting Started with MATLAB: A Quick Introduction
- PID Tuning Code using Zeigler-Nicholas Method in MATLAB
Share Now!