Mech-Eye API 2.5.1
API reference documentation for Mech-Eye Industrial 3D Camera
Loading...
Searching...
No Matches
Namespaces | Data Structures | Typedefs | Enumerations | Functions
mmind::eye Namespace Reference

Namespaces

namespace  laser_setting
 
namespace  pointcloud_processing_setting
 
namespace  projector_setting
 
namespace  scanning2d_setting
 
namespace  scanning3d_setting
 
namespace  uhp_setting
 

Data Structures

class  Array2D
 Represents a 2D container of data. More...
 
class  BoolParameter
 Represents a _Bool-type device parameter. More...
 
class  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...
 
struct  CameraDistortion
 Describes the distortion parameters. More...
 
class  CameraEvent
 The camera event related. Use CameraEvent::getSupportedEvents to get supported events. Use CameraEvent::registerCameraEventCallback to register an event of interest. More...
 
struct  CameraInfo
 Defines the camera information. More...
 
struct  CameraIntrinsics
 Defines the 3D camera intrinsic parameters, including the intrinsic parameters of the texture 2D camera, the intrinsic parameters of the depth 2D camera(s), and the transformation between them. More...
 
struct  CameraMatrix
 Describes the camera intrinsic parameter matrix. More...
 
struct  CameraResolutions
 Defines the camera image resolutions, including the resolutions of the 2D image (texture) and depth map. More...
 
struct  CameraStatus
 Describes the camera's statuses. More...
 
struct  ColorBGR
 Represents a pixel in Color2DImage with blue, green, and red channel information. More...
 
struct  DeviceTemperature
 Describes the device temperatures. More...
 
class  EnumParameter
 Represents an _Enum-type device parameter. More...
 
struct  ErrorStatus
 Describes the types of errors. More...
 
struct  EventData
 Represents data associated with a camera event. More...
 
class  FloatArrayParameter
 Represents a _FloatArray-type device parameter. More...
 
class  FloatParameter
 Represents a _Float-type device parameter. More...
 
class  Frame2D
 Represents the 2D capture result, which can be obtained by calling Camera::capture2D. The 2D data can be in the form of Gray or ColorBGR and is stored in a 2D array, with each element in the array representing an image pixel. More...
 
class  Frame2DAnd3D
 Represents the 2D and 3D capture results, which can be obtained by calling Camera::capture2DAnd3D. The 3D data can be in the form of PointZ or PointXYZ and is stored in a 2D array, with each element in the array representing a point. The class also provides methods for saving the point cloud data to a local file. More...
 
class  Frame3D
 Represents the 3D capture result, which can be obtained by calling Camera::capture3D. The 3D data can be in the form of PointZ or PointXYZ and is stored in a 2D array, with each element in the array representing a point. The class also provides methods for saving the point cloud data to a local file. More...
 
struct  FrameTransformation
 Defines the rigid body transformations from one reference frame to another, including the rotation matrix and translation vector. More...
 
struct  Gray
 Represents a pixel in GrayScale2DImage with grayscale channel information. More...
 
class  HandEyeCalibration
 
class  IntParameter
 Represents an _Int-type device parameter. More...
 
struct  Intrinsics2DCamera
 Describes the intrinsic parameters of the 2D camera in the 3D camera based on the pinhole camera model, including the camera matrix and camera distortion parameters. More...
 
struct  NormalVector
 The pixel element struct with the normal vector coordinate (x, y, z) information. More...
 
class  Parameter
 Represents a parameter of the device. More...
 
struct  PointXYZ
 Represents a point in UntexturedPointCloud with the coordinate (x, y, z) information. More...
 
struct  PointXYZBGR
 Represents a point in TexturedPointCloud with the coordinate (x, y, z) and texture (blue, green, red, and transparency) information. More...
 
struct  PointXYZBGRWithNormals
 The pixel element struct in TexturedPointCloudWithNormals with the coordinate (x, y, z), texture (blue, green, red and transparency), and normal vector coordinate (x, y, z and curvature) information. More...
 
struct  PointXYZWithNormals
 The pixel element struct in UntexturedPointCloudWithNormals with the coordinate (x, y, z) and normal vector coordinate (x, y, z, curvature) information. More...
 
struct  PointZ
 Represents a point in DepthMap with the depth (z-coordinate) information. More...
 
