mantoone / DepthCapture

iOS application for capturing video and depth data to file
52 stars 10 forks source link

Reading depth data? #3

Closed sanamsta closed 3 years ago

sanamsta commented 3 years ago

How to play or read the depth data from saved depth data?

mantoone commented 3 years ago

Are you familiar with Python and Jupyter? There’s an example Jupyter notebook for reading the depth data in the notebooks folder. You can also use it to create a depth video file.

sanamsta commented 3 years ago

Thanks,

sanamsta commented 3 years ago

Actually i dont want to create depth video i just want to read it in swift. I want to get per frame depth information from file.Do you have any idea how to get that?

mantoone commented 3 years ago

Unfortunately, I have not done that myself so I don’t know how to fo it right away. The depth data saving is based on Eyal Fink’s code which can be found here https://stackoverflow.com/a/50265132

That should be a good starting point. You can search what you can use to decompress files that have been compressed as shown in the code, that is, using: compression_stream_init(compresserPtr!, COMPRESSION_STREAM_ENCODE, COMPRESSION_ZLIB) Or you may try to use zlib in C read it and use inflateInit2(&strm, -15): as Eyal suggested.

sanamsta commented 3 years ago

Thanks