Class MechEyeDevice

Class Documentation

class mmind::api::MechEyeDevice

Interface that is used to connect the Mech-Eye Industrial 3D Camera and access basic information of the device.

Public Functions

MechEyeDevice()

Constructor.

~MechEyeDevice()

Destructor.

MechEyeDevice(const MechEyeDevice&) = delete

No copy.

MechEyeDevice &operator=(const MechEyeDevice&) = delete

No copy.

ErrorStatus connect(const MechEyeDeviceInfo &info, int timeout = 10000)

Connects to the device by the MechEyeDeviceInfo identifying a device.

Parameters
  • info[in] the device information used to connect the device which can be

  • timeout[in] the timeout value (ms) obtained by enumerateMechEyeDeviceList function.

Returns

See ErrorStatus for details.

ErrorStatus connect(const std::string &ipAddress, int port = 5577, int timeout = 10000)

Connects to the device by the ip address and port identifying a device.

Parameters
  • ipAddress[in] the device ip address used to connect the device

  • port[in] the device port used to connect the device

  • timeout[in] the timeout value (ms)

Returns

See ErrorStatus for details.

void disconnect()

Disconnects from the device.

ErrorStatus getDeviceInfo(MechEyeDeviceInfo &info) const

Gets the basic information about the connected device.

Parameters

info[out] See MechEyeDeviceInfo for details.

Returns

See ErrorStatus for details.

ErrorStatus getDeviceIntri(DeviceIntri &intri) const

Gets the intrinsic camera parameter about the connected device.

Parameters

intri[out] See DeviceIntri for details.

Returns

See ErrorStatus for details.

ErrorStatus getDeviceResolution(DeviceResolution &imageResolution) const

Gets the device resolution.

Parameters

imageResolution[out] See DeviceResolution for details.

Returns

See ErrorStatus for details.

ErrorStatus captureColorMap(ColorMap &colorMap) const

Captures a color image.

Parameters

colorMap[out] See Frame for details.

Returns

See ErrorStatus for details.

ErrorStatus captureDepthMap(DepthMap &depthMap) const

Captures a depth image.

Parameters

depthMap[out] See Frame for details.

Returns

See ErrorStatus for details.

ErrorStatus capturePointXYZMap(PointXYZMap &pointXYZMap) const

Captures a point cloud image.

Parameters

pointXYZMap[out] See Frame for details.

Returns

See ErrorStatus for details.

ErrorStatus capturePointXYZBGRMap(PointXYZBGRMap &pointXYZBGRMap) const

Captures a colored point cloud image.

Parameters

pointXYZBGRMap[out] See Frame for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan2DExposureMode(Scanning2DSettings::Scan2DExposureMode value) const

Sets the camera exposure mode to capture the 2D images.

Parameters

value[in] See Scanning2DSettings::exposureMode for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan2DExposureMode(Scanning2DSettings::Scan2DExposureMode &value) const

Gets the camera exposure mode to capture the 2D images.

Parameters

value[out] See Scanning2DSettings::exposureMode for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan2DExposureTime(double value) const

Sets the camera exposure time in Scanning2DSettings::Timed exposure mode.

Parameters

value[in] See Scanning2DSettings::exposureTime for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan2DExposureTime(double &value) const

Gets the camera exposure time in Scanning2DSettings::Timed exposure mode.

Parameters

value[out] See Scanning2DSettings::exposureTime for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan2DHDRExposureSequence(std::vector<double> &values) const

Sets the camera HDR exposure sequence in Scanning2DSettings::HDR exposure mode.

Parameters

values[in] See Scanning2DSettings::hdrExposureSequence for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan2DHDRExposureSequence(std::vector<double> &values) const

Gets the camera HDR exposure sequence in Scanning2DSettings::HDR exposure mode.

Parameters

values[out] See Scanning2DSettings::hdrExposureSequence for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan2DExpectedGrayValue(int value) const

Sets the expected gray value in Scanning2DSettings::Auto exposure mode.

Parameters

value[in] See Scanning2DSettings::expectedGrayValue for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan2DExpectedGrayValue(int &value) const

Gets the expected gray value in Scanning2DSettings::Auto exposure mode.

Parameters

valus[out] See Scanning2DSettings::expectedGrayValue for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan2DToneMappingEnable(bool value) const

Sets whether gray level transformation algorithm is used or not.

Parameters

value[in] See Scanning2DSettings::toneMappingEnable for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan2DToneMappingEnable(bool &value) const

Gets whether gray level transformation algorithm is used or not.

Parameters

value[out] See Scanning2DSettings::toneMappingEnable for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan2DSharpenFactor(double value) const

Sets the image sharpen factor.

Parameters

value[in] See Scanning2DSettings::sharpenFactor for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan2DSharpenFactor(double &value) const

Gets the image sharpen factor.

Parameters

value[out] See Scanning2DSettings::sharpenFactor for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan2DROI(const ROI &value) const

Sets ROI to capture the 2D image.

Parameters

