opencv自定义标定与matlab对比分析 (opecv非正方形标定板)

程序说明

程序结构


 

CmakeLists.txt Cmake文件

image_points.xml 图像2D点输入存放

object_points.xml标识3D点输入存放

注意事项

calibration.cpp 主程序

#define view_number 6 //图片数目 the number of a scene views

#define view_points_number 44 //每幅图像上的角点数目 要求每幅图像上点数目一样 points in each particular view(here very view's points's number is the same)

#define image_width 1280 //分辨率设置

#define image_height 720

运行


效果


 

测试实验

6张图片,每张88的点对,共528个点

K1 ,k2, p1,p2 (畸变参数)

matlab结果

1528.96521170087 0 0

0 1535.78526461957 0

605.099827862827 397.738637267714 1

-0.424787596935801 0.380419925823708 (K)

-0.00209821343507270 0.00322581039323562 (P)

6张图片,每张88的点对,共528个点

opencv结果

<intrinsic_matrix type_id="opencv-matrix">

<rows>3</rows>

<cols>3</cols>

<dt>d</dt>

<data>

1.5289729069184157e+03 0. 6.0508973880088320e+02 0.

1.5357937076891867e+03 3.9774109243729168e+02 0. 0. 1.</data></intrinsic_matrix>

<distortion_coeffs type_id="opencv-matrix">

<rows>1</rows>

<cols>4</cols>

<dt>d</dt>

<data>

-4.2479997249484824e-01 3.8049457737605091e-01

-2.0985592077567856e-03 3.2272882784423469e-03</data></distortion_coeffs>

结论 matlab与opencv办标定结果基本一致

———————

6张图片 每张44的点对,共528个点

(重点是非正方形标定板,大有可为)

opencv测量结果

<opencv_storage>

<!-- calibration result -->

<intrinsic_matrix type_id="opencv-matrix">

<rows>3</rows>

<cols>3</cols>

<dt>d</dt>

<data>

1.5275758060082735e+03 0. 6.0365090580827905e+02 0.

1.5341917635137281e+03 3.9899755681473306e+02 0. 0. 1.</data></intrinsic_matrix>

<distortion_coeffs type_id="opencv-matrix">

<rows>1</rows>

<cols>4</cols>

<dt>d</dt>

<data>

-4.2151317729737053e-01 3.7177241583281667e-01

-2.0990131798020641e-03 3.2883786172242559e-03</data></distortion_coeffs>

结论 :实现非正方形的点对标定

猜你喜欢

转载自blog.csdn.net/KYJL888/article/details/81185547