Class Cutout

Inheritance Relationships

Derived Type

Class Documentation

class Cutout

Abstract base struct of a cutout geometry from the calibration board.

This is used to determine whether a given point within the local coordinate system of the board lies inside a cutout and, thus, has no 3D information

Subclassed by multisensor_calibration::CircularCutout

Public Functions

Cutout(const int iGeometryId, const int iNumCoefficients)

Construct setting the geometry ID and the number of coefficients.

Cutout(const int iGeometryId, const int iNumCoefficients, const std::vector<float> iCoefficients)

Construct setting the geometry ID, the number of coefficients, as well as the coefficients themself.

virtual ~Cutout()

Destructor.

int getGeometryId() const

Returns ID of cutout. Identifying the geometry.

int getNumCoefficients() const

Returns number of coefficients needed to define the geometry.

std::vector<float> getCoefficients() const

Returns model coefficients defining the specific geometry.

virtual float getRadius() const

Get radius of cutout. If cutout is not circular, this should be the biggest radius which fully fits into the cutout.

virtual float getCenterX() const

Get X coordinate of center point.

virtual float getCenterY() const

Get Y coordinate of center point.

void setCoefficients(const std::vector<float> &iCoefficients)

Set model coefficients defining the specific geometry.

Parameters:

iCoefficients

bool isPointInside(const cv::Vec2f iPnt, float *opDistance = nullptr, float *opPenalty = nullptr) const

Method to test whether a point lies inside the cutout.

Parameters:
  • iPnt[in] 2D point given in the local coordinate system of the calibration target.

  • opDistance[out] Pointer to return value providing the distance to the center of the cutout. Set to nullptr if not used.

  • opPenalty[out] Pointer to return value providing a penalty based on the distance of the point to the center of the cutout.

Returns:

True, if point is inside the cutout. False, otherwise.

virtual bool isPointInside(const float x, const float y, float *opDistance = nullptr, float *opPenalty = nullptr) const = 0

Method to test whether a point lies inside the cutout.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
  • x[in] X-value of the point in the local coordinate system of the calibration target.

  • y[in] Y-value of the point in the local coordinate system of the calibration target.

  • opDistance[out] Pointer to return value providing the distance to the center of the cutout. Set to nullptr if not used.

  • opPenalty[out] Pointer to return value providing a penalty based on the distance of the point to the center of the cutout.

Returns:

True, if point is inside the cutout. False, otherwise.