Example program using F&H method to locate matches on a pair of images. More...
#include <vul/vul_arg.h>#include <vimt/vimt_image_2d_of.h>#include <vimt/vimt_gaussian_pyramid_builder_2d.h>#include <vimt/vimt_image_pyramid.h>#include <vimt/vimt_crop.h>#include <vil/algo/vil_corners.h>#include <vil/algo/vil_find_peaks.h>#include <vil/vil_load.h>#include <vil/vil_save.h>#include <vil/vil_fill.h>#include <vil/vil_crop.h>#include <vil/vil_math.h>#include <vil/vil_convert.h>#include <vil/vil_resample_bilin.h>#include <mbl/mbl_index_sort.h>#include <vnl/vnl_math.h>#include <vgl/vgl_point_2d.h>#include <vgl/vgl_vector_2d.h>#include <fhs/fhs_searcher.h>#include <vimt/algo/vimt_normalised_correlation_2d.h>#include <mbl/mbl_minimum_spanning_tree.h>#include <mbl/mbl_draw_line.h>Go to the source code of this file.
Functions | |
| void | print_usage () |
| void | draw_tree (vil_image_view< vxl_byte > &image, const vcl_vector< vgl_point_2d< double > > &pts, const vcl_vector< vcl_pair< int, int > > &pairs) |
| Write tree into the image. | |
| void | get_strongest_corners (const vimt_image &image, vcl_vector< vgl_point_2d< double > > &pts, unsigned max_n) |
| Apply corner operator to image and select strongest corners. | |
| void | extract_normalised_patches (const vimt_image &image, const vcl_vector< vgl_point_2d< double > > &pts, int half_width, vcl_vector< vil_image_view< float > > &patch, vcl_vector< vgl_point_2d< double > > &ref_pts) |
| Sample normalised patches around each point. | |
| unsigned | closest_pt_index (const vcl_vector< vgl_point_2d< double > > &pts, unsigned lo, unsigned hi, vgl_point_2d< double > p) |
| Return index of closest point in pts[lo,hi]. | |
| void | vimt_resample (const vimt_image_2d_of< float > &src_im, int src_L, vimt_image_2d_of< float > &dest_im, int dest_L) |
| Generate a new image with resolution suitable for dest_L. | |
| int | main (int argc, char *argv[]) |
Example program using F&H method to locate matches on a pair of images.
Definition in file mr_find_matches.cxx.
| unsigned closest_pt_index | ( | const vcl_vector< vgl_point_2d< double > > & | pts, |
| unsigned | lo, | ||
| unsigned | hi, | ||
| vgl_point_2d< double > | p | ||
| ) |
Return index of closest point in pts[lo,hi].
Definition at line 137 of file mr_find_matches.cxx.
| void draw_tree | ( | vil_image_view< vxl_byte > & | image, |
| const vcl_vector< vgl_point_2d< double > > & | pts, | ||
| const vcl_vector< vcl_pair< int, int > > & | pairs | ||
| ) |
Write tree into the image.
Draw disks at each point, and lines between linked points
Definition at line 43 of file mr_find_matches.cxx.
| void extract_normalised_patches | ( | const vimt_image & | image, |
| const vcl_vector< vgl_point_2d< double > > & | pts, | ||
| int | half_width, | ||
| vcl_vector< vil_image_view< float > > & | patch, | ||
| vcl_vector< vgl_point_2d< double > > & | ref_pts | ||
| ) |
Sample normalised patches around each point.
Extract patches with given half-width around each pts[i] When near an image edge, patch may be truncated ref_pts defines position of original point relative to the patch origin
Definition at line 101 of file mr_find_matches.cxx.
| void get_strongest_corners | ( | const vimt_image & | image, |
| vcl_vector< vgl_point_2d< double > > & | pts, | ||
| unsigned | max_n | ||
| ) |
Apply corner operator to image and select strongest corners.
Definition at line 62 of file mr_find_matches.cxx.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 172 of file mr_find_matches.cxx.
| void print_usage | ( | ) |
Definition at line 29 of file mr_find_matches.cxx.
| void vimt_resample | ( | const vimt_image_2d_of< float > & | src_im, |
| int | src_L, | ||
| vimt_image_2d_of< float > & | dest_im, | ||
| int | dest_L | ||
| ) |
Generate a new image with resolution suitable for dest_L.
Requires dest_L>src_L, else dest_im is a (shallow) copy of src_im
Definition at line 153 of file mr_find_matches.cxx.
1.7.5.1