Go to the documentation of this file.00001 #ifndef rgrl_matcher_k_nearest_boundary_h_
00002 #define rgrl_matcher_k_nearest_boundary_h_
00003
00004
00005
00006
00007
00008 #include "rgrl_matcher_k_nearest.h"
00009 #include "rgrl_feature_sptr.h"
00010
00011 #include <vcl_vector.h>
00012 #include <vbl/vbl_array_2d.h>
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 class rgrl_matcher_k_nearest_boundary
00023 : public rgrl_matcher_k_nearest
00024 {
00025 public:
00026
00027
00028 rgrl_matcher_k_nearest_boundary( unsigned int k );
00029
00030
00031
00032
00033
00034
00035
00036 rgrl_matcher_k_nearest_boundary( unsigned int k, double dist_thres );
00037
00038 rgrl_match_set_sptr
00039 compute_matches( rgrl_feature_set const& from_features,
00040 rgrl_feature_set const& to_features,
00041 rgrl_view const& current_view,
00042 rgrl_transformation const& current_xform,
00043 rgrl_scale const& ,
00044 rgrl_match_set_sptr const& old_matches = 0 );
00045
00046
00047 rgrl_type_macro( rgrl_matcher_k_nearest_boundary, rgrl_matcher_k_nearest);
00048
00049 private:
00050 typedef vcl_vector<rgrl_feature_sptr > feature_vector;
00051
00052
00053 vbl_array_2d<bool>
00054 match_boundary_pts(feature_vector const& mapped_bd_pts,
00055 feature_vector const& to_boundary_pts) const;
00056
00057
00058 vbl_array_2d<bool>
00059 match_boundary_pts_helper(vbl_array_2d<double> const& dist_error,
00060 vbl_array_2d<bool> const& valid,
00061 int count,
00062 double& obj_value) const;
00063 };
00064
00065 #endif // rgrl_matcher_k_nearest_boundary_h_