Mech-Eye API 2.4.0
API reference documentation for Mech-Eye Industrial 3D Camera
|
Operates the camera. Use Camera::connect to connect an available camera, and then call the corresponding methods to perform data acquisition, configure parameters, and so on. More...
#include <Camera.h>
Public Member Functions | |
Camera () | |
Constructor. | |
~Camera () | |
Destructor. | |
Camera (const Camera &other) noexcept | |
Copy constructor. | |
Camera & | operator= (const Camera &other) noexcept |
Copy assignment. | |
ErrorStatus | connect (const CameraInfo &info, unsigned int timeoutMs=5000) |
Connects to a camera using CameraInfo. | |
ErrorStatus | connect (const std::string &ipAddress, unsigned int timeoutMs=5000) |
Connects to a camera using the IP address. | |
void | disconnect () |
Disconnects from the camera and releases the associated resources. | |
ErrorStatus | setHeartbeatInterval (unsigned int timeIntervalMs) |
Sets the time interval at which the client sends periodic heartbeat messages to the camera side. The default time interval is 10s. | |
ErrorStatus | getCameraInfo (CameraInfo &info) const |
Gets the basic information of the camera, such as the model, serial number, firmware version, and IP configuration. | |
ErrorStatus | getCameraStatus (CameraStatus &status) const |
Gets various statuses of the camera. | |
ErrorStatus | getCameraIntrinsics (CameraIntrinsics &intrinsics) const |
Gets the camera intrinsic parameters. The camera intrinsic parameters include the intrinsic parameters of the texture 2D camera and the intrinsic parameters of the depth 2D camera(s) based on the pinhole camera model, which correspond to the 2D and 3D capture results Frame2D and Frame3D. The camera intrinsic parameters also include the transformation relationship between the texture 2D camera and depth 2D camera(s). | |
ErrorStatus | getCameraResolutions (CameraResolutions &resolutions) const |
Gets the image resolutions of the camera. Two image resolutions are provided, 2D image (texture) and depth map, which correspond to the 2D and 3D capture results Frame2D and Frame3D. | |
UserSet & | currentUserSet () |
Gets the UserSet currently in use.Through UserSet, you can access all available parameters of the camera related to 2D and 3D data acquisition. You can also use UserSet to directly set and get the parameter values instead of using Parameter interface. | |
UserSetManager & | userSetManager () |
Gets the UserSetManager of the camera. UserSetManager provides various operations for managing all user sets saved in the camera, including adding and deleting user sets and selecting the user set to be used. It also provides the methods for saving all user sets to a JSON file and load all user sets from a JSON file. | |
ErrorStatus | capture3D (Frame3D &frame3D, unsigned int timeoutMs=5000) const |
Projects structured light and captures a single 3D frame. 3D information is computed on the camera. The result is retrieved after the computation is completed. | |
ErrorStatus | capture3DWithNormal (Frame3D &frame3D, unsigned int timeoutMs=10000) const |
Projects structured light and captures a single 3D frame. 3D information and normal vector are computed on the camera. The result is retrieved after the computation is completed. | |
ErrorStatus | capture2D (Frame2D &frame2D, unsigned int timeoutMs=5000) const |
Captures a single 2D frame using the 2D camera in the 3D camera. The result is retrieved after the capture is completed. | |
ErrorStatus | capture2DAnd3D (Frame2DAnd3D &frame2DAnd3D, unsigned int timeoutMs=10000) const |
Simultaneously captures a single 2D frame and 3D frame. 3D information is computed on the camera. Both 2D and 3D capture results are retrieved after the capturing and computation processes are completed. Using this method, you can easily generate the textured point cloud from both 2D and 3D data. | |
ErrorStatus | capture2DAnd3DWithNormal (Frame2DAnd3D &frame2DAnd3D, unsigned int timeoutMs=15000) const |
Simultaneously captures a single 2D frame and 3D frame. 3D information and normal vector are computed on the camera. Both 2D and 3D capture results are retrieved after the capturing and computation processes are completed. Using this method, you can easily generate the texture point cloud from both 2D and 3D data. | |
ErrorStatus | captureStereo2D (Frame2D &left, Frame2D &right, bool isRectified=false, unsigned int timeoutMs=5000) const |
Captures the 2D images from both 2D cameras in the 3D camera. This method is only available for DEEP, LSR S, LSR L, and PRO XS. | |
ErrorStatus | setPointCloudUnit (CoordinateUnit unit) |
Sets the unit of the point cloud. | |
ErrorStatus | getPointCloudUnit (CoordinateUnit &unit) const |
Gets the current unit of the point cloud. | |
Static Public Member Functions | |
static std::vector< CameraInfo > | discoverCameras () |
Discovers all available cameras and returns the list of information of all available cameras. If a camera is not successfully discovered, please check the network connection and indicator lights on the camera. | |
Friends | |
class | HandEyeCalibration |
class | CameraEvent |
class | InternalInterfaces |
Operates the camera. Use Camera::connect to connect an available camera, and then call the corresponding methods to perform data acquisition, configure parameters, and so on.
ErrorStatus mmind::eye::Camera::capture2D | ( | Frame2D & | frame2D, |
unsigned int | timeoutMs = 5000 ) const |
Captures a single 2D frame using the 2D camera in the 3D camera. The result is retrieved after the capture is completed.
[out] | frame2D | The capture result. See Frame2D for details. |
[in] | timeoutMs | The timeout period (in ms) for the capturing process. If no data is received within the timeout period, this method returns ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR. |
ErrorStatus mmind::eye::Camera::capture2DAnd3D | ( | Frame2DAnd3D & | frame2DAnd3D, |
unsigned int | timeoutMs = 10000 ) const |
Simultaneously captures a single 2D frame and 3D frame. 3D information is computed on the camera. Both 2D and 3D capture results are retrieved after the capturing and computation processes are completed. Using this method, you can easily generate the textured point cloud from both 2D and 3D data.
[out] | frame2DAnd3D | The capture result containing Frame2D and Frame3D. See Frame2DAnd3D for details. |
[in] | timeoutMs | The timeout period (in ms) for the capturing process. If no data is received within the timeout period, this method returns ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR. |
ErrorStatus mmind::eye::Camera::capture2DAnd3DWithNormal | ( | Frame2DAnd3D & | frame2DAnd3D, |
unsigned int | timeoutMs = 15000 ) const |
Simultaneously captures a single 2D frame and 3D frame. 3D information and normal vector are computed on the camera. Both 2D and 3D capture results are retrieved after the capturing and computation processes are completed. Using this method, you can easily generate the texture point cloud from both 2D and 3D data.
[out] | frame2DAnd3D | The capture result containing Frame2D and Frame3D. See Frame2DAnd3D for details. |
[in] | timeoutMs | The timeout period (in ms) for the capturing process. If no data is received within the timeout period, this method returns ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR. |
ErrorStatus mmind::eye::Camera::capture3D | ( | Frame3D & | frame3D, |
unsigned int | timeoutMs = 5000 ) const |
Projects structured light and captures a single 3D frame. 3D information is computed on the camera. The result is retrieved after the computation is completed.
[out] | frame3D | The capture result. See Frame3D for details. |
[in] | timeoutMs | The timeout period (in ms) for the capturing process. If no data is received within the timeout period, this method returns ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR. |
ErrorStatus mmind::eye::Camera::capture3DWithNormal | ( | Frame3D & | frame3D, |
unsigned int | timeoutMs = 10000 ) const |
Projects structured light and captures a single 3D frame. 3D information and normal vector are computed on the camera. The result is retrieved after the computation is completed.
[out] | frame3D | The capture result. See Frame3D for details. |
[in] | timeoutMs | The timeout period (in ms) for the capturing process. If no data is received within the timeout period, this method returns ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR. |
ErrorStatus mmind::eye::Camera::captureStereo2D | ( | Frame2D & | left, |
Frame2D & | right, | ||
bool | isRectified = false, | ||
unsigned int | timeoutMs = 5000 ) const |
Captures the 2D images from both 2D cameras in the 3D camera. This method is only available for DEEP, LSR S, LSR L, and PRO XS.
[out] | left | The 2D image of the left 2D camera. See Frame2D for details. |
[out] | right | The 2D image of the right 2D camera. See Frame2D for details. |
[in] | isRectified | Whether to perform stereo rectification. After the rectification, The left image and the depth map are aligned pixel-to-pixel. If true, the rectified 2D images are returned. If false, the original images are returned. |
[in] | timeoutMs | The timeout period (in ms) for the capturing process. If no data is received within the timeout period, this method returns ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR. |
ErrorStatus mmind::eye::Camera::connect | ( | const CameraInfo & | info, |
unsigned int | timeoutMs = 5000 ) |
Connects to a camera using CameraInfo.
[in] | info | The information of the camera to be connected. You can use Camera::discoverCameras to discover all available cameras. |
[in] | timeoutMs | The timeout period (in ms) for connecting to a camera. If the camera connection does not succeed after the timeout period has passed, this method returns ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR. |
ErrorStatus mmind::eye::Camera::connect | ( | const std::string & | ipAddress, |
unsigned int | timeoutMs = 5000 ) |
Connects to a camera using the IP address.
[in] | ipAddress | The IP address of the camera to be connected. The format of a valid IP address: 100.100.1.1. |
[in] | timeoutMs | The timeout period (in ms) for connecting to a camera. If the camera connection does not succeed after the timeout period has passed, this method returns ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR. |
UserSet & mmind::eye::Camera::currentUserSet | ( | ) |
|
static |
Discovers all available cameras and returns the list of information of all available cameras. If a camera is not successfully discovered, please check the network connection and indicator lights on the camera.
ErrorStatus mmind::eye::Camera::getCameraInfo | ( | CameraInfo & | info | ) | const |
Gets the basic information of the camera, such as the model, serial number, firmware version, and IP configuration.
[out] | See | CameraInfo for details. |
ErrorStatus mmind::eye::Camera::getCameraIntrinsics | ( | CameraIntrinsics & | intrinsics | ) | const |
Gets the camera intrinsic parameters. The camera intrinsic parameters include the intrinsic parameters of the texture 2D camera and the intrinsic parameters of the depth 2D camera(s) based on the pinhole camera model, which correspond to the 2D and 3D capture results Frame2D and Frame3D. The camera intrinsic parameters also include the transformation relationship between the texture 2D camera and depth 2D camera(s).
[out] | See | CameraIntrinsics for details. |
ErrorStatus mmind::eye::Camera::getCameraResolutions | ( | CameraResolutions & | resolutions | ) | const |
Gets the image resolutions of the camera. Two image resolutions are provided, 2D image (texture) and depth map, which correspond to the 2D and 3D capture results Frame2D and Frame3D.
[out] | See | CameraResolutions for details. |
ErrorStatus mmind::eye::Camera::getCameraStatus | ( | CameraStatus & | status | ) | const |
Gets various statuses of the camera.
[out] | See | CameraStatus for details. |
ErrorStatus mmind::eye::Camera::getPointCloudUnit | ( | CoordinateUnit & | unit | ) | const |
Gets the current unit of the point cloud.
[out] | unit | The current CoordinateUnit of the point cloud. |
ErrorStatus mmind::eye::Camera::setHeartbeatInterval | ( | unsigned int | timeIntervalMs | ) |
Sets the time interval at which the client sends periodic heartbeat messages to the camera side. The default time interval is 10s.
[in] | timeIntervalMs | The time interval for periodic sending heartbeat messages in milliseconds. The valid setting range is from 1s to 3600s. |
ErrorStatus mmind::eye::Camera::setPointCloudUnit | ( | CoordinateUnit | unit | ) |
Sets the unit of the point cloud.
[in] | unit | The new CoordinateUnit of the point cloud. |
UserSetManager & mmind::eye::Camera::userSetManager | ( | ) |
Gets the UserSetManager of the camera. UserSetManager provides various operations for managing all user sets saved in the camera, including adding and deleting user sets and selecting the user set to be used. It also provides the methods for saving all user sets to a JSON file and load all user sets from a JSON file.
|
friend |
|
friend |