struct  ProfileROI
 Describes the region of interest (ROI) of a laser profiler. More...
 
class  ProfileRoiParameter
 Represents an _ProfileRoi-type device parameter. More...
 
struct  Range
 Describes a value range. More...
 
class  RangeParameter
 Represents a _Range-type device parameter. More...
 
struct  ROI
 Describes a region of interest (ROI). More...
 
class  RoiArrayParameter
 Represents an _RoiArray-type device parameter. More...
 
class  RoiParameter
 Represents an _Roi-type device parameter. More...
 
struct  Size
 Describes a two-dimensional size with a width and a height. More...
 
struct  SizeF
 Describes a two-dimensional size with a width and a height using double-precision floating-point numbers. More...
 
struct  Transformation
 Defines the rigid body transformations, including rotation matrix and translation vector. More...
 
class  UserSet
 
class  UserSetManager
 Manages device user sets. More...
 
class  Version
 Describes the version information. More...
 
class  VirtualUserSet
 

Typedefs

using GrayScale2DImage = Array2D< Gray >
 
using Color2DImage = Array2D< ColorBGR >
 
using TexturedPointCloud = Array2D< PointXYZBGR >
 
using TexturedPointCloudWithNormals = Array2D< PointXYZBGRWithNormals >
 
using DepthMap = Array2D< PointZ >
 
using UntexturedPointCloud = Array2D< PointXYZ >
 
using UntexturedPointCloudWithNormals = Array2D< PointXYZWithNormals >
 
using PointCloud = UntexturedPointCloud
 
using PointCloudWithNormals = UntexturedPointCloudWithNormals
 

Enumerations

enum class  ColorTypeOf2DCamera { Monochrome , Color , Undefined }
 Defines the color type of the 2D camera in the 3D camera. More...
 
enum struct  CoordinateUnit { Millimeter , Meter }
 The unit of the coordinate data of the point cloud. More...
 
enum struct  FileFormat { PLY , PCD , CSV }
 
enum struct  IpAssignmentMethod { Unknown , DHCP = 4 , Static , LLA }
 Describes the assignment method of the device IP address. More...
 
enum struct  Platform {
  PLATFORM_A , PLATFORM_B , PLATFORM_C , PLATFORM_D ,
  PLATFORM_E , PLATFORM_F , PLATFORM_G , PLATFORM_H
}
 Describes the platform of the camera. More...
 

Functions

MMIND_API_EXPORT ErrorStatus getPointCloudAfterMapping (const DepthMap &depthMap, const GrayScale2DImage &textureValidMask, const CameraIntrinsics &intrinsics, PointCloud &pointCloud)
 Uses a gray scale image as a mask to transform a depth map into a point cloud, the valid points in the point cloud only contain the mapped depth for each valid pixel in the mask.
 
MMIND_API_EXPORT ErrorStatus getPointCloudAfterMapping (const DepthMap &depthMap, const GrayScale2DImage &textureValidMask, const Color2DImage &texture, const CameraIntrinsics &intrinsics, TexturedPointCloud &pointCloud)
 Uses a gray scale image as a mask to transform a depth map and a texture image into a textured point cloud, the valid points in the point cloud only contain the mapped depth for each valid pixel in the mask.
 
MMIND_API_EXPORT PointCloud transformPointCloud (const FrameTransformation &coordinateTransformation, const PointCloud &originalPointCloud)
 Transforms the reference frame of a point cloud.
 
MMIND_API_EXPORT PointCloudWithNormals transformPointCloudWithNormals (const FrameTransformation &coordinateTransformation, const PointCloud &originalPointCloud)
 Transforms the reference frame of a point cloud with normals.
 
MMIND_API_EXPORT TexturedPointCloud transformTexturedPointCloud (const FrameTransformation &coordinateTransformation, const TexturedPointCloud &originalTexturedPointCloud)
 Transforms the reference frame of a textured point cloud.
 
MMIND_API_EXPORT TexturedPointCloudWithNormals transformTexturedPointCloudWithNormals (const FrameTransformation &coordinateTransformation, const TexturedPointCloud &originalTexturedPointCloud)
 Transforms the reference frame of a textured point cloud with normals.
 
