ImFusion SDK 4.3
HandEyeCalibrationAlgorithm Class Reference

#include <ImFusion/Vision/HandEyeCalibrationAlgorithm.h>

Performs hand-eye calibration between two tracking sequences. More...

+ Inheritance diagram for HandEyeCalibrationAlgorithm:

Detailed Description

Performs hand-eye calibration between two tracking sequences.

A typical use case is to calibrate a camera mounted on a robot end effector (EyeInHand) or a camera mounted on a tripod (EyeOnBase) to the robot coordinate system by the use of a calibration target.

Public Types

enum  CalibrationMethod { TsaiLenz = 0 , GlobalMLSL = 1 }
 Method to be used for calibration. More...
 
enum  StreamInfo { CalibToCam , CamToCalib , HandToBase , BaseToHand }
 Information about the transformation direction of the tracking sequences.
 
enum class  CalibrationType { EyeInHand , EyeOnBase }
 
- Public Types inherited from Algorithm
enum  Status {
  Unknown = -1 , Success = 0 , Error = 1 , InvalidInput ,
  IncompleteInput , OutOfMemoryHost , OutOfMemoryGPU , UnsupportedGPU ,
  UnknownAction , AbortedByUser , User = 1000
}
 Status codes. More...
 

Public Member Functions

 HandEyeCalibrationAlgorithm (TrackingSequence &ts1, TrackingSequence &ts2)
 Construct hand-eye calibration from two tracking sequences.
 
void compute () override
 Execute the algorithm.
 
OwningDataList takeOutput () override
 Return any new Data that was created by the Algorithm during the last call to compute().
 
mat4 movingToHand () const
 Returns the transformation between the moving and the hand coordinate systems, where the moving object is the one rigidly attached to the (robot) hand, being either the camera (in the case of EyeInHand calibration) or the calibration object (in the case of EyeOnBase calibration).
 
mat4 fixedToBase () const
 Returns the transformation between the fixed coordinate system and the base coordinate system, where the fixed coordinate system is the one of the object positioned in a fixed location in the scene, being either the calibration object (in the case of EyeInHand calibration) or the camera (in the case of EyeOnBase calibration).
 
std::vector< vec2i > finalPairs () const
 Returns the pairs of indices of the samples from the first and second tracking sequences that were used for calibration.
 
void setCalibrationOptimizer (CalibrationOptimizer *fcn)
 Set an optimizer, to be used during the non-linear refinement phase.
 
const TrackingSequencetsMovingToFixed () const
 First tracking sequence as it was passed to alignment with non-corresponding samples removed, either CamToCalib (when EyeInHand) or CalibToCam (when EyeOnBase), with applied registration (Fixed to Base)
 
const TrackingSequencetsHandToBase () const
 Second tracking sequence as it was passed to alignment with non-corresponding samples removed with applied calibration (Moving to Hand)
 
- Public Member Functions inherited from Algorithm
 Algorithm ()
 Default constructor will registers a single "compute" action that calls compute() and returns status().
 
virtual void setProgress (Progress *progress)
 Sets a Progress interface the algorithm can use to notify observers about its computing progress.
 
Progressprogress () const
 Returns the progress interface if set.
 
virtual int status () const
 Indicates the status of the last call to compute().
 
virtual bool survivesDataDeletion (const Data *) const
 Indicates whether the algorithm can handle (partial) deletion of the specified data, by default this checks whether the data is in the input list.
 
const FactoryInfofactoryInfo () const
 Returns the record describing how this Algorithm was instantiated by the AlgorithmFactory.
 
void setFactoryInfo (const FactoryInfo &value)
 Sets the record describing how this Algorithm was instantiated by the AlgorithmFactory.
 
Status runAction (const std::string &id)
 Run the action with name id if it exists.
 
const std::vector< Action > & actions ()
 Get a mapping from Action id to Action as registered in this algorithm.
 
- Public Member Functions inherited from Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
 
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Static Public Member Functions

static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
 
- Static Public Member Functions inherited from Algorithm
static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
 Factory function to check algorithm compatibility with input data and optionally instantiate it.
 

Public Attributes

Parameter< CalibrationTypep_calibrationType
 Calibration type, either EyeInHand or EyeOnBase.
 
Parameter< StreamInfop_si1
 Direction of the transformation of the first tracking sequence.
 
Parameter< StreamInfop_si2
 Direction of the transformation of the second tracking sequence.
 
Parameter< CalibrationMethodp_method = {"method", CalibrationMethod::TsaiLenz, this}
 Calibration method to be used.
 
Parameter< bool > p_resetMatricesBeforeComputing
 Reset the matrices of the input streams before starting the computation.
 
Parameter< double > p_minRelativeAngleSampleSelection
 Minimum angle in degrees between current sample and a previously selected sample for the current sample to be selected.
 
Parameter< double > p_minRelativeTranslationSampleSelection
 Minimum trnaslation between current sample and a previously selected sample for the current sample to be selected.
 
Parameter< double > p_minRelativeAngle
 Minimum angle in degrees between pose pairs selected for optimization.
 
