Bootstrap

opencv 的norm_OpenCV:norm-范数求解函数

5

应用实例:用于评估相机标心猿意马的表里参质量

法式如下:

cout << "每幅图像的标心猿意马误差:" << endl;

for (int i = 0; i

{

vector tempPointSet = object_Points[i];

/*object_Points是图像棋盘格角点宿世界坐标的容器,其是三通道的XYZ,此中Z通道为0。棋盘格以左上角为原点,方块巨细是12mm和12mm*/

/*依据摄像机表里参数,对空间的三维点进行重投影计较;

tempPointSet为12mm*12mm的棋盘格标心猿意马板角点宿世界坐标,

image_points2是重投影后的图像像素角点坐标*/

projectPoints(tempPointSet,

rotation_vectors[i],

translation_vectors[i],

intrinsic_matrix,

distortion_coeffs,

image_points2);

/*图像亚像素角点坐标tempImagePoint */

/*image_points2和tempImagePoint进行误差计较,评估出其表里参的质量*/

vector tempImagePoint = corners_Seq[i];

//界说双通道的Mat矩阵,每个点暗示两个数据,别离为棋盘格角点的x和y//

Mat tempImagePointMat = Mat(1, tempImagePoint.size(), CV_32FC2)

;