Camera calibration with OpenCV3.2

sturner
Posts: 13
Joined: Thu Sep 29, 2016 3:54 am

Camera calibration with OpenCV3.2

Postby sturner » Thu Jul 06, 2017 8:20 am

Hi,
I have been trying to calibrate a high resolution camera. I can calibrate it no problem with OpenCV 2.14.13.2
However, it takes a very long time - a minute or more to process a single image. I want to use over 40 images to get a good calibration.
I switched to using OpenCV3.2. This processes the individual frames very quickly, but crashes on the calibration phase with an assertion in convertPointsHomogeneous inside cvcalibratecamera2.
I found one mention of this on google (which I can no longer find). Someone said that you shouldn't be using deprecated C entry points.

Has anyone else had experience of ARToolkit 5 and OpenCV3.2?

Thanks

john21wall
Posts: 1
Joined: Mon Jul 10, 2017 1:23 am
Contact:

Re: Camera calibration with OpenCV3.2

Postby john21wall » Mon Jul 10, 2017 3:28 am

There's no a simple single function that will give you camera intrinsic parameters. Calibration process requires a few steps:

Acquisition of calibration images (with chessboard pattern or with circle pattern)
Detecting chessboard corners(or blobs in case of circle pattern) with subpixel accuracy
Finding camera calibration paramters: intrinsic matrix and distortion coefficients with
The easiest approach is to use an example provided with OpenCV - calibration.exe. You can use it with your own images, so it'll do a calibration for you and give you camera intrinsic matrix and distortions coefficients

sturner
Posts: 13
Joined: Thu Sep 29, 2016 3:54 am

Re: Camera calibration with OpenCV3.2

Postby sturner » Thu Jul 13, 2017 12:55 am

My C++ skills weren't up to getting ARToolkit working with the OpenCV3.2 calibration.exe example. Well actually, it was more to do with my ignorance of the structure of the camera matirx - I wasn't sure if the camera matrix as returned by OpenCV3.2 is the same as the intrinsic matrix expected by ARToolkit.
However, I was able to port the newer version of cvFindChessBoardCorners back into OpenCV2.14
This works great and is all I need.
Thanks.


Return to “ARToolKit for Desktop v5.x”

Who is online

Users browsing this forum: No registered users and 1 guest