Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
rgrl_scale_est_closest Class Reference

Unweighted scale estimator using closest of the match points. More...

#include <rgrl_scale_est_closest.h>

Inheritance diagram for rgrl_scale_est_closest:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 rgrl_scale_est_closest (vcl_auto_ptr< rrel_objective > obj, bool do_signature_scale=false)
 obj is the objective function that will be used to estimate a robust scale.
 ~rgrl_scale_est_closest ()
rgrl_scale_sptr estimate_unweighted (rgrl_match_set const &match_set, rgrl_scale_sptr const &current_scales, bool penalize_scaling=false) const
 Estimated an unweighted scale.
rgrl_scale_sptr estimate_weighted (rgrl_match_set const &match_set, rgrl_scale_sptr const &current_scales, bool use_signature_only=false, bool penalize_scaling=false) const
 Estimated a weighted scale.
 rgrl_type_macro (rgrl_scale_est_closest, rgrl_scale_estimator)
virtual bool is_type (const vcl_type_info &type) const
 rgrl_type_macro (rgrl_scale_estimator_unwgted, rgrl_object)
 rgrl_type_macro (rgrl_scale_estimator_wgted, rgrl_object)
void set_debug_flag (unsigned int debugFlag) const
 Set the value of the debug flag. A non-zero value turns debugging on.
unsigned int debug_flag () const
 Get the value of the debug flag.
void set_warning (bool) const
 Set the flag for warning messages.
bool warning () const
 Get the warning flag.
unsigned int add_observer (rgrl_event_sptr event, rgrl_command_sptr)
 Allow people to add/remove/invoke observers (callbacks) to any rgrl object.
rgrl_command_sptr get_command (unsigned int tag)
 Get the command associated with the given tag.
void invoke_event (const rgrl_event &)
 Call execute(.) on all the rgrl_commands observing this event id.
void invoke_event (const rgrl_event &) const
 Call execute(.) on all the rgrl_commands observing this event id.
void remove_observer (unsigned int tag)
 Remove the observer with this tag value.
bool has_observer (const rgrl_event &event) const
 Return true if an observer is registered for this event.
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Static Public Member Functions

static const vcl_type_info & type_id ()

Protected Attributes

bool do_signature_scale_
vcl_auto_ptr< rrel_objectiveobj_

Private Member Functions

 rgrl_scale_est_closest (rgrl_scale_est_closest const &)
rgrl_scale_est_closestoperator= (rgrl_scale_est_closest const &)
bool compute_geometric_scale (double &scale, rgrl_match_set const &match_set, bool penalize_scaling) const
bool compute_signature_inv_covar (vnl_matrix< double > &covar, rgrl_match_set const &match_set) const

Detailed Description

Unweighted scale estimator using closest of the match points.

This can also be used as a weighted scale estimator, albeit one that just ignores the weights.

The scale estimator is able to estimate both the geometric scale and the signature error in the form of the covariance matrix. The latter is optional (do_signature_scale). In practice, if other components for the registration engine require the use of signature_error_vector, the do_signature_scale should be set to true for the constructor.

Definition at line 28 of file rgrl_scale_est_closest.h.


Constructor & Destructor Documentation

rgrl_scale_est_closest::rgrl_scale_est_closest ( vcl_auto_ptr< rrel_objective obj,
bool  do_signature_scale = false 
)

obj is the objective function that will be used to estimate a robust scale.

The one that is commonly used is the MUSE objective function. The flag do_signature_scale determines whether a signature covariance will be estimated.

Definition at line 18 of file rgrl_scale_est_closest.cxx.

rgrl_scale_est_closest::~rgrl_scale_est_closest ( )

Definition at line 28 of file rgrl_scale_est_closest.cxx.

rgrl_scale_est_closest::rgrl_scale_est_closest ( rgrl_scale_est_closest const &  ) [private]

Member Function Documentation

unsigned int rgrl_object::add_observer ( rgrl_event_sptr  event,
rgrl_command_sptr  cmd 
) [inherited]

Allow people to add/remove/invoke observers (callbacks) to any rgrl object.

This is an implementation of the subject/observer design pattern. An observer is added by specifying an event to respond to and an rgrl_command to execute. It returns an unsigned long tag which can be used later to remove the event or retrieve the command.

Definition at line 47 of file rgrl_object.cxx.

