Fisheye/Wide-Angle lens Calibration in OpenCV

前端 未结 4 1134
走了就别回头了
走了就别回头了 2021-02-05 21:26

I know the default OpenCV Calibration systems model a Pinhole camera, but I\'m working with a system using extremely wide FOV lens (187-degrees). If there any existing way to d

相关标签:
4条回答
  • 2021-02-05 21:28

    Seems there's no good OpenCV way to do this.

    I wound up using OCamLib to do the actual calibration, then writing my own "undistortPoints" function (using Scaramuzza's algorithms) to undistort 2D image points into 3D unit vectors (rather than 2D points). Unfortunately, this also breaks lots of other stuff in OpenCV because most OpenCV image processing functions expect 2D points and their own pinhole calibration model, so I've had to rebuild significant portions of the code for this.

    I welcome any other insight into this.

    0 讨论(0)
  • 2021-02-05 21:29

    OpenCV fisheye camera calibration 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. More detailed explanation of this limitation I placed HERE.In my own results I got 140-150 degrees FOV in undistorted image. If FOV about 140-150 degrees is suitable for you, you can use cv::fisheye without any modification

    0 讨论(0)
  • 2021-02-05 21:34

    There is a good reason why people don’t use wide angle lenses much - when images are undistorted, the resulting image is highly non-rectangular and the quality on the edges is so bad that the image needs to be cropped back to… 90 deg FOV. So the question is, why don’t just use 90 deg FOV lens on the first place? The situation gets even worse with stereo cameras and image rectification.

    If you really need to have wide FOV use several cameras or rotating camera. Here are some examples: PointGrey Inc.

    0 讨论(0)
  • 2021-02-05 21:46

    In order to calibrate camera with extremely wide FOV lens, you can use Omnidirectional Camera module from OpenCV Contrib. It is important to notice that you have to rebuild your OpenCV with OpenCV contribs to use it.

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