MMIND_API_EXPORT FrameTransformation getTransformationParams (Camera &camera)
 Obtains the rigid body transformations of the custom reference frame of a camera. The custom reference frame can be adjusted using the "Custom Reference Frame" tool in Mech-Eye Viewer. The rigid body transformations are automatically calculated after the settings in this tool have been applied. The "Custom Reference Frame" tool is recommended as the GUI allows you to adjust the reference frame easily and conveniently. Alternatively, you can use the rotation and translation methods in FrameTransformation to define the transformations manually.
 
void showError (const mmind::eye::ErrorStatus &status, const std::string &successMessage={})
 Prints the error code and its description.
 
MMIND_API_EXPORT ErrorStatus exportLogs (const std::string &dstPath, bool coverIfExist)
 Exports the API logs.
 
MMIND_API_EXPORT std::string getApiVersionInfo ()
 Gets the version of Mech-Eye API.
 

Typedef Documentation

◆ Color2DImage

◆ DepthMap

◆ GrayScale2DImage

◆ PointCloud

◆ PointCloudWithNormals

◆ TexturedPointCloud

◆ TexturedPointCloudWithNormals

◆ UntexturedPointCloud

◆ UntexturedPointCloudWithNormals

Enumeration Type Documentation

◆ ColorTypeOf2DCamera

enum class ColorTypeOf2DCamera
strong

Defines the color type of the 2D camera in the 3D camera.

Enumerator
Monochrome 
Color 
Undefined 

◆ CoordinateUnit

enum struct CoordinateUnit
strong

The unit of the coordinate data of the point cloud.

Enumerator
Millimeter 
Meter 

◆ FileFormat

enum struct FileFormat
strong
Enumerator
PLY 
PCD 
CSV 

◆ IpAssignmentMethod

enum struct IpAssignmentMethod
strong

Describes the assignment method of the device IP address.

Enumerator
Unknown 
DHCP 
Static 
LLA 

◆ Platform

enum struct Platform
strong

Describes the platform of the camera.

Enumerator
PLATFORM_A 
PLATFORM_B 
PLATFORM_C 
PLATFORM_D 
PLATFORM_E 
PLATFORM_F 
PLATFORM_G 
PLATFORM_H 

Function Documentation

◆ exportLogs()

MMIND_API_EXPORT ErrorStatus exportLogs ( const std::string &  dstPath,
bool  coverIfExist 
)

Exports the API logs.

Parameters
[in]Thefolder path used to store the exported logs.
[in]Whetherto overwrite an existing file with the same name.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Log export successful.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR. Failed to save the logs.

◆ getApiVersionInfo()

MMIND_API_EXPORT std::string getApiVersionInfo ( )

Gets the version of Mech-Eye API.

◆ getPointCloudAfterMapping() [1/2]

MMIND_API_EXPORT ErrorStatus getPointCloudAfterMapping ( const DepthMap depthMap,
const GrayScale2DImage textureValidMask,
const CameraIntrinsics intrinsics,
PointCloud pointCloud 
)

Uses a gray scale image as a mask to transform a depth map into a point cloud, the valid points in the point cloud only contain the mapped depth for each valid pixel in the mask.

Note
The unit of the translational component of the CameraIntrinsics is mm. If the unit of the point cloud is m, the point cloud cannot be correctly masked. Therefore, please set the unit of the point cloud to mm using Camera::setPointCloudUnit before calling this method.
Parameters
[in]depthMapThe input depth map. See DepthMap for details.
[in]textureValidMaskA mask image of the same size as the camera's 2D image, with valid points set to 255 and invalid points to 0.
[in]intrinsicsThe camera intrinsics. See CameraIntrinsics for details.
[out]pointCloudThe output point cloud. See PointCloud for details.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_INVALID_INPUT_ERROR Input error.

◆ getPointCloudAfterMapping() [2/2]

MMIND_API_EXPORT ErrorStatus getPointCloudAfterMapping ( const DepthMap depthMap,
const GrayScale2DImage textureValidMask,
const Color2DImage texture,
const CameraIntrinsics intrinsics,
TexturedPointCloud pointCloud 
)

Uses a gray scale image as a mask to transform a depth map and a texture image into a textured point cloud, the valid points in the point cloud only contain the mapped depth for each valid pixel in the mask.

