Ask Your Question
0

Problems ChAruCo Camera Calibration

asked 2019-07-04 07:45:48 -0600

FlorMaye gravatar image

Hi together,

I have problems calibration my camere with the following code: (see attached used code) https://mecaruco.readthedocs.io/en/la...

I took 60 pictures from different angles from an ChAruCo-Board (19mm Checker, 14mm AruCo) I'm getting a bad result like this:

image description

Can anyone help, I can not find the failure.

Thanks Flo

edit retag flag offensive close merge delete

Comments

Looks like your calibration images might be corrupted, however I have never seen errors this big. Are you sure you made good calibration images? Different angles, different distances, covering the entire image with consecutive chessboards, no blur, and not taking pictures too close to the camera with active autofocus)

Witek gravatar imageWitek ( 2019-07-04 18:58:42 -0600 )edit

HI Witek, thanks for the answer.

I took the pictures with a Logitech C270 Webcam. All pictures are taken in distance like you can see in Raw image, but from different angels all around. The Chessboard is A4 printet in high resolution on thick paper taped to the table.

I will try to take pictures from different distances as well. But could It be the cammera it self as well?

I used the Matlab Camera Calibration app to compare the results and had same bad results.

Any other ideas, I doent think its the code.

Greetings Florian

FlorMaye gravatar imageFlorMaye ( 2019-07-05 05:54:14 -0600 )edit

Strange. Perhaps the chessboard was mainly in the center of the calibration images? Can you share the calibration images?

Witek gravatar imageWitek ( 2019-07-06 15:52:45 -0600 )edit

Yes the chessboard is mainly in the center, is this wrong? Here is the dropboxlink to se 22 samples of the 60 pictures:

https://www.dropbox.com/sh/ih2om3guc3...

I can send you all pictures if needet as well.

In the example code they used 6x6 AruCo-Markers for the calibration and I used a 4x4 but changed in the code the marker_dict. Normaly i think it should work but I try now to use 6x6 markes as wll to be sure.

FlorMaye gravatar imageFlorMaye ( 2019-07-06 18:25:17 -0600 )edit

I wanted to give it a quick try, but Matlab's cameraCalibrator failed to detect the checkerboard correctly (due to aruco markers). The checkerboard should be all over the image and especially in the corners, where biggest distortions normally occur. Was your checkerboard correctly detected by OpenCV during calibration?

Witek gravatar imageWitek ( 2019-07-06 18:48:45 -0600 )edit

I tryed matlab and Python Calibration again with only Chessboard and it works pretty good.

OK good hint! I added this code to the loop when it detects the markers

found, corners = cv2.findChessboardCorners(frame, (8, 11))

Somehow it detects the AruCo-Markers but not the chessboard-corners on the ChAruCo-Board. found = non and corners= empty

I added the complete calibration code to the Dropbox folder if you want to have a look at it as well

FlorMaye gravatar imageFlorMaye ( 2019-07-06 22:14:34 -0600 )edit

It detects the markers and ids verry well so I´m not sure if it has to detect the checherboard.

FlorMaye gravatar imageFlorMaye ( 2019-07-06 22:53:37 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2019-07-06 18:36:32 -0600

FlorMaye gravatar image

updated 2019-07-07 00:31:58 -0600

I tried this code:

https://github.com/nullboundary/Charu...

There is not much different but the results are great, not sure what is wrong on my code!!

image description

And results look more plausible

Rep Error: 0.333780710349104 cam_matrix

[[802.67522005 0. 299.59488625]

[ 0. 791.74437284 231.08205004]

[ 0. 0. 1. ]]

edit flag offensive delete link more

Comments

I don't think the results are great at all! Look at the axes: they are not right!

Witek gravatar imageWitek ( 2019-07-07 08:45:37 -0600 )edit

You are right but it is the best result i got so far. But there must be a major point which I'm doing wrong.

FlorMaye gravatar imageFlorMaye ( 2019-07-07 10:22:59 -0600 )edit

I have no experience with Charuco boards, but it could be the resolution of the images. It is quite low and so aruco markers' corners are not detected very well. Can you perhaps try calibrating with a standard chessboard

Witek gravatar imageWitek ( 2019-07-09 02:26:00 -0600 )edit

true, resolution is not verry high. I did calibration with chessboard and pose estimation with chessboard and sinlgel markers and the result was pretty good. The axes looked perfect allinged.

I also tryed to do Charuco calibration with pictures from I-phone (resolution 3024,4023) but still the calibration results and board estimation came out verry bad. There must be something wrong with the code. I read that some code have different output in Python than explaned in documentation and use in C++ but cound find any major difference so far

FlorMaye gravatar imageFlorMaye ( 2019-07-09 09:42:38 -0600 )edit

Hi Witek,

I could find the Problem. I did not had enaugh data to interpolate the board axes. I tried to do the evaluaton on a video stream and added some if clauses and it worked perfect This link helped a lot.

http://www.peterklemperer.com/blog/20...

Thanks a lot for your help, I really appreciate it.

FlorMaye gravatar imageFlorMaye ( 2019-07-09 14:02:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-07-04 07:45:48 -0600

Seen: 2,491 times

Last updated: Jul 07 '19