Download zip file with example files: Tracking
There are two parts to running the code: the SIFT feature / match calculation and the Matlab outlier / moving object calculation. The user starts with a directory of sequential aerial images and runs the SIFT algorithm, which produces match files (and a listing of those match files). The listing of those match files is fed to the Matlab script which calculates which matches are bad.
Tools needed:
Images should be in .pgm format. You could use a batch image converter, such as Image Converter .EXE - Download Link.
You will start with a sequence of images in the directory named “images” and another directory named “EXE”, which will contain the SIFT code - the executables and the cygwin libraries
First, you will need to generate batch calls to the SIFT code to extract the features and matches. This is done using this python script: batch generator.py (click for source code). The script should be located in the same directory as the images directory and the “EXE” directory. The script will produce 3 files:
The script will also create the directories called FEATURES and MATCHES, if they don't exist
Then, you will need to run extractfeatures.bat and computematches.bat to produce the features from images and matches from features
There is only one script: GenerateHoughClusters.m (click for source code). The input parameter, “list_of_matches” is just a pointer to the file containing a list of all the matches between image pairs - it's titled matlabinputfile.txt in the previous step, so you would run the script like this: GenerateHoughClusters('matlabinputfile.txt')
The catch is that matlab needs to be pointed to the directory in which the match files listed in the input file are. Thus, to run the script, I would move matlabinputfile.txt into the directory named MATCHES, navigate with Matlab to that directory, and then run the script.
After the script is run and completes, it will produce a plot of the results that can be exported as an image file.