In the sift algorithm of MATLAB, how to match multiple images with one template?

( 1) ? Survey of Scale Invariant Feature Transformation

It is an algorithm of computer vision, which is used to detect and describe local features in images. It searches for extreme points in spatial scale and extracts their positions, scales and rotation invariants.

This algorithm was published by David Lowe in 1999 and summarized in 2004. Its applications include object recognition, robot map perception and navigation, image mosaic, 3D modeling, gesture recognition, image tracking and action comparison. This algorithm has its own patent, and the patent owner is the University of British Columbia.

The description and detection of local image features are helpful to identify objects. SIFT features are based on some local appearance points of interest on the object, and have nothing to do with the size and rotation of the image. Tolerance to light, noise and slight changes in viewing angle is also quite high. Based on these characteristics, they are very important and relatively easy to retrieve. It is easy to identify objects in a feature library with a huge mother number, and there are few misunderstandings. The detection rate of some objects covered by SIFT feature description is also quite high, even more than three SIFT object features are enough to calculate the position and orientation. At present, the speed of computer hardware and feature library are small, and the recognition speed can be close to real-time operation. SIFT features a large amount of information, which is suitable for fast and accurate matching in massive databases.

(2 ) ? The main functions of Matlab code are as follows: match.m: test program.

Function: This function reads two (gray) images, finds out their respective SIFT features, and displays two straight lines connecting matching feature points (matching key points) in the two images (connecting corresponding feature points). The criterion for judging a match is that the matching distance is less than the distance ratio multiplied by the next nearest matching distance (only when the distance is less than the distance ratio multiplied by the second nearest matching distance will the match be accepted). The program returns the number of matching pairs displayed. (It returns the number of matches displayed. ) Call instance: match('desk.jpg',' book.jpg');

Call method and parameter description: omitted. Note: (1) image is a grayscale image. If it is a color image, it should be converted into a gray image with rgb2gray before calling.

(2) The parameter distRatio is the coefficient that controls the number of matching points, here it is 0.6, which determines the number of matching points. Adjust this parameter in the Match.m file to get the most suitable number of matching points. Sift.m: The Core Algorithm Program of Scale Invariant Feature Transform (Sift Algorithm)

Function: This function reads the gray image and returns the SIFT key points. Calling method and parameter description:

Calling method: [image, descriptors, loc]= sift (image file)? Input parameters:

ImageFile: image file name.

Output or return parameters (return):

Image: is an image matrix with double format.

Descriptor: a matrix x multiplied by k 128, in which each row is an invariant descriptor of the k key points found. This descriptor is a vector with 128 values and is standardized to a unit length.

Locs: is a matrix of k times 4, in which each row has four numerical values, representing key point position information (row coordinates, column coordinates (note that the upper left corner of a general image is the origin of coordinates), scale and parameters of Gaussian scale space, in which this parameter also determines the size of the image disk determined by the frame (structure), and the last parameter is orientation.

This function creates a new image, which contains two matching images and the.

Match the connecting straight line of the pair. (3)? Actual case execution results:

The program code adopts mixed programming of matlab and C. Open sift_match.m file in the file with matlab and execute it. As shown in the figure below:

As can be seen from the above figure, * * has 17 matching points.