Hi @jakaskerl & @Oskar-Luxonis
I want to have review on newer calibration values with clarity on whats the right way to apply rotation on the correct camera.
I have 4 camera connected to oak ffc4p. 4 cameras are OAK FFC OV9782 FF. 3 are facing front and 1 camera is mounted down facing. I need majorly calibration for front 3 camera, and 4th camera facing down data is just added so there exists some calibration data.
Now the major issue here is, stereo pair cam_b and cam_c are normally placed with baseline of 6cm. but cam_a is placed 180 degrees rotated in the middle; 3cm far from cam_b and cam_c. As all three cams need to be calibrated for align depth i went ahead with below json. can u please help me correct this if any mistakes are there in the json.
I used dsb param for disabling 4th camera when 3 cameras are calibrated, then i did calibration of just 4th camera disabling other 3.
{
"board_config": {
"name": "OAK-FFC-4P",
"cameras": {
"CAM_B": {
"name": "left",
"hfov": 80,
"type": "mono"
},
"CAM_A": {
"name": "middle",
"hfov": 80,
"type": "color",
"extrinsics": {
"to_cam": "CAM_B",
"specTranslation": {
"x": 3,
"y": 0,
"z": 0
},
"rotation": {
"r": 0,
"p": 0,
"y": 180
}
}
},
"CAM_C": {
"name": "right",
"hfov": 80,
"type": "mono",
"extrinsics": {
"to_cam": "CAM_B",
"specTranslation": {
"x": 6,
"y": 0,
"z": 0
},
"rotation": {
"r": 0,
"p": 0,
"y": 0
}
}
},
"CAM_D": {
"name": "down",
"hfov": 80,
"type": "mono",
"extrinsics": {
"to_cam": "CAM_B",
"specTranslation": {
"x": 10,
"y": 0,
"z": 0
},
"rotation": {
"r": 0,
"p": 0,
"y": 0
}
}
}
},
"stereo_config": {
"left_cam": "CAM_B",
"right_cam": "CAM_C"
}
}
}
I have refered to preset board config files but i wasn't able to find a single file applying rotation.
This below cli output is rerun of calibration for just stereo pair:
`<-------------Extrinsics calibration of right and left ------------> Use DEFAULT model`
`Epipolar error is 0.23235119675837798`
`Printing Extrinsics res... [[ 0.99997247 -0.00708394 0.00220968] [ 0.00710053 0.99994594 -0.00759604] [-0.00215575 0.00761152 0.99996871]] [[ 5.81244231e+00] [-2.03211534e-03] [ 6.24935640e-03]] Euler angles in XYZ [0.43611321 0.12351542 0.40683502] degs <-------------Epipolar error of right and left ------------> Epipolar error 0.23235119675837798`
`Reprojection error threshold -> 1.1111111111111112`
`left Reprojection Error: 0.227620`
`Reprojection error threshold -> 1.1111111111111112`
`right Reprojection Error: 0.214708`
`Flashing Calibration data into EEPROM VERSION being flashed is -> 7`
`EEPROM VERSION being flashed is -> 7`
`py: DONE.`
And this is output of calibration_dump:
Is EEPROM available: True
User calibration: {
"batchName": "",
"batchTime": 1717298050,
"boardConf": "IR-C00M00-00",
"boardCustom": "",
"boardName": "DD2090",
"boardOptions": 0,
"boardRev": "R7M1E7",
"cameraData": [
[
0,
{
"cameraType": 0,
"distortionCoeff": [
4.428467273712158,
12.631766319274902,
-0.0008713753195479512,
-0.0005999229615554214,
-24.348819732666016,
4.171751022338867,
13.42512321472168,
-24.945770263671875,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"extrinsics": {
"rotationMatrix": [
[
-0.999979555606842,
0.0026230337098240852,
0.005833887029439211
],
[
-0.0026709451340138912,
-0.9999626278877258,
-0.008220034651458263
],
[
0.005812107585370541,
-0.008235448971390724,
0.9999492168426514
]
],
"specTranslation": {
"x": 3.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": 1,
"translation": {
"x": 2.990255832672119,
"y": -0.047424495220184326,
"z": -0.06258359551429749
}
},
"height": 800,
"intrinsicMatrix": [
[
805.049072265625,
0.0,
643.1897583007812
],
[
0.0,
804.2926635742188,
363.5214538574219
],
[
0.0,
0.0,
1.0
]
],
"lensPosition": 0,
"specHfovDeg": 80.0,
"width": 1280
}
],
[
1,
{
"cameraType": 0,
"distortionCoeff": [
7.287642955780029,
8.617563247680664,
-0.00030853660427965224,
-3.930313596356427e-06,
-23.53774642944336,
6.970340251922607,
9.57243537902832,
-24.24040412902832,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"extrinsics": {
"rotationMatrix": [
[
0.9998325705528259,
-0.004424602258950472,
-0.017754964530467987
],
[
0.003927252255380154,
0.9996016025543213,
-0.027949653565883636
],
[
0.0178715568035841,
0.027875246480107307,
0.9994516372680664
]
],
"specTranslation": {
"x": -6.006999969482422,
"y": -0.0,
"z": -0.0
},
"toCameraSocket": 2,
"translation": {
"x": -5.869819641113281,
"y": -0.03712931647896767,
"z": -0.16481617093086243
}
},
"height": 800,
"intrinsicMatrix": [
[
797.2044677734375,
0.0,
654.9495239257812
],
[
0.0,
797.3389892578125,
399.9513854980469
],
[
0.0,
0.0,
1.0
]
],
"lensPosition": 0,
"specHfovDeg": 80.0,
"width": 1280
}
],
[
2,
{
"cameraType": 0,
"distortionCoeff": [
8.208428382873535,
2.655541181564331,
-0.001404370879754424,
0.0013656376395374537,
-17.11795425415039,
7.899855136871338,
3.6094589233398438,
-17.829050064086914,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"extrinsics": {
"rotationMatrix": [
[
0.9999724626541138,
-0.007083937060087919,
0.0022096785251051188
],
[
0.007100534625351429,
0.9999459385871887,
-0.007596039678901434
],
[
-0.002155749127268791,
0.007611520122736692,
0.9999687075614929
]
],
"specTranslation": {
"x": 6.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": 1,
"translation": {
"x": 5.812442302703857,
"y": -0.0020321153569966555,
"z": 0.006249356549233198
}
},
"height": 800,
"intrinsicMatrix": [
[
795.3712768554688,
0.0,
645.530029296875
],
[
0.0,
795.1524047851562,
403.3253479003906
],
[
0.0,
0.0,
1.0
]
],
"lensPosition": 0,
"specHfovDeg": 80.0,
"width": 1280
}
],
[
3,
{
"cameraType": 0,
"distortionCoeff": [
-10.458497047424316,
104.62010955810547,
0.0005981730646453798,
-0.0008816338959150016,
-50.37309265136719,
-10.494210243225098,
103.99183654785156,
-48.6142692565918,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"extrinsics": {
"rotationMatrix": [
[
0.9998325705528259,
-0.004424602258950472,
-0.017754964530467987
],
[
0.003927252255380154,
0.9996016025543213,
-0.027949653565883636
],
[
0.0178715568035841,
0.027875246480107307,
0.9994516372680664
]
],
"specTranslation": {
"x": -6.006999969482422,
"y": -0.0,
"z": -0.0
},
"toCameraSocket": 2,
"translation": {
"x": -5.869819641113281,
"y": -0.03712931647896767,
"z": -0.16481617093086243
}
},
"height": 800,
"intrinsicMatrix": [
[
801.8607788085938,
0.0,
651.6859741210938
],
[
0.0,
802.0641479492188,
407.34967041015625
],
[
0.0,
0.0,
1.0
]
],
"lensPosition": 0,
"specHfovDeg": 80.0,
"width": 1280
}
]
],
"deviceName": "",
"hardwareConf": "F0-FV00-BC000",
"housingExtrinsics": {
"rotationMatrix": [],
"specTranslation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": -1,
"translation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
},
"imuExtrinsics": {
"rotationMatrix": [
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
]
],
"specTranslation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": -1,
"translation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
},
"miscellaneousData": [],
"productName": "OAK-FFC-4P",
"stereoEnableDistortionCorrection": false,
"stereoRectificationData": {
"leftCameraSocket": 1,
"rectifiedRotationLeft": [
[
0.9999993443489075,
-0.0003496144781820476,
0.0010751680238172412
],
[
0.000345522363204509,
0.9999927282333374,
0.0038038601633161306
],
[
-0.0010764901526272297,
-0.0038034862373024225,
0.9999921917915344
]
],
"rectifiedRotationRight": [
[
0.9999670386314392,
-0.0074253445491194725,
0.003287467174232006
],
[
0.007437795400619507,
0.9999651312828064,
-0.003791479393839836
],
[
-0.0032591994386166334,
0.003815805772319436,
0.9999874234199524
]
],
"rightCameraSocket": 2
},
"stereoUseSpecTranslation": true,
"version": 7,
"verticalCameraSocket": -1
}
Factory calibration: {
"batchName": "",
"batchTime": 1717298050,
"boardConf": "IR-C00M00-00",
"boardCustom": "",
"boardName": "DD2090",
"boardOptions": 0,
"boardRev": "R7M1E7",
"cameraData": [],
"deviceName": "",
"hardwareConf": "F0-FV00-BC000",
"housingExtrinsics": {
"rotationMatrix": [],
"specTranslation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": -1,
"translation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
},
"imuExtrinsics": {
"rotationMatrix": [
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
]
],
"specTranslation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": -1,
"translation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
},
"miscellaneousData": [],
"productName": "OAK-FFC-4P",
"stereoEnableDistortionCorrection": false,
"stereoRectificationData": {
"leftCameraSocket": 255,
"rectifiedRotationLeft": [
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
]
],
"rectifiedRotationRight": [
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
]
],
"rightCameraSocket": 255
},
"stereoUseSpecTranslation": true,
"version": 7,
"verticalCameraSocket": -1
}
This is final output of stereo.py

this was the image feed:

So what could be the issue? if my calibration bad? is my calib json bad or stereo needs lots of tuning? Should i push the caibration values to factory setting for optimal performance in the stereo depth?