Camera calibration using a square grid pattern

asked 2017-09-03 23:27:40 -0600

nicksl gravatar image

updated 2017-09-04 00:48:18 -0600

Hi all,

I'm aware that openCV has inbuilt functions to support camera calibration using,

      1.  Circle pattern - cv2.findCirclesGrid() 
      2.  Chessboard pattern. - cv2.findChessboardCorners()

But my application required to use a square grid pattern as shown in this link Camera calibration using a square grid.

I would like to know is there any possible way to use openCV inbuilt camera calibration functions directly or alter them accordingly to achieve my requirement.

Any guidance would be appreciated.

Thanks in advance.

edit retag flag offensive close merge delete

Comments

You want to calibrate using 1 dimensional array of points ?

Ziri gravatar imageZiri ( 2017-09-03 23:57:59 -0600 )edit

Hi Ziri,

I've edited the original question to get clear idea about my requirement(Attached a square grid image,You can forget about the paper :-) )

No, I'm not going to use 1 dimensional array of points for calibration.In chessboard pattern, coordinates of the chessboard corners are used for calibration(2D array). Similarly I'm trying to use 2D array of square grid corner coordinates to get camera calibration matrix.

Thanks..

nicksl gravatar imagenicksl ( 2017-09-04 00:46:31 -0600 )edit

But my application required to use a square grid pattern

can you explain why it is so ?

while it should be possible to just adapt the model points to your grid, choosing a square one has its downsides (90° rotation ambiguity)

berak gravatar imageberak ( 2017-09-04 00:51:36 -0600 )edit

Hi berak,

Well. I'm trying to calibrate a camera which is integrate in to a large system.Pattern is predefined for the system.Therefore i can not alter it. Yes I'm aware that rotation ambiguity would be an issue.But I'm more focus towards eliminating distortions such as fish-eye effect in this phase.Rotational distortion in the camera is corrected by an alternative mechanism previously.

Thanks..

nicksl gravatar imagenicksl ( 2017-09-04 01:03:31 -0600 )edit

you'll have to come up with your own way, to find the square corners for this, i'm afraid. (findChessboardCorners won't work)

berak gravatar imageberak ( 2017-09-04 01:16:11 -0600 )edit

Hi berak,

Yeah, That's what i thought.But i have some doubts,

  1. Lets just say I've found 2d array of square corner points somehow.Do you think it possible to use cv2.calibrateCamera() with those coordinates ?
  2. If possible, What if my algorithm missed in detecting some of square corners in the grid.In this scenario will cv2.calibrateCamera() return an accurate camera matrix?

Thanks for the help!!! I really appreciate it.

nicksl gravatar imagenicksl ( 2017-09-04 01:29:07 -0600 )edit
  1. idk, but hopefully, yes.
  2. you need to detect all of the corners. (you need acorresponding scene point for each of your model points)
berak gravatar imageberak ( 2017-09-04 01:33:09 -0600 )edit

Thanks berak. Let's see where it goes.. :-) :-)

nicksl gravatar imagenicksl ( 2017-09-04 01:38:47 -0600 )edit