3#include <unordered_map>
101 const std::string& paraName =
"")
132 std::string emptyImageDescription =
133 "Failed to access the specified image. Please check the file path and ensure the file "
135 std::string planeSegmentationFailureDescription =
136 "The number of sampling points in the point cloud available for plane segmentation is too "
137 "few. Please check the input depth maps and ensure that they only contain the six feature "
138 "planes of the calibration target.";
139 std::string noneParallelPlanesDescription =
140 "Plane 1 and 2 were not found. Please check the input depth maps and ensure that they only "
141 "contain the six feature planes of the calibration target.";
142 std::string overmuchParallelPlanesDescription =
143 "More than two parallel surfaces were identified. Please ensure the depth map only "
144 "contains the six feature planes of the calibration target. If two laser profilers share a "
145 "common field of view, laser light interference may cause this error; in that case, "
146 "the 'Trigger Delay' parameter should be set for one laser profiler.";
147 std::string reorderPlanesFailureDescription =
148 "Failed to order the feature planes. Please ensure that each lateral face forms a 45° "
149 "angle with both the upper and lower bases, and that the depth map contains only the six "
150 "feature planes of the calibration target.";
151 std::string reprojectErrorHighDescription =
152 "The reprojection error is excessive. Please verify the input parameters: (1) The depth "
153 "maps should only contain the six feature planes of the calibration target; (2) Ensure the "
154 "resolutionX/Y in deviceInfo (algorithm parameter) matches the actual specifications, and "
155 "confirm the targetSize parameters correspond with practical usage; (3) Excessive noise in "
156 "captured data may exist - appropriately increasing downsampleX/Y (downsampling intervals "
157 "along X/Y axes) might alleviate this issue, with recommended values in [10, 40]; (4) "
158 "Contaminants like dust, scratches, or reflective areas on the calibration target could "
159 "interfere with accuracy; (5) Verify the calibration target meets required mechanical "
160 "machining precision; (6) Check whether the camera contour mode parameters align with "
161 "recommended values.";
162 std::string invalidROIDescription =
163 "The ROI (Region of Interest) of the real-time collected image should match the ROI of the "
164 "device information. Please check if the ROI in depthImageInfo and dualProfilerConfig is "
167 std::string nonStandardResolutionDescription =
168 "In stitching, the user-input resolution in the X direction is an LNX non-standard "
169 "resolution. Please verify that the output matches expectations. This might occur because "
170 "the user rescaled the image before stitching. If errors or unexpected results arise "
171 "during stitching, first check whether the resolution input is correct.";
172 std::string cameraModelErrorDescription =
"Please input the model of the laser profiler.";
173 std::string invalidBoundaryValueDescription =
174 "In stitching, the image boundary detection during the resampling step returned invalid "
175 "values. Please check the input parameters, especially whether the RT matrix is incorrect.";
176 std::string fusionPointExceedMemoryDescription =
177 "During stitching, the point cloud fusion process required more computing space than the "
178 "available capacity.";
179 std::string multiStitchCameraModelEmptyDescription =
180 "In stitching, the 'camera model' parameter list is empty.";
181 std::string multiStitchParamsEmptyDescription =
182 "In stitching, the 'stitching parameters' list is empty.";
183 std::string multiStitchParamsSizeInconsistencyDescription =
184 "In stitching, the length of the 'stitching parameters' list does not match the length of "
185 "the 'camera model' parameter list.";
186 std::string multiFusionParamsSizeInconsistencyDescription =
187 "The length of fusionFlag or fusionParam variable input during fusion does not match the "
188 "length of the minor camera image.";
189 std::string stitchParamsAreNotCheckedDescription =
190 "Before calling the stitching function, the parameter check function must be called first.";
191 std::string pointCloudsEmptyDescription =
"The input point cloud data was empty.";
192 std::string depthImageTypeWrongDescription =
"The input image type was not CV_32F or CV_32F1.";
193 std::string resolutionInconsistencyDescription =
194 "During stitching, the X-axis and Y-axis resolutions must be identical, and the "
195 "resolutions for both axes should be the same across the primary and secondary laser "
197 std::string noImageAvailableDescription =
198 "The intensity image and depth map in the input data were unavailable.";
199 std::string depthAndIntensityImageSizeWrongDescription =
200 "During stitching, the dimensions of the depth map and intensity map from the same camera "
202 std::string intensityImageTypeWrongDescription =
203 "The input intensity image type was not CV_8UC1.";
204 std::string biasesEmptyDescription =
"In fusion, the 'image bias' parameter list is empty.";
205 std::string minorInfoSizeErrorDescription =
206 "In fusion, the lengths of the ‘image data’ list and the ‘image bias’ parameter list are "
208 std::string imageExtractInformationErrorDescription =
209 "In fusion, when extracting the fused image from the fused large image, the computed ROI "
210 "exceeds the original image size. The possible reason is incorrect image size or image "
211 "bias input into the function. This interface is not open to the public, so the risk of "
212 "this error occurring is minimal.";
213 std::string imageAndMaskSizeUnmatchedDescription =
214 "In fusion, the sizes of the valid point mask image and the original image do not match.";
215 std::string invalidResolutionDescription =
216 "The input resolution is invalid, please check if the input resolution is zero or close to "
220 std::string notSupportedDataDescription =
221 "The current method requires input of intensity image to run properly. Check if any "
222 "intensity information that has not been input.";
223 std::string stitchFirstDescription =
224 "There is currently no point cloud available, please perform stitching first.";
225 std::string onlyCloudWithoutIntensityAvailableDescription =
226 "Only point clouds without intensity information can be obtained. If you want to obtain "
227 "a point cloud with intensity, please input the intensity map during the stitching stage.";
228 std::string voxelGridOverflowDescription =
229 "The maximum number of voxel grids that can be created has been exceeded. Please check if "
230 "the resolution you entered is correct. If the cameras do not have overlapping fields of "
231 "view, you can switch to fast mode to avoid this problem.";
232 std::string refinedReliabilityTooLowDescription =
233 "The reliability of the optimization result is too low. Check: (1) whether the overlapping "
234 "area is too small; (2) whether the overlapping area has too few features.(3) whether "
235 "there are too few valid points scanned in the overlapping area.";
236 std::string noPointMatchedInRegistrationStepDescription =
237 "During the optimization registration process, no valid matching points were detected. "
238 "Check whether the error in the calibration process is too large or if the camera model is "
240 std::string initializedUnsupportedCloudTypeDescription =
241 "The point cloud stitching implementation class initializes an unsupported point cloud "
242 "type. Please check whether there are any missing enumerations during the initialization "
244 std::string transformRefineParamsEmptyDescription =
245 "The input parameters for pose matching are empty. Please enter the correct parameters and "
246 "call the refine step again.";
247 std::string multiRingRegistrationNotSupportedDescription =
248 "Registration is not currently supported when there are multiple rings in the path.";
249 std::string wrongKnnPointNumberDescription =
250 "The number of nearest neighbor points number used in the normal vector estimation is less "
251 "than or equal to zero. Please check this parameter.";
252 std::string stitchOptionNotSupportedDescription =
"The cloud stitch option is not supported.";
253 std::string paramRefineOptionNotSupportedDescription =
254 "The parameter refine option is not supported.";
257 std::string invalidParamDescription =
258 "The input parameters were empty or contain invalid values such as infinite or Nan.";
259 std::string invalidPositiveParamDescription =
260 "Input parameters should be positive finite values.";
261 std::string invalidImageConfigPairDescription =
262 "The lengths of minorImageInfos and multiProfilerConfig input parameters are inconsistent; "
263 "please check the relevant inputs.";
264 std::string invalidImageResultPairDescription =
265 "The lengths of minorImageInfos and multiProfilerResult input parameters are inconsistent; "
266 "please check the relevant inputs.";
267 std::string emptyMultiProfilerConfigDescription =
268 "The multiProfilerConfig input parameter is empty; please check the relevant inputs.";
269 std::string invalidRotateMatrixDescription =
"The rotation matrix is not an orthogonal matrix.";
270 std::string invalidMoveDirVecDescription =
"The motion direction vector is not a unit vector.";
271 std::string invalidMoveDirVecYDescription =
272 "The Y component of the motion direction vector should be a non-negative number.";
273 std::string invalidTopLengthDescription =
274 "The upper base length of the frustum should be smaller than the lower base length.";
275 std::string invalidRotateRadiusInAngleModeDescription =
276 "In the Angled mode, the value of rotateRadius should be greater than half of the frustum "
278 std::string invalidRotateRadiusInWideModeDescription =
279 "In the Wide mode, the value of rotateRadius should be 0.";
280 std::string invalidRotateAngleInAngleModeDescription =
281 "In the Angled mode, when one frustum is rotated relative to another along the Y axis, the "
282 "included angle between frustum axes (rotateAngleInDegree) should be within [-180, 180]; "
283 "when one frustum is rotated relative to another along the X axis, the included angle "
284 "between frustum axes (rotateAngleInDegree) should be within (-90, 90).";
285 std::string invalidRotateAngleInWideModeDescription =
286 "In the Wide mode, the rotation angle between two frustums (rotateAngleInDegree) should be "
288 std::string invalidTranslateDistanceInAngleModeDescription =
289 "In the Angled mode, the translate distance between two frustums (translateDistance) "
291 std::string invalidRotateAxisInAngleModeDescription =
292 "In the Angled mode, the axis along which one frustum is rotated relative to another "
293 "(targetRotateAxis) should not be NullAxis.";
294 std::string invalidRotateAxisInWideModeDescription =
295 "In the Wide mode, the axis along which one frustum is rotated relative to another "
296 "(targetRotateAxis) should be NullAxis.";
297 std::string invalidTranslateAxisInAngleModeDescription =
298 "In the Angled mode, the axis along which one frustum is translated relative to another "
299 "(targetTranslateAxis) should be NullAxis.";
300 std::string invalidTranslateAxisInWideModeDescription =
301 "In the Wide mode, the axis along which one frustum is translated relative to another "
302 "(targetTranslateAxis) should not be NullAxis.";
303 std::string invalidDownSampleDescription =
304 "The input downsampling parameters (downsampleX and downsampleY) should be integers within "
305 "the range [1, 40].";
306 std::string invalidDepthGroupIDDescription =
307 "The groupID of members in the xxx data structure should match the index of their "
309 std::string invalidConfigGroupIDDescription =
310 "The groupID of each dualProfilerConfig in multiProfilerConfig should correspond to its "
311 "index in the vector (a data structure). For example, if there are three members in "
312 "multiProfilerConfig named dualProfilerConfig0 to dualProfilerConfig2, the groupID of "
313 "dualProfilerConfig0 should be 0, dualProfilerConfig1 should be 1, and dualProfilerConfig2 "
315 std::string invalidResultGroupIDDescription =
316 "The groupID of each dualProfilerResult in multiProfilerResults should correspond to its "
317 "index in the vector (a data structure). For example, if there are three members in "
318 "multiProfilerResults named dualProfilerResult0 to dualProfilerResult2, the groupID of "
319 "dualProfilerResult0 should be 0, dualProfilerResult1 should be 1, and dualProfilerResult2 "
322 std::unordered_map<ErrorCode, std::string> errorInfoMap = {
339 multiStitchParamsSizeInconsistencyDescription},
345 depthAndIntensityImageSizeWrongDescription},
352 imageAndMaskSizeUnmatchedDescription},
354 multiFusionParamsSizeInconsistencyDescription},
362 onlyCloudWithoutIntensityAvailableDescription},
366 noPointMatchedInRegistrationStepDescription},
368 initializedUnsupportedCloudTypeDescription},
370 multiRingRegistrationNotSupportedDescription},
390 invalidTranslateDistanceInAngleModeDescription},
394 invalidTranslateAxisInAngleModeDescription},
Definition MultiProfilerErrorStatus.h:7
MultiProfilerErrorStatus(ErrorCode code, const std::string &message)
Definition MultiProfilerErrorStatus.h:96
MultiProfilerErrorStatus()=default
void setErrorCodeAndDescription(const ErrorCode &code, const std::string ¶Name)
Definition MultiProfilerErrorStatus.h:119
ErrorSource errorSource
Definition MultiProfilerErrorStatus.h:126
ErrorCode
Definition MultiProfilerErrorStatus.h:9
@ MMIND_STATUS_INVALID_IMAGE_RESULT_PAIR
Definition MultiProfilerErrorStatus.h:46
@ MMIND_STATUS_NO_IMAGE_AVAILABLE
Definition MultiProfilerErrorStatus.h:30
@ MMIND_STATUS_INVALID_TRANSLATE_AXIS_WIDE_MODE
Definition MultiProfilerErrorStatus.h:60
@ MMIND_STATUS_NONE_PARALLEL_PLANES
Definition MultiProfilerErrorStatus.h:15
@ MMIND_STATUS_PARAM_REFINE_OPTION_NOT_SUPPORTED
Definition MultiProfilerErrorStatus.h:90
@ MMIND_STATUS_INPUT_ERROR
Definition MultiProfilerErrorStatus.h:67
@ MMIND_STATUS_CONFIG_LOAD_FAILURE
Definition MultiProfilerErrorStatus.h:70
@ MMIND_STATUS_DATA_NOT_SUPPORTED_BY_CURRENT_CLASS
Definition MultiProfilerErrorStatus.h:79
@ MMIND_STATUS_INITIALIZED_UNSUPPORTED_STITCHER_TYPE
Definition MultiProfilerErrorStatus.h:85
@ MMIND_STATUS_DEPTH_LOAD_FAILURE
Definition MultiProfilerErrorStatus.h:73
@ MMIND_STATUS_INVALID_DOWNSAMPLE
Definition MultiProfilerErrorStatus.h:61
@ MMIND_STATUS_INVALID_MOVE_DIR_VECTOR_Y
Definition MultiProfilerErrorStatus.h:50
@ MMIND_STATUS_PARAMS_ARE_NOT_CHECKED
Definition MultiProfilerErrorStatus.h:28
@ MMIND_STATUS_EXTRACT_IMAGE_INFO_ERROR
Definition MultiProfilerErrorStatus.h:38
@ MMIND_STATUS_INVALID_ROTATE_ANGLE_WIDE_MODE
Definition MultiProfilerErrorStatus.h:55
@ MMIND_STATUS_DEPTH_INTENSITY_IMAGE_SIZE_UNMATCHED
Definition MultiProfilerErrorStatus.h:31
@ MMIND_STATUS_MAJOR_AND_MINOR_RESOLUTION_INCONSISTENCY
Definition MultiProfilerErrorStatus.h:34
@ MMIND_STATUS_EMPTY_DEPTH_IMAGE
Definition MultiProfilerErrorStatus.h:13
@ MMIND_STATUS_NO_POINT_MATCHED_IN_REGISTRATION_STEP
Definition MultiProfilerErrorStatus.h:84
@ MMIND_STATUS_NON_STANDARD_RESOLUTION
Definition MultiProfilerErrorStatus.h:22
@ MMIND_STATUS_RESULT_LOAD_FAILURE
Definition MultiProfilerErrorStatus.h:71
@ MMIND_STATUS_MULTI_STITCH_PARAMS_SIZE_INCONSISTENCY
Definition MultiProfilerErrorStatus.h:35
@ MMIND_STATUS_INVALID_RESOLUTION
Definition MultiProfilerErrorStatus.h:76
@ MMIND_STATUS_INVALID_TRANSLATE_DISTANCE_ANGLE_MODE
Definition MultiProfilerErrorStatus.h:56
@ MMIND_STATUS_INVALID_MOVE_DIR_VECTOR
Definition MultiProfilerErrorStatus.h:49
@ MMIND_STATUS_MULTI_STITCH_CAMERA_MODEL_EMPTY
Definition MultiProfilerErrorStatus.h:26
@ MMIND_STATUS_INVALID_ROTATE_RADIUS_ANGLE_MODE
Definition MultiProfilerErrorStatus.h:52
@ MMIND_STATUS_INVALID_ROTATE_RADIUS_WIDE_MODE
Definition MultiProfilerErrorStatus.h:53
@ MMIND_STATUS_INVALID_ROTATE_ANGLE_ANGLE_MODE
Definition MultiProfilerErrorStatus.h:54
@ MMIND_STATUS_INVALID_ROTATE_AXIS_WIDE_MODE
Definition MultiProfilerErrorStatus.h:58
@ MMIND_STATUS_INVALID_ROI
Definition MultiProfilerErrorStatus.h:19
@ MMIND_STATUS_WRONG_KNN_POINT_NUMBER
Definition MultiProfilerErrorStatus.h:88
@ MMIND_STATUS_EMPTY_MULTISYSTEM_CONFIG
Definition MultiProfilerErrorStatus.h:47
@ MMIND_STATUS_REORDER_PLANES_FAILURE
Definition MultiProfilerErrorStatus.h:17
@ MMIND_STATUS_FUSION_POINT_EXCEED_MEMORY
Definition MultiProfilerErrorStatus.h:25
@ MMIND_STATUS_CAMERA_MODEL_ERROR
Definition MultiProfilerErrorStatus.h:23
@ MMIND_STATUS_INVALID_IMAGE_CONFIG_PAIR
Definition MultiProfilerErrorStatus.h:45
@ MMIND_STATUS_POINT_CLOUDS_EMPTY
Definition MultiProfilerErrorStatus.h:29
@ MMIND_STATUS_PLEASE_STITCH_FIRST
Definition MultiProfilerErrorStatus.h:80
@ MMIND_STATUS_MULTIRING_REGISTRATION_UNSUPPORT
Definition MultiProfilerErrorStatus.h:87
@ MMIND_STATUS_MULTI_FUSION_PARAMS_SIZE_INCONSISTENCY
Definition MultiProfilerErrorStatus.h:36
@ MMIND_STATUS_REPROJECT_ERROR_HIGH
Definition MultiProfilerErrorStatus.h:18
@ MMIND_STATUS_EMPTY_BIASES_IN_FUSION
Definition MultiProfilerErrorStatus.h:39
@ MMIND_STATUS_INVALID_ROTATION_MATRIX
Definition MultiProfilerErrorStatus.h:48
@ MMIND_STATUS_MINOR_INFO_UNMATCHED_IN_FUSION
Definition MultiProfilerErrorStatus.h:37
@ MMIND_STATUS_PLANE_SEGMENTATION_FAILURE
Definition MultiProfilerErrorStatus.h:14
@ MMIND_STATUS_DEPTH_IMAGE_TYPE_WRONG
Definition MultiProfilerErrorStatus.h:32
@ MMIND_STATUS_ONLY_POINT_CLOUD_WITHOUT_INTENSITY_AVAILABLE
Definition MultiProfilerErrorStatus.h:81
@ MMIND_STATUS_IMAGE_AND_MASK_SIZE_UNMATCHED_IN_FUSION
Definition MultiProfilerErrorStatus.h:40
@ MMIND_STATUS_REFINED_RELIABILITY_TOO_LOW
Definition MultiProfilerErrorStatus.h:83
@ MMIND_STATUS_INVALID_TRANSLATE_AXIS_ANGLE_MODE
Definition MultiProfilerErrorStatus.h:59
@ MMIND_STATUS_EVALS_LOAD_FAILURE
Definition MultiProfilerErrorStatus.h:72
@ MMIND_STATUS_MULTI_STITCH_PARAMS_EMPTY
Definition MultiProfilerErrorStatus.h:27
@ MMIND_STATUS_INVALID_POSITIVE_PARAM
Definition MultiProfilerErrorStatus.h:44
@ MMIND_STATUS_OVERMUCH_PARALLEL_PLANES
Definition MultiProfilerErrorStatus.h:16
@ MMIND_STATUS_INVALID_PARAM
Definition MultiProfilerErrorStatus.h:43
@ MMIND_STATUS_SUCCESS
Definition MultiProfilerErrorStatus.h:10
@ MMIND_STATUS_INVALID_BOUNDARY_VALUE
Definition MultiProfilerErrorStatus.h:24
@ MMIND_STATUS_TRANSFORM_REFINE_PARAMS_EMPTY
Definition MultiProfilerErrorStatus.h:86
@ MMIND_STATUS_INVALID_ROTATE_AXIS_ANGLE_MODE
Definition MultiProfilerErrorStatus.h:57
@ MMIND_STATUS_INVALID_RESULT_GROUPID
Definition MultiProfilerErrorStatus.h:64
@ MMIND_STATUS_INTENSITY_IMAGE_TYPE_WRONG
Definition MultiProfilerErrorStatus.h:33
@ MMIND_STATUS_INVALID_DEPTH_GROUPID
Definition MultiProfilerErrorStatus.h:62
@ MMIND_STATUS_INVALID_CONFIG_GROUPID
Definition MultiProfilerErrorStatus.h:63
@ MMIND_STATUS_VOXEL_GRID_OVERFLOW
Definition MultiProfilerErrorStatus.h:82
@ MMIND_STATUS_INVALID_TOP_LENGTH
Definition MultiProfilerErrorStatus.h:51
@ MMIND_STATUS_STITCH_OPTION_NOT_SUPPORTED
Definition MultiProfilerErrorStatus.h:89
std::string errorDescription
Definition MultiProfilerErrorStatus.h:128
ErrorCode errorCode
Definition MultiProfilerErrorStatus.h:127
ErrorSource
Definition MultiProfilerErrorStatus.h:93
@ MinorDevice
Definition MultiProfilerErrorStatus.h:93
@ System
Definition MultiProfilerErrorStatus.h:93
@ MajorDevice
Definition MultiProfilerErrorStatus.h:93
MultiProfilerErrorStatus(ErrorCode code, ErrorSource source=System, unsigned int groupID=0, const std::string ¶Name="")
Definition MultiProfilerErrorStatus.h:100
unsigned int groupID
Definition MultiProfilerErrorStatus.h:125
bool isOK() const
Definition MultiProfilerErrorStatus.h:107
void setErrorCodeAndDescription(const ErrorCode &code)
Definition MultiProfilerErrorStatus.h:113