NAME

get_keypoint_match - Finds the closest match to the given keypoint in a vector of candidate keypoints.

SYNOPSIS

#include "kpt/keypoint.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int get_keypoint_match
(
	const Keypoint *target_kpt,
	const Keypoint_vector *candidate_kvp,
	const double dist_ratio
);

DESCRIPTION

This routine finds the two nearest neighbors of the given keypoint. The similarity is measured by the Euclidean distance of the keypoint vectors. Based on D. Lowe's "Distinctive image features from scale-invariant keypoints" paper, the cloest match is selected based on the ratio of the distances to the nearest and the second nearest neighbor.

RETURNS

On error, this routine returns ERROR. If the keypoint pointers are NULL, the routine returns NOT_SET. If a match was not found then the routine returns NOT_FOUND, otherwise, On success it returns the index of the keypoint matched to the target.

INPUT

const Keypoint *target_kpt - the keypoint for which to find a match const Keypoint_vector *candidate_kvp - a vector of possible matches const int dist_ratio - a ratio between 2 nearest keypoint matches

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

create_keypoint , get_target_keypoint , copy_keypoint , set_keypoint_from_vector , free_keypoint , read_vl_keypoints_into_matrix , read_vl_keypoint_vector_from_file , extract_selected_keypoints_positions , extract_keypoints_positions , create_keypoint_vector , get_keypoint_vector_from_matrix , copy_keypoint_vector , copy_keypoint_vector_selected_rows , write_vl_keypoint_vector , get_vector_from_keypoint , free_keypoint_vector , get_target_keypoint_vector , create_keypoint_vector_vector , get_target_keypoint_vector_vector , free_keypoint_vector_vector , free_keypoint_vector_descriptors , keypoint_euclidean_distance , get_local_keypoint_match , draw_oriented_keypoint , draw_oriented_keypoint_1 , draw_ubc_keypoints_from_file , fp_draw_vl_keypoints , draw_vl_keypoints_from_file , draw_keypoints_from_keypoint_vector , draw_vl_keypoint_vector_with_mask , draw_vl_keypoint_vector_with_mask_value , draw_keypoint_correspondences , draw_keypoint_matches , draw_keypoint_matches_1 , draw_ransac_matches