fast_trees
directory. Generated trees in intermediate, C++ and MATLAB form are availavle for FAST-8, FAST-9, FAST-10, FAST-11, FAST-12 and FAST-ER. In the case of FAST-ER, the FAST detector has been learned from the best FAST-ER tree (included as best_faster.tree
) with features extracted from all available images in the Cambridge dataset.To make on any unix-like environment, do:
./configure && make
There is no install option.
This will create the following executables:
learn_detector
This learns a detector from a repeatability dataset.extract_features
This extracts features from an image sequence which can be turned in to a decision tree.learn_fast_tree
This learns a FAST decision tree, from extracted data.fast_tree_to_cxx_score_bsearch
fast_tree_to_cxx_score_iterate
fast_tree_to_matlab_score_bsearch
test_repeatability
Measure the repeatability of a detector.warp_to_png
This converts a repeatability dataset in to a rather faster loading format.image_warp
This program allows visual inspection of the quality of a dataset.fast_N_features
This program generates all possible FAST-N features for consumption by learn_fast_tree
.
./configure && make
An example detector (the best known detector, used in the results section of the paper) is already in best_faster.tree
.
learn_detector.cfg
. The default parameters are good, except you will need to set up the system to point to the repeatability dataset you wish to use.
./learn_detector > logfile
If you run it more than once, you will probably want to alter the random seed in the configuration file.
awk 'a&&!NF{exit}a;/Final tree/{a=1}' logfile > new_detector.tree
./test_repeatability --detector faster2 --faster2 new_detector.tree > new_detector_repeatability.txt
The file new_detector_repeatability.txt
can be plotted with almost any graph plotting program. A variety of detectors can be tested using this program. See test_repeatability for more information.
./fast_N_features --N 9 > features.txt
Alternatively, they can be extracted from images using extract_features:
./extract_features IMAGE1 [IMAGE2 ...] > features.txt
learn_fast_tree < features.txt > fast-tree.txt
fast_tree_to_cxx_score_bsearch
, fast_tree_to_cxx_score_iterate
, or fast_tree_to_matlab_score_bsearch
.The name describes the target language, and the method by which the score is computed (iteraton or binary search). For monotonic trees, the result is the same, but for the more general non-monotonic trees produced by FAST-ER, the results may be slightly different.
These programs are used in the following way:
fast_tree_to_cxx_score_bsearch NAME fast-tree.txt > fast_tree.cxx
NAME specifies the name of the function. If Matlab code is generated, then it is recommended that NAME is used for an output file NAME.m.
The result is a usable source code file. In the case of generated C++, the file is compatible with libCVD, and the output of the corner detector can be fed to libCVD's nonmax_suppression function. The generated code does not make use of SSE. To do this, you will have to specify weights to learn_fast_tree and modify fast_tree_to_cxx_score_bsearch
to hardwire the initial questions in the tree.
In the case of Matlab, the generated file comes with code to perform nonmaximal suppression if desired. This code is generated in straight Matlab, so corner detection will not be especially fast.