value[in] See Scanning2DSettings::scan2DROI for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan2DROI(ROI &value) const

Gets ROI to capture the 2D image.

Parameters

value[out] See Scanning2DSettings::scan2DROI for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan3DExposure(const std::vector<double> &valueSequence) const

Sets the exposure time of the camera to capture the 3D image.

Parameters

valueSequence[in] See Scanning3DSettings::exposureSequence for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan3DExposure(std::vector<double> &valueSequence) const

Gets the exposure time sequence of the camera to capture the 3D image.

Parameters

valueSequence[out] See Scanning3DSettings::exposureSequence for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan3DGain(double value) const

Sets gain to capture the 3d image.

Parameters

value[in] See Scanning3DSettings::gain for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan3DGain(double &value) const

Gets gain to capture the 3d image.

Parameters

value[out] See Scanning3DSettings::gain for details.

Returns

See ErrorStatus for details.

ErrorStatus setScan3DROI(const ROI &value) const

Sets ROI to capture the 3D image.

Parameters

value[in] See Scanning3DSettings::scan3DROI for details.

Returns

See ErrorStatus for details.

ErrorStatus getScan3DROI(ROI &value) const

Gets ROI to capture the 3D image.

Parameters

value[out] See Scanning3DSettings::scan3DROI for details.

Returns

See ErrorStatus for details.

ErrorStatus setDepthRange(const DepthRange &value) const

Sets depth range in 3D image.

Parameters

value[in] See Scanning3DSettings::depthRange for details.

Returns

See ErrorStatus for details.

ErrorStatus getDepthRange(DepthRange &value) const

Gets depth range in 3D image.

Parameters

value[out] See Scanning3DSettings::depthRange for details.

Returns

See ErrorStatus for details.

ErrorStatus setFringeContrastThreshold(int value) const

Sets the signal contrast threshold for effective pixels.

Parameters

value[in] See PointCloudProcessingSettings::fringeContrastThreshold for details.

Returns

See ErrorStatus for details.

ErrorStatus getFringeContrastThreshold(int &value) const

Gets the signal contrast threshold for effective pixels.

Parameters

value[out] See PointCloudProcessingSettings::fringeContrastThreshold for details.

Returns

See ErrorStatus for details.

ErrorStatus setFringeMinThreshold(int value) const

Sets the signal minimum threshold for effective pixels.

Parameters

value[in] See PointCloudProcessingSettings::fringeMinThreshold for details.

Returns

See ErrorStatus for details.

ErrorStatus getFringeMinThreshold(int &value) const

Gets the signal minimum threshold for effective pixels.

Parameters

value[out] See PointCloudProcessingSettings::fringeMinThreshold for details.

Returns

See ErrorStatus for details.

ErrorStatus setCloudOutlierFilterMode(PointCloudProcessingSettings::CloudOutlierFilterMode value) const

Sets the point cloud outliers removal algorithm.

Parameters

value[in] See PointCloudProcessingSettings::outlierFilterMode for details.

Returns

See ErrorStatus for details.

ErrorStatus getCloudOutlierFilterMode(PointCloudProcessingSettings::CloudOutlierFilterMode &value) const

Gets the point cloud outliers removal algorithm.

Parameters

value[out] See PointCloudProcessingSettings::outlierFilterMode for details.

Returns

See ErrorStatus for details.

ErrorStatus setCloudSmoothMode(PointCloudProcessingSettings::CloudSmoothMode value) const

Sets the point cloud smoothing algorithm.

Parameters

value[in] See PointCloudProcessingSettings::smoothMode for details.

Returns

See ErrorStatus for details.

ErrorStatus getCloudSmoothMode(PointCloudProcessingSettings::CloudSmoothMode &value) const

Gets the point cloud smoothing algorithm.

Parameters

value[out] See PointCloudProcessingSettings::smoothMode for details.

Returns

See ErrorStatus for details.

ErrorStatus setProjectorFringeCodingMode(ProjectorSettings::FringeCodingMode value) const

Sets projector’s fringe coding mode. Only support with Mech-Eye NANO and PRO series industrial 3D cameras.

Parameters

value[in] See ProjectorSettings::fringeCodingMode for details.

Returns

See ErrorStatus for details.

ErrorStatus getProjectorFringeCodingMode(ProjectorSettings::FringeCodingMode &value) const

Gets projector’s fringe coding mode. Only support with Mech-Eye NANO and PRO series industrial 3D cameras.

Parameters

value[out] See ProjectorSettings::fringeCodingMode for details.

Returns

See ErrorStatus for details.

ErrorStatus setProjectorPowerLevel(ProjectorSettings::PowerLevel value) const

Sets projector’s powerl level. Only support with Mech-Eye NANO, LOG and PRO series industrial 3D cameras.

Parameters

value[in] See ProjectorSettings::powerLevel for details.

Returns

See ErrorStatus for details.

ErrorStatus getProjectorPowerLevel(ProjectorSettings::PowerLevel &value) const

