how to calibrate camera (stereo)

asked 2014-10-30 13:12:09 -0500

pandaren gravatar image

updated 2017-10-04 13:15:21 -0500

Hi i am trying to calibrate two cameras which are looking at a mini object through a microscope. The calibration target is a circle grid.

I have to mark these images appropriately in order to find the circles (images with markers)

markers data : (points only; format is objectX,objectY,objectZ,img1X,img1Y,img2X,img2Y per line) if you want you can load these points as the input for stereocalib.

My program is very similar to the one from opencv example. I tried both :

  • First: to calibrate the camera individually before stereo-calibration (ofc fix-intrinsic flag is set while using stereocalib)
  • Second: directly use stereocalib

I still have black images as rectification output.

From what I read the calibration should be done by moving the calibration target around, so that it fulfill some criteria:

  1. size (by moving the target approaching the camera and away from the camera)
  2. area (by moving along the x axis and y axis direction)
  3. skew (by tilting the target with various angle)

But due to space and lighting limitation I can only move up and down using the calibration target. It is impossible to do the (stereo) calibration like this? Since I got only black images after using stereo rectify.

Thank you

edit retag flag offensive close merge delete

Comments

Yes it is possible. Your problem is probably elsewhere. Can you show us your code and the calibration pattern you use?

petititi gravatar imagepetititi ( 2014-10-30 13:22:28 -0500 )edit

hi thanks for your answer, i am gonna post them tomorrow.

pandaren gravatar imagepandaren ( 2014-10-30 13:35:31 -0500 )edit

the calibration target is a circle grid.

the calibration images is here https://dl.dropboxusercontent.com/u/15437492/images.zip

I have to mask these images appropiately in order to find the circles.

images with markers: https://dl.dropboxusercontent.com/u/15437492/marked_images.zip

markers data (points only; format is objectX,objectY,objectZ,img1X,img1Y,img2X,img2Y per line) https://dl.dropboxusercontent.com/u/15437492/markers.zip

if you want you can load these points as the input for stereocalib. My program is very similar to the one from opencv example.

I tried both First: to calibrate the camera individually before stereo-calibration (ofc fix-intrinsic flag is set while using stereocalib) Second: directly use stereocalib I still have black images as output.

pandaren gravatar imagepandaren ( 2014-10-31 05:32:23 -0500 )edit

I'm sorry, but I have the same problem as you (black rectified images...). How do you acquire your images? Are you sure the relative position of the two camera doesn't change (it's very important as you are working with very small pattern)? You didn't process your images after that (rescale, rotation...)? As I don't have any clue, I edited your question with the information you gave, maybe someone with more experience will give it a try ;-)

petititi gravatar imagepetititi ( 2014-10-31 07:58:35 -0500 )edit

No problem, in fact thank you for your efforts. The two cameras are fixed on the microscope (with screw). So I am pretty sure their position doesn't change and I don't process the images after the acqusition. Yea, hopefully someone knows what is wrong with my images.

Thanks again :D

pandaren gravatar imagepandaren ( 2014-10-31 10:27:11 -0500 )edit