Ask Your Question

Camera Calibration in OpenCv : Camera as the input

asked 2014-03-07 21:07:52 -0500

jae gravatar image

updated 2014-03-08 01:50:57 -0500

berak gravatar image

I successfully run the code for camera calibration but i do not know how to use it with camera as the input. What are the steps in doing so?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2014-03-08 18:27:56 -0500

GrumbleLion gravatar image

There are two ways to calibrate cameras. The example uses the pattern matching method and I think you are just asking how to open the camera and get an image. You will also have to print the patterns on a piece of paper for the camera to see.

The one example located in opencv\sources\samples\cpp\tutorial_code\calib3d\camera_calibration has a camera input mode. If you look at line 112 where if (inputType == CAMERA);

You will see where it opens the camera using HighGui

The biggest issue I had with the example is that it ONLY adjusts for spherical distortion. You have to do several more steps to measure the rotation and shear and scale if needed.

edit flag offensive delete link more


Do i need to make an xml file for that? the example in the tutorial said that i have to make an xml file as the configuration file, or will i just modify the code a little bit?

jae gravatar imagejae ( 2014-03-08 20:34:40 -0500 )edit

that's up to you. I just commented out the code for the XML file and set the settings the way I wanted to test and then I started on my own code.

GrumbleLion gravatar imageGrumbleLion ( 2014-03-09 12:57:17 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-03-07 21:07:52 -0500

Seen: 142 times

Last updated: Mar 08 '14