各相机模型(针孔+鱼眼)综述

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011178262/article/details/86656153

Overview

Lens Projections

  • Perspective and fisheye imaging process

Optics: Terminology

  • Dioptric: All elements are refractive (lenses)
  • Catoptric: All elements are reflective (mirrors)
  • Catadioptric: Elements are refractive and reflective (mirrors + lenses)

Papers

  • Straight Lines Have to be Straight: Automatic Calibration and Removal of Distortion from Scenes of Structured Environments
  • A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses
  • Single View Point Omnidirectional Camera Calibration from Planar Grids

Related Code

  • Supported models in Kalibr

  • Distortion Models in ROS (distortion_models.h)

    • plumb_bob: a 5-parameter polynomial approximation of radial and tangential distortion
    • rational_polynomial: an 8-parameter rational polynomial distortion model
    • equidistant (lunar)
  • hengli/camodocal

    • Pinhole camera model
    • Unified projection model
    • Equidistant fish-eye model
  • uzh-rpg/rpg_vikit/vikit_common: support pinhole, atan and omni camera

  • ethz-asl/aslam_cv2: support pinhole and unified peojection and radtan, fisheye and equidistant distortion

  • cggos/okvis_cg: support pinhole peojection and radtan and equidistant distortion

  • ptam_cg/src/ATANCamera.cc: support ATAN camera model

Pinhole camera

  • pinhole model (rectilinear projection model) + radial-tangential distortion

The Pinhole camera model is the most common camera model for consumer cameras. In this model, the image is mapped onto a plane through perspective projection. The projection is defined by the camera intrinsic parameters such as focal length, principal point, aspect ratio, and skew.

Fisheye camera

OpenCV fisheye camera model

  • pinhole model (rectilinear projection model) + fisheye distortion

The Fisheye camera model is a camera model utilized for wide field of view cameras. This camera model is neccessary because the pinhole perspective camera model is not capable of modeling image projections as the field of view approaches 180 degrees.

Given a point X = [ x c y c z c ] X=[x_c \quad y_c \quad z_c] from the camera z c = 1 z_c=1 plane in camera coordinates, the pinhole projection is:

{ r = x c 2 + y c 2 θ = a t a n 2 ( r , z c ) = a t a n 2 ( r , 1 ) = a t a n ( r ) \begin{cases} r = \sqrt{x_c^2 + y_c^2} \\ \theta = atan2(r, |z_c|) = atan2(r, 1) = atan(r) \end{cases}

in another way

f = r t a n ( θ ) where r = u 2 + v 2 f = r' \cdot tan(\theta) \quad \text{where} \quad r' = \sqrt{u^2 + v^2}

fisheye distortion:

θ d = θ ( 1 + k 1 θ 2 + k 2 θ 4 + k 3 θ 6 + k 4 θ 8 ) \theta_d = \theta (1 + k1 \cdot \theta^2 + k2 \cdot \theta^4 + k3 \cdot \theta^6 + k4 \cdot \theta^8)

The distorted point coordinates are

{ x d = θ d x c r y d = θ d y c r \begin{cases} x_d = \frac{\theta_d \cdot x_c} {r} \\ y_d = \frac{\theta_d \cdot y_c} {r} \end{cases}

convert into pixel coordinates, the final pixel coordinates vector

{ u = f x ( x d + α y d ) + c x v = f y y d + c y \begin{cases} u = f_x (x_d + \alpha y_d) + c_x \\ v = f_y \cdot y_d + c_y \end{cases}

write in matrix form

[ u v 1 ] = [ f x α c x 0 f y c y 0 0 1 ] [ x d y d 1 ] \begin{aligned} \left[\begin{array}{c}u\\v\\1\end{array}\right] = \left[\begin{array}{ccc} f_x & \alpha & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{array}\right] \left[\begin{array}{c}x_d\\y_d\\1\end{array}\right] \end{aligned}

ATAN model

This is an alternative representation for camera models with large radial distortion (such as fisheye cameras) where the distance between an image point and principal point is roughly proportional to the angle between the 3D point and the optical axis. This camera model is first proposed in Straight Lines Have to be Straight: Automatic Calibration and Removal of Distortion from Scenes of Structured Environments.

Given a point X = [ x c y c z c ] X=[x_c \quad y_c \quad z_c] from the camera z c = 1 z_c=1 plane in camera coordinates, the pinhole projection is:

r = x c 2 + y c 2 z c 2 = x c 2 + y c 2 r = \sqrt{\frac{x_c^2 + y_c^2}{z_c^2}} = \sqrt{x_c^2 + y_c^2}

FOV distortion:

r d = 1 ω a r c t a n ( 2 r t a n ( ω 2 ) ) r_d = \frac{1}{\omega}arctan( 2 \cdot r \cdot tan(\frac{\omega}{2}) )

where ω \omega is the FOV distortion coefficient

The distorted point coordinates are

{ x d = r d r x c y d = r d r y c \begin{cases} x_d = \frac{r_d}{r} \cdot x_c \\ y_d = \frac{r_d}{r} \cdot y_c \end{cases}

convert into pixel coordinates, the final pixel coordinates vector

[ u v 1 ] = [ f x 0 c x 0 f y c y 0 0 1 ] [ x d y d 1 ] \begin{aligned} \left[\begin{array}{c}u\\v\\1\end{array}\right] = \left[\begin{array}{ccc} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{array}\right] \left[\begin{array}{c}x_d\\y_d\\1\end{array}\right] \end{aligned}

Equidistant fish-eye model

Omnidirectional Camera

猜你喜欢

转载自blog.csdn.net/u011178262/article/details/86656153