orbbec / OrbbecSDK

Orbbec SDK v1&v2 Pre-Compiled Repo
https://www.orbbec3d.com/
Other
119 stars 16 forks source link

is it normal that Orbbec Bolt reports depth intrinsic fx the same value regardless of mode? #56

Closed flugi closed 8 months ago

flugi commented 9 months ago

I wrote the following code:

    auto paramlist = dev->getCalibrationCameraParamList();
    for (int i=0;i<paramlist->count();i++) {
        OBCameraParam param = paramlist->getCameraParam(i);
        std::cout << param.rgbDistortion.k1 << " " <<param.rgbDistortion.k2 << " " <<param.rgbDistortion.k3 << " " <<param.rgbDistortion.k4 << " " <<param.rgbDistortion.k5 << " "<<param.rgbDistortion.k6 << " " << std::endl;
        std::cout << param.rgbIntrinsic.fx << " " <<param.rgbIntrinsic.fy << " " <<param.rgbIntrinsic.cx << " " <<param.rgbIntrinsic.cy << " " <<param.rgbIntrinsic.width << " " <<param.rgbIntrinsic.height << " " <<  std::endl;
        std::cout << param.depthDistortion.k1 << " " <<param.depthDistortion.k2 << " " <<param.depthDistortion.k3 << " " <<param.depthDistortion.k4 << " " <<param.depthDistortion.k5 << " "<<param.depthDistortion.k6 << " " <<std::endl;
        std::cout << param.depthIntrinsic.fx << " " <<param.depthIntrinsic.fy << " " <<param.depthIntrinsic.cx << " " <<param.depthIntrinsic.cy << " " <<param.depthIntrinsic.width << " " <<param.depthIntrinsic.height << " " <<  std::endl;
    }

and the output is the following:

0.0784412 -0.110434 0.0465312 0 0 0 373.929 373.583 317.359 186.263 640 360 8.68957 4.46817 0.172922 9.01699 7.37854 1.05598 505.284 505.233 530.666 505.513 1024 1024 0.0784412 -0.110434 0.0465312 0 0 0 498.572 498.111 316.479 248.351 640 480 8.68957 4.46817 0.172922 9.01699 7.37854 1.05598 505.284 505.233 530.666 505.513 1024 1024 0.0784412 -0.110434 0.0465312 0 0 0 373.929 373.583 317.359 186.263 640 360 8.68957 4.46817 0.172922 9.01699 7.37854 1.05598 505.284 505.233 338.666 325.513 640 576 0.0784412 -0.110434 0.0465312 0 0 0 498.572 498.111 316.479 248.351 640 480 8.68957 4.46817 0.172922 9.01699 7.37854 1.05598 505.284 505.233 338.666 325.513 640 576

I noticed that the depth fx and fy is exactly the same for 1024x1024 and 640x576 modes, which is odd.

natelowry commented 9 months ago

I don't have the code in front of me, but often these parameters come with reference dimensions (the width and height at witch the numbers apply). So, if the reference dimensions were the same I would expect to see the same values.

Looking now at the struct that's returned I'm not so sure that's the case here 🫤

puzzlepaint commented 8 months ago

If this still applies, then the 640x576 images are cropped from the 1024x1024 images, not scaled. In this case, it is correct for the fx, fy parameters to remain constant.

zhonghong322 commented 8 months ago

If this still applies, then the 640x576 images are cropped from the 1024x1024 images, not scaled. In this case, it is correct for the fx, fy parameters to remain constant.

yes, NFOV and WFOV have a relationship of cropping.