Mech-Eye API 2.5.0
API reference documentation for Mech-Eye 3D Laser Profiler
|
Public Member Functions | |
bool | setCalibCameraModel (const std::string &cameraModel) |
Sets the model of the laser profilers used in the calibration, in the form of a string such as "Mech-Eye LNX-8030". | |
void | setMajorDeviceInfo (const DeviceInfo &deviceInfo) |
Initializes the configuration for the primary laser profiler. | |
void | setMinorDeviceInfos (const std::vector< DeviceInfo > &deviceInfos) |
Initializes the configuration for the secondary laser profiler(s). | |
void | setCalibTargetSize (const TargetSize &targetSize) |
Sets the dimensions of the frustums of the calibration target. | |
void | setCalibTargetPoses (const std::vector< TargetPose > &targetPoses) |
Defines the relative position of the frustums of the calibration target. | |
MultiProfilerErrorStatus | calculateCalibration (const cv::Mat &majorDepth, const std::vector< cv::Mat > &minorDepths, std::vector< CalibResult > &calibResults) |
Calculates the calibration results based on the depth maps acquired by the primary and secondary laser profilers. | |
bool | saveCalibFiles (bool needSaveAll=true, const std::string &saveFolderName="") const |
Saves the calibration data to files in the specified path. | |
MultiProfilerErrorStatus | stitchImages (const ProfilerImage &majorImage, const std::vector< ProfilerImage > &minorImages, const std::vector< CalibResult > &calibResults, MultiStitchResult &stitchResults, const std::optional< MultiStitchParams > &stitchParams=std::nullopt) |
Calculates the stitching results when the laser profilers are arranged in the Angle mode (i.e., in the opposite direction or around a circle). | |
MultiProfilerErrorStatus | stitchImagesForZParallel (const ProfilerImage &majorImage, const std::vector< ProfilerImage > &minorImages, const std::vector< CalibResult > &calibResults, MultiStitchResultZParallel &stitchResults, const std::optional< MultiStitchParams > &stitchParams=std::nullopt) |
Calculates the stitching results when the laser profilers are arranged in the Wide mode (i.e., side-by-side or in the reversed direction). | |
MultiProfilerErrorStatus | imageFusionForZParallel (FusionResult &fusionResult, const std::vector< bool > &fusionFlag={}) |
Performs fusion based on the stitching results when the laser profilers are arranged in the Wide mode (i.e., side-by-side or in the reversed direction). | |
MultiProfilerErrorStatus | imageFusionForZParallel (const ProfilerImage &majorStitchImage, const std::vector< MinorStitchResultZParallel > &minorStitchResults, const cv::Point2i &majorBias, FusionResult &fusionResult, const std::vector< bool > &fusionFlag={}) |
Performs fusion based on the stitching results when the laser profilers are arranged in the Wide mode (i.e., side-by-side or in the reversed direction). | |
bool | saveStitchFiles (const std::string &saveFolderName="") const |
Saves the stitching results to files in the specified path. | |
bool | saveStitchFilesForZParallel (const std::string &saveFolderName="") const |
Saves the stitching results to files in the specified path when the laser profilers are arranged in the Wide mode (i.e., side-by-side or in the reversed direction). | |
MultiProfilerErrorStatus | loadCalibProperties (const std::string &loadFolderName="", bool needLoadAll=false) |
Loads the calibration data from the files in the specified path, typically used before stitching starts. | |
std::vector< CalibResult > | getCurrentCalibResults () const |
Gets the current calibration results, which can be used for stitching. | |
DeviceInfo | getMajorDeviceInfo () const |
Gets the major device information. This function retrieves the information of the primary device used in the calibration or processing pipeline. | |
TargetSize | getTargetSize () const |
Gets the target size. This function retrieves the size of the calibration target. | |
std::string | getCameraModel () const |
Gets the camera model identifier. This function retrieves the model name of the profiler. | |
std::vector< DeviceInfo > | getMinorDeviceInfos () const |
Gets the minor devices' information. This function retrieves a list of information for all minor devices in the system. | |
std::vector< TargetPose > | getTargetPoses () const |
Gets the calibration target poses. This function retrieves the spatial positions and orientations of the calibration target captured during the calibration process. | |
ProfilerCalibrationInterfaces (const std::string &cameraModel, const DeviceInfo &majorDeviceInfo, const std::vector< DeviceInfo > &minorDeviceInfos, const TargetSize &targetSize, const std::vector< TargetPose > &targetPoses) | |
Constructs a new ProfilerCalibrationInterfaces object with specified parameters. This constructor initializes the calibration interface with the provided camera model, device information, target size, and target poses. | |
Definition at line 47 of file ProfilerCalibrationInterfaces.h.
mmind::eye::ProfilerCalibrationInterfaces::ProfilerCalibrationInterfaces | ( | const std::string & | cameraModel, |
const DeviceInfo & | majorDeviceInfo, | ||
const std::vector< DeviceInfo > & | minorDeviceInfos, | ||
const TargetSize & | targetSize, | ||
const std::vector< TargetPose > & | targetPoses | ||
) |
Constructs a new ProfilerCalibrationInterfaces
object with specified parameters. This constructor initializes the calibration interface with the provided camera model, device information, target size, and target poses.
[in] | cameraModel | A string representing the camera model (e.g., "Mech-Eye LNX-8030"). |
[in] | majorDeviceInfo | A structure containing the configuration parameters of the major device. |
[in] | minorDeviceInfos | A vector of DeviceInfo structures containing configuration data for each minor device. |
[in] | targetSize | A structure defining the size of the calibration target. |
[in] | targetPoses | A vector of TargetPose structures describing the positions and orientations of the calibration targets. |
MultiProfilerErrorStatus mmind::eye::ProfilerCalibrationInterfaces::calculateCalibration | ( | const cv::Mat & | majorDepth, |
const std::vector< cv::Mat > & | minorDepths, | ||
std::vector< CalibResult > & | calibResults | ||
) |
Calculates the calibration results based on the depth maps acquired by the primary and secondary laser profilers.
[in] | majorDepth | Depth map acquired by the primary laser profiler. |
[in] | minorDepths | Depth map(s) acquired by secondary laser profiler(s). |
[out] | calibResults | The calibration results and errors. See CalibResult for details. |
std::string mmind::eye::ProfilerCalibrationInterfaces::getCameraModel | ( | ) | const |
Gets the camera model identifier. This function retrieves the model name of the profiler.
std::vector< CalibResult > mmind::eye::ProfilerCalibrationInterfaces::getCurrentCalibResults | ( | ) | const |
Gets the current calibration results, which can be used for stitching.
DeviceInfo mmind::eye::ProfilerCalibrationInterfaces::getMajorDeviceInfo | ( | ) | const |
Gets the major device information. This function retrieves the information of the primary device used in the calibration or processing pipeline.
DeviceInfo
object containing the details of the major device. std::vector< DeviceInfo > mmind::eye::ProfilerCalibrationInterfaces::getMinorDeviceInfos | ( | ) | const |
Gets the minor devices' information. This function retrieves a list of information for all minor devices in the system.
DeviceInfo
containing details of the minor devices. std::vector< TargetPose > mmind::eye::ProfilerCalibrationInterfaces::getTargetPoses | ( | ) | const |
Gets the calibration target poses. This function retrieves the spatial positions and orientations of the calibration target captured during the calibration process.
TargetPose
containing the captured pose data. TargetSize mmind::eye::ProfilerCalibrationInterfaces::getTargetSize | ( | ) | const |
Gets the target size. This function retrieves the size of the calibration target.
TargetSize
object representing the size of the target. MultiProfilerErrorStatus mmind::eye::ProfilerCalibrationInterfaces::imageFusionForZParallel | ( | const ProfilerImage & | majorStitchImage, |
const std::vector< MinorStitchResultZParallel > & | minorStitchResults, | ||
const cv::Point2i & | majorBias, | ||
FusionResult & | fusionResult, | ||
const std::vector< bool > & | fusionFlag = {} |
||
) |
Performs fusion based on the stitching results when the laser profilers are arranged in the Wide mode (i.e., side-by-side or in the reversed direction).
[in] | majorStitchImage | The intensity image and depth map acquired by the primary laser profiler and converted to the coordinate system of the secondary laser profiler. |
[in] | minorStitchResults | The intensity image and depth map acquired by the secondary laser profiler(s) and converted to the coordinate system of the primary laser profiler. |
[in] | majorBias | The bias of the primary laser profiler relative to the laser profiler used as the reference in stitching. |
[out] | fusionResult | The fused intensity image and depth map, and the coordinates of the upper-left pixels of the intensity image and depth may acquired by the primary laser profiler. |
[in] | fusionFlag | Optional. Specifies whether to perform fusion. If left empty, fusion will be performed. |
MultiProfilerErrorStatus mmind::eye::ProfilerCalibrationInterfaces::imageFusionForZParallel | ( | FusionResult & | fusionResult, |
const std::vector< bool > & | fusionFlag = {} |
||
) |
Performs fusion based on the stitching results when the laser profilers are arranged in the Wide mode (i.e., side-by-side or in the reversed direction).
[out] | fusionResult | The fused intensity image and depth map, and the coordinates of the upper-left pixels of the intensity image and depth map acquired by the primary laser profiler. |
[in] | fusionFlag | Optional. Specifies whether to perform fusion. If left empty, fusion will be performed. |
MultiProfilerErrorStatus mmind::eye::ProfilerCalibrationInterfaces::loadCalibProperties | ( | const std::string & | loadFolderName = "" , |
bool | needLoadAll = false |
||
) |
Loads the calibration data from the files in the specified path, typically used before stitching starts.
[in] | loadFolderName | The path of the files storing the calibration data to be loaded. |
[in] | needLoadAll | Specifies whether all data related to the calibration should be loaded. When set to "false", only the calibration configurations, results, and errors will be loaded. When set to "true" (the default value), the intensity images and depth maps acquired by the laser profilers will also be loaded. |
bool mmind::eye::ProfilerCalibrationInterfaces::saveCalibFiles | ( | bool | needSaveAll = true , |
const std::string & | saveFolderName = "" |
||
) | const |
Saves the calibration data to files in the specified path.
[in] | needSaveAll | Specifies whether all data related to the calibration should be saved. When set to "false", only the calibration configurations, results, and errors will be saved. When set to "true" (the default value), the intensity images and depth maps acquired by the laser profilers will also be saved. |
[in] | saveFolderName | The path where the files should be saved. If left empty, the default path will be used. |
bool mmind::eye::ProfilerCalibrationInterfaces::saveStitchFiles | ( | const std::string & | saveFolderName = "" | ) | const |
Saves the stitching results to files in the specified path.
[in] | saveFolderName | The path where the files should be saved. If left empty, the default path will be used. |
bool mmind::eye::ProfilerCalibrationInterfaces::saveStitchFilesForZParallel | ( | const std::string & | saveFolderName = "" | ) | const |
Saves the stitching results to files in the specified path when the laser profilers are arranged in the Wide mode (i.e., side-by-side or in the reversed direction).
[in] | saveFolderName | The path where the files should be saved. If left empty, the default path will be used. |
bool mmind::eye::ProfilerCalibrationInterfaces::setCalibCameraModel | ( | const std::string & | cameraModel | ) |
Sets the model of the laser profilers used in the calibration, in the form of a string such as "Mech-Eye LNX-8030".
[in] | cameraModel | The laser profiler model. |
void mmind::eye::ProfilerCalibrationInterfaces::setCalibTargetPoses | ( | const std::vector< TargetPose > & | targetPoses | ) |
Defines the relative position of the frustums of the calibration target.
[in] | targetPoses | The position and orientation of the frustums of the calibration target. See TargetPose for details. |
void mmind::eye::ProfilerCalibrationInterfaces::setCalibTargetSize | ( | const TargetSize & | targetSize | ) |
Sets the dimensions of the frustums of the calibration target.
[in] | targetSize | The dimensions of the frustums, including the upper base length, lower base length, and height. See TargetSize for details. |
void mmind::eye::ProfilerCalibrationInterfaces::setMajorDeviceInfo | ( | const DeviceInfo & | deviceInfo | ) |
Initializes the configuration for the primary laser profiler.
[in] | deviceInfo | The configuration for the primary laser profiler. See DeviceInfo for details. |
void mmind::eye::ProfilerCalibrationInterfaces::setMinorDeviceInfos | ( | const std::vector< DeviceInfo > & | deviceInfos | ) |
Initializes the configuration for the secondary laser profiler(s).
[in] | deviceInfos | The configuration for each secondary laser profiler. See DeviceInfo for details. |
MultiProfilerErrorStatus mmind::eye::ProfilerCalibrationInterfaces::stitchImages | ( | const ProfilerImage & | majorImage, |
const std::vector< ProfilerImage > & | minorImages, | ||
const std::vector< CalibResult > & | calibResults, | ||
MultiStitchResult & | stitchResults, | ||
const std::optional< MultiStitchParams > & | stitchParams = std::nullopt |
||
) |
Calculates the stitching results when the laser profilers are arranged in the Angle mode (i.e., in the opposite direction or around a circle).
[in] | majorImage | Intensity image and depth map from the primary laser profiler. |
[in] | minorImages | Intensity image(s) and depth map(s) from the secondary laser profiler(s). |
[in] | calibResults | The calibration results and errors used for stitching, which can be either calculated or loaded from files. See CalibResult for details. |
[out] | stitchResults | The stitched intensity image and depth map, and transformation result file. |
[in] | stitchParams | Optional. If left empty, default or previously set calibration parameters will be used for stitching. |
MultiProfilerErrorStatus mmind::eye::ProfilerCalibrationInterfaces::stitchImagesForZParallel | ( | const ProfilerImage & | majorImage, |
const std::vector< ProfilerImage > & | minorImages, | ||
const std::vector< CalibResult > & | calibResults, | ||
MultiStitchResultZParallel & | stitchResults, | ||
const std::optional< MultiStitchParams > & | stitchParams = std::nullopt |
||
) |
Calculates the stitching results when the laser profilers are arranged in the Wide mode (i.e., side-by-side or in the reversed direction).
[in] | majorImage | Intensity image and depth map from the primary laser profiler. |
[in] | minorImages | Intensity image(s) and depth map(s) from the secondary laser profiler(s). |
[in] | calibResults | The calibration results and errors used for stitching, which can be either calculated or loaded from files. See CalibResult for details. |
[out] | stitchResults | The stitched intensity image and depth map and transformation result file. |
[in] | stitchParams | Optional. If left empty, default or previously set calibration parameters will be used for stitching. |