#include <ImageMetric.h>
Public Member Functions | |
ImageMetric () | |
virtual | ~ImageMetric () |
virtual vgl_homg_point_2d< double > | homg_to_imagehomg (vgl_homg_point_2d< double > const &) const |
Convert homogeneous point in conditioned coordinates to one in image coordinates. | |
virtual vgl_homg_point_2d< double > | imagehomg_to_homg (vgl_homg_point_2d< double > const &) const |
Convert homogeneous point in image coordinates to one in conditioned coordinates. | |
virtual HomgPoint2D | homg_to_imagehomg (const HomgPoint2D &) const |
virtual HomgPoint2D | imagehomg_to_homg (const HomgPoint2D &) const |
virtual vgl_point_2d< double > | homg_to_image (vgl_homg_point_2d< double > const &) const |
Convert conditioned point p to image coordinates. | |
virtual vnl_double_2 | homg_to_image (const HomgPoint2D &) const |
virtual vgl_homg_point_2d< double > | image_to_homg (vgl_point_2d< double > const &) const |
Condition the 2D point p. | |
virtual HomgPoint2D | image_to_homg (const vnl_double_2 &) const |
Condition the 2D point p. | |
virtual HomgPoint2D | image_to_homg (double x, double y) const |
Condition 2D point (x,y). | |
virtual vgl_homg_line_2d< double > | homg_to_image_line (vgl_homg_line_2d< double > const &) const |
Convert homogeneous line in conditioned coordinates to one in image coordinates. | |
virtual vgl_homg_line_2d< double > | image_to_homg_line (vgl_homg_line_2d< double > const &) const |
virtual HomgLine2D | homg_to_image_line (const HomgLine2D &) const |
virtual HomgLine2D | image_to_homg_line (const HomgLine2D &) const |
virtual HomgLineSeg2D | image_to_homg_line (const HomgLineSeg2D &) const |
virtual vgl_line_segment_2d < double > | image_to_homg_line (vgl_line_segment_2d< double > const &l) const |
virtual HomgLineSeg2D | homg_line_to_image (const HomgLineSeg2D &) const |
virtual vgl_line_segment_2d < double > | homg_line_to_image (vgl_line_segment_2d< double > const &l) const |
Convert homogeneous line segment in conditioned coordinates to one in image coordinates. | |
virtual double | perp_dist_squared (const HomgPoint2D &, const HomgLine2D &) const |
virtual double | perp_dist_squared (vgl_homg_point_2d< double > const &, vgl_homg_line_2d< double > const &) const |
Compute perpendicular distance in image coordinates between point p and line l, expressed in conditioned coordinates. | |
virtual HomgPoint2D | perp_projection (const HomgLine2D &l, const HomgPoint2D &p) const |
virtual vgl_homg_point_2d< double > | perp_projection (vgl_homg_line_2d< double > const &l, vgl_homg_point_2d< double > const &p) const |
Project point onto line. | |
virtual double | distance_squared (const HomgPoint2D &, const HomgPoint2D &) const |
virtual double | distance_squared (const HomgLineSeg2D &segment, const HomgLine2D &line) const |
virtual double | distance_squared (const vgl_homg_point_2d< double > &, const vgl_homg_point_2d< double > &) const |
Get perpendicular distance in image. | |
virtual double | distance_squared (vgl_line_segment_2d< double > const &segment, vgl_homg_line_2d< double > const &line) const |
Get distance between a line segment and an infinite line. | |
virtual bool | is_within_distance (const HomgPoint2D &, const HomgPoint2D &, double distance) const |
virtual bool | is_within_distance (vgl_homg_point_2d< double > const &, vgl_homg_point_2d< double > const &, double distance) const |
virtual vnl_double_3x3 | get_C () const |
Return conditioning matrix C that converts homogeneous image points to homogeneous conditioned points. | |
virtual vnl_double_3x3 | get_C_inverse () const |
Return conditioning matrix C that converts homogeneous conditioned points to image coordinates. | |
virtual bool | is_linear () const |
Return true if the action of the conditioner can be represented as a planar homography. | |
virtual bool | can_invert_distance () const |
Return true if the invert_distance function makes sense. | |
virtual double | image_to_homg_distance (double image_distance) const |
Convert a distance in image coordinates to one in conditioned coordinates. | |
virtual double | homg_to_image_distance (double image_distance) const |
Convert a distance in image coordinates to one in conditioned coordinates. | |
virtual vcl_ostream & | print (vcl_ostream &s) const |
Static Public Member Functions | |
static FMatrix | decondition (const FMatrix &F, const ImageMetric *c1, const ImageMetric *c2) |
Friends | |
vcl_ostream & | operator<< (vcl_ostream &o, const ImageMetric &m) |
Definition at line 41 of file ImageMetric.h.
ImageMetric::ImageMetric | ( | ) | [inline] |
Definition at line 45 of file ImageMetric.h.
virtual ImageMetric::~ImageMetric | ( | ) | [inline, virtual] |
Definition at line 46 of file ImageMetric.h.
bool ImageMetric::can_invert_distance | ( | ) | const [virtual] |
Return true if the invert_distance function makes sense.
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 274 of file ImageMetric.cxx.
FMatrix ImageMetric::decondition | ( | const FMatrix & | F, |
const ImageMetric * | c1, | ||
const ImageMetric * | c2 | ||
) | [static] |
Definition at line 308 of file ImageMetric.cxx.
double ImageMetric::distance_squared | ( | const HomgPoint2D & | p1, |
const HomgPoint2D & | p2 | ||
) | const [virtual] |
Reimplemented in SimilarityMetric.
Definition at line 221 of file ImageMetric.cxx.
double ImageMetric::distance_squared | ( | const HomgLineSeg2D & | segment, |
const HomgLine2D & | line | ||
) | const [virtual] |
Reimplemented in SimilarityMetric.
Definition at line 236 of file ImageMetric.cxx.
double ImageMetric::distance_squared | ( | const vgl_homg_point_2d< double > & | p1, |
const vgl_homg_point_2d< double > & | p2 | ||
) | const [virtual] |
Get perpendicular distance in image.
Reimplemented in SimilarityMetric.
Definition at line 215 of file ImageMetric.cxx.
double ImageMetric::distance_squared | ( | vgl_line_segment_2d< double > const & | segment, |
vgl_homg_line_2d< double > const & | line | ||
) | const [virtual] |
Get distance between a line segment and an infinite line.
The metric used is the maximum of the two endpoint perp distances.
Reimplemented in SimilarityMetric.
Definition at line 228 of file ImageMetric.cxx.
vnl_double_3x3 ImageMetric::get_C | ( | ) | const [virtual] |
Return conditioning matrix C that converts homogeneous image points to homogeneous conditioned points.
If the ImageMetric used is nonlinear, then we'll have to make other arrangements...
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 291 of file ImageMetric.cxx.
vnl_double_3x3 ImageMetric::get_C_inverse | ( | ) | const [virtual] |
Return conditioning matrix C that converts homogeneous conditioned points to image coordinates.
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 299 of file ImageMetric.cxx.
HomgLineSeg2D ImageMetric::homg_line_to_image | ( | const HomgLineSeg2D & | l | ) | const [virtual] |
Definition at line 155 of file ImageMetric.cxx.
vgl_line_segment_2d< double > ImageMetric::homg_line_to_image | ( | vgl_line_segment_2d< double > const & | l | ) | const [virtual] |
Convert homogeneous line segment in conditioned coordinates to one in image coordinates.
Definition at line 147 of file ImageMetric.cxx.
vgl_point_2d< double > ImageMetric::homg_to_image | ( | vgl_homg_point_2d< double > const & | p | ) | const [virtual] |
Convert conditioned point p to image coordinates.
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 56 of file ImageMetric.cxx.
vnl_double_2 ImageMetric::homg_to_image | ( | const HomgPoint2D & | p | ) | const [virtual] |
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 62 of file ImageMetric.cxx.
double ImageMetric::homg_to_image_distance | ( | double | image_distance | ) | const [virtual] |
Convert a distance in image coordinates to one in conditioned coordinates.
This is only possible for similarity transformations, but where it does make sense it can mean significant increases in speed.
Reimplemented in SimilarityMetric.
Definition at line 258 of file ImageMetric.cxx.
vgl_homg_line_2d< double > ImageMetric::homg_to_image_line | ( | vgl_homg_line_2d< double > const & | l | ) | const [virtual] |
Convert homogeneous line in conditioned coordinates to one in image coordinates.
Definition at line 93 of file ImageMetric.cxx.
HomgLine2D ImageMetric::homg_to_image_line | ( | const HomgLine2D & | l | ) | const [virtual] |
Definition at line 106 of file ImageMetric.cxx.
vgl_homg_point_2d< double > ImageMetric::homg_to_imagehomg | ( | vgl_homg_point_2d< double > const & | x | ) | const [virtual] |
Convert homogeneous point in conditioned coordinates to one in image coordinates.
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 82 of file ImageMetric.cxx.
HomgPoint2D ImageMetric::homg_to_imagehomg | ( | const HomgPoint2D & | x | ) | const [virtual] |
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 87 of file ImageMetric.cxx.
vgl_homg_point_2d< double > ImageMetric::image_to_homg | ( | vgl_point_2d< double > const & | p | ) | const [virtual] |
Condition the 2D point p.
Default implementation is simply to return p in homogeneous coordinates
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 34 of file ImageMetric.cxx.
HomgPoint2D ImageMetric::image_to_homg | ( | const vnl_double_2 & | p | ) | const [virtual] |
Condition the 2D point p.
Default implementation is simply to return p in homogeneous coordinates
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 42 of file ImageMetric.cxx.
HomgPoint2D ImageMetric::image_to_homg | ( | double | x, |
double | y | ||
) | const [virtual] |
Condition 2D point (x,y).
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 49 of file ImageMetric.cxx.
double ImageMetric::image_to_homg_distance | ( | double | image_distance | ) | const [virtual] |
Convert a distance in image coordinates to one in conditioned coordinates.
This is only possible for similarity transformations, but where it does make sense it can mean significant increases in speed.
Reimplemented in SimilarityMetric.
Definition at line 267 of file ImageMetric.cxx.
vgl_homg_line_2d< double > ImageMetric::image_to_homg_line | ( | vgl_homg_line_2d< double > const & | l | ) | const [virtual] |
Definition at line 119 of file ImageMetric.cxx.
HomgLine2D ImageMetric::image_to_homg_line | ( | const HomgLine2D & | l | ) | const [virtual] |
Definition at line 132 of file ImageMetric.cxx.
HomgLineSeg2D ImageMetric::image_to_homg_line | ( | const HomgLineSeg2D & | l | ) | const [virtual] |
Definition at line 170 of file ImageMetric.cxx.
vgl_line_segment_2d< double > ImageMetric::image_to_homg_line | ( | vgl_line_segment_2d< double > const & | l | ) | const [virtual] |
Definition at line 163 of file ImageMetric.cxx.
vgl_homg_point_2d< double > ImageMetric::imagehomg_to_homg | ( | vgl_homg_point_2d< double > const & | x | ) | const [virtual] |
Convert homogeneous point in image coordinates to one in conditioned coordinates.
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 71 of file ImageMetric.cxx.
HomgPoint2D ImageMetric::imagehomg_to_homg | ( | const HomgPoint2D & | x | ) | const [virtual] |
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 76 of file ImageMetric.cxx.
bool ImageMetric::is_linear | ( | ) | const [virtual] |
Return true if the action of the conditioner can be represented as a planar homography.
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 282 of file ImageMetric.cxx.
bool ImageMetric::is_within_distance | ( | const HomgPoint2D & | p1, |
const HomgPoint2D & | p2, | ||
double | distance | ||
) | const [virtual] |
Definition at line 250 of file ImageMetric.cxx.
bool ImageMetric::is_within_distance | ( | vgl_homg_point_2d< double > const & | p1, |
vgl_homg_point_2d< double > const & | p2, | ||
double | distance | ||
) | const [virtual] |
Definition at line 243 of file ImageMetric.cxx.
double ImageMetric::perp_dist_squared | ( | const HomgPoint2D & | p, |
const HomgLine2D & | l | ||
) | const [virtual] |
Reimplemented in SimilarityMetric.
Definition at line 186 of file ImageMetric.cxx.
double ImageMetric::perp_dist_squared | ( | vgl_homg_point_2d< double > const & | p, |
vgl_homg_line_2d< double > const & | l | ||
) | const [virtual] |
Compute perpendicular distance in image coordinates between point p and line l, expressed in conditioned coordinates.
Reimplemented in SimilarityMetric.
Definition at line 180 of file ImageMetric.cxx.
HomgPoint2D ImageMetric::perp_projection | ( | const HomgLine2D & | l, |
const HomgPoint2D & | p | ||
) | const [virtual] |
Definition at line 201 of file ImageMetric.cxx.
vgl_homg_point_2d< double > ImageMetric::perp_projection | ( | vgl_homg_line_2d< double > const & | l, |
vgl_homg_point_2d< double > const & | p | ||
) | const [virtual] |
Project point onto line.
Definition at line 192 of file ImageMetric.cxx.
vcl_ostream & ImageMetric::print | ( | vcl_ostream & | s | ) | const [virtual] |
Reimplemented in SimilarityMetric, and AffineMetric.
Definition at line 321 of file ImageMetric.cxx.
vcl_ostream& operator<< | ( | vcl_ostream & | o, |
const ImageMetric & | m | ||
) | [friend] |
Definition at line 109 of file ImageMetric.h.