Mech-Eye API 2.6.0
API reference documentation for Mech-Eye Industrial 3D Camera
Loading...
Searching...
No Matches
HandEyeCalibration.h
1#pragma once
2#include <cmath>
3#include "Camera.h"
4#include "CameraProperties.h"
5#include "CommonTypes.h"
6
7namespace mmind {
8
9namespace eye {
10
11class MMIND_API_EXPORT HandEyeCalibration
12{
13public:
18 enum struct CameraMountingMode {
19 EyeInHand,
20 EyeToHand,
21 };
22
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
43 struct Transformation
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 };
65
74 CalibrationBoardModel boardModel);
75
89 Color2DImage& color2DImage, unsigned int timeoutMs = 10000);
90
99
110 ErrorStatus testRecognition(Camera& camera, Color2DImage& testResult,
111 unsigned int timeoutMs = 20000);
112
126 unsigned int timeoutMs = 20000);
127};
128
129} // namespace eye
130
131} // namespace mmind
Operates the camera. Use Camera::connect to connect an available camera, and then call the correspond...
Definition Camera.h:55
ErrorStatus extractCurrentImageFirstCorner(Camera &camera, PointXYZ &corner, unsigned int timeoutMs=20000)
Detects features in the current image and retrieves the first detected corner point.
ErrorStatus initializeCalibration(Camera &camera, CameraMountingMode mountingMode, CalibrationBoardModel boardModel)
Sets the board model and camera mounting mode 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 testRecognition(Camera &camera, Color2DImage &testResult, unsigned int timeoutMs=20000)
Only captures current image with feature recognition result for test.
ErrorStatus calculateExtrinsics(Camera &camera, Transformation &cameraToBase)
Starts to calculate the result of hand-eye calibration.
Describes the types of errors.
Definition ErrorStatus.h:12
Defines rigid body transformations, including translation vector and quaternion vector.
Represents a point in UntexturedPointCloud with the coordinate (x, y, z) information.