Note
The unit of the translational component of the CameraIntrinsics is mm. If the unit of the point cloud is m, the point cloud cannot be correctly masked and textured. Therefore, please set the unit of the point cloud to mm using Camera::setPointCloudUnit before calling this method.
Parameters
[in]depthMapThe input depth map. See DepthMap for details.
[in]textureValidMaskA mask image of the same size as the camera's 2D image, with valid points set to 255 and invalid points to 0.
[in]textureThe input texture image. See Color2DImage for details.
[in]intrinsicsThe camera intrinsics. See CameraIntrinsics for details.
[out]pointCloudThe output textured point cloud. See TexturedPointCloud for details.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_INVALID_INPUT_ERROR Input error.

◆ getTransformationParams()

MMIND_API_EXPORT FrameTransformation getTransformationParams ( Camera camera)

Obtains the rigid body transformations of the custom reference frame of a camera. The custom reference frame can be adjusted using the "Custom Reference Frame" tool in Mech-Eye Viewer. The rigid body transformations are automatically calculated after the settings in this tool have been applied. The "Custom Reference Frame" tool is recommended as the GUI allows you to adjust the reference frame easily and conveniently. Alternatively, you can use the rotation and translation methods in FrameTransformation to define the transformations manually.

Parameters
[in]cameraThe Camera handle.
Returns
The rigid body transformations from the camera reference frame to the custom reference frame. Refer to FrameTransformation for more details.

◆ showError()

void showError ( const mmind::eye::ErrorStatus status,
const std::string &  successMessage = {} 
)
inline

Prints the error code and its description.

◆ transformPointCloud()

MMIND_API_EXPORT PointCloud transformPointCloud ( const FrameTransformation coordinateTransformation,
const PointCloud originalPointCloud 
)

Transforms the reference frame of a point cloud.

Parameters
[in]coordinateTransformationThe rigid body transformations from the original reference frame to the new reference frame. Refer to FrameTransformation for more details.
[in]originalPointCloudThe PointCloud whose reference frame is to be transformed.
Returns
The PointCloud after reference frame transformation.
Note
This method must be called after Camera::capture3D and Frame3D::getUntexturedPointCloud so that the PointCloud data is available.

◆ transformPointCloudWithNormals()

MMIND_API_EXPORT PointCloudWithNormals transformPointCloudWithNormals ( const FrameTransformation coordinateTransformation,
const PointCloud originalPointCloud 
)

Transforms the reference frame of a point cloud with normals.

Parameters
[in]coordinateTransformationThe rigid body transformations from the original reference frame to the new reference frame. Refer to FrameTransformation for more details.
[in]originalPointCloudThe PointCloud whose reference frame is to be transformed.
Returns
The PointCloudWithNormals after reference frame transformation.
Note
This method must be called after Camera::capture3D and Frame3D::getUntexturedPointCloud so that the PointCloud data is available.

◆ transformTexturedPointCloud()

MMIND_API_EXPORT TexturedPointCloud transformTexturedPointCloud ( const FrameTransformation coordinateTransformation,
const TexturedPointCloud originalTexturedPointCloud 
)

Transforms the reference frame of a textured point cloud.

Parameters
[in]coordinateTransformationThe rigid body transformations from the original reference frame to the new reference frame. Refer to FrameTransformation for more details.
[in]originalTexturedPointCloudThe TexturedPointCloud whose reference frame is to be transformed.
Returns
The TexturedPointCloud after reference frame transformation.
Note
This method must be called after Camera::capture2DAnd3D and Frame2DAnd3D::getTexturedPointCloud so that the TexturedPointCloud data is available.

◆ transformTexturedPointCloudWithNormals()

MMIND_API_EXPORT TexturedPointCloudWithNormals transformTexturedPointCloudWithNormals ( const FrameTransformation coordinateTransformation,
const TexturedPointCloud originalTexturedPointCloud 
)

Transforms the reference frame of a textured point cloud with normals.

Parameters
[in]coordinateTransformationThe rigid body transformations from the original reference frame to the new reference frame. Refer to FrameTransformation for more details.
[in]originalTexturedPointCloudThe TexturedPointCloud whose reference frame is to be transformed.
Returns
The TexturedPointCloudWithNormals after reference frame transformation.
Note
This method must be called after Camera::capture2DAnd3D and Frame2DAnd3D::getTexturedPointCloud so that the TexturedPointCloud data is available.