bool rgrl_scale_est_closest::compute_geometric_scale ( double &  scale,
rgrl_match_set const &  match_set,
bool  penalize_scaling 
) const [private]

Definition at line 57 of file rgrl_scale_est_closest.cxx.

bool rgrl_scale_est_closest::compute_signature_inv_covar ( vnl_matrix< double > &  covar,
rgrl_match_set const &  match_set 
) const [private]

Definition at line 124 of file rgrl_scale_est_closest.cxx.

unsigned int rgrl_object::debug_flag ( ) const [inherited]

Get the value of the debug flag.

Definition at line 26 of file rgrl_object.cxx.

rgrl_scale_sptr rgrl_scale_est_closest::estimate_unweighted ( rgrl_match_set const &  match_set,
rgrl_scale_sptr const &  current_scales,
bool  penalize_scaling = false 
) const [virtual]

Estimated an unweighted scale.

match_set stores the current matches, and, if not null, current_scales has the current scale estimates. (Perhaps from the previous iteration.)

Implements rgrl_scale_estimator_unwgted.

Definition at line 35 of file rgrl_scale_est_closest.cxx.

rgrl_scale_sptr rgrl_scale_est_closest::estimate_weighted ( rgrl_match_set const &  match_set,
rgrl_scale_sptr const &  current_scales,
bool  use_signature_only = false,
bool  penalize_scaling = false 
) const [virtual]

Estimated a weighted scale.

match_set stores the current matches, and, if not null, current_scales has the current scale estimates. (Perhaps from the previous iteration.)

Implements rgrl_scale_estimator_wgted.

Definition at line 198 of file rgrl_scale_est_closest.cxx.

rgrl_command_sptr rgrl_object::get_command ( unsigned int  tag) [inherited]

Get the command associated with the given tag.

Definition at line 57 of file rgrl_object.cxx.

bool rgrl_object::has_observer ( const rgrl_event event) const [inherited]

Return true if an observer is registered for this event.

Definition at line 107 of file rgrl_object.cxx.

void rgrl_object::invoke_event ( const rgrl_event event) [inherited]

Call execute(.) on all the rgrl_commands observing this event id.

Definition at line 69 of file rgrl_object.cxx.

void rgrl_object::invoke_event ( const rgrl_event event) const [inherited]

Call execute(.) on all the rgrl_commands observing this event id.

The actions triggered by this call doesn't modify this object.

Definition at line 83 of file rgrl_object.cxx.

virtual bool rgrl_scale_estimator::is_type ( const vcl_type_info &  type) const [inline, virtual, inherited]

Reimplemented from rgrl_object.

Definition at line 100 of file rgrl_scale_estimator.h.

rgrl_scale_est_closest& rgrl_scale_est_closest::operator= ( rgrl_scale_est_closest const &  ) [private]
void rgrl_object::remove_observer ( unsigned int  tag) [inherited]

Remove the observer with this tag value.

Definition at line 97 of file rgrl_object.cxx.

rgrl_scale_estimator_unwgted::rgrl_type_macro ( rgrl_scale_estimator_unwgted  ,
rgrl_object   
) [inherited]
rgrl_scale_est_closest::rgrl_type_macro ( rgrl_scale_est_closest  ,
rgrl_scale_estimator   
)
rgrl_scale_estimator_wgted::rgrl_type_macro ( rgrl_scale_estimator_wgted  ,
rgrl_object   
) [inherited]
void rgrl_object::set_debug_flag ( unsigned int  debugFlag) const [inherited]

Set the value of the debug flag. A non-zero value turns debugging on.

Definition at line 19 of file rgrl_object.cxx.

void rgrl_object::set_warning ( bool  flag) const [inherited]

Set the flag for warning messages.

Definition at line 33 of file rgrl_object.cxx.

static const vcl_type_info& rgrl_scale_estimator::type_id ( ) [inline, static, inherited]

Reimplemented from rgrl_object.

Definition at line 97 of file rgrl_scale_estimator.h.

bool rgrl_object::warning ( ) const [inherited]

Get the warning flag.

Definition at line 40 of file rgrl_object.cxx.


Member Data Documentation

Definition at line 71 of file rgrl_scale_est_closest.h.

vcl_auto_ptr<rrel_objective> rgrl_scale_est_closest::obj_ [protected]

Definition at line 72 of file rgrl_scale_est_closest.h.


The documentation for this class was generated from the following files: