mono_dataset_code
mono_dataset_code copied to clipboard
Uninitialized values in undistorter
Vignette calibration crashed with this error:
OpenCV Error: Assertion failed (s >= 0) in setSize, file /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/core/src/matrix.cpp, line 307 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/core/src/matrix.cpp:307: error: (-215) s >= 0 in function setSize
I was using following camera calibration:
395.006308 404.392711 314.697857 174.704342 0.0
856 480
none
856 480
The problem is in FOVUndistorter.cpp on the line 99. Undistorter returns and never reads output width and height which later results in error.
I suggest simply initializing out_width and out_height with values of in_width and in_height respectively. Patch is attached. patch.txt
Hello,can you tell me how to calibrate the camera with FOV model ? seems the vignette code only support the FOV model.
@LittleMing233 this is off topic on this issue, but to answer your question, you can for example use Kalibr with their pinhole-fov
model.