Go to the documentation of this file.00001 #ifndef rgrl_util_h_
00002 #define rgrl_util_h_
00003
00004
00005
00006
00007
00008 #include <rgrl/rgrl_transformation_sptr.h>
00009 #include <rgrl/rgrl_weighter_sptr.h>
00010 #include <rgrl/rgrl_scale_sptr.h>
00011 #include <rgrl/rgrl_match_set_sptr.h>
00012 #include <rgrl/rgrl_estimator_sptr.h>
00013 #include <rgrl/rgrl_mask_sptr.h>
00014
00015 #include <vnl/vnl_vector.h>
00016 #include <vcl_iosfwd.h>
00017 #include <vcl_vector.h>
00018 #include <rgrl/rgrl_fwd.h>
00019
00020 class rgrl_match_set;
00021
00022
00023 rgrl_mask_box
00024 rgrl_util_estimate_global_region(
00025 rgrl_mask_sptr const& from_image_roi,
00026 rgrl_mask_sptr const& to_image_roi,
00027 rgrl_mask_box const& current_region,
00028 rgrl_transformation const& curr_xform,
00029 bool union_with_curr = false,
00030 double drastic_change_ratio = 1.75 );
00031
00032
00033
00034 rgrl_mask_box
00035 rgrl_util_estimate_global_region_with_inverse_xform(
00036 rgrl_mask_sptr const& from_image_roi,
00037 rgrl_mask_sptr const& to_image_roi,
00038 rgrl_mask_box const& current_region,
00039 rgrl_transformation const& inv_xform,
00040 bool union_with_curr = false,
00041 double drastic_change_ratio = 1.75 );
00042
00043
00044 double
00045 rgrl_util_geometric_error_scaling( rgrl_match_set const& match_set );
00046
00047 double
00048 rgrl_util_geometric_error_scaling( rgrl_set_of<rgrl_match_set_sptr> const& current_match_sets );
00049
00050
00051 bool
00052 rgrl_util_geometric_scaling_factors( rgrl_set_of<rgrl_match_set_sptr> const& current_match_sets,
00053 vnl_vector<double>& factors );
00054
00055
00056 bool
00057 rgrl_util_geometric_scaling_factors( rgrl_match_set const& current_match_set,
00058 vnl_vector<double>& factors );
00059
00060
00061
00062
00063
00064 void
00065 rgrl_util_extract_region_locations( vnl_vector< double > const& center,
00066 vcl_vector< vnl_vector<double> > const& basis_dirs,
00067 vnl_vector< double > const& basis_radii,
00068 vcl_vector< vnl_vector<int> > & pixel_locations );
00069
00070
00071
00072
00073
00074
00075
00076 bool
00077 rgrl_util_irls( rgrl_match_set_sptr match_set,
00078 rgrl_scale_sptr scale,
00079 rgrl_weighter_sptr weighter,
00080 rgrl_convergence_tester const& conv_tester,
00081 rgrl_estimator_sptr estimator,
00082 rgrl_transformation_sptr & estimate,
00083 const bool fast_remapping = false,
00084 unsigned int debug_flag = 0);
00085
00086
00087
00088
00089
00090
00091
00092 bool
00093 rgrl_util_irls( rgrl_set_of<rgrl_match_set_sptr> const& match_sets,
00094 rgrl_set_of<rgrl_scale_sptr> const& scales,
00095 vcl_vector<rgrl_weighter_sptr> const& weighters,
00096 rgrl_convergence_tester const& conv_tester,
00097 rgrl_estimator_sptr estimator,
00098 rgrl_transformation_sptr& estimate,
00099 const bool fast_remapping = false,
00100 unsigned int debug_flag = 0);
00101
00102
00103 void
00104 rgrl_util_skip_empty_lines( vcl_istream& is );
00105
00106
00107 #endif // rgrl_util_h_