Point feature matching

In image processing, point feature matching is an effective method to detect a specified target in a cluttered scene. This method detects single objects rather than multiple objects. For instance, by using this method, one can recognize one specific person in a cluttered scene, but not any other person.

The algorithm is based on comparing and analyzing point correspondences between the reference image and the target image. If any part of the cluttered scene shares correspondences greater than the threshold, that part of the cluttered scene image is targeted and considered to include the reference object there.[1]

MATLAB implementation

% if original image is a color image, we need to grayscale it
originalPadsImage = (imread('pads.jpg')) ;
padsImage = rgb2gray(originalPadsImage);
figure;
imshow(padsImage);

title('Image of a pads box');

originalDeskImage = (imread('mydesk.jpg'));
deskImage = rgb2gray(originalDeskImage);
figure;
imshow(deskImage);
title('Image of a Cluttered desk scene');

padBoxPoints = detectSURFFeatures(padsImage);
deskPoints = detectSURFFeatures(deskImage);

figure;
imshow(padsImage);
title('50 Strongest Feature Points from the Pads box Image');
hold on;

plot(selectStrongest(padBoxPoints, 50));

figure;
imshow(deskImage);
title('300 Strongest Feature Points from Scene Image');
hold on;
plot(selectStrongest(deskPoints, 300));

[padboxFeatures, padboxPoints] = extractFeatures(padsImage, padBoxPoints);
[deskFeatures, deskPoints] = extractFeatures(deskImage, deskPoints);

boxPairs = matchFeatures(padboxFeatures, deskFeatures);

% Display putatively matched features.
matchedPadBoxPoints = padboxPoints(boxPairs(:, 1), :);
matchedDeskPoints = deskPoints(boxPairs(:, 2), :);
figure;
showMatchedFeatures(padsImage, deskImage, matchedPadBoxPoints,matchedDeskPoints, 'montage');
title('Putatively Matched Points (Including Outliers)');

[tform, inlierBoxPoints, inlierdeskPoints] = estimateGeometricTransform(matchedPadBoxPoints, matchedDeskPoints,'affine');
% display the inliers only
figure;
showMatchedFeatures(padsImage, deskImage, inlierBoxPoints, inlierdeskPoints, 'montage');
title('Matched Points (Inliers Only)');

% drawing out the box
boxPolygon = [1, 1;
    size(padsImage, 2), 1;
    size(padsImage, 2), size(padsImage, 1);
    1, size(padsImage, 1); 
    1, 1];
newBoxPolygon = transformPointsForward(tform, boxPolygon);
figure;
imshow(originalDeskImage);
hold on;
line(newBoxPolygon(:, 1), newBoxPolygon(:, 2), 'Color', 'y');
title('Detected Box');

Video stabilization

In addition to object detection, point feature also helps in improving video stabilization. To achieve this, it usually follows these steps: reading frames, identifying salient points, corresponding points, accurate correspondence, and frame correction.[2]

Identify salient points

The purpose of identifying the corresponding salient points that exist between two frames is to reduce distortion.[2][3] Corner detection is used to identify salient points. To find corner values, Harris Corner Detector (one of the fastest algorithms for detecting corners) can be used.

Corresponding points

In this step, by extracting a matrix of 9 x 9 blocks for each point, cost to include them in the solution can be computed. The lowest cost reveals the object.[2]

Accurate correspondence

Using the random sample consensus algorithm (RANSAC), incorrect point correspondences with strong estimation of changing in location in the image can be determined.[4]

References

  1. "Object Detection in a Cluttered Scene Using Point Feature Matching - MATLAB & Simulink". www.mathworks.com. Retrieved 2019-07-06.
  2. Abdullah, L. M.; Tahir, N. Md; Samad, M. (July 2012). "Video stabilization based on point feature matching technique". 2012 IEEE Control and System Graduate Research Colloquium: 303–307. doi:10.1109/ICSGRC.2012.6287181. ISBN 978-1-4673-2036-8.
  3. Anu Suneja and Gaurav Kumar . “An Experimental Study of Edge Detection Methods in Digital Image”, Global Journal of Computer Science and Technology, 10(2), 2010.
  4. Tordoff, B; Murray, DW. "Guided sampling and consensus for motion estimation." 7th European Conference on Computer Vision, 2002.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.