charlesCXK / Depth2HHA

Use MATLAB to convert depth image into HHA image. In this repo, I will use NYU Depth V2 dataset as an example.
42 stars 10 forks source link

I have some questions about depth image and raw-depth image #1

Open YUjieqiong opened 5 years ago

YUjieqiong commented 5 years ago

I want to know what depth image and raw-depth image refer to. Is depth image a post-processing depth map? I did this operation (depths-min)/(max-min)255 when I generated raw-depth from the depth data of NYUv2 dataset. How did you deal with it?Most of the HHA diagrams I generated according to your program are green. [pc, N, yDir, h, pcRot, NRot] = processDepthImage(D100, missingMask, C);why is 100? I(:,:,1) = 31000./pc(:,:,3); what does 31000 mean? I(:,:,3) = (angl+128-90); what does 128-90 mean? Thank you ~

ZhaoyangLi-nju commented 5 years ago

I think there is no pixel's value equal 255

ZhaoyangLi-nju commented 5 years ago

I want to know what's the raw-depth? Is there has an explanation? If I get help,I will be happy

jiunyen-ching commented 4 years ago

@YUjieqiong @ZhaoyangLi-nju I think depth image and raw-depth image here refers to the content of the NYUv2 dataset. From the documentation at https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html,

depths – HxWxN matrix of in-painted depth maps where H and W are the height and width, respectively and N is the number of images. The values of the depth elements are in meters.

rawDepths – HxWxN matrix of raw depth maps where H and W are the height and width, respectively, and N is the number of images. These depth maps capture the depth images after they have been projected onto the RGB image plane but before the missing depth values have been filled in. Additionally, the depth non-linearity from the Kinect device has been removed and the values of each depth image are in meters.

In a way, you are correct regarding the depth image as it undergo some processing since some depth values are missing from raw-depth image. However, this processing is done beforehand and prepared as part of the NYUv2 dataset.

jiunyen-ching commented 4 years ago

@YUjieqiong

[pc, N, yDir, h, pcRot, NRot] = processDepthImage(D100, missingMask, C);why is 100?

The input, D is in meters. So, by multiplying 100, we're changing it to centimeters.

I(:,:,1) = 31000./pc(:,:,3); what does 31000 mean?

I am not sure about this value. Seems like it's an arbitrary value; possibly obtained via trial-and-error. The comment from the original work's code says: % Making the minimum depth to be 100, to prevent large values for disparity!!!

I(:,:,3) = (angl+128-90); what does 128-90 mean?

I am unable to figure this part out yet. I'd also be interested to find out why is this the case.