Intrinsic matrix estimation for non planar objects (Feature #623)
Description
I transformed a small piece of code I found at the MATLAB calibration toolbox, regarding the initialization of intrinsic matrix for non planar objects. It might be useful for other people. I tested it with my data and the the reconstruction seems to be working.
1CvMat *initIntrinsicMatrix(int width, int height, float fovAngle=35)
2{
3 CvMat *intrinsicMatrix = cvCreateMat(3, 3, CV_32FC1);
4 cvSetIdentity(intrinsicMatrix);
5
6 float fc = ((float)width/2) / (float)tan(PI * fovAngle / 360.0f);
7
8 cvmSet(intrinsicMatrix, 0, 0, fc);
9 cvmSet(intrinsicMatrix, 1, 1, fc);
10 cvmSet(intrinsicMatrix, 0, 2, (float)width / 2);
11 cvmSet(intrinsicMatrix, 1, 2, (float)height / 2);
12
13 return intrinsicMatrix;
14}
History
Updated by Alexander Shishkov almost 13 years ago
- Description changed from I transformed a small piece of code I found at the MATLAB calibration toolbox... to I transformed a small piece of code I found at the MATLAB calibration toolbox... More
Updated by Alexander Shishkov almost 13 years ago
- Status changed from Open to Cancelled