c++ - Kinect depth pixel -


i working on kinect project using ms kinect sdk1.7. when trying sample code bridging opencv. not understanding code of calculation // convert depth info intensity display byte b = 255 - static_cast(256 * realdepth / 0x0fff);

and how can pixels mat depth distance?

i'm not familiar kinect, line i'm assuming realdepth depth measured device inside kinect, in si unit (since 0x0fff 4096 i'm assuming mm). line there

// convert depth info intensity display  byte b = 255 - static_cast(256 * realdepth / 0x0fff); 

then converts depth value in mm range (0 - 255) can displayed on monitor screen.

you don't need depth 'back', can use realdepth directly


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -