match

所属分类:Windows编程
开发工具:C/C++
文件大小:1518KB
下载次数:9
上传日期:2008-04-02 22:25:06
上 传 者skair
说明:  matching between a pair of figure using the keypoint developed bu Lowe

文件列表:
match\basmati.key (210958, 2007-01-27)
match\basmati.pgm (46433, 2007-01-27)
match\book.key (320465, 2007-01-27)
match\book.pgm (97697, 2007-01-27)
match\box.key (233055, 2007-01-27)
match\box.pgm (72310, 2007-01-27)
match\defs.h (1920, 2007-01-27)
match\keypoints (66754, 2007-01-27)
match\lib.key (644560, 2007-01-27)
match\lib.pgm (235258, 2007-01-27)
match\lib2.key (313278, 2007-01-27)
match\lib2.pgm (128263, 2007-01-27)
match\Makefile (631, 2007-01-27)
match\match.c (4876, 2007-01-27)
match\scene.key (368967, 2007-01-27)
match\scene.pgm (196623, 2007-01-27)
match\scene2.pgm (196666, 2007-01-27)
match\toy.key (112180, 2007-01-27)
match\toy.pgm (53415, 2007-01-27)
match\util.c (7494, 2007-01-27)
match (0, 2007-05-05)

Sample code for matching invariant keypoints -------------------------------------------- This directory contains some sample C code for reading a pair of PGM input images and their keypoints. The program outputs a result image that places the first image above the second, and then draws lines connecting matching keypoints from one image to the other. The code is divided into 2 files: match.c and util.c: match.c: contains the main() routine and code for matching keypoints. util.c: utility routines for creating an image structure and doing I/O for PGM and keypoint files. Making a copy and running the code ---------------------------------- To compile the code, just type "make" (the Makefile works under Linux and most other versions of Unix). Test the module by running the program on pairs of images and their corresponding keypoints (already provided in this directory). For example, the following matches the "box" image to the "scene" image: % match -im1 box.pgm -k1 box.key -im2 scene.pgm -k2 scene.key > out.pgm You can examine the results with the program xv: % xv out.pgm This image shows a line for each valid match connecting a keypoint location in one image to its matching location in the other. The matches are identified by finding the 2 nearest neighbors for each keypoint from the first image among those in the second image, and only accepting a match if the distance to the closest neighbor is less than 0.8 times that to the second closest neighbor. Some other sample images are the following (the final image has only false matches): % match -im1 basmati.pgm -k1 basmati.key -im2 scene.pgm -k2 scene.key > out.pgm % match -im1 book.pgm -k1 book.key -im2 scene.pgm -k2 scene.key > out.pgm % match -im1 toy.pgm -k1 toy.key -im2 scene.pgm -k2 scene.key > out.pgm A more difficult matching problem is matching images of the UBC library: % match -im1 lib.pgm -k1 lib.key -im2 lib2.pgm -k2 lib2.key > out.pgm Finding keypoints ----------------- This is not part of the homework assignment, but if you want to detect keypoints yourself on other images, you can use the Linux binary program "keypoints" provided in this directory. It is used as follows: % keypoints basmati.key The output file format starts with 2 integers giving the total number of keypoints and the size of the descriptor vector for each keypoint (128). Then the location of each keypoint in the image is specified by 4 floating point numbers giving subpixel row and column location, scale, and orientation (in radians from -PI to PI). Obviously, these numbers are not invariant to viewpoint, but can be used in later stages of processing to check for geometric consistency among matches. Finally, the invariant descriptor vector for the keypoint is given as a list of 128 integers in range [0,255]. Keypoints from a new image can be matched to those from previous images by simply looking for the descriptor vector with closest Euclidean distance among all vectors from previous images.

近期下载者

相关文件


收藏者