Second calibration example - Calibration using Zhengyou Zhang's data

The previous example showed you how to run calibration from raw images. It is worth noticing that our toolbox may also be used in case where some calibration data have been previously computed. As an illustration, let us use our calibration engine onZhengyou Zhang's calibration data that he made available on hiscalibration page at Microsoft Research. Do not bother downloading the data from there, we have it all ready for you right here just one mouse click away:zhang_data.zip (621Kb zipped). After download, retrieve all the files present in the package in a directory calledzhang_data (this should be automatic). This directory contains the original calibration images (five of them) used by Zhang (intif format), together with the planar calibration rig model and the extracted corner coordinate files that Zhengyou Zhang distributes on hisweb page. In addition, you will find a small matlab script file calleddemo_script.m.

前面的例子教你怎样用原始deep图片来校正。工具箱同样能够用以前的校正数据来进行校正。作为演示,我们校正引擎采用Zhengyou Zhang的校正数据(来自他在微软研究院的网页上)。不需要去他网页下载,可以直接右键在这里下载。下载完成后,得到的数据在一个叫zhang_data的目录中。该目录含有原始校正图片(5张,格式是tif),同时还有刚体校正模型和角点坐标文件。你还会找到一个matlab的脚本程序叫做demo_script.m。

Under Matlab, run that script file demo_script.m. This script converts all Zhang's data into my calibration format, reads in the images, runs through the main calibration engine, shows the results (intrinsic + extrinsic), and saves them under a file called Calib_Results.mat. This small script demonstrates that our calibration toolbox may easily be used in cases where some data have already been extracted (in this case, the corner coordinates). Observe that setting the variable dont_ask to one lets you use the main toolbox functions (optimization + graphical display) in script mode without being prompted. This is also quite useful for including calibration calls in your own matlab script files. In this present example, compare our calibration results (fc, cc, kc, Rc_1, Tc_1, Rc_2,Tc_2, ... ,Rc_5, Tc_5) with Zhang's. Quite similar no? (observe that our distortion model includes two additional terms accounting for tangential distortion. The other terms are defined in the exact same way. For more information, visit thepage describing the calibration parameters.

运行demo_script.m。该脚本将zhang的数据转换成自己的校正格式,读入图片,运行校正步骤,显示结果(内部参数+外部参数),并将结果保存在一个叫做Calib_Results.mat的文件中。这个小脚本显示了我们的校正工具箱可以很简单的应用,当一些数据已经被提取出来的话(这里指角点坐标)。注意到可以设置变量dont_ask为1来使你应用工具箱时(优化+图形显示)没有提示过程。这个对你自己写matlab脚本来计算校正很有用。本例子中,我们校正结果(fc, cc, kc, Rc_1, Tc_1, Rc_2,Tc_2, ... ,Rc_5, Tc_5)和zhang比较。是不是很相似?(注意到我们的校正包含两个二维的切向失真)。

Once the script is finished running, we may want to try to include the skew coefficient alpha_c in the optimization. For that purpose, set the binary variable est_alpha to1 (est_alpha = 1), and click on Calibration. Observe that the final computed skew coefficient alpha_c is very close to zero (i.e. pixels are rectangular). For more information, visit thepage describing the calibration parameters.

脚本运行完成后,我们可能需要将斜交系数在优化过程中考虑在内。这样,可以将变量est_alpha设为1,点击Calibration按钮。可以观察到alpha_c十分接近于0(也就是说像素是按矩形排列的)。

As a final ultimate comparison, you may want to run the estimation is the exact same configuration as Zhang. For that, disable the tangential distortion part of the model and limit the radial distortion model up to the 4th degree (est_dist = [1;1;0;0;0]), and activate the skew estimation (est_alpha = 1). After calibration, you should observe that our results are exactly the same asZhang's. To compare skew estimation, look at the camera matrix KK. Zhang's skew coefficient is defined as fc(1)*alpha_c, which is the (1,2) entry of the camera matrixKK. For more information, visit thepage describing the calibration parameters.

作为最后的终极比较,你可能希望运行和zhang同样的配置。那么,可以使切向失真无效,将径向失真模型设置为第四(est_dist=[1;1;0;0;0]),激活斜交系数估计(est_alpha=1)。完成校正后,可以看到我们的结果和zhang的一模一样。比较斜交系数,查看矩阵KK。zhang的斜交系数定义为fc(1)*alpha_c,就是矩阵KK的(1,2)。

You may also try to re-extract the square corners on the calibration images, by clicking onRecomp. corners. Select all the images, the window size of your choice (for example wintx = 6,winty = 6), and the automatic mode (required here). Then run calibration again, and compare the results. As a general advice, we recommend NOT to use such a pattern for calibration (disjoint squares generating asymmetric corner features) . It is better to use symmetric corner features such as the corners of a checkerboard pattern (the pattern used in thefirst example). To retrieve that pattern, visit that link.

你可能也试试重新提取角点,可以点击Recomp.corners。选择所有图片,设置窗口大小(比如wintx=6,winty=6),设置成自动模式。然后重新运行校正步骤,比较结果。作为一个建议,我们不推荐这种校正模式(从不对称的特征中提取角点)。最好是采用对称的角点特征,如棋盘格(我们前面用到的)。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1 2/3维图像分割工具箱 2 PSORT粒子群优化工具箱 3 matlab计量工具箱Lesage 4 MatCont7p1 5 matlab模糊逻辑工具箱函数 6 医学图像处理工具箱 7 人工蜂群工具箱 8 MPT3安装包 9 drEEM toolbox 10 DOMFluor Toolbox v1.7 11 Matlab数学建模工具箱 12 马尔可夫决策过程(MDP)工具箱MDPtoolbox 13 国立SVM工具箱 14 模式识别与机器学习工具箱 15 ttsbox1.1语音合成工具箱 16 分数阶傅里叶变换的程序FRFT 17 魔方模拟器与规划求解 18 隐马尔可夫模型工具箱 HMM 19 图理论工具箱GrTheory 20 自由曲线拟合工具箱ezyfit 21 分形维数计算工具箱FracLab 2.2 22 For-Each 23 PlotPub 24 Sheffield大学最新遗传算法工具箱 25 Camera Calibration 像机标定工具箱 26 Qhull(二维三维三角分解、泰森图)凸包工具箱 2019版 27 jplv7 28 MatlabFns 29 张量工具箱Tensor Toolbox 30 海洋要素计算工具箱seawater 31 地图工具箱m_map 32 othercolor配色工具包 33 Matlab数学建模工具箱 34 元胞自动机 35 量子波函数演示工具箱 36 图像局域特征匹配工具箱 37 图像分割graphcut工具箱 38 NSGA-II工具箱 39 chinamap中国地图数据工具箱(大陆地区) 40 2D GaussFit高斯拟合工具箱 41 dijkstra最小成本路径算法 42 多维数据快速矩阵乘法 43 约束粒子群优化算法 44 脑MRI肿瘤的检测与分类 45 Matlab数值分析算法程序 46 matlab车牌识别完整程序 47 机器人工具箱robot-10.3.1 48 cvx凸优化处理工具箱 49 hctsa时间序列分析工具箱 50 神经科学工具箱Psychtoolbox-3-PTB 51 地震数据处理工具CREWES1990版 52 经济最优化工具箱CompEcon 53 基于约束的重构分析工具箱Cobratoolbox 54 Schwarz-Christoffel Toolbox 55 Gibbs-SeaWater (GSW)海洋学工具箱 56 光声仿真工具箱K-Wave-toolbox-1.2.1 57 语音处理工具箱Sap-Voicebox 58 贝叶斯网工具箱Bayes Net Toolbox(BNT) 59 计算机视觉工具箱VFfeat-0.9.21 60 全向相机校准工具箱OCamCalib_v3.0 61 心理物理学数据分析工具箱Palamedes1_10_3 62 生理学研究工具箱EEGLAB 63 磁共振成像处理工具箱CONN 18b 64 matlab 复杂网络工具箱 65 聚类分析工具箱FuzzyClusteringToolbox 66 遗传规划matlab工具箱 67 粒子群优化工具箱 68 数字图像处理工具箱DIPUM Toolbax V1.1.3 69 遗传算法工具箱 70 鱼群算法工具箱OptimizedAFSAr 71 蚁群算法工具箱 72 matlab优化工具箱 73 数据包络分析工具箱 74 图像分割质量评估工具包 75 相关向量机工具箱 76 音频处理工具箱 77 nurbs工具箱 78 Nurbs-surface工具箱 79 grabit数据提取工具箱 80 量子信息工具箱QLib 81 DYNAMO工具箱 82 NEDC循环的整车油耗量 83 PlotHub工具箱 84 MvCAT_Ver02.01 85 Regularization Tools Version 4.1 86 MatrixVB 4.5(含注册) 87 空间几何工具箱 matGeom-1.2.2 88 大数计算工具箱 VariablePrecisionIntegers 89 晶体织构分析工具包 mtex-5.7.0 90 Minimal Paths 2工具箱 91 Matlab数学建模工具箱

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值