Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convertted depth image should be an uint16 array #3

Closed
cdowen opened this issue Feb 1, 2021 · 3 comments
Closed

Convertted depth image should be an uint16 array #3

cdowen opened this issue Feb 1, 2021 · 3 comments

Comments

@cdowen
Copy link

cdowen commented Feb 1, 2021

Thanks for these functions! They are really useful.

However, in the depth_2_color_space function, the returned depth gets converted to uint8 which I think is not optimal. The original data is in uint16 range and numpy astype may cause loss in precision, even plain erroneous depth value.

Best regards!

@KonstantinosAng
Copy link
Owner

As i don't have a Kinect device to test it now, i cannot be sure if the uint16 is fitted for the depth image. I remember when i tested it that the uint16 resulted in an error depth image but i may be wrong. You can test it out and make a pull request if you think that this is correct.

@cdowen
Copy link
Author

cdowen commented Feb 6, 2021

I am pretty sure it's uint16. The C++ SDK uses UINT16 array to store the depth image. See AccessUnderLyingBuffer and CopyFrameDataToArray. The error depth image might be due to visualization issues. Sometimes the uint16 data get clipped when visualization.

@KonstantinosAng
Copy link
Owner

Thanks for the update. I have changed the code to uint16 for the depth image and the aligned image.

@cdowen cdowen closed this as completed Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants