LTI-Lib latest version v1.9 - last update 24 Nov 2005
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Simple geometry classes and functions
[MathAlgorithms and Classes for Image Processing]

Collaboration diagram for Simple geometry classes and functions:


Modules

 Geometry Data Structures

Classes

class  lti::flipImage
 Flips an image horizontally or vertically. More...
class  lti::geometricTransform
 This functor implements an generic geometric transform based on a homogeneous matrix, which is able to represent rotations, translations scalings and all other possibilites of homographies. More...
class  lti::rotation
 Rotation implements a rotation functor. More...
class  lti::scaling
 Scaling implements a functor to rescale an image using a real valued scaling factor. More...

Functions

template<class T>
bool lti::intersection (const tpoint< T > &p1, const tpoint< T > &p2, const tpoint< T > &p3, const tpoint< T > &p4, tpoint< T > &p)
template<class T>
bool lti::intersection (const tpoint< T > &p1, const tpoint< T > &p2, const tpoint< T > &p3, const tpoint< T > &p4)
template<class T>
lti::minDistanceSqr (const tpoint< T > &p1, const tpoint< T > &p2, const tpoint< T > &p3, tpoint< T > &p)
template<class T>
lti::minDistanceSqr (const tpoint< T > &p1, const tpoint< T > &p2, const tpoint< T > &p3)
template<class T>
lti::minDistanceSqr (const tpoint< T > &p1, const tpoint< T > &p2, const tpoint< T > &p3, const tpoint< T > &p4, tpoint< T > &pa, tpoint< T > &pb)
template<class T>
int lti::clockwiseTurn (const tpoint< T > &p0, const tpoint< T > &p1, const tpoint< T > &p2)

Detailed Description

See also:
Conceptual Class Hierarchy in the LTI-Lib

Function Documentation

template<class T>
int lti::clockwiseTurn const tpoint< T > &  p0,
const tpoint< T > &  p1,
const tpoint< T > &  p2
 

compute if the path that follows the points p0, p1 and p2 makes a clock-wise turn (+1) a counter-clock-wise turn (-1) or stays in a straight line (0).

Parameters:
p0 first point
p1 second point
p2 third point
Returns:
+1 for a clockwise turn, -1 for a counter clockwise turn, 0 if path stays in a straight line.
Defined in ltiGeometry.h

template<class T>
bool lti::intersection const tpoint< T > &  p1,
const tpoint< T > &  p2,
const tpoint< T > &  p3,
const tpoint< T > &  p4
[inline]
 

compute if the line between p1 and p2 intersects with the line between p3 and p4.

If they intersect in exactly one point (normal case) the function returns true. If the lines are parallel or any of the lines have length 0 this function returns false.

Parameters:
p1 begin of first line
p2 end of first line
p3 begin of first line
p4 end of first line
Returns:
true if lines intersect in exactly one point, false otherwise
Defined in ltiGeometry.h

template<class T>
bool lti::intersection const tpoint< T > &  p1,
const tpoint< T > &  p2,
const tpoint< T > &  p3,
const tpoint< T > &  p4,
tpoint< T > &  p
 

compute if the line between p1 and p2 intersects with the line between p3 and p4.

If they intersect in exactly one point (normal case) the function returns true. If the lines are parallel or any of the lines have length 0 this function returns false.

Parameters:
p1 begin of first line
p2 end of first line
p3 begin of first line
p4 end of first line
p intersection point will be written here, in case there is one. if there is no intersection point (or infinity) the value will not change.
Returns:
true if lines intersect in exactly one point, false otherwise
Defined in ltiGeometry.h

template<class T>
T lti::minDistanceSqr const tpoint< T > &  p1,
const tpoint< T > &  p2,
const tpoint< T > &  p3,
const tpoint< T > &  p4,
tpoint< T > &  pa,
tpoint< T > &  pb
 

compute the square of the minimal distance between the line segment defined by the points p1 and p2 and the line segment defined by the points p3 and p4.

The corresponding points with the minimal distance will be stored in pa (in p1-p2) and pb (in p3-p4).

Parameters:
p1 start point of the first line segment
p2 end point of the first line segment
p3 start point of the second line segment
p4 end point of the second line segment
pa point in the line p1-p2 with the minimal distance to the line segment p3-p4.
pb point in the line p3-p4 with the minimal distance to the line segment p1-p2.
Returns:
the square of the distance between the line p1-p2 and p3-p4
Defined in ltiGeometry.h

template<class T>
T lti::minDistanceSqr const tpoint< T > &  p1,
const tpoint< T > &  p2,
const tpoint< T > &  p3
[inline]
 

compute the square of the minimal distance between the line segment defined by the points p1 and p2 and the point p3.

The point within the line with the minimal distance will be stored in p.

Parameters:
p1 start point of the line segment
p2 end point of the line segment
p3 point, for which the distance to the line segment will be computed.
Returns:
the square of the distance between the line p1_p2 and the point p3
Defined in ltiGeometry.h

template<class T>
T lti::minDistanceSqr const tpoint< T > &  p1,
const tpoint< T > &  p2,
const tpoint< T > &  p3,
tpoint< T > &  p
 

compute the square of the minimal distance between the line segment defined by the points p1 and p2 and the point p3.

The point within the line with the minimal distance will be stored in p.

Parameters:
p1 start point of the line segment
p2 end point of the line segment
p3 point, for which the distance to the line segment will be computed.
p the point in the line between p1 and p2 with the shortest distance will be stored here.
Returns:
the square of the distance between the line p1_p2 and the point p3
Defined in ltiGeometry.h


Generated on Thu Nov 24 16:29:52 2005 for LTI-Lib by Doxygen 1.4.4