Go to the documentation of this file.00001 #ifndef rgrl_initializer_inv_indexing_h_
00002 #define rgrl_initializer_inv_indexing_h_
00003
00004
00005
00006
00007
00008
00009 #include "rgrl_initializer.h"
00010
00011 #include <vcl_vector.h>
00012
00013 #include "rgrl_view_sptr.h"
00014 #include "rgrl_mask.h"
00015 #include "rgrl_invariant_match_sptr.h"
00016 #include "rgrl_invariant_sptr.h"
00017
00018
00019
00020
00021
00022
00023
00024
00025 class rgrl_initializer_inv_indexing
00026 : public rgrl_initializer
00027 {
00028 public:
00029
00030 rgrl_initializer_inv_indexing( rgrl_view_sptr prior_view,
00031 bool should_estimate_global_region = true,
00032 int max_num_matches_tried = -1);
00033
00034 rgrl_initializer_inv_indexing( rgrl_mask_sptr const& from_image_roi,
00035 rgrl_mask_sptr const& to_image_roi,
00036 rgrl_estimator_sptr xform_estimator = 0,
00037 unsigned initial_resolution = 0,
00038 bool should_estimate_global_region = true,
00039 int max_num_matches_tried = -1);
00040
00041
00042 ~rgrl_initializer_inv_indexing() {}
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 void add_data( vcl_vector<rgrl_invariant_sptr> const& fixed_set,
00053 vcl_vector<rgrl_invariant_sptr> const& moving_set,
00054 double nn_radius = 0,
00055 unsigned int k_nn = 1 );
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 virtual void add_multiple_data( vcl_vector<rgrl_invariant_sptr> const& fixed_set,
00066 vcl_vector<vcl_vector<rgrl_invariant_sptr> > const& moving_sets,
00067 double nn_radius = 0,
00068 unsigned int k_nn = 1);
00069
00070
00071 void set_current_moving_image( unsigned int moving_image_index);
00072
00073
00074 const vcl_vector<rgrl_invariant_match_sptr>& matches_for_moving_image( unsigned int moving_image_index);
00075
00076
00077 bool next_initial( rgrl_view_sptr & view,
00078 rgrl_scale_sptr & prior_scale);
00079
00080
00081
00082 bool next_initial( rgrl_invariant_match_sptr& best_match );
00083
00084
00085
00086 virtual int size() const;
00087
00088
00089 rgrl_type_macro( rgrl_initializer_inv_indexing, rgrl_initializer );
00090
00091 protected:
00092 vcl_vector<vcl_vector<rgrl_invariant_match_sptr> > matches_;
00093 rgrl_view_sptr view_;
00094 bool should_estimate_global_region_;
00095 unsigned int current_moving_image_ind_;
00096 int num_matches_tried_;
00097 int max_num_matches_tried_;
00098 };
00099
00100 #endif