Mech-Eye API 2.5.1
API reference documentation for Mech-Eye Industrial 3D Camera
|
Interface that is used to connect the LNX Mech-Eye device and access basic information of the device. More...
#include <MechEyeLNXApi.h>
Public Member Functions | |
MechEyeDevice () | |
~MechEyeDevice () | |
ErrorStatus | connect (const MechEyeDeviceInfo &info, const int timeout=10000) |
Connect to the device by the MechEyeDeviceInfo identifying a device. | |
ErrorStatus | connect (const std::string &ipAddress, const int port=5577, const int timeout=10000) |
Connects to a device by the IP address and port of the device. | |
void | disconnect () |
Disconnect from the device. | |
ErrorStatus | getDeviceInfo (api::MechEyeDeviceInfo &info) const |
Get the basic information of the connected device. | |
ErrorStatus | saveAllSettingsToUserSets () const |
Save all parameter values to the current parameter group. | |
ErrorStatus | setCurrentUserSet (const std::string &userSetName) const |
ErrorStatus | getCurrentUserSet (std::string &userSetName) const |
Get the name of the currently selected parameter group. | |
ErrorStatus | getAllUserSets (std::vector< std::string > &userSetNames) const |
Get the names of all available parameter groups. | |
ErrorStatus | deleteUserSet (const std::string &userSetName) const |
ErrorStatus | addUserSet (const std::string &userSetName) const |
ErrorStatus | captureLnx2DImage (ColorMap &colorMap) const |
Perform scanning of one line and obtain the line scan image. | |
ErrorStatus | getLnxBatchRollData (float *depth, unsigned char *intensity, unsigned int *encoder, long long *frameId, int &lineCount) const |
Get the acquired batch data. | |
ErrorStatus | getLnxBatchRollData (LineBatch &LineBatch) const |
Get the acquired batch data. | |
ErrorStatus | stopLnxCaptureImage () |
Stop scanning. | |
ErrorStatus | startLnxCaptureImage () |
Start scanning. | |
ErrorStatus | setLnxCaptureMode (CaptureMode value) const |
Set scan mode. | |
ErrorStatus | getLnxCaptureMode (CaptureMode &value) const |
Get the current scan mode. | |
ErrorStatus | setLnxRawTimeout (int time) const |
Set the timeout value for obtaining the line scan image. | |
ErrorStatus | getLnxRawTimeout (int &time) const |
Get the current timeout value for obtaining the line scan image. | |
ErrorStatus | setLnxDepthTimeout (int time) const |
Set the timeout value for obtaining the depth map. | |
ErrorStatus | getLnxDepthTimeout (int &time) const |
Get the current timeout value for obtaining the depth map. | |
ErrorStatus | getLnxXDataWidth (int &xDataWidth) const |
Get the line width in the X direction. | |
ErrorStatus | getLnxXScale (float &xScale) const |
Get the X resolution. | |
ErrorStatus | setLnxLaserPowerLevel (int powerLevel) const |
Set the laser power level. | |
ErrorStatus | getLnxLaserPowerLevel (int &powerLevel) const |
Get the current laser power level. | |
ErrorStatus | setScanExposureMode (ExposureMode mode) const |
Set the exposure mode. | |
ErrorStatus | getScanExposureMode (ExposureMode &mode) const |
Get the current exposure mode. | |
ErrorStatus | setLnxExposure (int time) const |
Set the exposure time for the Timed exposure mode. | |
ErrorStatus | getLnxExposure (int &time) const |
Get the current exposure time for the Timed exposure mode. | |
ErrorStatus | setScan3DHDRExposureSequence (int time1, int time2, int time3) const |
Set the exposure sequence for the HDR exposure mode. | |
ErrorStatus | getScan3DHDRExposureSequence (int &time1, int &time2, int &time3) const |
Get the current exposure sequence for the HDR exposure mode. | |
ErrorStatus | setLnxHDRDualSlope (int value) const |
Set the y-coordinate of the first HDR knee point. | |
ErrorStatus | getLnxHDRDualSlope (int &value) const |
Get the current y-coordinate of the first HDR knee point. | |
ErrorStatus | setLnxHDRTripleSlope (int value) const |
Set the y-coordinate of the second HDR knee point. | |
ErrorStatus | getLnxHDRTripleSlope (int &value) const |
Get the current y-coordinate of the second HDR knee point. | |
ErrorStatus | setScan3DAnalogGain (ImageAnalogGain gainVal) const |
Set the analog gain. | |
ErrorStatus | getScan3DAnalogGain (ImageAnalogGain &gainVal) const |
Get the current analog gain. | |
ErrorStatus | setScan3DAnalogGainFor8030 (ImageAnalogGainFor8030 gainVal) const |
Set the analog gain of LNX-8030. | |
ErrorStatus | getScan3DAnalogGainFor8030 (ImageAnalogGainFor8030 &gainVal) const |
Get the current analog gain of LNX-8030. | |
ErrorStatus | setScan3DDigitalGain (int gainVal) const |
Set the digital gain. | |
ErrorStatus | getScan3DDigitalGain (int &gainVal) const |
Get the current digital gain. | |
ErrorStatus | setLnxROIMode (ROIMode mode) const |
Set the ROI mode. | |
ErrorStatus | getLnxROIMode (ROIMode &mode) const |
Get the current ROI mode. | |
ErrorStatus | setLnxTriggerDelay (int delay) const |
Set the trigger delay time. | |
ErrorStatus | getLnxTriggerDelay (int &delay) const |
Get the current trigger delay time. | |
ErrorStatus | setLnxDepthTriggerSource (TriggerSource triggerSource) const |
Set the trigger source for the Depth scan mode. Note: this function can only be used in CaptureMode::Depth. It does not take effect in CaptureMode::Raw. | |
ErrorStatus | getLnxDepthTriggerSource (TriggerSource &triggerSource) const |
Get the current trigger source for the Depth scan mode. | |
ErrorStatus | setLnxLineRate (double rate) const |
Set the line rate for the Software trigger source. | |
ErrorStatus | getLnxLineRate (double &rate) const |
Get the current line rate for the Software trigger source. | |
ErrorStatus | setLnxProfileNum (int profileNum) const |
Set the maximum number of lines to be scanned. | |
ErrorStatus | getLnxProfileNum (int &profileNum) const |
Get the current maximum number of lines to be scanned. | |
ErrorStatus | setLnxEncoderTriggerMode (EncoderTriggerMode mode) const |
Set the encoder trigger mode. | |
ErrorStatus | getLnxEncoderTriggerMode (EncoderTriggerMode &mode) const |
Get the current encoder trigger mode. | |
ErrorStatus | setLnxEncoderDivide (int interval) const |
Set the encoder divider value. Camera frame rate = encoder signal rate * encoder multiplier / encoder divider. | |
ErrorStatus | getLnxEncoderDivide (int &interval) const |
Get the current encoder divider value. | |
ErrorStatus | setLnxEncoderMultiplier (EncoderMultiplier multiple) const |
Set the encoder multiplier value. | |
ErrorStatus | getLnxEncoderMultiplier (EncoderMultiplier &multiple) const |
Get the current encoder multiplier value. | |
ErrorStatus | setLnxFilterType (FilterType type) const |
Set the filter type. | |
ErrorStatus | getLnxFilterType (FilterType &type) const |
Get the filter type. | |
ErrorStatus | setLnxMeanFilterWindow (MeanFilterWindow window) const |
Set the window size for mean filtering. | |
ErrorStatus | getLnxMeanFilterWindow (MeanFilterWindow &window) const |
Get the current window size for mean filtering. | |
ErrorStatus | setLnxMedianFilterWindow (MedianFilterWindow window) const |
Set the window size for median filtering. | |
ErrorStatus | getLnxMedianFilterWindow (MedianFilterWindow &window) const |
Get the current window size for median filtering. | |
ErrorStatus | setLnxMaxFillingPointCount (int value) const |
Set the maximum number of invalid points to be interpolated. | |
ErrorStatus | getLnxMaxFillingPointCount (int &value) const |
Get the current maximum number of invalid points to be interpolated. | |
ErrorStatus | setLnxProfileStrategy (ProfileStrategy value) const |
Set profile extraction strategy. | |
ErrorStatus | getLnxProfileStrategy (ProfileStrategy &value) const |
Get the current profile extraction strategy. | |
ErrorStatus | setLnxGrayFilterThresh (int value) const |
Set the grayscale value threshold. Grayscale values of pixels below this threshold are set to zero before profile extraction. | |
ErrorStatus | getLnxGrayFilterThresh (int &value) const |
Get the current grayscale value threshold. | |
ErrorStatus | setLnxMinStripeWidth (int value) |
Set the minimum laser line width. | |
ErrorStatus | getLnxMinStripeWidth (int &value) const |
Get the current minimum laser line width. | |
ErrorStatus | setLnxMaxStripeWidth (int value) |
Set the maximum laser line width. | |
ErrorStatus | getLnxMaxStripeWidth (int &value) const |
Get the current maximum laser line width. | |
ErrorStatus | setLnxMinStripeIntensity (int value) |
Set the minimum laser line intensity. | |
ErrorStatus | getLnxMinStripeIntensity (int &value) const |
Get the current minimum laser line intensity. | |
ErrorStatus | setLnxMaxStripeIntensity (int value) |
Set the maximum laser line intensity. | |
ErrorStatus | getLnxMaxStripeIntensity (int &value) const |
Get the current maximum laser line intensity. | |
ErrorStatus | getLnxEncoderValue (unsigned int &value) const |
Get the current encoder value. | |
Static Public Member Functions | |
static std::vector< api::MechEyeDeviceInfo > | enumerateMechEyeDeviceList () |
Enumerate Mech-Eye devices by the MechEyeDeviceInfo identifying the device. | |
Interface that is used to connect the LNX Mech-Eye device and access basic information of the device.
MechEyeDevice | ( | ) |
Constructor.
~MechEyeDevice | ( | ) |
Destructor.
ErrorStatus addUserSet | ( | const std::string & | userSetName | ) | const |
Add a new parameter group, set all the current parameter values to it, and select it as the current parameter group.
[in] | userSetName |
ErrorStatus captureLnx2DImage | ( | ColorMap & | colorMap | ) | const |
Perform scanning of one line and obtain the line scan image.
[out] | colorMap | See Frame for details. |
ErrorStatus connect | ( | const MechEyeDeviceInfo & | info, |
const int | timeout = 10000 |
||
) |
Connect to the device by the MechEyeDeviceInfo identifying a device.
[in] | info | the device information used to connect to the device which can be obtained by enumerateMechEyeDeviceList function. |
[in] | timeout | the timeout value (ms). |
ErrorStatus connect | ( | const std::string & | ipAddress, |
const int | port = 5577 , |
||
const int | timeout = 10000 |
||
) |
Connects to a device by the IP address and port of the device.
[in] | ipAddress | the IP address of the device to be connected. |
[in] | port | the port of the device to be connected. |
[in] | timeout | the timeout value (ms). |
ErrorStatus deleteUserSet | ( | const std::string & | userSetName | ) | const |
Delete the specified parameter group. If the input name is the currently selected parameter group's, the parameter group of the previous index value in the list will be selected instead.
[in] | userSetName |
void disconnect | ( | ) |
Disconnect from the device.
|
static |
Enumerate Mech-Eye devices by the MechEyeDeviceInfo identifying the device.
ErrorStatus getAllUserSets | ( | std::vector< std::string > & | userSetNames | ) | const |
Get the names of all available parameter groups.
[out] | userSetNames |
ErrorStatus getCurrentUserSet | ( | std::string & | userSetName | ) | const |
Get the name of the currently selected parameter group.
[out] | userSetName |
ErrorStatus getDeviceInfo | ( | api::MechEyeDeviceInfo & | info | ) | const |
Get the basic information of the connected device.
[out] | info | See MechEyeDeviceInfo for details. |
ErrorStatus getLnxBatchRollData | ( | float * | depth, |
unsigned char * | intensity, | ||
unsigned int * | encoder, | ||
long long * | frameId, | ||
int & | lineCount | ||
) | const |
Get the acquired batch data.
[out] | depth | the depth value or profile value (mm) |
[out] | intensity | the intensity value |
[out] | encoder | the encoder value |
[out] | frameId | the frame ID |
[out] | lineCount | the count of frame |
ErrorStatus getLnxBatchRollData | ( | LineBatch & | LineBatch | ) | const |
Get the acquired batch data.
ErrorStatus getLnxCaptureMode | ( | CaptureMode & | value | ) | const |
Get the current scan mode.
[out] | value | See CaptureMode for details. |
ErrorStatus getLnxDepthTimeout | ( | int & | time | ) | const |
Get the current timeout value for obtaining the depth map.
[out] | time | (ms) |
ErrorStatus getLnxDepthTriggerSource | ( | TriggerSource & | triggerSource | ) | const |
Get the current trigger source for the Depth scan mode.
[out] | triggerSource | See TriggerSource for details. |
ErrorStatus getLnxEncoderDivide | ( | int & | interval | ) | const |
ErrorStatus getLnxEncoderMultiplier | ( | EncoderMultiplier & | multiple | ) | const |
Get the current encoder multiplier value.
[out] | multiple | See EncoderMultiplier for details. |
ErrorStatus getLnxEncoderTriggerMode | ( | EncoderTriggerMode & | mode | ) | const |
Get the current encoder trigger mode.
[out] | mode | See EncoderTriggerMode for details. |
ErrorStatus getLnxEncoderValue | ( | unsigned int & | value | ) | const |
ErrorStatus getLnxExposure | ( | int & | time | ) | const |
Get the current exposure time for the Timed exposure mode.
[in] | time | (μs) |
ErrorStatus getLnxFilterType | ( | FilterType & | type | ) | const |
Get the filter type.
[out] | type | See FilterType for details. |
ErrorStatus getLnxGrayFilterThresh | ( | int & | value | ) | const |
Get the current grayscale value threshold.
[out] | value |
ErrorStatus getLnxHDRDualSlope | ( | int & | value | ) | const |
Get the current y-coordinate of the first HDR knee point.
[out] | value. |
ErrorStatus getLnxHDRTripleSlope | ( | int & | value | ) | const |
Get the current y-coordinate of the second HDR knee point.
[out] | value. |
ErrorStatus getLnxLaserPowerLevel | ( | int & | powerLevel | ) | const |
ErrorStatus getLnxLineRate | ( | double & | rate | ) | const |
Get the current line rate for the Software trigger source.
[out] | rate |
ErrorStatus getLnxMaxFillingPointCount | ( | int & | value | ) | const |
Get the current maximum number of invalid points to be interpolated.
[out] | value |
ErrorStatus getLnxMaxStripeIntensity | ( | int & | value | ) | const |
Get the current maximum laser line intensity.
[out] | value |
ErrorStatus getLnxMaxStripeWidth | ( | int & | value | ) | const |
ErrorStatus getLnxMeanFilterWindow | ( | MeanFilterWindow & | window | ) | const |
Get the current window size for mean filtering.
[out] | window | See MeanFilterWindow for details. |
ErrorStatus getLnxMedianFilterWindow | ( | MedianFilterWindow & | window | ) | const |
Get the current window size for median filtering.
[out] | window | See MedianFilterWindow for details. |
ErrorStatus getLnxMinStripeIntensity | ( | int & | value | ) | const |
Get the current minimum laser line intensity.
[out] | value |
ErrorStatus getLnxMinStripeWidth | ( | int & | value | ) | const |
ErrorStatus getLnxProfileNum | ( | int & | profileNum | ) | const |
Get the current maximum number of lines to be scanned.
[out] | profileNum |
ErrorStatus getLnxProfileStrategy | ( | ProfileStrategy & | value | ) | const |
Get the current profile extraction strategy.
[out] | value | See ProfileStrategy for details. |
ErrorStatus getLnxRawTimeout | ( | int & | time | ) | const |
Get the current timeout value for obtaining the line scan image.
[out] | time | (ms) |
ErrorStatus getLnxROIMode | ( | ROIMode & | mode | ) | const |
Get the current ROI mode.
[out] | mode | See ROIMode for details. |
ErrorStatus getLnxTriggerDelay | ( | int & | delay | ) | const |
Get the current trigger delay time.
[out] | delay | (1-2600us) |
ErrorStatus getLnxXDataWidth | ( | int & | xDataWidth | ) | const |
Get the line width in the X direction.
[out] | xDataWidth |
ErrorStatus getLnxXScale | ( | float & | xScale | ) | const |
ErrorStatus getScan3DAnalogGain | ( | ImageAnalogGain & | gainVal | ) | const |
Get the current analog gain.
[out] | gainVal | See ImageAnalogGain for details. |
ErrorStatus getScan3DAnalogGainFor8030 | ( | ImageAnalogGainFor8030 & | gainVal | ) | const |
Get the current analog gain of LNX-8030.
[out] | gainVal | See ImageAnalogGainFor8030 for details. |
ErrorStatus getScan3DDigitalGain | ( | int & | gainVal | ) | const |
ErrorStatus getScan3DHDRExposureSequence | ( | int & | time1, |
int & | time2, | ||
int & | time3 | ||
) | const |
Get the current exposure sequence for the HDR exposure mode.
[out] | time1 | the exposure time1 (μs) |
[out] | time2 | the exposure time2 (μs) |
[out] | time3 | the exposure time3 (μs) |
ErrorStatus getScanExposureMode | ( | ExposureMode & | mode | ) | const |
Get the current exposure mode.
[out] | mode | ExposureMode for details. |
ErrorStatus saveAllSettingsToUserSets | ( | ) | const |
Save all parameter values to the current parameter group.
ErrorStatus setCurrentUserSet | ( | const std::string & | userSetName | ) | const |
Select the parameter group to use by its name.
[in] | userSetName |
ErrorStatus setLnxCaptureMode | ( | CaptureMode | value | ) | const |
ErrorStatus setLnxDepthTimeout | ( | int | time | ) | const |
Set the timeout value for obtaining the depth map.
[in] | time | (ms) |
ErrorStatus setLnxDepthTriggerSource | ( | TriggerSource | triggerSource | ) | const |
Set the trigger source for the Depth scan mode.
Note: this function can only be used in CaptureMode::Depth. It does not take effect in CaptureMode::Raw.
[in] | triggerSource | See TriggerSource for details. |
ErrorStatus setLnxEncoderDivide | ( | int | interval | ) | const |
Set the encoder divider value. Camera frame rate = encoder signal rate * encoder multiplier / encoder divider.
[in] | interval |
ErrorStatus setLnxEncoderMultiplier | ( | EncoderMultiplier | multiple | ) | const |
Set the encoder multiplier value.
[in] | multiple | See EncoderMultiplier for details. |
ErrorStatus setLnxEncoderTriggerMode | ( | EncoderTriggerMode | mode | ) | const |
Set the encoder trigger mode.
[in] | mode | See EncoderTriggerMode for details. |
ErrorStatus setLnxExposure | ( | int | time | ) | const |
Set the exposure time for the Timed exposure mode.
[in] | time | (μs) |
ErrorStatus setLnxFilterType | ( | FilterType | type | ) | const |
Set the filter type.
[in] | type | See FilterType for details. |
ErrorStatus setLnxGrayFilterThresh | ( | int | value | ) | const |
Set the grayscale value threshold. Grayscale values of pixels below this threshold are set to zero before profile extraction.
[in] | value |
ErrorStatus setLnxHDRDualSlope | ( | int | value | ) | const |
Set the y-coordinate of the first HDR knee point.
[in] | value. |
ErrorStatus setLnxHDRTripleSlope | ( | int | value | ) | const |
Set the y-coordinate of the second HDR knee point.
[in] | value. |
ErrorStatus setLnxLaserPowerLevel | ( | int | powerLevel | ) | const |
ErrorStatus setLnxLineRate | ( | double | rate | ) | const |
Set the line rate for the Software trigger source.
[in] | rate |
ErrorStatus setLnxMaxFillingPointCount | ( | int | value | ) | const |
Set the maximum number of invalid points to be interpolated.
[in] | value |
ErrorStatus setLnxMaxStripeIntensity | ( | int | value | ) |
ErrorStatus setLnxMaxStripeWidth | ( | int | value | ) |
ErrorStatus setLnxMeanFilterWindow | ( | MeanFilterWindow | window | ) | const |
Set the window size for mean filtering.
[in] | window | See MeanFilterWindow for details. |
ErrorStatus setLnxMedianFilterWindow | ( | MedianFilterWindow | window | ) | const |
Set the window size for median filtering.
[in] | window | See MedianFilterWindow for details. |
ErrorStatus setLnxMinStripeIntensity | ( | int | value | ) |
ErrorStatus setLnxMinStripeWidth | ( | int | value | ) |
ErrorStatus setLnxProfileNum | ( | int | profileNum | ) | const |
Set the maximum number of lines to be scanned.
[in] | profileNum |
ErrorStatus setLnxProfileStrategy | ( | ProfileStrategy | value | ) | const |
Set profile extraction strategy.
[in] | value | See ProfileStrategy for details. |
ErrorStatus setLnxRawTimeout | ( | int | time | ) | const |
Set the timeout value for obtaining the line scan image.
[in] | time | (ms) |
ErrorStatus setLnxROIMode | ( | ROIMode | mode | ) | const |
ErrorStatus setLnxTriggerDelay | ( | int | delay | ) | const |
ErrorStatus setScan3DAnalogGain | ( | ImageAnalogGain | gainVal | ) | const |
Set the analog gain.
[in] | gainVal | See ImageAnalogGain for details. |
ErrorStatus setScan3DAnalogGainFor8030 | ( | ImageAnalogGainFor8030 | gainVal | ) | const |
Set the analog gain of LNX-8030.
[in] | gainVal | See ImageAnalogGainFor8030 for details. |
ErrorStatus setScan3DDigitalGain | ( | int | gainVal | ) | const |
ErrorStatus setScan3DHDRExposureSequence | ( | int | time1, |
int | time2, | ||
int | time3 | ||
) | const |
Set the exposure sequence for the HDR exposure mode.
[in] | time1 | the exposure time1 (μs) |
[in] | time2 | the exposure time2 (μs) |
[in] | time3 | the exposure time3 (μs) |
ErrorStatus setScanExposureMode | ( | ExposureMode | mode | ) | const |
Set the exposure mode.
[in] | mode | ExposureMode for details. |
ErrorStatus startLnxCaptureImage | ( | ) |
Start scanning.
ErrorStatus stopLnxCaptureImage | ( | ) |
Stop scanning.