How calculate and use FOV correctly

asked 2013-08-14 06:39:49 -0600

Jose Salvador gravatar image

updated 2013-08-14 07:52:55 -0600

Hi all, I'm new with OpenCV and a have a dude with calibrationMatrixValues.
I want to calculate the maximum width and height that captures my WebCam to 50cm. I thought calculate using the FOV, for that I have calibrated the camera with a chessboard, as explained here:
http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html#cameracalibrationopencv
I invoke calibrationMatrixValues by passing the matrix ​​calculated. I don't know if this its correct

FileStorage fs2("out_camera_data.xml", FileStorage::READ);
  Mat cameraMatrix2;
  fs2["Camera_Matrix"] >> cameraMatrix2;
  cv::Size imageSize(640,480);
  double apertureWidth = 1;
  double apertureHeight = 1;
  double fieldOfViewX;
  double fieldOfViewY;
  double focalLength;
  cv::Point2d principalPoint;
  double aspectRatio;
  cv::calibrationMatrixValues(cameraMatrix2, imageSize, apertureWidth, apertureHeight, fieldOfViewX, fieldOfViewY, focalLength, principalPoint, aspectRatio);


Whats the apertureWidth/height mean? Are they correct? When I run this, he tells me fovx = 44.68 and fovy = 34.26.These results would be corrects?
I've been doing various tests and looking in different forums, and I can't understand.
I try to get the values I need with these values and I do know if I'm wrong ( with my trigonometry calculations) or its because I call wrong the function. I should get out more or less about 60 cm of width
Any help you can give me would be appreciated,
Sorry for my bad english.
A greeting.

edit retag flag offensive close merge delete

Comments

-1 Please try to make some structure in your question and state your problem more clearly. Also please change your question title to reflect your actual problem. Read the FAQ to see how to make a good question layout.

As a suggestion to your problem, start reading into the complete process of camera calibration, 2D stereo setups and so on. I have the impression you do net grasp the basics of the theory.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-14 06:46:31 -0600 )edit