iai_kinect2 icon indicating copy to clipboard operation
iai_kinect2 copied to clipboard

Error while calibrating depth

Open VasLem opened this issue 6 years ago • 6 comments

I have a rather peculiar setup here, which is Ubuntu 18.04, running a ROS melodic 1.14.2 and using OpenCV3.2 . I have to say that everything worked perfectly till now. I am facing this error while trying to calibrate depth image (rosrun kinect2_calibration kinect2_calibration chess5x7x0.03 calibrate depth). The error is:

... [ INFO] [DepthCalibration::readFiles] restoring file: 0008_sync [ INFO] [DepthCalibration::readFiles] restoring file: 0009 [ INFO] [DepthCalibration::readFiles] restoring file: 0009_sync [ INFO] [main] starting calibration... [ INFO] [DepthCalibration::calibrate] frame: ./0000_depth.png OpenCV Error: Bad argument (Input argument is not a valid matrix) in cvRodrigues2, file /tmp/opencv/opencv-3.2.0/modules/calib3d/src/calibration.cpp, line 259 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/opencv/opencv-3.2.0/modules/calib3d/src/calibration.cpp:259: error: (-5) Input argument is not a valid matrix in function cvRodrigues2

Does anyone know what is happening? I seem not to understand the source of the problem by looking at the project code.

VasLem avatar Jul 29 '18 13:07 VasLem

I am also having this problem.

anthony-simetri avatar Nov 18 '20 21:11 anthony-simetri

Was this ever resolved?

thisisjaskaran avatar Mar 18 '21 08:03 thisisjaskaran

Hi I have the same problem I tried using the command "record depth" but it is the same that "record sync" I am using a hp laptop with AMD Ryzen I do not know if the problem is generated by a possible bad config due to the use of AMD

sebastianzacarias avatar Oct 30 '21 00:10 sebastianzacarias

If you use OpenCV 4, lines 1093-1096 in kinect2_bridge/src/kinect2_calibration.cpp get macro'ed out, so you'll need to add a line for OpenCV 4 (same call signature as the one for OpenCV 3).

gycn avatar Dec 16 '21 19:12 gycn

If you use OpenCV 4, lines 1093-1096 in kinect2_bridge/src/kinect2_calibration.cpp get macro'ed out, so you'll need to add a line for OpenCV 4 (same call signature as the one for OpenCV 3).

Thanks, I just came across that bug, and you've just answered it :) you saved my night

remmel avatar Dec 16 '21 23:12 remmel

If you use OpenCV 4, lines 1093-1096 in kinect2_bridge/src/kinect2_calibration.cpp get macro'ed out, so you'll need to add a line for OpenCV 4 (same call signature as the one for OpenCV 3).

Thanks a lot.

Rampantsen avatar Apr 15 '23 09:04 Rampantsen