Gets projector’s powerl level. Only support with Mech-Eye NANO, LOG and PRO series industrial 3D cameras.

Parameters

value[out] See ProjectorSettings::powerLevel for details.

Returns

See ErrorStatus for details.

ErrorStatus setProjectorAntiFlickerMode(ProjectorSettings::AntiFlickerMode value) const

Sets projector’s anti-flicker mode. Only support with Mech-Eye NANO and PRO series industrial 3D camera.

Parameters

value[in] See ProjectorSettings::antiFlickerMode for details.

Returns

See ErrorStatus for details.

ErrorStatus getProjectorAntiFlickerMode(ProjectorSettings::AntiFlickerMode &value) const

Gets projector’s anti-flicker mode. Only support with Mech-Eye NANO and PRO series industrial 3D camera.

Parameters

value[out] See ProjectorSettings::antiFlickerMode for details.

Returns

See ErrorStatus for details.

ErrorStatus setLaserSettings(const LaserSettings &value) const

Sets laser device settings. Only support with Mech-Eye Laser series industrial 3D camera.

Parameters

value[in] See LaserSettings for details.

Returns

See ErrorStatus for details.

ErrorStatus getLaserSettings(LaserSettings &value) const

Gets laser device settings. Only support with Mech-Eye Laser series industrial 3D camera.

Parameters

value[out] See LaserSettings for details.

Returns

See ErrorStatus for details.

ErrorStatus setUhpSettings(UhpSettings value) const

Sets UHP device settings. Only support with Mech-Eye UHP series industrial 3D camera.

Parameters

value[in] See UhpSettings for details.

Returns

See ErrorStatus for details.

ErrorStatus getUhpSettings(UhpSettings &value) const

Gets UHP device settings. Only support with Mech-Eye UHP series industrial 3D camera.

Parameters

value[out] See UhpSettings for details.

Returns

See ErrorStatus for details.

ErrorStatus setUhpCaptureMode(UhpSettings::UhpCaptureMode value) const

Sets UHP camera capture mode. Only support with Mech-Eye UHP series industrial 3D camera.

Parameters

value[in] See UhpSettings::captureMode and UhpSettings::UhpCaptureMode for details.

Returns

See ErrorStatus for details.

ErrorStatus getUhpCaptureMode(UhpSettings::UhpCaptureMode &value) const

Gets UHP camera capture mode. Only support with Mech-Eye UHP series industrial 3D camera.

Parameters

value[out] See UhpSettings::captureMode and UhpSettings::UhpCaptureMode for details.

Returns

See ErrorStatus for details.

ErrorStatus setUhpFringeCodingMode(UhpSettings::UhpFringeCodingMode value) const

Sets UHP camera fringe coding mode. Only support with Mech-Eye UHP series industrial 3D camera.

Parameters

value[in] See UhpSettings::fringeCodingMode and UhpSettings::UhpFringeCodingMode for details.

Returns

See ErrorStatus for details.

ErrorStatus getUhpFringeCodingMode(UhpSettings::UhpFringeCodingMode &value) const

Gets UHP camera fringe coding mode. Only support with Mech-Eye UHP series industrial 3D camera.

Parameters

value[out] See UhpSettings::fringeCodingMode and UhpSettings::UhpFringeCodingMode for details.

Returns

See ErrorStatus for details.

ErrorStatus saveAllSettingsToUserSets() const

Saves all parameters to the current user set.

Returns

See ErrorStatus for details.

ErrorStatus setCurrentUserSet(const std::string &userSetName) const

Sets the current user set by user set name.

Call saveAllSettingsToUserSets to take effect permanently on the device.

Parameters

userSetName[in]

Returns

See ErrorStatus for details.

ErrorStatus getCurrentUserSet(std::string &userSetName) const

Gets the name of the current user set.

See also

getAllUserSets

Parameters

userSetName[out]

Returns

See ErrorStatus for details.

ErrorStatus getAllUserSets(std::vector<std::string> &userSetNames) const

Gets the names of all user sets.

Parameters

userSetNames[out]

Returns

See ErrorStatus for details.

ErrorStatus deleteUserSet(const std::string &userSetName) const

Deletes the user set by the user set name. If input name is the current user set it will change the current user set to the previous index value in the user set list.

Call saveAllSettingsToUserSets to take effect permanently on the device.

Parameters

userSetName[in]

Returns

See ErrorStatus for details.

ErrorStatus addUserSet(const std::string &userSetName) const

Adds a new user set by the user set name and sets all the current device settings to it. It will also change the current user set to the input value if adds success.

Call saveAllSettingsToUserSets to take effect permanently on the device.

Parameters

userSetName[in]

Returns

See ErrorStatus for details.

Public Static Functions

static std::vector<MechEyeDeviceInfo> enumerateMechEyeDeviceList()

Enumerates Mech-Eye Industrial 3D Camera by the type of MechEyeDeviceInfo identifying the device.

Returns

Information on all detectable Mech-Eye Industrial 3D Camera.