Mech-Eye API 2.2.0
API reference documentation for Mech-Eye Industrial 3D Camera
All Classes Functions Variables Enumerations Enumerator Pages
HandEyeCalibration.h
1#pragma once
2#include <cmath>
3#include "Camera.h"
4#include "CameraProperties.h"
5
6namespace mmind {
7
8namespace eye {
9
10class MMIND_API_EXPORT HandEyeCalibration
11{
12public:
17 enum struct CameraMountingMode {
18 EyeInHand,
19 EyeToHand,
20 };
21
27 BDB_5,
28 BDB_6,
29 BDB_7,
30 OCB_5,
31 OCB_10,
32 OCB_15,
33 OCB_20,
34 CGB_20,
35 CGB_35,
36 CGB_50,
37 };
38
44 {
45 Transformation() = default;
46 Transformation(double x, double y, double z, double qW, double qX, double qY, double qZ)
47 : x(x), y(y), z(z), qW(qW), qX(qX), qY(qY), qZ(qZ)
48 {
49 }
50
51 std::string toString() const
52 {
53 char buff[256] = {0};
54 snprintf(buff, sizeof(buff), "%lf,%lf,%lf,%lf,%lf,%lf,%lf", x, y, z, qW, qX, qY, qZ);
55 return buff;
56 }
57 double x{}; // Translation 3*1 vector robot pose unit: mm; extrinsic unit: m.
58 double y{};
59 double z{};
60 double qW{1}; // Quaternion 4*1 vector
61 double qX{};
62 double qY{};
63 double qZ{};
64 };
71 CalibrationBoardModel boardModel);
72
80 Color2DImage& color2DImage, unsigned int timeoutMs = 10000);
81
88
95 unsigned int timeoutMs = 10000);
96};
97
98} // namespace eye
99
100} // namespace mmind
Represents a 2D container of data.
Definition Array2D.h:17
Operates the Mech-Eye Industrial 3D Cameras. Use Camera::connect to connect an available camera,...
Definition Camera.h:55
ErrorStatus initializeCalibration(Camera &camera, CameraMountingMode mountingMode, CalibrationBoardModel boardModel)
Sets the board type for this calibration.
ErrorStatus addPoseAndDetect(Camera &camera, const Transformation &poseData, Color2DImage &color2DImage, unsigned int timeoutMs=10000)
Adds current pose of the robot, captures the image, and calculates necessary parameters prepared for ...
ErrorStatus calculateExtrinsics(Camera &camera, Transformation &cameraToBase)
Starts to calculate the result of hand-eye calibration.
ErrorStatus testRecognition(Camera &camera, Color2DImage &testResult, unsigned int timeoutMs=10000)
Only captures current image with feature recognition result for test.
Describes the types of errors.
Definition ErrorStatus.h:12
Defines rigid body transformations, including translation vector and quaternion vector.