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

qustion about the h5 file #9

Open
lijuan123 opened this issue Apr 11, 2018 · 1 comment
Open

qustion about the h5 file #9

lijuan123 opened this issue Apr 11, 2018 · 1 comment

Comments

@lijuan123
Copy link

Thanks for your perfect project.
The question is when I use following script to read ht5 file, the rbg image I get is a whole white image. How to recover the raw data from the hdf5 mat?
''''''''''
local rgbImage = file:read('/rgb'):all():transpose(2,3):float()
local depthImage = file:read('/depth'):all():transpose(1,2)
file:close()
image.save('0001_rgb.jpg',rgbImage)
--print(rgbImage:size())
image.save('0001_depth.jpg',depthImage)
''''''''''

Thanks for your answer.

@fangchangma
Copy link
Owner

fangchangma commented Apr 11, 2018

I think you should avoid converting rgb images (uint8) to float. If you really need to do that, scale the color to between [0,1] after the float-type conversion. Please let me know if that works.

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