Você está na página 1de 3

INTRODUCTION

This package contains two application one for purpose of building the KD tree form training Image the other one to query the match form the build data structure.

1. RS Image DB
It is a simple GUI application that can be used to build KD tree and produce supporting files for query Steps to follow to 1. 2. 3. 4. Browser the folder when the images are located set the number of kd tree ,the SIFT controlling parameters check if image needs to be smooth and scaled before SIFT feature extraction (optional) Click Generate or Exit(to quit)

Note: It will take time to generate complete the whole process depending on the number of Images selected and the feature extraction parameters. When the process is complete it will show the completing time also create a folder called "Out" on the same directory when the executable is located. This created folder contains all the supportive files for query program. Files Description in the Out folder output_index.max File used to referee the which SIFT descriptors generate from the image output_kdTree.mat Core structure of the KD tree output_Rowdata.mat Row data of the SIFT descriptors from the image set SIFTKEYDBINDEXING.xml XML File the query application refers to get the file name for the match, also contains the number of SIFT descriptors generated from that particular image. output.txt Total number of SIFT descriptors (sum form each image SIFT descriptors)

Its very important for the query application not to change the file names the above generated files. Otherwise the query application will fail.

2. Image Query
This is a command line application. The inputs in the command line are file name of image we are going to query [required] and two optional inputs Max comparisons and Max neighbors. The Max Comparisons option is used to run an ANN query. The parameter specifies how many paths in the bestbin-first search of the kd-tree can be checked before giving up and returning the closest point encountered so far. Max neighbors is used to return the k nearest neighbors to a given query image.

2.1 Usage First Copy the "out" folder generated by the RS Image DB to the where Image Query.exe is found/ going to be run. If the query application did not find this folder and enclosed files it will definitely fail. Example 1: if you want to find the match of image file "query.jpg with max comparisons of 100 and 3 neighbors that the command will be >ImageQuery.exe -i query.jpg -c 100 -n 3 Where -i [image file name] -c [max comparison]/ [optional] -n [max neighbors]/ [optional]

Here in the example above query.jpg must be in the current directory/folder where the Image Query.exe is located else the application will fail (??? Error using ==> imread at 37 File "query.jpg" does not exist.) Example 2: if you want to query the match of image file found on E:\Library\TestImages\test2\T2A0.jpg with 700 comparison of 10 neighbors ImageQuery.exe -i E:\Library\TestImages\test2\T2A0.jpg -n 10 -c 700 Note: the query time depends on the number of Image used and the SIFT point in the KD tree, also the parameter Max comparison will help to trade off accuracy and speed in the query. The output of the query application is the file name of the images used in the RS Image DB application. For the specific project task where the training image file are names according to the position and angle chosen, like X1Y2A270.jpg where X1Y2 means image take at X=1 ,Y=2 position where A270 means image take at angle of 270 degrees. According to this convention the output of the query function will me like the following order according to the decreasing score, best match always on the top. Typical output result is show in the box below for the command line argument -i test.jpg -c 100 -n7

Initilizing... Initilizing DONE... Query Started DONE! in 0 HR 0 MIN 2 SEC 409 MSec X=1 Y=2 Angle=90 hits of 126 SIFT Desc X=1 Y=2 Angle=90 hits of 65 SIFT Desc X=1 Y=2 Angle=90 hits of 48 SIFT Desc X=0 Y=2 Angle=90 hits of 30 SIFT Desc X=0 Y=2 Angle=90 hits of 33 SIFT Desc X=0 Y=2 Angle=90 hits of 20 SIFT Desc X=0 Y=1 Angle=90 hits of 19 SIFT Desc

If the file name is not according to the convention mentioned above it will just output the full file name of the image for the matches

3. Package Dependency
The application is built on 64bit windows but compile and publish to run on also 32 bits too(but not tested) also application are built by linking Matlab and C#. Where Matlab is used to handle all the matrix operations and VLfeat Library functions. The DLL and the application supporting file are included in the package with the source code. Note: They application can run on any computer that even do not have a Matlab but it need a MCR Compiler. MCRInstaller is free to distribute with terms of conditions.

4. Source Files
Included source file in the package are Visual Studio 2010 solution for the RS image DB/Query application in C# in VS Src folder Matlab dll for building KD tree and query form the Matlab., in Matlab dll folder Two Matlab function files used in Matlab Src folder Executable and setup files in Published Folder Note: There are many comments in the source file to explain the codes(C# and Matlab).

Você também pode gostar