KAIST-VCLAB / sphere-stereo

[CVPR2021] Real-Time Sphere Sweeping Stereo from Multiview Fisheye Images
Other
73 stars 13 forks source link

Testing on my own data using different calibration method #8

Open phongnhhn92 opened 1 month ago

phongnhhn92 commented 1 month ago

Hi,

I am trying to run your code on my own data. I have 4 fisheye cameras like this. I am currently having KB-8 parameters calibration and I wonder if I can use the obtained intrinsic and extrinsic to work with your method.
1694061091482

{
   "Intrinsics": [
            {
                "camera_type": "KB-8",
                "intrinsics": {
                    "fx": 304.00711059570312,
                    "fy": 304.07843017578125,
                    "cx": 638.46905517578125,
                    "cy": 399.956298828125,
                    "k1": 0.13828100264072418,
                    "k2": 0.025172000750899315,
                    "k3": -0.030962999910116196,
                    "k4": 0.0050189998000860214
                }
            },
            {
               "camera_type": "KB-8",
               "intrinsics": {
                   "fx": 304.00711059570312,
                   "fy": 304.07843017578125,
                   "cx": 638.46905517578125,
                   "cy": 399.956298828125,
                   "k1": 0.13828100264072418,
                   "k2": 0.025172000750899315,
                   "k3": -0.030962999910116196,
                   "k4": 0.0050189998000860214
               }
            },
            {
               "camera_type": "KB-8",
               "intrinsics": {
                   "fx": 304.00711059570312,
                   "fy": 304.07843017578125,
                   "cx": 638.46905517578125,
                   "cy": 399.956298828125,
                   "k1": 0.13828100264072418,
                   "k2": 0.025172000750899315,
                   "k3": -0.030962999910116196,
                   "k4": 0.0050189998000860214
               }
            },
            {
               "camera_type": "KB-8",
               "intrinsics": {
                   "fx": 304.00711059570312,
                   "fy": 304.07843017578125,
                   "cx": 638.46905517578125,
                   "cy": 399.956298828125,
                   "k1": 0.13828100264072418,
                   "k2": 0.025172000750899315,
                   "k3": -0.030962999910116196,
                   "k4": 0.0050189998000860214
               }
            }
        ],
   "Resolution": [
      [
         1280,
         800
      ],
      [
         1280,
         800
      ],
      [
         1280,
         800
      ],
      [
         1280,
         800
      ]
   ],
   "Extrinsic" : [
      {
         "camPos" : 0,
         "matrixD" : [
            0.13828100264072418,
            0.025172000750899315,
            -0.030962999910116196,
            0.0050189998000860214
         ],
         "matrixK" : [
            304.00711059570312,
            638.46905517578125,
            304.07843017578125,
            399.956298828125
         ],
         "matrixR" : [
            0.99994224309921265,
            -0.0056597921065986156,
            -0.0091361468657851219,
            -0.010480538010597229,
            -0.70172762870788574,
            -0.7123681902885437,
            -0.0023792306892573833,
            0.71242278814315796,
            -0.70174646377563477
         ],
         "vectT" : [ -0.63753241300582886, 1.5378644466400146, 0.0086838314309716225 ]
      },
      {
         "camPos" : 1,
         "matrixD" : [
            0.13828100264072418,
            0.025172000750899315,
            -0.030962999910116196,
            0.0050189998000860214
         ],
         "matrixK" : [
            304.00711059570312,
            638.46905517578125,
            304.07843017578125,
            399.956298828125
         ],
         "matrixR" : [
            0.018369581550359726,
            -0.99966245889663696,
            0.018371244892477989,
            -0.43550080060958862,
            -0.024539684876799583,
            -0.89985382556915283,
            0.9000009298324585,
            0.0085292458534240723,
            -0.4358045756816864
         ],
         "vectT" : [ -0.056737218052148819, 1.6638540029525757, -1.7759065628051758 ]
      },
      {
         "camPos" : 2,
         "matrixD" : [
            0.13828100264072418,
            0.025172000750899315,
            -0.030962999910116196,
            0.0050189998000860214
         ],
         "matrixK" : [
            304.00711059570312,
            638.46905517578125,
            304.07843017578125,
            399.956298828125
         ],
         "matrixR" : [
            -0.0079702958464622498,
            0.99996811151504517,
            0.00048334535676985979,
            0.69928163290023804,
            0.0059191756881773472,
            -0.71482175588607788,
            -0.7148018479347229,
            -0.0053593465127050877,
            -0.69930648803710938
         ],
         "vectT" : [ -0.016288090497255325, 2.1296632289886475, -1.2072857618331909 ]
      },
      {
         "camPos" : 3,
         "matrixD" : [
            0.13828100264072418,
            0.025172000750899315,
            -0.030962999910116196,
            0.0050189998000860214
         ],
         "matrixK" : [
            304.00711059570312,
            638.46905517578125,
            304.07843017578125,
            399.956298828125
         ],
         "matrixR" : [
            -0.99931108951568604,
            0.021234672516584396,
            -0.030437005683779716,
            0.036611020565032959,
            0.69839686155319214,
            -0.71477371454238892,
            0.006079123355448246,
            -0.71539562940597534,
            -0.69869315624237061
         ],
         "vectT" : [ 0.67148739099502563, 1.4917794466018677, 0.0025501109194010496 ]
      }
   ]
}
ameuleman commented 1 month ago

Hi, We are not planning to enable different camera models at the moment. It should however be possible to "rectify" from one camera model to the other: given a target camera model, we unproject the pixels of the image, then project them to the source camera model, giving sampling indices for the source image.