I have studied your example, camera_uvmap.
I knew that the type of depth data is short.However, when I see depth data using 'printf', It's range is 1byte.
I think that the module controls the depth data internally as 2 byte and displays the depth data as 1 byte. Is it right?
What I want to question to you is this.
-> Following is my code, which is for seeing depth data value. However, it doesn't look well like I want to see.
I want to control depth data from 0 to 255 as unsigned char type. So, I'd like to display the farest one as black and the nearest one as white,using opencv library.
Can I get your answer?
Thank you for your time.
short temp_p=(short *)(ddepth.planes[depth_render.m_mouse.y*pdepth.imageInfo.width+depth_render.m_mouse.x]);
unsigned short temp_s=temp_p;
unsigned char temp_c=temp_s/2;
printf("x=%d , y= %d ,value=%d\n",depth_render.m_mouse.x,depth_render.m_mouse.y,temp_c);