日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

相机模型-鱼眼模型/Omnidirectional Camera(1)

發布時間:2023/12/18 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 相机模型-鱼眼模型/Omnidirectional Camera(1) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Omnidirectional Camera Davide Scaramuzza

Definition 定義

omnidirectional camera (from omni, meaning all) 廣角相機: 在一個水平面有360度視野的相機,或視野能覆蓋半個球或近似整個球的相機

Background 背景知識

大多數商業相機可以使用 pinhole 相機模型來描述,使用一個 perspective projection 來建模。但是存在一些高畸變成像設備如廣角相機,它們不能使用傳統小孔相機模型來描述。 目前存在幾種構建廣角相機的方法。Dioptric cameras 使用一組 shaped lenses(如魚眼鏡頭),可以得到大于180度視野,(稍微多余半球); Catadioptric cameras 則使用一個標準相機和一個 shaped mirror — such as a parabolic, hyperbolic, or elliptical mirror,其在水平面可以提供360度視野,仰角方向大于100度;polydioptric camera 通過組合多個相機來重疊相機視野

?

1. 廣角相機成像原理

廣角相機成像步驟與普通相機基本一致, 主要的區別在于鏡頭聚光的部分, 廣角相機為了獲得更大的FOV, 有三種鏡頭聚光方式:

  • Dioptric cameras: 通過透鏡來實現, 主要是折射
  • Catadioptric cameras: 使用一個標準相機加一個面鏡(Shaped mirror)
  • Polydioptric camera: 通過多個相機重疊視野
  • 廣角相機引入了很多模型, 為了防止混亂, 我們先總結一下, 我們通常會討論兩種模型: 相機模型和畸變模型.

    2. 相機模型

    相機模型指的是相機坐標系到理想圖像平面(通常也稱為Normalize 平面)的投影模型.

    注意: 廣義上相機模型包括投影成像, 畸變, 內外參等全部模型, 這里討論的相機模型僅指的透鏡/面鏡的投影模型.

    2.1 針孔相機模型(Pinhole)

    針孔相機模型利用透鏡進行聚光成像的相機使用的模型, 該模型非常簡單:

    ?

    2.2 全向模型(Omnidirectional)

    全向模型利用面鏡(mirror)反射進行成像的相機使用的模型. 該模型帶有一個參數 .

    首先將相機坐標系的點歸一化到半徑為1的球面上:

    然后再投影到圖像平面上

    其逆變換推導出來如下:

    最后,注意下當E=0 時, 全向模型就退化為了針孔模型.

    3. 畸變模型

    畸變模型指的理想圖像平面到真實圖像平面的變換模型, 也就是Normalize平面上的畸變模型.

    理想的針孔成像模型確定的坐標變換關系均為線性的,而實際上,現實中使用的相機由于鏡頭中鏡片因為光線的通過產生的不規則的折射,鏡頭畸變(lens distortion)總是存在的,即根據理想針孔成像模型計算出來的像點坐標與實際坐標存在偏差。

    3.1 radtan畸變模型

    普通相機畸變通常包括徑向畸變和切向畸變, 如下圖所示.

    徑向畸變表式沿半徑方向的偏移量, 徑向畸變的形成原因是鏡頭制造工藝不完美,使得鏡頭形狀存在缺陷, 通常又分為桶性畸變和枕形畸變,dr 分別代表 往外偏和往里偏.

    徑向畸變的數學轉換為:

    切向畸變又分為薄透鏡畸變和離心畸變等,薄透鏡畸變則是因為透鏡存在一定的細微傾斜造成的;離心畸變的形成原因是鏡頭是由多個透鏡組合而成的,而各個透鏡的光軸不在同一條中心線上。切向畸變可以用如下數學表達式來描述:

    結合徑向和切向畸變, 像平面點的轉換關系為:

    ?

    這就是OpenCV calibration使用的畸變模型, 由于參數過多導致數值求解不穩定, 通常只使用 k1,k2,k3,p1,p2, 其他參數設為0. 簡化后的模型就是常用的radtan畸變模型:

    3.2 魚眼畸變模型

    魚眼鏡頭的畸變模型有很多種:

    其中使用最多的是Equidistant模型, 即rd=f*,對實際的魚眼鏡頭來說,它們不可能精確地按照投影模型來設計,所以為了方便魚眼相機的標定,Kannala提出了一種魚眼相機的一般多項式近似模型。通過前面的四個模型,可以發現d 是 的奇函數,而且將這些式子按泰勒級數展開,發現 可以用 的奇次多項式表示,即

    畸變投影模型為:

    opencv中的fisheye::calibrate就是用的該畸變模型. 也叫作kannala-brandt模型.

    3.3 FOV畸變模型

    FOV畸變模型轉換關系如下:

    4. Unified Projection Model

    在魚眼相機中通常會看到Unified Projection Model或者MEI model, 其實就是Omnidirectional相機模型+radtan畸變模型. 前面提到了Omnidirectional模型涵蓋了Pinhole模型, 所以MEI model可以表示魚眼和非魚眼相機.

    參考:

  • https://blog.csdn.net/u011178262/article/details/86656153
  • https://blog.csdn.net/okasy/article/details/90665534#fn4
  • https://zhuanlan.zhihu.com/p/23090593
  • https://blog.csdn.net/u010128736/article/details/52864024
  • Kannala J, Brandt S S. A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses[M]. 2006.
  • Mei C, Rives P. Single view point omnidirectional camera calibration from planar grids[C]//Proceedings 2007 IEEE International Conference on Robotics and Automation. IEEE, 2007: 3945-3950.
  • Kneip L, Scaramuzza D, Siegwart R. A novel parametrization of the perspective-three-point problem for a direct computation of absolute camera position and orientation[C]//CVPR 2011. IEEE, 2011: 2969-2976.
  • ?

    Theory 理論

    0.1 Central omnidirectional cameras

    一個視覺系統是 central 的話,那么 被觀測物體的所有入射光線匯交于3D空間的一個點,這個點稱為 projection center 或 single effective viewpoint。 A vision system is said to be central when the optical rays to the viewed objects intersect in a single point in 3D called projection center or single effective viewpoint

    這個屬性我們稱之為 single effective viewpoint property。 perspective camera 就是一個 central projection system,因為所有的入射光線交于一點: camera optical center。

    所有現代魚眼相機都是 central,所以他們都滿足這個屬性 single effective viewpoint property。Central catadioptric cameras 由一個相機+mirror 構建,相機和 mirror 的距離需要選擇合適。Baker and Nayar [6] 證明了滿足 single viewpoint property 的 mirrors 具有什么數學形式, the class of rotated (swept) conic sections, that is, hyperbolic, parabolic, and elliptical mirrors

    為什么 single effective viewpoint 是如此的重要了? 1)it allows the user to generate geometrically correct perspective images from the pictures captured by the omnidirectional camera,When the geometry of the omnidirectional camera is known, that is, when the camera is calibrated, one can precompute this direction for each pixel. 2)Epipolar geometry holds for any central camera, both perspective and omnidirectional,這樣就可以應用 Epipolar geometry 相關知識到廣角相機的圖像中了。

    0.2 Omnidirectional camera model and calibration

    omnidirectional camera 的建模要比標準的 perspective camera 復雜一些。因為在建模的時候需要考慮: catadioptric camera中的 mirror 反射 或者 fisheye camera 中的 鏡頭折射問題 the reflection operated by the mirror in the case of a catadioptric camera or the refraction caused by the lens in the case of a fisheye camera 這里我們介紹 omnidirectional vision and robotics 中標準的兩個不同投影模型,這兩個模型其對應的 Matlab toolboxes 可以直接下載應用,所以被廣泛使用。

    第一個模型就是 the unified projection model for central catadioptric cameras, Geyer and Daniilidis [7] 在2000年提出的,Barreto and Araujo [8]后來優化了一下。這個模型包括了 catadioptric cameras相機中三類 mirror: cameras using a hyperbolic, parabolic, or elliptical mirror. 這個模型是專門針對 central catadioptric cameras 的,不實用于 fisheye cameras。在文獻[9]中分析了使用該模型近似分析魚眼鏡頭,精度有限。

    第二個模型是 unifies both central catadioptric cameras and fisheye cameras under a general model also known as Taylor model,由 Scaramuzza et al. [10,11]于2006年提出,優勢就是使用一個模型( a Taylor polynomial)分析 catadioptric and dioptric cameras

    0.3 Unified model for central catadioptric cameras Geyer and Daniilidis 在 2000年那篇經典文獻指出:任意的 catadioptric (parabolic, hyperbolic, elliptical) 和標準的 perspective projection 都等同于一個 projective mapping ,該映射將 位于 single viewpoint 一個球上的點 投影到 一個平面內,該平面的 the projection center on the perpendicular to the plane and distant ? from the center of the sphere

    scene point 和 image point 的投影關系如下: the camera and mirror reference frames differ only by a translation along z 相機坐標系和 mirror 坐標系

    1)投影的第一步是將 scene point 投影到 the unit sphere

    2)將投影點的坐標變換到一個新坐標系下表示,新坐標系的原點位于

    新坐標為

    注意這個新坐標系原點的位置不同,對應的mirror( 曲線反射面)類型會不一樣。

    3)接著將點 投影到 normalized image plane

    4)最后通過相機內參數矩陣 K 將點投影到相機圖像坐標系

    ?

    function g ?1 is bijective and that its inverse g is given by

    ?

    上面的映射是將 成像平面上的點映射到 the unit vector Ps in the mirror reference frame

    方程(6)可以通過反轉方程(3)得到,滿足約束: Ps 在單位球上。

    方程(6)是 central catadioptric cameras 投影模型的核心。It expresses the relation between the point m on the normalized image plane and the unit vector Ps in the mirror reference frame.

    這個模型可以準確用于描述 all central catadioptric cameras (parabolic, hyperbolic, and elliptical mirror) and standard perspective cameras. 將該模型用于魚眼相機存在精度有限的問題。為了克服這個問題,一個新的統一模型被提出來。

    0.4 Unified model for catadioptric and fisheye cameras

    該模型 Scaramuzza et al. in 2006 提出來的。它與上面的模型主要區別在于 函數 g 的選擇。為了克服針對魚眼相機參數模型的知識缺乏。作者提出使用 Taylor polynomial, the relation between the normalized image point ? m = (x m ,y m ,1) and the unit vector P s in the fisheye (mirror) reference frame can be written as:

    ?

    0.5 Omnidirectional camera calibration

    這里主要介紹三個 開源的 Matlab 標定程序,which differ mainly for the projection model adopted and the type of calibration pattern:

    1) The toolbox of Mei 使用棋盤格圖像標定,使用 Geyer and Daniilidis 的投影模型,該工具箱特征適用于 catadioptric cameras using hyperbolic, parabolic, folded mirrors, and spherical mirrors

    2) The toolbox of Barreto 使用直線圖像標定,沒有使用棋盤格,它也使用 Geyer and Daniilidis 的投影模型,該工具箱特別適用于 parabolic mirrors

    3) the toolbox of Scaramuzza 使用棋盤格圖像標定,它使用 the unified Taylor model for catadioptric and fisheye cameras,該工具箱適用于 catadioptric cameras using hyperbolic, parabolic, folded mirrors, spherical,and elliptical mirrors.

    此外它還使用于市面上大多數魚眼相機, it works with a wide range of fisheye lenses available on the market — such as Nikon, Sigma, Omnitech-Robotics, and many others — with field of view up to 195 degrees

    Application 應用

    11

    總結

    以上是生活随笔為你收集整理的相机模型-鱼眼模型/Omnidirectional Camera(1)的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。