Ask Your Question
1

How can i calibrate 2 not aligned Cameras

asked 2013-07-15 10:30:23 -0600

steaff gravatar image

updated 2013-07-15 11:29:30 -0600

Hello,

i hope I am describing it the right way.

I have a set of 4 Cameras pointing down at one Object.

If you look from above one Camera is at 0 o'clock one at 3 o'clock one at 6 o'clock and one at 9 o'clock.

image description

I now want to use one Kamera (the one at 0) and calibrate each of the other cameras with this Camera.

Bit It doesn't seem to work. After trying for a month now i used the example File from the opencv samples without any changes and it wouldn display anything usable.

Right now I am running again the Calibration for the Cameras at 0 and 9 o'clock (in the picture it i the kinect and the one right to the kinect) to be able to post an image of the Result but so far: Does anyone know if it is possible to calibrate those Cameras with Opencv or how it is done?

thank you verry much steaff

Those are the source and the resulting Image and the content of the calculated matrices

image description image description

The Intrinsic Camera Parameters:

%YAML:1.0

M1: !!opencv-matrix

rows: 3

cols: 3

dt: d

data: [ 2.2241379209351021e+003, 0., 6.3059176335930135e+002, 0., 2.2241379209351021e+003, 5.1007775759383134e+002, 0., 0., 1. ]

D1: !!opencv-matrix

rows: 1

cols: 8

dt: d

data: [ 1.0043368468776315e+000, -3.4416247147983135e+001, 0., 0., 0., 0., 0., 4.7443526196894297e+000 ]

M2: !!opencv-matrix

rows: 3

cols: 3

dt: d

data: [ 2.2241379209351021e+003, 0., 7.1690683602360411e+002, 0., 2.2241379209351021e+003, 5.4388045026940574e+002, 0., 0., 1. ]

D2: !!opencv-matrix

rows: 1

cols: 8

dt: d

data: [ 6.6088041195880498e-001, -1.1820658547536208e+001, 0., 0., 0., 0., 0., -7.2303203938806320e+001 ]

The Extrinsic Camera Parameters:

%YAML:1.0

R: !!opencv-matrix

rows: 3

cols: 3

dt: d

data: [ 6.1501820069651592e-001, -7.2649429222532536e-001, 3.0652676257717498e-001, 7.0686612034488350e-001, 6.8023651807437502e-001, 1.9395506538016299e-001, -3.4941794561898637e-001, 9.7387488118721999e-002, 9.3189204119218294e-001 ]

T: !!opencv-matrix

rows: 3

cols: 1

dt: d

data: [ -3.1075937414718489e+001, -1.2954808145854402e+001, -4.6420195458050941e+001 ]

R1: !!opencv-matrix

rows: 3

cols: 3

dt: d

data: [ 2.1012586079464327e-001, -1.6119129293625789e-001, 9.6429481472568745e-001, 3.9746030635964452e-001, 9.1521541260311323e-001, 6.6378109360021809e-002, -8.9323705000061882e-001, 3.6932115511469271e-001, 2.5637756705870601e-001 ]

R2: !!opencv-matrix

rows: 3

cols: 3

dt: d

data: [ 5.4191795082816152e-001, 2.2591251198904466e-001, 8.0949890147980208e-001, -4.0010678397909216e-001, 9.1638854084540944e-001, 1.2107998229665726e-002, -7.3908016884781491e-001, -3.3044754369494300e-001, 5.8699652884992803e-001 ]

P1: !!opencv-matrix

rows: 3

cols: 4

dt: d

data: [ -2.9229981928635933e+001, 0., -6.9050370635986328e+003, 0., 0., -2.9229981928635933e+001, 1.9621982192993164e+002, 0., 0., 0., 1., 0. ]

P2: !!opencv-matrix

rows: 3

cols: 4

dt: d

data: [ -2.9229981928635933e+001, 0., -6.9050370635986328e+003, 1.6761745715555271e+003, 0., -2.9229981928635933e+001, 1.9621982192993164e+002, 0., 0., 0., 1., 0. ]

Q: !!opencv-matrix

rows: 4

cols: 4

dt: d

data: [ 1., 0., 0., 6.9050370635986328e+003, 0., 1., 0., -1.9621982192993164e+002, 0., 0., 0., -2.9229981928635933e+001, 0., 0., 1.7438506957846198e-002, 0. ]

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-07-15 12:10:09 -0600

Daniil Osokin gravatar image

Hi, Steaff!

Looks like your intrinsics are not good. Try to calibrate intrinsics for each camera with calibrateCamera() and look at the undistorted image quality. If it's good, use these intrinsics: pass CV_CALIB_FIX_INTRINSIC to flags combination in stereoCalibrate(). Don't forget, that you must have the same image size from each camera, when using stereoCalibrate().

edit flag offensive delete link more

Comments

1

Thank you for your quick answer, i'll give it a try (in several other attemps i did it like this but maybe there were other problems too ;)

Well the Kinectimage is half as big as the other image but i scaled it before using... (ugly i know but it should work, should it... :P?)

steaff gravatar imagesteaff ( 2013-07-15 13:13:55 -0600 )edit

May be better to scale down other image, than scale up Kinect image (less blur noise). Nevertheless, try with same type of cameras to get confidence in flags combination (OpenCV sample should work). When all is fine, try with Kinect.

Daniil Osokin gravatar imageDaniil Osokin ( 2013-07-15 13:33:51 -0600 )edit

Tank you verry much! You were right the intrinsics where the problem... I captured new images used CV_CALIB_FIX_INTRINSIC and changed a bit of code (just to make it look nicer ;)) and it is working now!

steaff gravatar imagesteaff ( 2013-07-16 16:52:46 -0600 )edit

Congratulations!

Daniil Osokin gravatar imageDaniil Osokin ( 2013-07-16 23:50:39 -0600 )edit

Question Tools

Stats

Asked: 2013-07-15 10:30:23 -0600

Seen: 1,425 times

Last updated: Jul 15 '13