版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、CameraCalibrationToolboxforMatlabDescriptionofthecalibrationparametersAftercalibration,thelistofparametersmaybestoredinthematabfileCalib_ResultsbyclickingonSave.Thelistofvariablesmaybeseparatedintotwocategories:Intrinsicparametersandextrinsicparameters.Intrinsicparameters(cameramodel):Theinternalcam
2、eramodelisverysimilartothatusedbyHeikkil伯aandSilvenattheUniversityofOuluinFinland.Visittheironlinecalibrationpage,andtheirpublicationpage.WespecificallyrecommendtheirCVPR97paper:AFour-stepCameraCalibrationProcedurewithImplicitImageCorrection.Thelistofinternalparameters:Focallength:Thefocallengthinpi
3、xelsisstoredinthe2x1vectorfc.Principalpoint:Theprincipalpointcoordinatesarestoredinthe2x1vectorcc.Skewcoefficient:Theskewcoefficientdefiningtheanglebetweenthexandypixelaxesisstoredinthescalaralpha_c.Distortions:Theimagedistortioncoefficients(radialandtangentialdistortions)arestoredinthe5x1vectorkc.D
4、efinitionoftheintrinsicparameters:LetPbeapointinspaceofcoordinatevectorXXc=Xc;Yc;Zcinthecamerareferenceframe.Letusprojectnowthatpointontheimageplaneaccordingtotheintrinsicparameters(fc,cc,alpha_c,kc).Letxnbethenormalized(pinhole)imageprojection:Letr2=x2+y2.Afterincludinglensdistortion,thenewnormaliz
5、edpointcoordinatexdisdefinedasfollows:wheredxisthetangentialdistortionvector:dx=2直xy+kcF+2/kc(3)(r2+2y2)+2kc(4)xyTherefore,the5-vectorkccontainsbothradialandtangentialdistortioncoefficients(observethatthecoefficientof6thorderradialdistortiontermisthefifthentryofthevectorkc).Itisworthnoticingthatthis
6、distortionmodelwasfirstintroducedbyBrownin1966andcalledPlumbBobmodel(radialpolynomial+thinprism).Thetangentialdistortionisduetodecentering,orimperfectcenteringofthelenscomponentsandothermanufacturingdefectsinacompoundlens.Formoredetails,refertoBrownsoriginalpublicationslistedinthereferencepage.Onced
7、istortionisapplied,thefinalpixelcoordinatesx_pixel=xp;ypoftheprojectionofPontheimageplaneis:%=氏l:xd(l)+alpha_c*xd(2)i+cc(l)耳=fc(2)心(2)+m(2)Therefore,thepixelcoordinatevectorx_pixelandthenormalized(distorted)coordinatevectorxdarerelatedtoeachotherthroughthelinearequation:whereKKisknownasthecameramatr
8、ix,anddefinedasfollows:Inmatlab,thismatrixisstoredinthevariableKKaftercalibration.Observethatfc(1)andfc(2)arethefocaldistance(auniquevalueinmm)expressedinunitsofhorizontalandverticalpixels.Bothcomponentsofthevectorfcareusuallyverysimilar.Theratiofc(2)/fc(1),oftencalledaspectratio,isdifferentfrom1ift
9、hepixelintheCCDarrayarenotsquare.Therefore,thecameramodelnaturallyhandlesnon-squarepixels.Inaddition,thecoefficientalpha_cencodestheanglebetweenthexandysensoraxes.Consequently,pixelsareevenallowedtobenon-rectangular.Someauthorsrefertothattypeofmodelasaffinedistortionmodel.Inadditiontocomputingestima
10、tesfortheintrinsicparametersfc,cc,kcandalpha_c,thetoolboxalsoreturnsestimatesoftheuncertaintiesonthoseparameters.Thematlabvariablescontainingthoseuncertaintiesarefc_error,cc_error,kc_error,alpha_c_error.Forinformation,thosevectorsareapproximatelythreetimesthestandarddeviationsoftheerrorsofestimation
11、.Hereisanexampleofoutputofthetoolboxafteroptimization:FocalLength:Fc=657.30254657.74391士0.284870.28937Principalpoint:cc=302.71656242.33386土0.591150.55710Skeu:alphac=0.000420.00019=angleofpixelaxes=89.975950.Distortion:kc=-0.253490.11868-0.000280.000050.00000|0.00231Pixelerror:err=0.117438.11585Calib
12、rationresultsafteroptimization(withuncertainties):Note:Thenumericalerrorsareapproximatelythreetimesthestandarddeviations(ForreferenceInthiscasefc=657.30254;657.74391andfc_error=0.28487;0.28937,cc=302.71656;242.33386,cc_error=0.59115;0.55710,.ImportantConvention:Pixelcoordinatesaredefinedsuchthat0;0i
13、sthecenteroftheupperleftpixeloftheimage.Asaresult,nx-1;0iscenteroftheupperrightcornerpixel,0;ny-1isthecenterofthelowerleftcornerpixelandnx-1;ny-1isthecenterofthelowerrightcornerpixelwherenxandnyarethewidthandheightoftheimage(fortheimagesofthefirstexample,nx=640andny=480).Onematlabfunctionprovidedint
14、hetoolboxcomputesthatdirectpixelprojectionmap.Thisfunctionisproject_points2.m.Thisfunctiontakesinthe3Dcoordinatesofasetofpointsinspace(inworldreferenceframeorcamerareferenceframe)andtheintrinsiccameraparameters(fc,cc,kc,alpha_c),andreturnsthepixelprojectionsofthepointsontheimageplane.Seetheinformati
15、ongiveninthefunction.Theinversemapping:Theinverseproblemofcomputingthenormalizedimageprojectionvectorxnfromthepixelcoordinatex_pixelisveryusefulinmostmachinevisionapplications.However,becauseofthehighdegreedistortionmodel,thereexistsnogeneralalgebraicexpressionforthisinversemap(alsocallednormalizati
16、on).Inthetoolboxhowever,anumericalimplementationofinversemappingisprovidedintheformofafunction:normalize.m.Hereisthewaythefunctionshouldbecalled:xn=normalize(x_pixel,fc,cc,kc,alpha_c).Inthatsyntax,x_pixelandxnmayconsistofmorethanonepointcoordinates.Foranexampleofcall,seethematlabfunctioncompute_extr
17、insic_init.m.Reducedcameramodels:Currentlymanufacturedcamerasdonotalwaysjustifythisverygeneralopticalmodel.Forexample,itnowcustomarytoassumerectangularpixels,andthusassumezeroskew(alpha_c=0).Itisinfactadefaultsettingofthetoolbox(theskewcoefficientnotbeingestimated).Furthermore,theverygeneric(6thorde
18、rradial+tangential)distortionmodelisoftennotconsideredcompletely.Forstandardfieldofviews(nonwide-anglecameras),itisoftennotnecessary(andnotrecommended)topushtheradialcomponentofdistortionmodelbeyondthe4thorder(i.e.keepingkc(5)=0).Thisisalsoadefaultsettingofthetoolbox.Inaddition,thetangentialcomponen
19、tofdistortioncanoftenbediscarded(justifiedbythefactthatmostlensescurrentlymanufactureddonothaveimperfectionincentering).The4thordersymmetricradialdistortionwithnotangentialcomponent(thelastthreecomponentofkcaresettozero)isactuallythedistortionmodelusedbyZhang.Anotherverycommondistortionmodelforgoodo
20、pticalsystemsornarrowfieldofviewlensesisthesecondordersymmetricradialdistortionmodel.Inthatmodel,onlythefirstcomponentofthevectorkcisestimated,whiletheotherfouraresettozero.Thismodelisalsocommonlyusedwhenafewimagesareusedforcalibration(toolittledatatoestimateamorecomplexmodel).Asidefromdistortionsan
21、dskew,othermodelreductionsarepossible.Forexample,whenonlyafewimagesareusedforcalibration(e.g.one,twoorthreeimages)theprincipalpointccisoftenverydifficulttoestimatereliably.Itisknowntobeoneofthemostdifficultpartofthenativeperspectiveprojectionmodeltoestimate(ignoringlensdistortions).Ifthisisthecase,i
22、tissometimesbetter(andrecommended)tosettheprincipalpointatthecenteroftheimage(cc=(nx-1)/2;(ny-1)/2)andnotestimateitfurther.Finally,infewrareinstances,itmaybenecessarytorejecttheaspectratiofc(2)/fc(1)fromtheestimation.Althoughthisfinalmodelreductionstepispossiblewiththetoolbox,itisgenerallynotrecomme
23、ndedastheaspectratioisofteneasytoestimateveryreliably.Formoreinformationonhowtoperformmodelselectionwiththetoolbox,visitthepagedescribingthefirstcalibrationexample.CorrespondencewithHeikki雌notation:IntheoriginalHeikkil懺paper,theinternalparametersappearwithslightlydifferentnames.Thefollowingtablegive
24、sthecorrespondencebetweenthetwonotationschemes:OurnotationHeikkil唯notationfcf.Du.sufc(2)f.DvCCu0cc(2)v0alphac0kcf3.k1kc(2)f5.k2kc(3)f2.plkc(4)f2.p2kc(5)0AfewcommentsonHeikkil临model:Skewisnotestimated(alpha_c=0).Itmaynotbeaproblemasmostcamerascurrentlymanufactureddonothavecenteringimperfections.Thera
25、dialcomponentofthedistortionmodelisonlyuptothe4thorder.Thisissufficientformostcases.Thefourvariables(f,Du,Dv,su)replacingthe2x1focalvectorfcareingeneralimpossibletoestimateseparately.Itisonlypossibleiftwoofthosevariablesareknown(forexamplethemetricfocalvaluefandthescalefactorsu).SeeHeikki雌paperformo
26、reinformation.CorrespondencewithRegWillsonsnotation:InhisoriginalimplementationoftheTsaicameracalibrationalgorithm,RegWillsonusesadifferentnotationforthecameraparameters.Thefollowingtablegivesthecorrespondencebetweenthetwonotationschemes:OurnotationWillsonsnotationfc(1)f.sx/dpxfc(2)f/dpyCCCxcc(2)Cya
27、lphac0Willsonusesafirstorderradialdistortionmodel(withanadditionalconstantkappa1)thatdoesnothaveaneasyclosed-formcorespondencewithourdistortionmodel(encodedwiththecoefficientskc(1),.,kc(5).However,weincludedinthetoolboxafunctioncalledwillson_convertthatconvertstheentiresetofWillsonsparametersintoour
28、parameters(includingdistortion).Thisfunctioniscalledinanotherfunctionwillson_readthatdirectlyloadsinacalibrationresultfilegeneratedbyWillsonscodeandcomputesthesetparameters(intrinsicandextrinsic)followingournotation(tousethatfunction,firstsetthematlabvariablecalib_filetothenameoftheoriginalwillsonca
29、librationfile).AfewextracommentsonWillsonsmodel:SimilarlytoHeikkil临model,theskewisnotincludedinthemodel(alpha_c=0).SimilarlytoHeikkil临model,thefourvariables(f,sx,dpx,dpy)replacingthe2x1focalvectorfcareingeneralimpossibletoestimateseparately.Itisonlypossibleiftwoofthosevariablesareknown(forexamplethe
30、metricfocalvaluefandthescalefactorsx).Extrinsicparameters:Rotations:Asetofn_ima3x3rotationmatricesRc_1,Rc_2,.,Rc_20(assumingn_ima=20).Translations:Asetofn_ima3x1vectorsTc_1,Tc_2,.,Tc_20(assumingn_ima=20).Definitionoftheextrinsicparameters:Considerthecalibrationgrid#i(attachedtotheithcalibrationimage
31、),andconcentrateonthecamerareferenceframeattahedtothatgrid.Withoutlossofgenerality,takei=1.Thefollowingfigureshowsthereferenceframe(O,X,Y,Z)attachedtothatcalibrationgid.BacktomaincalibrationpageLetPbeapointspaceofcoordinatevectorXX=X;Y;Zinthegridreferenceframe(referenceframeshownonthepreviousfigure).LetXXc=Xc;Yc;ZcbethecoordinatevectorofPinthecamerareferenceframe.ThenXXand
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 江西南昌市江西科技学院附属中学2025-2026学年第二学期高一年级月考政治试卷(含答案)
- 鲜风生活物流优化方案
- 阑尾炎患者肠道功能恢复护理
- 重症监护室疼痛管理与舒适护理
- 鲜风生活门店调改经验
- 福建水利电力职业技术学院《数字经济学》2025-2026学年期末试卷
- 延边职业技术学院《薪酬管理》2025-2026学年期末试卷
- 福建船政交通职业学院《文献信息检索与利用》2025-2026学年期末试卷
- 长春大学《商法》2025-2026学年期末试卷
- 闽江师范高等专科学校《经济学原理》2025-2026学年期末试卷
- 低钠血症的中国专家共识2023解读
- 小儿矮小症护理
- 中华医学会胃癌临床诊疗指南(全文版)
- 超声引导下动静脉内瘘穿刺
- GB/T 2423.17-2024环境试验第2部分:试验方法试验Ka:盐雾
- 商用车驾驶室的驾驶室悬置形式及主要功能
- 第4章-图像增强
- 2024年长江出版社武汉有限公司招聘笔试参考题库含答案解析
- 患者情绪疏导与心理支持
- 灰姑娘英语话剧剧本-doc
- 桂林一中小升初去年分班考试试卷
评论
0/150
提交评论