Zivid C++ API 2.15.0+5fcc365b-1
Zivid::Calibration::DetectionResult Class Reference

A result returned by the detectCalibrationBoard(...) call. More...

#include <Zivid/Calibration/DetectionResult.h>

Public Member Functions

ZIVID_CORE_EXPORT bool valid () const
 Test if DetectionResult is valid.
 
ZIVID_CORE_EXPORT CalibrationBoardDetectionStatus status () const
 Get the status of the detection.
 
ZIVID_CORE_EXPORT operator bool () const
 Test if DetectionResult is valid.
 
ZIVID_CORE_EXPORT std::string statusDescription () const
 Get human-readable description of the status. Useful for feedback if valid() is false.
 
ZIVID_CORE_EXPORT PointXYZ centroid () const
 Get the centroid of the detected feature points in camera-space.
 
ZIVID_CORE_EXPORT Pose pose () const
 Get position and orientation of the top left detected corner in camera coordinate system.
 
ZIVID_CORE_EXPORT Array2D< PointXYZfeaturePoints () const
 Get the detected feature points in camera-space.
 
ZIVID_CORE_EXPORT Array2D< PointXYfeaturePoints2D () const
 Get the detected feature points in pixel-space.
 
ZIVID_CORE_EXPORT std::string toString () const
 Get string representation of DetectionResult.
 

Detailed Description

A result returned by the detectCalibrationBoard(...) call.

Member Function Documentation

◆ centroid()

ZIVID_CORE_EXPORT PointXYZ Zivid::Calibration::DetectionResult::centroid ( ) const

Get the centroid of the detected feature points in camera-space.

If valid() is false, an exception will be thrown.

Returns
The XYZ position of the feature point centroid.

◆ featurePoints()

ZIVID_CORE_EXPORT Array2D< PointXYZ > Zivid::Calibration::DetectionResult::featurePoints ( ) const

Get the detected feature points in camera-space.

Returns a 2D array of 3D coordinates representing the centers of the calibration board squares. The element at index (0,0) corresponds to the physical top-left corner of the board. The first index moves down the physical board, while the second index moves to the right. If the valid() function returns false, an exception will be thrown.

Returns
Feature points.

◆ featurePoints2D()

ZIVID_CORE_EXPORT Array2D< PointXY > Zivid::Calibration::DetectionResult::featurePoints2D ( ) const

Get the detected feature points in pixel-space.

Same as featurePoints(), but with 2D coordinates instead of 3D coordinates. The points are reported at subpixel accuracy. If the valid() function returns false, an exception will be thrown.

Returns
Feature points in 2D.

◆ operator bool()

ZIVID_CORE_EXPORT Zivid::Calibration::DetectionResult::operator bool ( ) const
explicit

Test if DetectionResult is valid.

DetectionResult is valid if all the feature points were detected.

Returns
True if DetectionResult is valid.

◆ pose()

ZIVID_CORE_EXPORT Pose Zivid::Calibration::DetectionResult::pose ( ) const

Get position and orientation of the top left detected corner in camera coordinate system.

This is the top left inner corner as viewed from the board's coordinate system. For example, if the board is rotated 180 degrees, this will be the bottom right corner.

Pose calculation works for official Zivid calibration boards only. An exception will be thrown if valid() is false or if the board is not supported.

Returns
The XYZ position and orientation of the top left corner.

◆ status()

ZIVID_CORE_EXPORT CalibrationBoardDetectionStatus Zivid::Calibration::DetectionResult::status ( ) const

Get the status of the detection.

Returns
The detection status.

◆ statusDescription()

ZIVID_CORE_EXPORT std::string Zivid::Calibration::DetectionResult::statusDescription ( ) const

Get human-readable description of the status. Useful for feedback if valid() is false.

This returns a free-form string and should not be considered API stable.

Returns
A string which describes the detection status

◆ toString()

ZIVID_CORE_EXPORT std::string Zivid::Calibration::DetectionResult::toString ( ) const

Get string representation of DetectionResult.

Returns
DetectionResult as string

◆ valid()

ZIVID_CORE_EXPORT bool Zivid::Calibration::DetectionResult::valid ( ) const

Test if DetectionResult is valid.

DetectionResult is valid if status is OK.

Returns
True if DetectionResult is valid.

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