Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camera_calibration/calibrator.py: StereoCalibrator fails for stereo fisheye cameras #503

Closed
SJamieson opened this issue Mar 14, 2020 · 0 comments · Fixed by #542
Closed

Comments

@SJamieson
Copy link

OS: Ubuntu 18.04
Behaviour: Calibrating a stereo camera results in the following error when using fisheye cameras

OpenCV Error: Assertion failed (D1.empty() || (D1.total() == 4)) in stereoCalibrate, file /home/nvidia/build_opencv/opencv/modules/calib3d/src/fisheye.cpp, line 857
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/camera_calibration/camera_calibrator.py", line 269, in on_mouse
    self.c.do_calibration()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 1231, in do_calibration
    self.cal_fromcorners(self.good_corners)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 1004, in cal_fromcorners
    flags = flags)
cv2.error: /home/nvidia/build_opencv/opencv/modules/calib3d/src/fisheye.cpp:857: error: (-215) D1.empty() || (D1.total() == 4) in function stereoCalibrate

Desired Behaviour: stereoCalibrate succeeds and finds good distortion parameters
Diagnosis: StereoCalibrator fails to appropriately set camera model for left and right mono calibrators by overriding set_cammodel(model)

soeroesg added a commit to soeroesg/image_pipeline that referenced this issue Jun 10, 2020
set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085

unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate
soeroesg added a commit to soeroesg/image_pipeline that referenced this issue Jun 12, 2020
set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085:
unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate

Trimmed whitespace at line endings
SteveMacenski pushed a commit that referenced this issue Jun 12, 2020
set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085:
unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate

Trimmed whitespace at line endings
JWhitleyWork pushed a commit that referenced this issue Jun 12, 2020
* fix #503:

set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085

unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate

* removed commented line;
trimmed whitespace at line endings
DavidTorresOcana pushed a commit to DavidTorresOcana/image_pipeline that referenced this issue Aug 23, 2020
* fix ros-perception#503:

set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085

unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate

* removed commented line;
trimmed whitespace at line endings
JWhitleyWork pushed a commit that referenced this issue Dec 11, 2020
set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085:
unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate

Trimmed whitespace at line endings
wep21 pushed a commit to wep21/image_pipeline that referenced this issue Oct 17, 2021
set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085:
unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate

Trimmed whitespace at line endings
JWhitleyWork pushed a commit that referenced this issue Nov 11, 2021
set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085:
unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate

Trimmed whitespace at line endings
JWhitleyWork pushed a commit that referenced this issue Apr 14, 2022
set_cammodel of StereoCalibrator need to override the method of parent class

fix related to opencv/opencv#11085:
unlike cv2.calibrate, the cv2.fisheye.calibrate method expects float64 points and in an array with an extra dimension. The same for cv2.stereoCalibrate vs cv2.fisheye.stereoCalibrate

Trimmed whitespace at line endings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant