Wide angle lenses calibration with Opencv

后端 未结 6 1364
栀梦
栀梦 2021-02-20 10:46

I\'m using a wide-angle lens (178º Diagonal FOV ) and I\'m trying to calibrate it properly using Opencv Calibration module. All the detection and calibration process are working

相关标签:
6条回答
  • 2021-02-20 10:49

    Since Opencv 2.4.10 and above there is a specfic distortion model for wide-angle/fisheye lenses able to handle this strong radial distortion. I've tested with my datasets and results are very good.

    0 讨论(0)
  • 2021-02-20 10:52

    I don't have any experiences with fish-eye lenses, but if you are planing to map the image to a perspective projection, you will run into trouble. The large viewing angle parts of the image will map to very far distances on the image plane. This might acctually result in an image like the one you provided. There are definitely some errors, but it seems that most of the straight "world lines" map to straight "image lines".

    What exactly did you expect as the result and what are you planing to use this calibration for?

    0 讨论(0)
  • 2021-02-20 11:00

    Are you making sure to use the CV_CALIB_RATIONAL_MODEL flag? That will tell OpenCV to use a model that supports wider angle lenses.

    Here are my suggestions for a 150 deg lens. You might also consider trying April Cal which I have had decent luck with.

    0 讨论(0)
  • 2021-02-20 11:10

    Maybe the camera/lens model of OpenCV does not describe accurately enough your ultra wide angle lens. And so maybe you have to abandon the built-in OpenCV calibration procedure and write your own calibration procedure.

    For example a google search gives me:

    Kanatani, K., "Calibration of Ultrawide Fisheye Lens Cameras by Eigenvalue Minimization," Pattern Analysis and Machine Intelligence, IEEE Transactions on , vol.35, no.4, pp.813,822, April 2013

    Abstract: We present a new technique for calibrating ultrawide fisheye lens cameras by imposing the constraint that collinear points be rectified to be collinear, parallel lines to be parallel, and orthogonal lines to be orthogonal. Exploiting the fact that line fitting reduces to an eigenvalue problem in 3D, we do a rigorous perturbation analysis to obtain a practical calibration procedure. Doing experiments, we point out that spurious solutions exist if collinearity and parallelism alone are imposed. Our technique has many desirable properties. For example, no metric information is required about the reference pattern or the camera position, and separate stripe patterns can be displayed on a video screen to generate a virtual grid, eliminating the grid point extraction processing.

    0 讨论(0)
  • 2021-02-20 11:10

    OpenCV 2.4.10 and above have fisheye camera calibration module. But this module uses a method based on pin-hole camera model. In this model we have an angle between an optical axis of camera and ray of light from some object in front of camera. We also have an angle between optical axis and direction to point on undistorted image (corresponding to object). If calibration was performed correctly, these 2 angles will be equal. It means that if FOV of your camera is about 180 degrees, the distanse from center of undistorted image to edge of undistorted image will be equal to infinity. As a result OpenCV fisheye correction module (cv::fisheye) undistorts only a central part of image. In my own results I got 140-150 degrees FOV in undistorted image. More detailed explanation I placed HERE. If FOV about 140-150 degrees is suitable for you, you can use cv::fisheye without any modification

    0 讨论(0)
  • 2021-02-20 11:16

    fisheye lenses have different distortion modelling. For calibrating a fisheye camera, use opencv fisheye module. See opnecv docs.

    0 讨论(0)
提交回复
热议问题