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

Uninitialized values in undistorter #8

Open
fairf4x opened this issue May 11, 2017 · 2 comments
Open

Uninitialized values in undistorter #8

fairf4x opened this issue May 11, 2017 · 2 comments

Comments

@fairf4x
Copy link

fairf4x commented May 11, 2017

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

@LittleMing233
Copy link

Hello,can you tell me how to calibrate the camera with FOV model ? seems the vignette code only support the FOV model.

@NikolausDemmel
Copy link

@LittleMing233 this is off topic on this issue, but to answer your question, you can for example use Kalibr with their pinhole-fov model.

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

No branches or pull requests

3 participants