Parameter< double > p_poseInlierThreshold = {"poseInlierThreshold", 5, this}
 Inlier threshold for pose pair errors.
 
Parameter< bool > p_useRansac
 Use RANSAC scheme: select 3 random pairs of poses and compute the calibration, repeat number of iterations and select the best result.
 
Parameter< int > p_ransacIterations = {"ransacIterations", 1000, this}
 Number of RANSAC iterations.
 
Parameter< bool > p_refineNonLinear = {"refineNonLinear", false, this}
 Refine Tsai-Lenz output using the non-linear optimizer.
 
- Public Attributes inherited from Algorithm
Signal signalOutputChanged
 Signal should be emitted by Algorithms when their output/result has changed.
 
Signal signalParametersChanged
 Signal should be emitted by Algorithms when their parameter configuration has changed.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Additional Inherited Members

- Protected Member Functions inherited from Algorithm
void loadDefaults ()
 
void registerAction (const std::string &id, const std::string &guiName, const std::function< Algorithm::Status(void)> &action)
 Register an action to be run via runAction.
 
template<typename D>
void registerAction (const std::string &id, const std::string &guiName, Algorithm::Status(D::*action)(void))
 Template version of runAction that can be used with a pointer to a member function.
 
void registerAction (const Action &action)
 Register an action.
 
- Protected Attributes inherited from Algorithm
std::string m_name
 Algorithm name.
 
Progressm_progress = nullptr
 Non-owing pointer to a progress interface. May be a nullptr.
 
FactoryInfo m_factoryInfo = {}
 Record describing how this algorithm was instantiated by the AlgorithmFactory.
 
int m_status = Status::Unknown
 Algorithm status after last call to compute()
 
std::vector< Actionm_actions
 Map of key given by the id of the action, of the available actions of this algorithm.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Enumeration Documentation

◆ CalibrationMethod

Method to be used for calibration.

Enumerator
TsaiLenz 

Tsai-Lenz.

GlobalMLSL 

NLopt, MLSL algorithm.

◆ CalibrationType

enum class CalibrationType
strong
Enumerator
EyeInHand 

The camera is mounted on the robot end effector (moving object is the camera, fixed object is the calibration target)

EyeOnBase 

The camera is mounted e.g. on a tripod or on the ceiling (moving object is the calibration target, fixed object is the camera)

Constructor & Destructor Documentation

◆ HandEyeCalibrationAlgorithm()

Construct hand-eye calibration from two tracking sequences.

Position-wise correspondence between the tracking sequences is assumed. Timestamps are NOT used for matching.

Member Function Documentation

◆ compute()

void compute ( )
overridevirtual

Execute the algorithm.

Implements Algorithm.

◆ takeOutput()

OwningDataList takeOutput ( )
overridevirtual

Return any new Data that was created by the Algorithm during the last call to compute().

The default implementation will return an empty list.

Note
Since ownership of the data is transferred, you can call this method only once between calls to compute().

Reimplemented from Algorithm.

◆ setCalibrationOptimizer()

void setCalibrationOptimizer ( CalibrationOptimizer * fcn)
inline

Set an optimizer, to be used during the non-linear refinement phase.

If not set, a default pose optimizer will be used minimizing the HregInv * m_Hg[i] * Hcg * m_Hc[i]

Member Data Documentation

◆ p_calibrationType

Parameter<CalibrationType> p_calibrationType
Initial value:
= {"calibrationType",
this}
@ EyeInHand
The camera is mounted on the robot end effector (moving object is the camera, fixed object is the cal...
Definition HandEyeCalibrationAlgorithm.h:63

Calibration type, either EyeInHand or EyeOnBase.

◆ p_si1

Initial value:
= {"stream1",
StreamInfo::CamToCalib,
this}

Direction of the transformation of the first tracking sequence.

◆ p_si2

Initial value:
= {"stream2",
StreamInfo::HandToBase,
this}

Direction of the transformation of the second tracking sequence.

◆ p_resetMatricesBeforeComputing

Parameter<bool> p_resetMatricesBeforeComputing
Initial value:
= {"resetMatricesBefore",
false,
this}

Reset the matrices of the input streams before starting the computation.

◆ p_minRelativeAngleSampleSelection

Parameter<double> p_minRelativeAngleSampleSelection
Initial value:
= {
"minRelativeAngleSampleSelection",
0,
this}

Minimum angle in degrees between current sample and a previously selected sample for the current sample to be selected.

◆ p_minRelativeTranslationSampleSelection

Parameter<double> p_minRelativeTranslationSampleSelection
Initial value:
= {
"minRelativeTranslationSampleSelection",
0,
this}

Minimum trnaslation between current sample and a previously selected sample for the current sample to be selected.

◆ p_minRelativeAngle

Parameter<double> p_minRelativeAngle
Initial value:
= {"minRelativeAngle",
20,
this}

Minimum angle in degrees between pose pairs selected for optimization.

◆ p_useRansac

Parameter<bool> p_useRansac
Initial value:
= {
"useRansac",
false,
this}

Use RANSAC scheme: select 3 random pairs of poses and compute the calibration, repeat number of iterations and select the best result.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close