Mech-Eye API 2.5.0
API reference documentation for Mech-Eye 3D Laser Profiler
All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
mmind::eye::ProfilerCalibrationInterfaces Class Reference

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< CalibResultgetCurrentCalibResults () 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< DeviceInfogetMinorDeviceInfos () const
 Gets the minor devices' information. This function retrieves a list of information for all minor devices in the system.
 
std::vector< TargetPosegetTargetPoses () 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.
 

Detailed Description

Definition at line 47 of file ProfilerCalibrationInterfaces.h.

Constructor & Destructor Documentation

◆ ProfilerCalibrationInterfaces()

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.

Parameters
[in]cameraModelA string representing the camera model (e.g., "Mech-Eye LNX-8030").
[in]majorDeviceInfoA structure containing the configuration parameters of the major device.
[in]minorDeviceInfosA vector of DeviceInfo structures containing configuration data for each minor device.
[in]targetSizeA structure defining the size of the calibration target.
[in]targetPosesA vector of TargetPose structures describing the positions and orientations of the calibration targets.

Member Function Documentation

◆ calculateCalibration()

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.

Parameters
[in]majorDepthDepth map acquired by the primary laser profiler.
[in]minorDepthsDepth map(s) acquired by secondary laser profiler(s).
[out]calibResultsThe calibration results and errors. See CalibResult for details.
Returns
See MultiProfilerErrorStatus for details.

◆ getCameraModel()

std::string mmind::eye::ProfilerCalibrationInterfaces::getCameraModel ( ) const

Gets the camera model identifier. This function retrieves the model name of the profiler.

Returns
Returns a string containing the camera model name.

◆ getCurrentCalibResults()

std::vector< CalibResult > mmind::eye::ProfilerCalibrationInterfaces::getCurrentCalibResults ( ) const

Gets the current calibration results, which can be used for stitching.

Returns
Returns the calibration results and errors. See CalibResult for details.

◆ getMajorDeviceInfo()

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.

Returns
Returns a DeviceInfo object containing the details of the major device.

◆ getMinorDeviceInfos()

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.

Returns
Returns a vector of DeviceInfo containing details of the minor devices.

◆ getTargetPoses()

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.

Returns
Returns a vector of TargetPose containing the captured pose data.

◆ getTargetSize()

TargetSize mmind::eye::ProfilerCalibrationInterfaces::getTargetSize ( ) const

Gets the target size. This function retrieves the size of the calibration target.

Returns
Returns a TargetSize object representing the size of the target.

◆ imageFusionForZParallel() [1/2]

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).

Parameters
[in]majorStitchImageThe intensity image and depth map acquired by the primary laser profiler and converted to the coordinate system of the secondary laser profiler.
[in]minorStitchResultsThe intensity image and depth map acquired by the secondary laser profiler(s) and converted to the coordinate system of the primary laser profiler.
[in]majorBiasThe bias of the primary laser profiler relative to the laser profiler used as the reference in stitching.
[out]fusionResultThe 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]fusionFlagOptional. Specifies whether to perform fusion. If left empty, fusion will be performed.
Returns
See MultiProfilerErrorStatus for details.

◆ imageFusionForZParallel() [2/2]

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).

Parameters
[out]fusionResultThe 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]fusionFlagOptional. Specifies whether to perform fusion. If left empty, fusion will be performed.
Returns
See MultiProfilerErrorStatus for details.

◆ loadCalibProperties()

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.

Parameters
[in]loadFolderNameThe path of the files storing the calibration data to be loaded.
[in]needLoadAllSpecifies 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.
Returns
See MultiProfilerErrorStatus for details.

◆ saveCalibFiles()

bool mmind::eye::ProfilerCalibrationInterfaces::saveCalibFiles ( bool  needSaveAll = true,
const std::string &  saveFolderName = "" 
) const

Saves the calibration data to files in the specified path.

Parameters
[in]needSaveAllSpecifies 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]saveFolderNameThe path where the files should be saved. If left empty, the default path will be used.
Returns
Returns true on success and false on failure.

◆ saveStitchFiles()

bool mmind::eye::ProfilerCalibrationInterfaces::saveStitchFiles ( const std::string &  saveFolderName = "") const

Saves the stitching results to files in the specified path.

Parameters
[in]saveFolderNameThe path where the files should be saved. If left empty, the default path will be used.
Returns
Returns true on success and false on failure.

◆ saveStitchFilesForZParallel()

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).

Parameters
[in]saveFolderNameThe path where the files should be saved. If left empty, the default path will be used.
Returns
Returns true on success and false on failure.

◆ setCalibCameraModel()

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".

Parameters
[in]cameraModelThe laser profiler model.
Returns
Returns true on success and false on failure.

◆ setCalibTargetPoses()

void mmind::eye::ProfilerCalibrationInterfaces::setCalibTargetPoses ( const std::vector< TargetPose > &  targetPoses)

Defines the relative position of the frustums of the calibration target.

Parameters
[in]targetPosesThe position and orientation of the frustums of the calibration target. See TargetPose for details.

◆ setCalibTargetSize()

void mmind::eye::ProfilerCalibrationInterfaces::setCalibTargetSize ( const TargetSize targetSize)

Sets the dimensions of the frustums of the calibration target.

Parameters
[in]targetSizeThe dimensions of the frustums, including the upper base length, lower base length, and height. See TargetSize for details.

◆ setMajorDeviceInfo()

void mmind::eye::ProfilerCalibrationInterfaces::setMajorDeviceInfo ( const DeviceInfo deviceInfo)

Initializes the configuration for the primary laser profiler.

Parameters
[in]deviceInfoThe configuration for the primary laser profiler. See DeviceInfo for details.

◆ setMinorDeviceInfos()

void mmind::eye::ProfilerCalibrationInterfaces::setMinorDeviceInfos ( const std::vector< DeviceInfo > &  deviceInfos)

Initializes the configuration for the secondary laser profiler(s).

Parameters
[in]deviceInfosThe configuration for each secondary laser profiler. See DeviceInfo for details.

◆ stitchImages()

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).

Parameters
[in]majorImageIntensity image and depth map from the primary laser profiler.
[in]minorImagesIntensity image(s) and depth map(s) from the secondary laser profiler(s).
[in]calibResultsThe calibration results and errors used for stitching, which can be either calculated or loaded from files. See CalibResult for details.
[out]stitchResultsThe stitched intensity image and depth map, and transformation result file.
[in]stitchParamsOptional. If left empty, default or previously set calibration parameters will be used for stitching.
Returns
See MultiProfilerErrorStatus for details.

◆ stitchImagesForZParallel()

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).

Parameters
[in]majorImageIntensity image and depth map from the primary laser profiler.
[in]minorImagesIntensity image(s) and depth map(s) from the secondary laser profiler(s).
[in]calibResultsThe calibration results and errors used for stitching, which can be either calculated or loaded from files. See CalibResult for details.
[out]stitchResultsThe stitched intensity image and depth map and transformation result file.
[in]stitchParamsOptional. If left empty, default or previously set calibration parameters will be used for stitching.
Returns
See MultiProfilerErrorStatus for details.

The documentation for this class was generated from the following file: