手眼标定过程的几个报错

1.sba极线几何优化报错

报错内容:

[ERROR] [1514175604.887669777]: Exception thrown while processing service call: /home/cbc/catkin_ws/src/glasgow_calibration/calibration_glasgow/cvsba-lib/src/cvsba.cpp:233: error: (8888) Error occured during Sba optimization in function Sba::run
[ INFO] [1514175604.851132338]: The hand-eye calibration service has been started...
[ INFO] [1514175604.851151019]: Calibrating... Total number of good images: 40
[ INFO] [1514175604.851241172]: size of image points: 40
[ INFO] [1514175604.851260002]: Number of points for BA: 35
coding error
coding error

解决方案:

暂时没有想到。所以这部分功能暂时被注释掉了。


2.opencv报错

报错内容:

OpenCV Error: Assertion failed (dims <= 2 && step[0] > 0) in locateROI, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp, line 991
[ERROR] [1514291754.843059403]: Exception thrown while processing service call: /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp:991: error: (-215) dims <= 2 && step[0] > 0 in function locateROI

解决方案:

程序中被处理的图片变量为空,这个错只报了一遍。本地程序加了sleep(1),等待1s再调用processTarget服务,使得服务器那边能有足够的时间更新接收新的消息数据。


报错内容:

OpenCV Error: Assertion failed (confidence > 0 && confidence < 1) in run, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/calib3d/src/ptsetreg.cpp, line 178
[ERROR] [1514291755.033778174]: /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/calib3d/src/ptsetreg.cpp:178: error: (-215) confidence > 0 && confidence < 1 in function run

解决方案:

opencv版本的问题,不同opencv版本给出的solvePnPRansac的接口不一样
opencv2.49接口:

void solvePnPRansac(InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int iterationsCount=100, float reprojectionError=8.0, int minInliersCount=100, OutputArray inliers=noArray(), int flags=ITERATIVE )

opencv3.0接口:

bool solvePnPRansac(InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int iterationsCount=100, float reprojectionError=8.0, double confidence=0.99, OutputArray inliers=noArray(), int flags=SOLVEPNP_ITERATIVE )

3.参考

opencv2.4_calib3d
opencv3.0_calib3d
opencv3.31_doc

你可能感兴趣的:(机器视觉)