小编bob*_*bob的帖子

如何从相机矩阵中找到焦距?

我有用于计算相机矩阵和修复图像失真的 OpenCV 代码。

这是 OpenCV 和 C++ 中的代码部分。

//default capture width and height
const int FRAME_WIDTH = 1288;
const int FRAME_HEIGHT = 964;
//max number of objects to be detected in frame
const int MAX_NUM_OBJECTS=50;
//minimum and maximum object area
const int MIN_OBJECT_AREA = 2*2;
const int MAX_OBJECT_AREA = FRAME_HEIGHT*FRAME_WIDTH/1.5;

Mat DistortedImg;                                           //storage for copy of the image raw
Mat UndistortedImg;                                         //

double cameraM[3][3] = {{1103.732864, 0.000000, 675.056365}, {0.000000, 1100.058630, 497.063376}, {0, 0, 1}}; //camera matrix to be edited
Mat …
Run Code Online (Sandbox Code Playgroud)

c++ opencv camera-calibration camera-matrix

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

c++ ×1

camera-calibration ×1

camera-matrix ×1

opencv ×1