Represents a 2D homography plus radial distortion transformation. More...
#include <rgrl_trans_homo2d_proj_rad.h>
Public Types | |
typedef rgrl_est_proj_func < Tdim, Fdim > | base_type |
enum | UseGradient |
Public Member Functions | |
rgrl_trans_homo2d_proj_rad () | |
Initialize to the identity matrix. | |
rgrl_trans_homo2d_proj_rad (vnl_matrix_fixed< double, 3, 3 > const &H, vcl_vector< double > const &k, vnl_vector_fixed< double, 2 > const &image_centre) | |
Constructor based on an initial transformation and covar estimate. | |
rgrl_trans_homo2d_proj_rad (vnl_matrix< double > const &H) | |
Constructor based on an initial transformation and unknown covar. | |
rgrl_trans_homo2d_proj_rad (vnl_matrix_fixed< double, 3, 3 > const &H, vcl_vector< double > const &k, vnl_vector_fixed< double, 2 > const &image_centre, vnl_matrix< double > const &covar, vnl_vector< double > const &from_centre, vnl_vector< double > const &to_centre) | |
Construct a centered transform. | |
rgrl_trans_homo2d_proj_rad (vcl_vector< double > const &norm_k, vnl_matrix_fixed< double, 3, 3 > const &H, vnl_vector_fixed< double, 2 > const &image_centre) | |
Constructor based on an initial transformation and covar estimate. | |
rgrl_trans_homo2d_proj_rad (vcl_vector< double > const &norm_k, vnl_matrix_fixed< double, 3, 3 > const &H, vnl_vector_fixed< double, 2 > const &image_centre, vnl_matrix< double > const &covar, vnl_vector< double > const &from_centre, vnl_vector< double > const &to_centre) | |
Construct a centered transform. | |
vnl_matrix< double > | transfer_error_covar (vnl_vector< double > const &p) const |
Compute covariance of the transfer error based on transformation covariance. | |
virtual void | jacobian_wrt_loc (vnl_matrix< double > &jac, vnl_vector< double > const &from_loc) const |
Compute jacobian w.r.t. location. | |
rgrl_transformation_sptr | scale_by (double scale) const |
transform the transformation for images of different resolution. | |
virtual double | log_det_covar () const |
log of determinant of the covariance. | |
rgrl_type_macro (rgrl_trans_homo2d_proj_rad, rgrl_transformation) | |
Defines type-related functions. | |
void | write (vcl_ostream &os) const |
for output UNCENTERED transformation, with the origin as the center. | |
bool | read (vcl_istream &is) |
for input. | |
rgrl_transformation_sptr | clone () const |
make a clone copy. | |
vnl_matrix_fixed< double, 3, 3 > | H () const |
The scaling and rotation component of the transform. | |
vcl_vector< double > | radial_params () const |
return unnormalized radial parameters. | |
vcl_vector< double > const & | normalized_radial_params () const |
return the normalized radial parameters. | |
void | map_location (vnl_vector< double > const &from, vnl_vector< double > &to) const |
Apply the transformation to create a new (mapped) location. | |
vnl_vector< double > | map_location (vnl_vector< double > const &p) const |
Apply the transformation to create a new (mapped) location. | |
virtual void | map_tangent (vnl_vector< double > const &from_loc, vnl_vector< double > const &from_dir, vnl_vector< double > &to_dir) const |
Map a tangent direction. | |
virtual void | map_normal (vnl_vector< double > const &from_loc, vnl_vector< double > const &from_dir, vnl_vector< double > &to_dir) const |
Map a normal direction. | |
virtual void | map_normal (vnl_vector< double > const &from_loc, vnl_vector< double > const &from_dir, vnl_matrix< double > const &tangent_subspace, vnl_vector< double > &to_dir) const |
Map a normal direction, given the tangent subspace. | |
void | map_direction (vnl_vector< double > const &from_loc, vnl_vector< double > const &from_dir, vnl_vector< double > &to_dir) const |
Map an arbitrary direction which is neither a tangent nor a normal. | |
virtual double | map_intensity (vnl_vector< double > const &from, double intensity) const |
Apply to an intensity, with a default of the identity. | |
virtual void | inv_map (const vnl_vector< double > &to, bool initialize_next, const vnl_vector< double > &to_delta, vnl_vector< double > &from, vnl_vector< double > &from_next_est) const |
Inverse map with an initial guess. | |
virtual void | inv_map (const vnl_vector< double > &to, vnl_vector< double > &from) const |
Inverse map based on the transformation. | |
vnl_matrix< double > | covar () const |
Parameter covariance matrix. | |
void | set_covar (const vnl_matrix< double > &covar) |
set parameter covariance matrix. | |
bool | is_covar_set () const |
is covariance set?. | |
virtual bool | is_invertible () const |
is this an invertible transformation?. | |
virtual rgrl_transformation_sptr | inverse_transform () const |
Return an inverse transformation. | |
vnl_matrix< double > | jacobian (vnl_vector< double > const &from_loc) const |
Return the jacobian of the transform. | |
void | set_scaling_factors (vnl_vector< double > const &scaling) |
set scaling factors. | |
const vnl_vector< double > & | scaling_factors () const |
return scaling factor. | |
rgrl_type_macro (rgrl_transformation, rgrl_object) | |
virtual bool | is_type (const vcl_type_info &type) const |
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 |
bool | projective_estimate (vnl_matrix_fixed< double, Tdim+1, Fdim+1 > &proj, vcl_vector< double > &rad_dist, vnl_matrix< double > &full_covar, vnl_vector_fixed< double, Fdim > &from_centre, vnl_vector_fixed< double, Tdim > &to_centre, vnl_vector_fixed< double, Tdim > const &camera_centre) |
estimate the projective transformation and the associated covariance. | |
bool | projective_estimate (vnl_matrix_fixed< double, Tdim+1, Fdim+1 > &proj, vnl_matrix< double > &full_covar, vnl_vector_fixed< double, Fdim > &from_centre, vnl_vector_fixed< double, Tdim > &to_centre) |
estimate the projective transformation and the associated covariance. | |
void | f (vnl_vector< double > const &x, vnl_vector< double > &fx) |
obj func value. | |
void | gradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian) |
Jacobian. | |
void | set_image_centre (vnl_vector_fixed< double, Tdim > const &image_centre) |
set image centre. | |
void | set_centres (vnl_vector_fixed< double, Fdim > const &from_centre, vnl_vector_fixed< double, Tdim > const &to_centre, vnl_vector_fixed< double, Tdim > const &image_centre) |
set from, to, and image centres. | |
void | set_centres (vnl_vector_fixed< double, Fdim > const &fc, vnl_vector_fixed< double, Tdim > const &tc) |
double | centre_mag_norm_const () const |
get centred coordinate normalization constant. | |
void | map_loc (vnl_vector_fixed< double, Tdim > &mapped, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vcl_vector< double > const &rad_k, vnl_vector_fixed< double, Fdim > const &from) const |
map a location. | |
void | map_loc (vnl_vector_fixed< double, Tdim > &mapped, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vnl_vector_fixed< double, Fdim > const &from) const |
map a location. | |
void | set_max_num_iter (int max) |
set max number of iterations. | |
int | max_num_iter () const |
return max number of iterations. | |
void | set_rel_thres (double thres) |
set relative threshold for parameters change. | |
double | rel_thres () const |
relative threshold. | |
void | set_zero_svd_thres (double thres) |
set zero singular value threshold for SVD. | |
double | zero_svd_thres () const |
zero singular value threshold. | |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > | uncentre_proj (vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj) const |
uncentre projection matrix. | |
void | throw_failure () |
void | clear_failure () |
void | fdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize) |
void | ffdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize) |
virtual void | trace (int iteration, vnl_vector< double > const &x, vnl_vector< double > const &fx) |
double | rms (vnl_vector< double > const &x) |
unsigned int | get_number_of_unknowns () const |
unsigned int | get_number_of_residuals () const |
bool | has_gradient () const |
bool | vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J) |
bool | vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_matrix< double > &J) |
bool | vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_vector< double > const &y, vnl_matrix< double > &J) |
bool | vnl_discrete_diff_sym (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J) |
bool | vnl_discrete_diff_sym (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_matrix< double > &J) |
Static Public Member Functions | |
static const vcl_type_info & | type_id () |
Public Attributes | |
no_gradient | |
use_gradient | |
bool | failure |
Protected Member Functions | |
void | map_loc (vnl_vector< double > const &from, vnl_vector< double > &to) const |
Apply the transformation to create a new (mapped) location. | |
void | map_dir (vnl_vector< double > const &from_loc, vnl_vector< double > const &from_dir, vnl_vector< double > &to_dir) const |
Apply the transformation to create a new direction at the (mapped) location. | |
void | set_up_rad_k (vcl_vector< double > const &rad_k) |
double | log_det_sym_matrix (vnl_matrix< double > const &m) const |
a slightly better way of computing log of determinant. | |
double | log_det_covar_deficient (int rank) const |
compute the log of determinant of the covariance when the matrix is rank deficient. | |
void | reduced_proj_rad_jacobian (vnl_matrix< double > &base_jac, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vcl_vector< double > const &rad_k, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian. | |
void | full_proj_rad_jacobian (vnl_matrix< double > &base_jac, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vcl_vector< double > const &rad_k, vnl_vector_fixed< double, Fdim > const &from) const |
compute the full jacobian. | |
void | proj_jac_wrt_loc (vnl_matrix_fixed< double, Tdim, Fdim > &jac_loc, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vcl_vector< double > const &rad_k, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian w.r.t. location. | |
void | proj_jac_wrt_loc (vnl_matrix_fixed< double, Tdim, Fdim > &jac_loc, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian w.r.t. location. | |
void | convert_parameters (vnl_vector< double > ¶ms, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj_matrix, vcl_vector< double > const &rad_dist, vnl_vector_fixed< double, Fdim > const &fc, vnl_vector_fixed< double, Tdim > const &tc, vnl_vector_fixed< double, Tdim > const &camera_centre) |
convert parameters. | |
void | convert_parameters (vnl_vector< double > ¶ms, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > proj_matrix, vnl_vector_fixed< double, Fdim > const &fc, vnl_vector_fixed< double, Tdim > const &tc) |
convert parameters. | |
void | apply_radial_distortion (vnl_vector_fixed< double, Tdim > &mapped, vnl_vector_fixed< double, Tdim > const &p, vcl_vector< double > const &rad_k) const |
void | transfer_radial_params_into_temp_storage (vnl_vector< double > const ¶ms) const |
transfer parameters into the temp vector. | |
void | reduced_proj_jacobian (vnl_matrix_fixed< double, Tdim,(Fdim+1)*(Tdim+1)-1 > &base_jac, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian. | |
void | full_proj_jacobian (vnl_matrix_fixed< double, Tdim,(Fdim+1)*(Tdim+1)> &base_jac, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian. | |
void | restored_centered_proj (vnl_matrix_fixed< double, Tdim+1, Fdim+1 > &proj_matrix, vnl_vector< double > const ¶ms) const |
convert parameters. | |
void | init (unsigned int number_of_unknowns, unsigned int number_of_residuals) |
Protected Attributes | |
vnl_matrix< double > | covar_ |
covariance matrix. | |
bool | is_covar_set_ |
flag of setting covariance. | |
vnl_vector< double > | scaling_factors_ |
scaling factors of current transformation on each dimension. | |
unsigned int | camera_dof_ |
vnl_vector_fixed< double, Tdim > | image_centre_ |
double | centre_mag_norm_const_ |
vcl_vector< double > | temp_rad_k_ |
rgrl_set_of < rgrl_match_set_sptr > const * | matches_ptr_ |
vnl_vector_fixed< double, Fdim > | from_centre_ |
vnl_vector_fixed< double, Tdim > | to_centre_ |
unsigned int | index_row_ |
unsigned int | index_col_ |
int | max_num_iterations_ |
specify the maximum number of iterations for this estimator. | |
double | relative_threshold_ |
The threshold for relative parameter change before termination. | |
double | zero_svd_thres_ |
zero singular value threshold. | |
unsigned int | p_ |
unsigned int | n_ |
bool | use_gradient_ |
Static Protected Attributes | |
static const unsigned int | proj_size_ = (Tdim+1)*(Fdim+1) |
Private Attributes | |
vnl_matrix_fixed< double, 3, 3 > | H_ |
vcl_vector< double > | rad_k_ |
Represents a 2D homography plus radial distortion transformation.
A transformation for x'_u=Hx, and x'_d = x'_u + k*radial_dist( x'_u )
Definition at line 16 of file rgrl_trans_homo2d_proj_rad.h.
typedef rgrl_est_proj_func<Tdim, Fdim> rgrl_est_proj_rad_func< Tdim, Fdim >::base_type [inherited] |
Definition at line 21 of file rgrl_est_proj_rad_func.h.
rgrl_trans_homo2d_proj_rad::rgrl_trans_homo2d_proj_rad | ( | ) |
Initialize to the identity matrix.
Definition at line 13 of file rgrl_trans_homo2d_proj_rad.cxx.
rgrl_trans_homo2d_proj_rad::rgrl_trans_homo2d_proj_rad | ( | vnl_matrix_fixed< double, 3, 3 > const & | H, |
vcl_vector< double > const & | k, | ||
vnl_vector_fixed< double, 2 > const & | image_centre | ||
) |
Constructor based on an initial transformation and covar estimate.
The radial parameters are assumed to be unnormalized.
Definition at line 24 of file rgrl_trans_homo2d_proj_rad.cxx.
rgrl_trans_homo2d_proj_rad::rgrl_trans_homo2d_proj_rad | ( | vnl_matrix< double > const & | H | ) |
Constructor based on an initial transformation and unknown covar.
The covariance matrix is a zero matrix.
rgrl_trans_homo2d_proj_rad::rgrl_trans_homo2d_proj_rad | ( | vnl_matrix_fixed< double, 3, 3 > const & | H, |
vcl_vector< double > const & | k, | ||
vnl_vector_fixed< double, 2 > const & | image_centre, | ||
vnl_matrix< double > const & | covar, | ||
vnl_vector< double > const & | from_centre, | ||
vnl_vector< double > const & | to_centre | ||
) |
Construct a centered transform.
The radial parameters are assumed to be unnormalized.
Definition at line 37 of file rgrl_trans_homo2d_proj_rad.cxx.
rgrl_trans_homo2d_proj_rad::rgrl_trans_homo2d_proj_rad | ( | vcl_vector< double > const & | norm_k, |
vnl_matrix_fixed< double, 3, 3 > const & | H, | ||
vnl_vector_fixed< double, 2 > const & | image_centre | ||
) |
Constructor based on an initial transformation and covar estimate.
The radial parameters are assumed to be normalized.
Definition at line 53 of file rgrl_trans_homo2d_proj_rad.cxx.
rgrl_trans_homo2d_proj_rad::rgrl_trans_homo2d_proj_rad | ( | vcl_vector< double > const & | norm_k, |
vnl_matrix_fixed< double, 3, 3 > const & | H, | ||
vnl_vector_fixed< double, 2 > const & | image_centre, | ||
vnl_matrix< double > const & | covar, | ||
vnl_vector< double > const & | from_centre, | ||
vnl_vector< double > const & | to_centre | ||
) |
Construct a centered transform.
The radial parameters are assumed to be normalized.
Definition at line 65 of file rgrl_trans_homo2d_proj_rad.cxx.
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.
void rgrl_est_proj_rad_func< Tdim, Fdim >::apply_radial_distortion | ( | vnl_vector_fixed< double, Tdim > & | mapped, |
vnl_vector_fixed< double, Tdim > const & | p, | ||
vcl_vector< double > const & | rad_k | ||
) | const [protected, inherited] |
convert parameters.
double rgrl_est_proj_rad_func< Tdim, Fdim >::centre_mag_norm_const | ( | ) | const [inline, inherited] |
get centred coordinate normalization constant.
Definition at line 74 of file rgrl_est_proj_rad_func.h.
rgrl_transformation_sptr rgrl_trans_homo2d_proj_rad::clone | ( | ) | const [virtual] |
make a clone copy.
Implements rgrl_transformation.
Definition at line 265 of file rgrl_trans_homo2d_proj_rad.cxx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::convert_parameters | ( | vnl_vector< double > & | params, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj_matrix, | ||
vcl_vector< double > const & | rad_dist, | ||
vnl_vector_fixed< double, Fdim > const & | fc, | ||
vnl_vector_fixed< double, Tdim > const & | tc, | ||
vnl_vector_fixed< double, Tdim > const & | camera_centre | ||
) | [protected, inherited] |
convert parameters.
void rgrl_est_proj_func< Tdim, Fdim >::convert_parameters | ( | vnl_vector< double > & | params, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > | proj_matrix, | ||
vnl_vector_fixed< double, Fdim > const & | fc, | ||
vnl_vector_fixed< double, Tdim > const & | tc | ||
) | [protected, inherited] |
convert parameters.
Definition at line 62 of file rgrl_est_proj_func.txx.
vnl_matrix< double > rgrl_transformation::covar | ( | ) | const [inherited] |
Parameter covariance matrix.
Definition at line 325 of file rgrl_transformation.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.
void rgrl_est_proj_rad_func< Tdim, Fdim >::f | ( | vnl_vector< double > const & | x, |
vnl_vector< double > & | fx | ||
) | [virtual, inherited] |
obj func value.
Reimplemented from rgrl_est_proj_func< Tdim, Fdim >.
void rgrl_est_proj_func< Tdim, Fdim >::full_proj_jacobian | ( | vnl_matrix_fixed< double, Tdim,(Fdim+1)*(Tdim+1)> & | base_jac, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute jacobian.
Definition at line 151 of file rgrl_est_proj_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::full_proj_rad_jacobian | ( | vnl_matrix< double > & | base_jac, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vcl_vector< double > const & | rad_k, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute the full jacobian.
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.
void rgrl_est_proj_rad_func< Tdim, Fdim >::gradf | ( | vnl_vector< double > const & | x, |
vnl_matrix< double > & | jacobian | ||
) | [virtual, inherited] |
Jacobian.
Reimplemented from rgrl_est_proj_func< Tdim, Fdim >.
vnl_matrix_fixed< double, 3, 3 > rgrl_trans_homo2d_proj_rad::H | ( | ) | const |
The scaling and rotation component of the transform.
Definition at line 172 of file rgrl_trans_homo2d_proj_rad.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_transformation::inv_map | ( | const vnl_vector< double > & | to, |
bool | initialize_next, | ||
const vnl_vector< double > & | to_delta, | ||
vnl_vector< double > & | from, | ||
vnl_vector< double > & | from_next_est | ||
) | const [virtual, inherited] |
Inverse map with an initial guess.
Reimplemented in rgrl_trans_spline, rgrl_trans_quadratic, rgrl_trans_reduced_quad, rgrl_trans_affine, rgrl_trans_rigid, rgrl_trans_similarity, rgrl_trans_couple, rgrl_trans_translation, and rgrl_trans_homography2d.
Definition at line 517 of file rgrl_transformation.cxx.
void rgrl_transformation::inv_map | ( | const vnl_vector< double > & | to, |
vnl_vector< double > & | from | ||
) | const [virtual, inherited] |
Inverse map based on the transformation.
This function only exist for certain transformations.
Reimplemented in rgrl_trans_quadratic, rgrl_trans_reduced_quad, rgrl_trans_spline, rgrl_trans_affine, rgrl_trans_rigid, rgrl_trans_similarity, rgrl_trans_rad_dis_homo2d, rgrl_trans_couple, rgrl_trans_translation, and rgrl_trans_homography2d.
Definition at line 598 of file rgrl_transformation.cxx.
rgrl_transformation_sptr rgrl_transformation::inverse_transform | ( | ) | const [virtual, inherited] |
Return an inverse transformation.
This function only exist for certain transformations.
Reimplemented in rgrl_trans_quadratic, rgrl_trans_reduced_quad, rgrl_trans_spline, rgrl_trans_affine, rgrl_trans_rigid, rgrl_trans_similarity, rgrl_trans_couple, rgrl_trans_rad_dis_homo2d, rgrl_trans_translation, and rgrl_trans_homography2d.
Definition at line 610 of file rgrl_transformation.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.
bool rgrl_transformation::is_covar_set | ( | ) | const [inline, inherited] |
is covariance set?.
Definition at line 131 of file rgrl_transformation.h.
virtual bool rgrl_transformation::is_invertible | ( | ) | const [inline, virtual, inherited] |
is this an invertible transformation?.
Reimplemented in rgrl_trans_affine, rgrl_trans_rigid, rgrl_trans_similarity, rgrl_trans_rad_dis_homo2d, rgrl_trans_couple, rgrl_trans_translation, and rgrl_trans_homography2d.
Definition at line 139 of file rgrl_transformation.h.
virtual bool rgrl_object::is_type | ( | const vcl_type_info & | type | ) | const [inline, virtual, inherited] |
Reimplemented in rgrl_scale_estimator.
Definition at line 66 of file rgrl_object.h.
vnl_matrix< double > rgrl_transformation::jacobian | ( | vnl_vector< double > const & | from_loc | ) | const [inherited] |
Return the jacobian of the transform.
use only as backward compatibility
Definition at line 333 of file rgrl_transformation.cxx.
void rgrl_trans_homo2d_proj_rad::jacobian_wrt_loc | ( | vnl_matrix< double > & | jac, |
vnl_vector< double > const & | from_loc | ||
) | const [virtual] |
Compute jacobian w.r.t. location.
Return the jacobian of the transform.
Implements rgrl_transformation.
Definition at line 190 of file rgrl_trans_homo2d_proj_rad.cxx.
virtual double rgrl_trans_homo2d_proj_rad::log_det_covar | ( | ) | const [inline, virtual] |
log of determinant of the covariance.
Reimplemented from rgrl_transformation.
Definition at line 70 of file rgrl_trans_homo2d_proj_rad.h.
double rgrl_transformation::log_det_covar_deficient | ( | int | rank | ) | const [protected, inherited] |
compute the log of determinant of the covariance when the matrix is rank deficient.
Definition at line 258 of file rgrl_transformation.cxx.
double rgrl_transformation::log_det_sym_matrix | ( | vnl_matrix< double > const & | m | ) | const [protected, inherited] |
a slightly better way of computing log of determinant.
Definition at line 238 of file rgrl_transformation.cxx.
void rgrl_trans_homo2d_proj_rad::map_dir | ( | vnl_vector< double > const & | from_loc, |
vnl_vector< double > const & | from_dir, | ||
vnl_vector< double > & | to_dir | ||
) | const [protected, virtual] |
Apply the transformation to create a new direction at the (mapped) location.
The resulting direction to_dir is a unit vector.
Implements rgrl_transformation.
Definition at line 107 of file rgrl_trans_homo2d_proj_rad.cxx.
void rgrl_transformation::map_direction | ( | vnl_vector< double > const & | from_loc, |
vnl_vector< double > const & | from_dir, | ||
vnl_vector< double > & | to_dir | ||
) | const [inherited] |
Map an arbitrary direction which is neither a tangent nor a normal.
The resulting direction to_dir is a unit vector.
Definition at line 52 of file rgrl_transformation.cxx.
double rgrl_transformation::map_intensity | ( | vnl_vector< double > const & | from, |
double | intensity | ||
) | const [virtual, inherited] |
Apply to an intensity, with a default of the identity.
Definition at line 223 of file rgrl_transformation.cxx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::map_loc | ( | vnl_vector_fixed< double, Tdim > & | mapped, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vcl_vector< double > const & | rad_k, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [inline, inherited] |
map a location.
Definition at line 80 of file rgrl_est_proj_rad_func.h.
void rgrl_trans_homo2d_proj_rad::map_loc | ( | vnl_vector< double > const & | from, |
vnl_vector< double > & | to | ||
) | const [protected, virtual] |
Apply the transformation to create a new (mapped) location.
Implements rgrl_transformation.
Definition at line 95 of file rgrl_trans_homo2d_proj_rad.cxx.
void rgrl_est_proj_func< Tdim, Fdim >::map_loc | ( | vnl_vector_fixed< double, Tdim > & | mapped, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [inline, inherited] |
map a location.
Definition at line 120 of file rgrl_est_proj_func.h.
void rgrl_transformation::map_location | ( | vnl_vector< double > const & | from, |
vnl_vector< double > & | to | ||
) | const [inherited] |
Apply the transformation to create a new (mapped) location.
Definition at line 35 of file rgrl_transformation.cxx.
vnl_vector< double > rgrl_transformation::map_location | ( | vnl_vector< double > const & | p | ) | const [inherited] |
Apply the transformation to create a new (mapped) location.
Convenience call to the two parameter version that allocates the result vector.
Definition at line 43 of file rgrl_transformation.cxx.
void rgrl_transformation::map_normal | ( | vnl_vector< double > const & | from_loc, |
vnl_vector< double > const & | from_dir, | ||
vnl_vector< double > & | to_dir | ||
) | const [virtual, inherited] |
Map a normal direction.
The resulting direction to_dir is a unit vector.
Reimplemented in rgrl_trans_couple.
Definition at line 76 of file rgrl_transformation.cxx.
void rgrl_transformation::map_normal | ( | vnl_vector< double > const & | from_loc, |
vnl_vector< double > const & | from_dir, | ||
vnl_matrix< double > const & | tangent_subspace, | ||
vnl_vector< double > & | to_dir | ||
) | const [virtual, inherited] |
Map a normal direction, given the tangent subspace.
The resulting direction to_dir is a unit vector.
Reimplemented in rgrl_trans_couple.
Definition at line 171 of file rgrl_transformation.cxx.
void rgrl_transformation::map_tangent | ( | vnl_vector< double > const & | from_loc, |
vnl_vector< double > const & | from_dir, | ||
vnl_vector< double > & | to_dir | ||
) | const [virtual, inherited] |
Map a tangent direction.
The resulting direction to_dir is a unit vector.
Reimplemented in rgrl_trans_couple.
Definition at line 61 of file rgrl_transformation.cxx.
int rgrl_est_proj_func< Tdim, Fdim >::max_num_iter | ( | ) | const [inline, inherited] |
return max number of iterations.
Definition at line 81 of file rgrl_est_proj_func.h.
vcl_vector<double> const& rgrl_trans_homo2d_proj_rad::normalized_radial_params | ( | ) | const [inline] |
return the normalized radial parameters.
Definition at line 94 of file rgrl_trans_homo2d_proj_rad.h.
void rgrl_est_proj_rad_func< Tdim, Fdim >::proj_jac_wrt_loc | ( | vnl_matrix_fixed< double, Tdim, Fdim > & | jac_loc, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vcl_vector< double > const & | rad_k, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute jacobian w.r.t. location.
void rgrl_est_proj_func< Tdim, Fdim >::proj_jac_wrt_loc | ( | vnl_matrix_fixed< double, Tdim, Fdim > & | jac_loc, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute jacobian w.r.t. location.
Definition at line 211 of file rgrl_est_proj_func.txx.
bool rgrl_est_proj_rad_func< Tdim, Fdim >::projective_estimate | ( | vnl_matrix_fixed< double, Tdim+1, Fdim+1 > & | proj, |
vcl_vector< double > & | rad_dist, | ||
vnl_matrix< double > & | full_covar, | ||
vnl_vector_fixed< double, Fdim > & | from_centre, | ||
vnl_vector_fixed< double, Tdim > & | to_centre, | ||
vnl_vector_fixed< double, Tdim > const & | camera_centre | ||
) | [inherited] |
estimate the projective transformation and the associated covariance.
bool rgrl_est_proj_func< Tdim, Fdim >::projective_estimate | ( | vnl_matrix_fixed< double, Tdim+1, Fdim+1 > & | proj, |
vnl_matrix< double > & | full_covar, | ||
vnl_vector_fixed< double, Fdim > & | from_centre, | ||
vnl_vector_fixed< double, Tdim > & | to_centre | ||
) | [inherited] |
estimate the projective transformation and the associated covariance.
Definition at line 351 of file rgrl_est_proj_func.txx.
vcl_vector< double > rgrl_trans_homo2d_proj_rad::radial_params | ( | ) | const |
return unnormalized radial parameters.
return radial parameters.
Definition at line 273 of file rgrl_trans_homo2d_proj_rad.cxx.
bool rgrl_trans_homo2d_proj_rad::read | ( | vcl_istream & | is | ) | [virtual] |
for input.
Reimplemented from rgrl_transformation.
Definition at line 223 of file rgrl_trans_homo2d_proj_rad.cxx.
void rgrl_est_proj_func< Tdim, Fdim >::reduced_proj_jacobian | ( | vnl_matrix_fixed< double, Tdim,(Fdim+1)*(Tdim+1)-1 > & | base_jac, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute jacobian.
Definition at line 191 of file rgrl_est_proj_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::reduced_proj_rad_jacobian | ( | vnl_matrix< double > & | base_jac, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vcl_vector< double > const & | rad_k, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute jacobian.
double rgrl_est_proj_func< Tdim, Fdim >::rel_thres | ( | ) | const [inline, inherited] |
relative threshold.
Definition at line 89 of file rgrl_est_proj_func.h.
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.
void rgrl_est_proj_func< Tdim, Fdim >::restored_centered_proj | ( | vnl_matrix_fixed< double, Tdim+1, Fdim+1 > & | proj_matrix, |
vnl_vector< double > const & | params | ||
) | const [protected, inherited] |
convert parameters.
Definition at line 242 of file rgrl_est_proj_func.txx.
rgrl_trans_homo2d_proj_rad::rgrl_type_macro | ( | rgrl_trans_homo2d_proj_rad | , |
rgrl_transformation | |||
) |
Defines type-related functions.
rgrl_transformation::rgrl_type_macro | ( | rgrl_transformation | , |
rgrl_object | |||
) | [inherited] |
rgrl_transformation_sptr rgrl_trans_homo2d_proj_rad::scale_by | ( | double | scale | ) | const [virtual] |
transform the transformation for images of different resolution.
Implements rgrl_transformation.
Definition at line 128 of file rgrl_trans_homo2d_proj_rad.cxx.
const vnl_vector<double>& rgrl_transformation::scaling_factors | ( | ) | const [inline, inherited] |
return scaling factor.
Definition at line 170 of file rgrl_transformation.h.
void rgrl_est_proj_rad_func< Tdim, Fdim >::set_centres | ( | vnl_vector_fixed< double, Fdim > const & | from_centre, |
vnl_vector_fixed< double, Tdim > const & | to_centre, | ||
vnl_vector_fixed< double, Tdim > const & | image_centre | ||
) | [inline, inherited] |
set from, to, and image centres.
Definition at line 60 of file rgrl_est_proj_rad_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::set_centres | ( | vnl_vector_fixed< double, Fdim > const & | fc, |
vnl_vector_fixed< double, Tdim > const & | tc | ||
) | [inline, inherited] |
Definition at line 69 of file rgrl_est_proj_func.h.
void rgrl_transformation::set_covar | ( | const vnl_matrix< double > & | covar | ) | [inherited] |
set parameter covariance matrix.
Reimplemented in rgrl_trans_spline.
Definition at line 344 of file rgrl_transformation.cxx.
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_est_proj_rad_func< Tdim, Fdim >::set_image_centre | ( | vnl_vector_fixed< double, Tdim > const & | image_centre | ) | [inline, inherited] |
set image centre.
Definition at line 49 of file rgrl_est_proj_rad_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::set_max_num_iter | ( | int | max | ) | [inline, inherited] |
set max number of iterations.
Definition at line 77 of file rgrl_est_proj_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::set_rel_thres | ( | double | thres | ) | [inline, inherited] |
set relative threshold for parameters change.
Definition at line 85 of file rgrl_est_proj_func.h.
void rgrl_transformation::set_scaling_factors | ( | vnl_vector< double > const & | scaling | ) | [inherited] |
set scaling factors.
Unless the transformation is not estimated using estimators in rgrl, it does not need to be set explicitly
Definition at line 357 of file rgrl_transformation.cxx.
void rgrl_trans_homo2d_proj_rad::set_up_rad_k | ( | vcl_vector< double > const & | rad_k | ) | [protected] |
Definition at line 81 of file rgrl_trans_homo2d_proj_rad.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.
void rgrl_est_proj_func< Tdim, Fdim >::set_zero_svd_thres | ( | double | thres | ) | [inline, inherited] |
set zero singular value threshold for SVD.
Definition at line 93 of file rgrl_est_proj_func.h.
vnl_matrix< double > rgrl_trans_homo2d_proj_rad::transfer_error_covar | ( | vnl_vector< double > const & | p | ) | const [virtual] |
Compute covariance of the transfer error based on transformation covariance.
This gives the additional uncertainty of the transferred point location due to the uncertainty of the transform estimate.
Implements rgrl_transformation.
Definition at line 179 of file rgrl_trans_homo2d_proj_rad.cxx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::transfer_radial_params_into_temp_storage | ( | vnl_vector< double > const & | params | ) | const [protected, inherited] |
transfer parameters into the temp vector.
static const vcl_type_info& rgrl_object::type_id | ( | ) | [inline, static, inherited] |
Reimplemented in rgrl_scale_estimator.
Definition at line 63 of file rgrl_object.h.
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > rgrl_est_proj_func< Tdim, Fdim >::uncentre_proj | ( | vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj | ) | const [inherited] |
uncentre projection matrix.
uncenter projection matrix.
Definition at line 123 of file rgrl_est_proj_func.txx.
bool rgrl_object::warning | ( | ) | const [inherited] |
Get the warning flag.
Definition at line 40 of file rgrl_object.cxx.
void rgrl_trans_homo2d_proj_rad::write | ( | vcl_ostream & | os | ) | const [virtual] |
for output UNCENTERED transformation, with the origin as the center.
Reimplemented from rgrl_transformation.
Definition at line 200 of file rgrl_trans_homo2d_proj_rad.cxx.
double rgrl_est_proj_func< Tdim, Fdim >::zero_svd_thres | ( | ) | const [inline, inherited] |
zero singular value threshold.
Definition at line 97 of file rgrl_est_proj_func.h.
unsigned int rgrl_est_proj_rad_func< Tdim, Fdim >::camera_dof_ [protected, inherited] |
Definition at line 137 of file rgrl_est_proj_rad_func.h.
double rgrl_est_proj_rad_func< Tdim, Fdim >::centre_mag_norm_const_ [protected, inherited] |
Definition at line 139 of file rgrl_est_proj_rad_func.h.
vnl_matrix<double> rgrl_transformation::covar_ [protected, inherited] |
covariance matrix.
Unlike transformation parameters, covariance is always a mtrix of double.
Definition at line 205 of file rgrl_transformation.h.
vnl_vector_fixed<double, Fdim> rgrl_est_proj_func< Tdim, Fdim >::from_centre_ [protected, inherited] |
Definition at line 160 of file rgrl_est_proj_func.h.
vnl_matrix_fixed<double,3,3> rgrl_trans_homo2d_proj_rad::H_ [private] |
Definition at line 20 of file rgrl_trans_homo2d_proj_rad.h.
vnl_vector_fixed<double, Tdim> rgrl_est_proj_rad_func< Tdim, Fdim >::image_centre_ [protected, inherited] |
Definition at line 138 of file rgrl_est_proj_rad_func.h.
unsigned int rgrl_est_proj_func< Tdim, Fdim >::index_col_ [protected, inherited] |
Definition at line 164 of file rgrl_est_proj_func.h.
unsigned int rgrl_est_proj_func< Tdim, Fdim >::index_row_ [protected, inherited] |
Definition at line 163 of file rgrl_est_proj_func.h.
bool rgrl_transformation::is_covar_set_ [protected, inherited] |
flag of setting covariance.
Check it before using covariance matrix
Definition at line 209 of file rgrl_transformation.h.
rgrl_set_of<rgrl_match_set_sptr> const* rgrl_est_proj_func< Tdim, Fdim >::matches_ptr_ [protected, inherited] |
Definition at line 159 of file rgrl_est_proj_func.h.
int rgrl_est_proj_func< Tdim, Fdim >::max_num_iterations_ [protected, inherited] |
specify the maximum number of iterations for this estimator.
Definition at line 166 of file rgrl_est_proj_func.h.
const unsigned int rgrl_est_proj_func< Tdim, Fdim >::proj_size_ = (Tdim+1)*(Fdim+1) [static, protected, inherited] |
Definition at line 157 of file rgrl_est_proj_func.h.
vcl_vector<double> rgrl_trans_homo2d_proj_rad::rad_k_ [private] |
Definition at line 21 of file rgrl_trans_homo2d_proj_rad.h.
double rgrl_est_proj_func< Tdim, Fdim >::relative_threshold_ [protected, inherited] |
The threshold for relative parameter change before termination.
Definition at line 169 of file rgrl_est_proj_func.h.
vnl_vector<double> rgrl_transformation::scaling_factors_ [protected, inherited] |
scaling factors of current transformation on each dimension.
This is computed from current transformation. And it has nothing to do with how to transform points
Definition at line 214 of file rgrl_transformation.h.
vcl_vector<double> rgrl_est_proj_rad_func< Tdim, Fdim >::temp_rad_k_ [mutable, protected, inherited] |
Definition at line 140 of file rgrl_est_proj_rad_func.h.
vnl_vector_fixed<double, Tdim> rgrl_est_proj_func< Tdim, Fdim >::to_centre_ [protected, inherited] |
Definition at line 161 of file rgrl_est_proj_func.h.
double rgrl_est_proj_func< Tdim, Fdim >::zero_svd_thres_ [protected, inherited] |
zero singular value threshold.
Definition at line 172 of file rgrl_est_proj_func.h.