#include <HomgMetric.h>
Public Member Functions | |
HomgMetric () | |
HomgMetric (const ImageMetric *metric) | |
~HomgMetric () | |
vgl_point_2d< double > | homg_to_image (vgl_homg_point_2d< double > const &) const |
vnl_double_2 | homg_to_image (const HomgPoint2D &) const |
void | homg_to_image (const HomgPoint2D &, double *ix, double *iy) const |
void | homg_to_image (vgl_homg_point_2d< double > const &, double &ix, double &iy) const |
vgl_homg_point_2d< double > | image_to_homg (vgl_point_2d< double > const &) const |
HomgPoint2D | image_to_homg (const vnl_double_2 &) const |
HomgPoint2D | image_to_homg (double x, double y) const |
HomgPoint2D | homg_to_imagehomg (const HomgPoint2D &) const |
HomgPoint2D | imagehomg_to_homg (const HomgPoint2D &) const |
vgl_homg_point_2d< double > | homg_to_imagehomg (vgl_homg_point_2d< double > const &) const |
vgl_homg_point_2d< double > | imagehomg_to_homg (vgl_homg_point_2d< double > const &) const |
HomgLine2D | homg_to_image_line (const HomgLine2D &) const |
HomgLine2D | image_to_homg_line (const HomgLine2D &) const |
vgl_homg_line_2d< double > | homg_to_image_line (vgl_homg_line_2d< double > const &) const |
vgl_homg_line_2d< double > | image_to_homg_line (vgl_homg_line_2d< double > const &) const |
HomgLineSeg2D | image_to_homg_line (const HomgLineSeg2D &) const |
HomgLineSeg2D | homg_line_to_image (const HomgLineSeg2D &) const |
double | perp_dist_squared (const HomgPoint2D &, const HomgLine2D &) const |
double | perp_dist_squared (vgl_homg_point_2d< double > const &p, vgl_homg_line_2d< double > const &l) const |
HomgPoint2D | perp_projection (const HomgLine2D &l, const HomgPoint2D &p) const |
vgl_homg_point_2d< double > | perp_projection (vgl_homg_line_2d< double > const &l, vgl_homg_point_2d< double > const &p) const |
double | distance_squared (double x1, double y1, double x2, double y2) const |
double | distance_squared (const HomgPoint2D &, const HomgPoint2D &) const |
double | distance_squared (vgl_homg_point_2d< double > const &, vgl_homg_point_2d< double > const &) const |
double | distance_squared (const HomgLineSeg2D &segment, const HomgLine2D &line) const |
double | distance_squared (vgl_line_segment_2d< double > const &segment, vgl_homg_line_2d< double > const &line) const |
bool | is_within_distance (const HomgPoint2D &, const HomgPoint2D &, double distance) const |
bool | is_within_distance (vgl_homg_point_2d< double > const &, vgl_homg_point_2d< double > const &, double distance) const |
bool | is_linear () const |
Return true if the conditioner's action can be described by a planar homography. | |
vnl_double_3x3 | get_C () const |
Return the planar homography C s.t. C x converts x from conditioned to image coordinates. | |
vnl_double_3x3 | get_C_inverse () const |
Return $C^{-1}$. | |
bool | can_invert_distance () const |
Return true if the metric is rotationally symmetric, i.e. can invert distances. | |
double | image_to_homg_distance (double image_distance) const |
Given that can_invert_distance is true, convert an image distance (in pixels) to a conditioned distance. | |
double | homg_to_image_distance (double homg_distance) const |
Convert a conditioned distance to an image distance. | |
double | image_to_homg_distance_sqr (double image_distance) const |
As above, but for squared distances. | |
double | homg_to_image_distance_sqr (double homg_distance) const |
As above, but for squared distances. | |
vcl_ostream & | print (vcl_ostream &) const |
Print HomgMetric to vcl_ostream. | |
operator const ImageMetric * () const | |
Static Public Member Functions | |
static PMatrix | homg_to_image_P (const PMatrix &, const HomgMetric &c) |
Convert a P matrix to image coordinates if possible. | |
static PMatrix | image_to_homg_P (const PMatrix &, const HomgMetric &c) |
static FMatrix | homg_to_image_F (const FMatrix &, const HomgMetric &c1, const HomgMetric &c2) |
Decondition a fundamental matrix (convert it from conditioned to image coordinates). | |
static FMatrix | image_to_homg_F (const FMatrix &, const HomgMetric &c1, const HomgMetric &c2) |
Condition a fundamental matrix. | |
static TriTensor | homg_to_image_T (const TriTensor &, const HomgMetric &c1, const HomgMetric &c2, const HomgMetric &c3) |
Decondition a trifocal tensor. | |
static TriTensor | image_to_homg_T (const TriTensor &, const HomgMetric &c1, const HomgMetric &c2, const HomgMetric &c3) |
Condition a trifocal tensor. | |
static HMatrix2D | homg_to_image_H (const HMatrix2D &, const HomgMetric &c1, const HomgMetric &c2) |
Decondition a planar homography. | |
static HMatrix2D | image_to_homg_H (const HMatrix2D &, const HomgMetric &c1, const HomgMetric &c2) |
Condition a planar homography. | |
Private Attributes | |
const ImageMetric * | metric_ |
Definition at line 41 of file HomgMetric.h.
HomgMetric::HomgMetric | ( | ) | [inline] |
Definition at line 48 of file HomgMetric.h.
HomgMetric::HomgMetric | ( | const ImageMetric * | metric | ) |
Definition at line 33 of file HomgMetric.cxx.
HomgMetric::~HomgMetric | ( | ) |
Definition at line 38 of file HomgMetric.cxx.
bool HomgMetric::can_invert_distance | ( | ) | const |
Return true if the metric is rotationally symmetric, i.e. can invert distances.
Definition at line 278 of file HomgMetric.cxx.
double HomgMetric::distance_squared | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2 | ||
) | const |
Definition at line 205 of file HomgMetric.cxx.
double HomgMetric::distance_squared | ( | const HomgPoint2D & | p1, |
const HomgPoint2D & | p2 | ||
) | const |
Definition at line 213 of file HomgMetric.cxx.
double HomgMetric::distance_squared | ( | vgl_homg_point_2d< double > const & | p1, |
vgl_homg_point_2d< double > const & | p2 | ||
) | const |
Definition at line 198 of file HomgMetric.cxx.
double HomgMetric::distance_squared | ( | const HomgLineSeg2D & | segment, |
const HomgLine2D & | line | ||
) | const |
Definition at line 230 of file HomgMetric.cxx.
double HomgMetric::distance_squared | ( | vgl_line_segment_2d< double > const & | segment, |
vgl_homg_line_2d< double > const & | line | ||
) | const |
Definition at line 219 of file HomgMetric.cxx.
vnl_double_3x3 HomgMetric::get_C | ( | ) | const |
Return the planar homography C s.t. C x converts x from conditioned to image coordinates.
Definition at line 260 of file HomgMetric.cxx.
vnl_double_3x3 HomgMetric::get_C_inverse | ( | ) | const |
Return $C^{-1}$.
Definition at line 268 of file HomgMetric.cxx.
HomgLineSeg2D HomgMetric::homg_line_to_image | ( | const HomgLineSeg2D & | l | ) | const |
Definition at line 165 of file HomgMetric.cxx.
vgl_point_2d< double > HomgMetric::homg_to_image | ( | vgl_homg_point_2d< double > const & | p | ) | const |
Definition at line 55 of file HomgMetric.cxx.
vnl_double_2 HomgMetric::homg_to_image | ( | const HomgPoint2D & | p | ) | const |
Definition at line 61 of file HomgMetric.cxx.
void HomgMetric::homg_to_image | ( | const HomgPoint2D & | homg, |
double * | ix, | ||
double * | iy | ||
) | const |
Definition at line 67 of file HomgMetric.cxx.
void HomgMetric::homg_to_image | ( | vgl_homg_point_2d< double > const & | homg, |
double & | ix, | ||
double & | iy | ||
) | const |
Definition at line 79 of file HomgMetric.cxx.
double HomgMetric::homg_to_image_distance | ( | double | homg_distance | ) | const |
Convert a conditioned distance to an image distance.
Definition at line 292 of file HomgMetric.cxx.
double HomgMetric::homg_to_image_distance_sqr | ( | double | homg_distance | ) | const |
As above, but for squared distances.
Definition at line 308 of file HomgMetric.cxx.
FMatrix HomgMetric::homg_to_image_F | ( | const FMatrix & | F, |
const HomgMetric & | c1, | ||
const HomgMetric & | c2 | ||
) | [static] |
Decondition a fundamental matrix (convert it from conditioned to image coordinates).
If not possible, print a warning and do it approximately.
Definition at line 338 of file HomgMetric.cxx.
HMatrix2D HomgMetric::homg_to_image_H | ( | const HMatrix2D & | H, |
const HomgMetric & | c1, | ||
const HomgMetric & | c2 | ||
) | [static] |
Decondition a planar homography.
Definition at line 360 of file HomgMetric.cxx.
HomgLine2D HomgMetric::homg_to_image_line | ( | const HomgLine2D & | l | ) | const |
Definition at line 141 of file HomgMetric.cxx.
vgl_homg_line_2d< double > HomgMetric::homg_to_image_line | ( | vgl_homg_line_2d< double > const & | l | ) | const |
Definition at line 135 of file HomgMetric.cxx.
PMatrix HomgMetric::homg_to_image_P | ( | const PMatrix & | P, |
const HomgMetric & | c | ||
) | [static] |
Convert a P matrix to image coordinates if possible.
Definition at line 324 of file HomgMetric.cxx.
TriTensor HomgMetric::homg_to_image_T | ( | const TriTensor & | T, |
const HomgMetric & | c1, | ||
const HomgMetric & | c2, | ||
const HomgMetric & | c3 | ||
) | [static] |
Decondition a trifocal tensor.
Definition at line 382 of file HomgMetric.cxx.
HomgPoint2D HomgMetric::homg_to_imagehomg | ( | const HomgPoint2D & | p | ) | const |
Definition at line 97 of file HomgMetric.cxx.
vgl_homg_point_2d< double > HomgMetric::homg_to_imagehomg | ( | vgl_homg_point_2d< double > const & | p | ) | const |
Definition at line 91 of file HomgMetric.cxx.
vgl_homg_point_2d< double > HomgMetric::image_to_homg | ( | vgl_point_2d< double > const & | p | ) | const |
Definition at line 104 of file HomgMetric.cxx.
HomgPoint2D HomgMetric::image_to_homg | ( | const vnl_double_2 & | p | ) | const |
Definition at line 110 of file HomgMetric.cxx.
HomgPoint2D HomgMetric::image_to_homg | ( | double | x, |
double | y | ||
) | const |
Definition at line 116 of file HomgMetric.cxx.
double HomgMetric::image_to_homg_distance | ( | double | image_distance | ) | const |
Given that can_invert_distance is true, convert an image distance (in pixels) to a conditioned distance.
Definition at line 285 of file HomgMetric.cxx.
double HomgMetric::image_to_homg_distance_sqr | ( | double | image_distance | ) | const |
As above, but for squared distances.
Definition at line 299 of file HomgMetric.cxx.
FMatrix HomgMetric::image_to_homg_F | ( | const FMatrix & | F, |
const HomgMetric & | c1, | ||
const HomgMetric & | c2 | ||
) | [static] |
Condition a fundamental matrix.
Definition at line 349 of file HomgMetric.cxx.
HMatrix2D HomgMetric::image_to_homg_H | ( | const HMatrix2D & | H, |
const HomgMetric & | c1, | ||
const HomgMetric & | c2 | ||
) | [static] |
Condition a planar homography.
Definition at line 371 of file HomgMetric.cxx.
HomgLine2D HomgMetric::image_to_homg_line | ( | const HomgLine2D & | l | ) | const |
Definition at line 153 of file HomgMetric.cxx.
vgl_homg_line_2d< double > HomgMetric::image_to_homg_line | ( | vgl_homg_line_2d< double > const & | l | ) | const |
Definition at line 147 of file HomgMetric.cxx.
HomgLineSeg2D HomgMetric::image_to_homg_line | ( | const HomgLineSeg2D & | l | ) | const |
Definition at line 159 of file HomgMetric.cxx.
PMatrix HomgMetric::image_to_homg_P | ( | const PMatrix & | P, |
const HomgMetric & | c | ||
) | [static] |
Definition at line 330 of file HomgMetric.cxx.
TriTensor HomgMetric::image_to_homg_T | ( | const TriTensor & | T, |
const HomgMetric & | c1, | ||
const HomgMetric & | c2, | ||
const HomgMetric & | c3 | ||
) | [static] |
Condition a trifocal tensor.
Definition at line 393 of file HomgMetric.cxx.
HomgPoint2D HomgMetric::imagehomg_to_homg | ( | const HomgPoint2D & | p | ) | const |
Definition at line 128 of file HomgMetric.cxx.
vgl_homg_point_2d< double > HomgMetric::imagehomg_to_homg | ( | vgl_homg_point_2d< double > const & | p | ) | const |
Definition at line 122 of file HomgMetric.cxx.
bool HomgMetric::is_linear | ( | ) | const |
Return true if the conditioner's action can be described by a planar homography.
Definition at line 253 of file HomgMetric.cxx.
bool HomgMetric::is_within_distance | ( | const HomgPoint2D & | p1, |
const HomgPoint2D & | p2, | ||
double | distance | ||
) | const |
Definition at line 244 of file HomgMetric.cxx.
bool HomgMetric::is_within_distance | ( | vgl_homg_point_2d< double > const & | p1, |
vgl_homg_point_2d< double > const & | p2, | ||
double | distance | ||
) | const |
Definition at line 236 of file HomgMetric.cxx.
HomgMetric::operator const ImageMetric * | ( | ) | const [inline] |
Definition at line 117 of file HomgMetric.h.
double HomgMetric::perp_dist_squared | ( | const HomgPoint2D & | p, |
const HomgLine2D & | l | ||
) | const |
Definition at line 179 of file HomgMetric.cxx.
double HomgMetric::perp_dist_squared | ( | vgl_homg_point_2d< double > const & | p, |
vgl_homg_line_2d< double > const & | l | ||
) | const |
Definition at line 172 of file HomgMetric.cxx.
HomgPoint2D HomgMetric::perp_projection | ( | const HomgLine2D & | l, |
const HomgPoint2D & | p | ||
) | const |
Definition at line 192 of file HomgMetric.cxx.
vgl_homg_point_2d< double > HomgMetric::perp_projection | ( | vgl_homg_line_2d< double > const & | l, |
vgl_homg_point_2d< double > const & | p | ||
) | const |
Definition at line 185 of file HomgMetric.cxx.
vcl_ostream & HomgMetric::print | ( | vcl_ostream & | s | ) | const |
Print HomgMetric to vcl_ostream.
Definition at line 44 of file HomgMetric.cxx.
const ImageMetric* HomgMetric::metric_ [private] |
Definition at line 44 of file HomgMetric.h.