




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、 Camera Calibration Toolbox for MatlabDescription of the calibration parametersAfter calibration, the list of parameters may be stored in the matab file Calib_Results by clicking on Save. The list of variables may be separated into two categories: Intrinsic parameters and extrinsic parameters.
2、 Intrinsic parameters (camera model):The internal camera model is very similar to that used by Heikkil伯a(chǎn)> and Silven at the University of Oulu in Finland. Visit their online calibration page, and their publication page. We specifically recommend their CVPR'97 paper: A Four-step Camera Calibra
3、tion Procedure with Implicit Image Correction. The list of internal parameters: · Focal length: The focal length in pixels is stored in the 2x1 vector fc.· Principal point: The principal point coordinates are stored in the 2x1 vector cc.· Skew coefficient: The skew coefficient definin
4、g the angle between the x and y pixel axes is stored in the scalar alpha_c.· Distortions: The image distortion coefficients (radial and tangential distortions) are stored in the 5x1 vector kc四個(gè)內(nèi)參,包括焦距fc,原點(diǎn)坐標(biāo)cc,相機(jī)坐標(biāo)系中x和y軸夾角alpha_c(接近90°),幾何畸變系數(shù)kc.Definition of the intrinsic parameters: Let
5、P be a point in space of coordinate vector XXc = Xc;Yc;Zc in the camera reference frame. Let us project now that point on the image plane according to the intrinsic parameters (fc,cc,alpha_c,kc). Let xn be the normalized (pinhole) image projection: Let r2 = x2 + y2. After including lens disto
6、rtion, the new normalized point coordinate xd is defined as follows:where dx is the tangential distortion vector: Matlab中計(jì)算幾何畸變還考慮了切向畸變Therefore, the 5-vector kc contains both radial and tangential distortion coefficients (observe that the coefficient of 6th order radial distortion term is th
7、e fifth entry of the vector kc).It is worth noticing that this distortion model was first introduced by Brown in 1966 and called "Plumb Bob" model (radial polynomial + "thin prism" ). The tangential distortion is due to "decentering", or imperfect centering of the lens
8、components and other manufacturing defects in a compound lens. For more details, refer to Brown's original publications listed in the reference page. Once distortion is applied, the final pixel coordinates x_pixel = xp;yp of the projection of P on the image plane is: Therefore, the pixel
9、coordinate vector x_pixel and the normalized (distorted) coordinate vector xd are related to each other through the linear equation: where KK is known as the camera matrix, and defined as follows: 對(duì)應(yīng)于書上的線性映射矩陣AFc(1)和fc(2)分別對(duì)應(yīng)于矩陣A中的f/k和f/l,即轉(zhuǎn)化為按照x和y方向上的像素尺寸為單位In matlab, this matrix is stored in the v
10、ariable KK after calibration. Observe that fc(1) and fc(2) are the focal distance (a unique value in mm) expressed in units of horizontal and vertical pixels. Both components of the vector fc are usually very similar. The ratio fc(2)/fc(1), often called "aspect ratio", is different from 1
11、if the pixel in the CCD array are not square. Therefore, the camera model naturally handles non-square pixels. In addition, the coefficient alpha_c encodes the angle between the x and y sensor axes. Consequently, pixels are even allowed to be non-rectangular. Some authors refer to that type of model
12、 as "affine distortion" model. In addition to computing estimates for the intrinsic parameters fc, cc, kc and alpha_c, the toolbox also returns estimates of the uncertainties on those parameters. The matlab variables containing those uncertainties are fc_error,cc_error, kc_error, alpha_c_e
13、rror. For information, those vectors are approximately three times the standard deviations of the errors of estimationFc_error,cc_error,kc_error,alpha_c_error這四個(gè)變量記錄四個(gè)內(nèi)參的不確定度,大小設(shè)定為三倍標(biāo)準(zhǔn)差. Here is an example of output of the toolbox after optimization: In this case fc = 657.30254 ; 657.74391 and fc_er
14、ror = 0.28487 ; 0.28937, cc = 302.71656 ; 242.33386, cc_error = 0.59115 ; 0.55710, . Important Convention:Pixel coordinates are defined such that 0;0 is the center of the upper left pixel注意:圖像左上角默認(rèn)為原點(diǎn)0;0左下角為0;ny-1右上角為nx-1;0右下角為nx-1;ny-1 of the image. As a result, nx-1;0 is center of the upper right
15、corner pixel, 0;ny-1 is the center of the lower left corner pixel and nx-1;ny-1 is the center of the lower right corner pixel where nx and ny are the width and height of the image (for the images of the first example, nx=640 and ny=480). One matlab function provided in the toolbox computes that dire
16、ct pixel projection map. This function is project_points2.m. This function takes in the 3D coordinates of a set of points in space (in world reference frame or camera reference frame) and the intrinsic camera parameters (fc,cc,kc,alpha_c), and returns the pixel projections of the points on the image
17、 plane. See the information given in the function函數(shù)project_points2.m將相機(jī)坐標(biāo)系下的三維點(diǎn)陣按照內(nèi)參轉(zhuǎn)化成圖像平面上的二位點(diǎn)陣. The inverse mapping: The inverse problem of computing the normalized image projection vector xn from the pixel coordinate x_pixel is very useful in most machine vision applications. However, bec
18、ause of the high degree distortion model, there exists no general algebraic expression for this inverse map (also called normalization). In the toolbox however, a numerical implementation of inverse mapping is provided in the form of a function: normalize.m. Here is the way the function should be ca
19、lled: xn = normalize(x_pixel,fc,cc,kc,alpha_c). In that syntax, x_pixel and xn may consist of more than one point coordinates. For an example of call, see the matlab function compute_extrinsic_init.m.Reduced camera models:Currently manufactured cameras do not always justify this very general optical
20、 model. For example, it now customary to assume rectangular pixels, and thus assume zero skew (alpha_c=0). It一般情況下,相機(jī)坐標(biāo)系中的坐標(biāo)軸正交,alpha_c就可以默認(rèn)為0;在非廣角鏡頭中,一般徑向畸變模型到4階就足夠了(好的鏡頭2階就夠了),而且切向畸變可以忽略 is in fact a default setting of the toolbox (the skew coefficient not being estimated). Furthermore, the very g
21、eneric (6th order radial + tangential) distortion model is often not considered completely. For standard field of views (non wide-angle cameras), it is often not necessary (and not recommended) to push the radial component of distortion model beyond the 4th order (i.e. keeping kc(5)=0). This is also
22、 a default setting of the toolbox. In addition, the tangential component of distortion can often be discarded (justified by the fact that most lenses currently manufactured do not have imperfection in centering). The 4th order symmetric radial distortion with no tangential component (the last three
23、component of kc are set to zero) is actually the distortion model used by Zhang. Another very common distortion model for good optical systems or narrow field of view lenses is the second order symmetric radial distortion model. In that model, only the first component of the vector kc is estimated,
24、while the other four are set to zero. This model is also commonly used when a few images are used for calibration (too little data to estimate a more complex model). Aside from distortions and skew, other model reductions are possible. For example, when only a few images are used for calibration (e.
25、g. one, two or three images) the principal point cc is often very difficult to estimate reliably . It is known to be one of the most difficult part of the native perspective projection model to estimate (ignoring lens distortions). If this is the case, it is sometimes better (and recommended) to set
26、 the principal point at the center of the image (cc = (nx-1)/2;(ny-1)/2) and not estimate it further. Finally, in few rare instances, it may be necessary to reject the aspect ratio fc(2)/fc(1) from the estimation. Although this final model reduction step is possible with the toolbox, it is generally
27、 not recommended as the aspect ratio is often 'easy' to estimate very reliably. For more information on how to perform model selection with the toolbox, visit the page describing the first calibration example. Correspondence with Heikkil notation: In the original Heikkil paper, the in
28、ternal parameters appear with slightly different names. The following table gives the correspondence between the two notation schemes: Our notationHeikkil notationfc(1)f . Du . sufc(2)f . Dvcc(1)u0cc(2)v0alpha_c0kc(1)f3 . k1kc(2)f5 . k2kc(3)f2 . p1kc(4)f2 . p2kc(5)0A few comments on Heikkil m
29、odel: · Skew is not estimated (alpha_c=0). It may not be a problem as most cameras currently manufactured do not have centering imperfections. · The radial component of the distortion model is only up to the 4th order. This is sufficient for most cases. · The four variables (f,Du,Dv,s
30、u) replacing the 2x1 focal vector fc are in general impossible to estimate separately. It is only possible if two of those variables are known (for example the metric focal value f and the scale factor su). See Heikkil paper for more information. Correspondence with Reg Willson's notation: In hi
31、s original implementation of the Tsai camera calibration algorithm, Reg Willson uses a different notation for the camera parameters. The following table gives the correspondence between the two notation schemes: Our notationWillson's notationfc(1)f . sx / dpxfc(2)f / dpycc(1)Cxcc(2)Cyalph
32、a_c0Willson uses a first order radial distortion model (with an additional constant kappa1) that does not have an easy closed-form corespondence with our distortion model (encoded with the coefficients kc(1),.,kc(5). However, we included in the toolbox a function called willson_convert that converts
33、 the entire set of Willson's parameters into our parameters (including distortion). This function is called in another function willson_read that directly loads in a calibration result file generated by Willson's code and computes the set parameters (intrinsic and extrinsic) following our no
34、tation (to use that function, first set the matlab variable calib_file to the name of the original willson calibration file). A few extra comments on Willson's model: · Similarly to Heikkil model, the skew is not included in the model (alpha_c=0). · Similarly to Heikkil model, the four
35、 variables (f,sx,dpx,dpy) replacing the 2x1 focal vector fc are in general impossible to estimate separately. It is only possible if two of those variables are known (for example the metric focal value f and the scale factor sx). Extrinsic parameters:· Rotations: A set of n_ima 3x3 rotat
36、ion matrices Rc_1, Rc_2,., Rc_20 (assuming n_ima=20). · Translations:A外部參數(shù)Rc和Tc同時(shí)注意n_ima好像是圖片的數(shù)量(對(duì)一個(gè)鏡頭進(jìn)行參數(shù)估計(jì)的圖片數(shù)量) set of n_ima 3x1 vectors Tc_1, Tc_2,., Tc_20 (assuming n_ima=20). Definition of the extrinsic parameters: Consider the calibration grid #i (attached to the ith calibration image),
37、and concentrate on the camera reference frame attahed to that grid. Without loss of generality, take i = 1. The following figure shows the reference frame (O,X,Y,Z) attached to that calibration gid. Let P be a point space of coordinate vector XX = X;Y;Z in the grid reference frame (reference frame shown on the previous figure). Let XXc = Xc;Yc;Zc be the coordinate vector of P in the camera reference frame. Then XX and XXc are related to each other through the following rigid motion equation: XXc = Rc_1 * XX + Tc_1XXc=Rc_1*XX+Tc_1世界坐標(biāo)系到相機(jī)坐標(biāo)系的投影,用兩個(gè)外部參數(shù)矩陣In parti
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 仲裁機(jī)構(gòu)和協(xié)議書
- 保潔車制作協(xié)議書
- 違法種植協(xié)議書
- 駕駛培訓(xùn)協(xié)議書
- 銷售醫(yī)藥協(xié)議書
- 出院后補(bǔ)償協(xié)議書
- 鋼管經(jīng)銷協(xié)議書
- 面試集訓(xùn)協(xié)議書
- 集采種牙協(xié)議書
- 裝修轉(zhuǎn)讓協(xié)議書
- 2025年保密教育線上培訓(xùn)考試試題及答案
- JJG 693-2011可燃?xì)怏w檢測(cè)報(bào)警器
- 操作系統(tǒng)-作業(yè)實(shí)驗(yàn)1存儲(chǔ)管理
- 青春期學(xué)生性教育PPT資料
- 多學(xué)科診療糖尿病足病例分享
- 施工進(jìn)度計(jì)劃網(wǎng)絡(luò)圖、橫道圖
- 汽車起重機(jī)檢查及記錄表(月檢)
- 公司委托經(jīng)營協(xié)議
- 中共中央辦公廳、國務(wù)院辦公廳關(guān)于進(jìn)一步穩(wěn)定和完善農(nóng)村土地承包關(guān)系的通知中辦發(fā)〔1997〕16號(hào),1997年6
- 實(shí)用美學(xué)第九講飲食美學(xué)課件
- “三合一”“多合一”場(chǎng)所消防安全告知書
評(píng)論
0/150
提交評(píng)論