[HELP] - Why are the Depth Map .tiff and Color Image .jpg not the same?

I would like to know why are the saved color image (.jpg) and depth (.tiff) not the same?
Meaning, there seems to be some position shift in the pixels of the .jpg and .tiff file upon saving. How can this issue be solved?

Example below:

FYI these are the details below using Mech Eye version 2.2.0:

Camera Model Name: Mech-Eye UHP 140
Hardware Version: V4.1.0
Firmware Version: V2.2.0

Connected to the camera successfully.
Texture Camera Matrix:
[4768.42, 0, 984.788]
[0, 4768.04, 743.561]
[0, 0, 1]

Texture Camera Distortion Coefficients:
k1: 0, k2: 0, p1: 0, p2: 0, k3: 0

Depth Camera Matrix:
[3575.86, 0, 991.755]
[0, 3575.75, 569.37]
[0, 0, 1]

Depth Camera Distortion Coefficients:
k1: 0, k2: 0, p1: 0, p2: 0, k3: 0

Rotation: From Depth Camera to Texture Camera:
[0.968276, -0.00241829, -0.249871]
[0.00215839, 0.999997, -0.00131415]
[0.249873, 0.000733138, 0.968278]

Translation From Depth Camera to Texture Camera:
X: 83.1971mm, Y: 0.417161mm, Z: 22.2939mm

Texture Map size : (width : 2048, height : 1536).
Depth Map size : (width : 2048, height : 1536).

Hello, may I ask if you captured the depth map in Merge mode? Depth maps in Merge mode are based on the projector coordinate system, so inconsistencies with 2D images are normal. The Rotation: From Depth Camera to Texture Camera parameters you provided are the transformation matrix from the 2D camera coordinate system to the projector coordinate system.

When capturing depth maps in Camera1 mode, it is based on the 2D coordinate system and should be consistent with 2D images.

Camera1:
image

Merge:
image

1 Like

Ok thank you @Mech-Mind_Dshuai, when using camera1 setting in Mech Eye, it the same position. But now I also want to ask a few more questions below:

  1. If I were to use the MechEye SDK 2.2.0 e.g. in c++, how can I repeat the same effect of capturing the depth map .tiff and color image .jpg as the camera1 mode (where there are no shift in the position of the pixels)?

  2. If I capture depth map in camera1 mode, does the depth change compared to using merge or camera2 mode?

Hello,

  1. To repeatedly capture depth maps and 2D images, you can use the capture2DAnd3D interface in a loop. For specific details, please refer to the MechEye API documentation: Mech-Eye API
  2. Due to the different coordinate systems in these three modes, switching modes will result in changes in the depth values of the depth map.