Ocean
Ocean::Geometry::CameraCalibration::Pattern Class Reference

Definition of a class holding the information about one calibration pattern. More...

Public Types

typedef Vectors2 PatternRow
 Definition of a (row) vector holding 2D positions. More...
 
typedef std::vector< PatternRowPatternRows
 Definition of a vector holding rows. More...
 

Public Member Functions

 Pattern ()
 Creates an empty pattern object. More...
 
 Pattern (const PatternRows &rows, const Timestamp timestamp)
 Creates a new pattern object. More...
 
const PatternRowsrows () const
 Returns the rows of this pattern. More...
 
const Vector2corners () const
 Returns the four corners of this pattern. More...
 
Box2 boundingBox () const
 Returns the bounding box of this pattern. More...
 
Timestamp timestamp () const
 Returns the timestmap of this pattern. More...
 
bool isEmpty () const
 Returns whether the pattern object holds not valid corners. More...
 
Scalar distance (const Pattern &pattern) const
 Returns the minimal sum of square distances between the corners of two calibration patterns. More...
 
void changeSize (const Scalar sizeFactor)
 Applies a size factor to resize the entire pattern. More...
 

Static Private Member Functions

template<typename TF , typename TS >
static bool compareFirst (const std::pair< TF, TS > &first, const std::pair< TF, TS > &second)
 Compares the first elements of two pairs. More...
 

Private Attributes

PatternRows patternRows
 Pattern rows. More...
 
Vector2 patternCorners [4]
 Pattern corners. More...
 
Timestamp patternTimestamp
 Pattern timestamp. More...
 

Detailed Description

Definition of a class holding the information about one calibration pattern.

Member Typedef Documentation

◆ PatternRow

Definition of a (row) vector holding 2D positions.

◆ PatternRows

Definition of a vector holding rows.

Constructor & Destructor Documentation

◆ Pattern() [1/2]

Ocean::Geometry::CameraCalibration::Pattern::Pattern ( )

Creates an empty pattern object.

◆ Pattern() [2/2]

Ocean::Geometry::CameraCalibration::Pattern::Pattern ( const PatternRows rows,
const Timestamp  timestamp 
)

Creates a new pattern object.

Parameters
rowsPattern rows defining the pattern
timestampTimestamp of the pattern

Member Function Documentation

◆ boundingBox()

Box2 Ocean::Geometry::CameraCalibration::Pattern::boundingBox ( ) const

Returns the bounding box of this pattern.

Returns
2D bounding box

◆ changeSize()

void Ocean::Geometry::CameraCalibration::Pattern::changeSize ( const Scalar  sizeFactor)

Applies a size factor to resize the entire pattern.

All corner positions will be changed by the given factor.

Parameters
sizeFactorSize factor to be applied, with range (0, infinity)

◆ compareFirst()

template<typename TF , typename TS >
bool Ocean::Geometry::CameraCalibration::Pattern::compareFirst ( const std::pair< TF, TS > &  first,
const std::pair< TF, TS > &  second 
)
inlinestaticprivate

Compares the first elements of two pairs.

Parameters
firstFirst pair to compare
secondSecond pair to compare
Returns
True, if the first element of the first pair is lesser than the first element of the second pair

◆ corners()

const Vector2 * Ocean::Geometry::CameraCalibration::Pattern::corners ( ) const
inline

Returns the four corners of this pattern.

Returns
Four corners

◆ distance()

Scalar Ocean::Geometry::CameraCalibration::Pattern::distance ( const Pattern pattern) const

Returns the minimal sum of square distances between the corners of two calibration patterns.

Returns
Sum of square distances

◆ isEmpty()

bool Ocean::Geometry::CameraCalibration::Pattern::isEmpty ( ) const
inline

Returns whether the pattern object holds not valid corners.

Returns
True, if so

◆ rows()

const CameraCalibration::Pattern::PatternRows & Ocean::Geometry::CameraCalibration::Pattern::rows ( ) const
inline

Returns the rows of this pattern.

Returns
Pattern rows

◆ timestamp()

Timestamp Ocean::Geometry::CameraCalibration::Pattern::timestamp ( ) const
inline

Returns the timestmap of this pattern.

Returns
Pattern timestamp

Field Documentation

◆ patternCorners

Vector2 Ocean::Geometry::CameraCalibration::Pattern::patternCorners[4]
private

Pattern corners.

◆ patternRows

PatternRows Ocean::Geometry::CameraCalibration::Pattern::patternRows
private

Pattern rows.

◆ patternTimestamp

Timestamp Ocean::Geometry::CameraCalibration::Pattern::patternTimestamp
private

Pattern timestamp.


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