Python Camera Calibration

asked 2018-01-17 07:14:47 -0600

During the Calibration procedures using the python calibration tutorial (https://docs.opencv. org/3.1.0/dc/dbb/tutorial_py_calibration.html), it states that camera intrinsic parameters "results we get will be in the scale of size of chess board square. But if we know the square size, (say 30 mm), and we can pass the values as (0,0),(30,0),(60,0),..., we get the results in mm.". However, by changing the values of the board square size the results remain the same (pixel units).

Using a different approach using the Matlab toolbox (http://www.vision.caltech.edu/bouguet...) the same results occur.

Is any way to obtain the camera intrinsic parameters in metric units using the OpenCv python framework? If it is, what seems to be the error i am committing?

edit retag flag offensive close merge delete

Comments

"Is any way to obtain the camera intrinsic parameters in metric units" -- sure, do a calibration ;)

(in other words, you can only calculate pixels -> mm after you obtained the intrinsic values nessecary for this)

it also does not matter at this stage, in which units the chessboard is.

berak gravatar imageberak ( 2018-01-17 08:23:26 -0600 )edit

The issue is that i would like to "geo-locate targets", which involve translation matrices from the camera to a gimbal platform... this complicates the issue because the target is located in (u,v,f) in camera image plane . However trying to translate to the gimbal coordinate frame i need the measurments in metric units

Rutherford_27 gravatar imageRutherford_27 ( 2018-01-17 09:33:44 -0600 )edit

yea, but - one step after the other. 1st finish your calibration, then you can undistort your images(if nessecary), and use the camera matrix (or the fov extracted from it) for your calculations

berak gravatar imageberak ( 2018-01-17 09:50:29 -0600 )edit

I already have done: 1- calibrate camera, 2- undistort image, 3- Obtain target pixel coordiantes 4- translate to gimbal reference frame

Step 4 is the one i need to be sure, i have the calibration results in pixel (despite the tutorials saying otherwise if the square size is used) leading to the conclusion that either it is an error in my code or the OpenCv needs some other parameter, flag, method to compute the camera parameters in metric units.

Rutherford_27 gravatar imageRutherford_27 ( 2018-01-23 19:28:06 -0600 )edit
abhijit gravatar imageabhijit ( 2018-03-07 11:19:31 -0600 )edit