niessner / Matterport

Matterport3D is a pretty awesome dataset for RGB-D machine learning tasks :)
https://niessner.github.io/Matterport/
MIT License
929 stars 153 forks source link

Reading .jxr HDR images and tone mapping? #59

Open Jerrypiglet opened 1 year ago

Jerrypiglet commented 1 year ago

Hi there, I have a question on the provided HDR Images in .jxr format.

[1] First of all, in order to load the .jxr images in Python, I followed this issue to convert images to .tif format, then load with cv2.imread(), which yields a np.uint16 image with max value usually around 2xxxx (2**16=65536). I then tried to tone map the np.uint16 image onto LDR, with the function here, but got very dark images and yellowish tones.

I wonder if there is anything wrong with my steps, and if there is a better way to load the .jxr images and do tone mapping (demos will be appreciated).

A similar issue was posted here without solution.

[2] The second question is how to convert to .exr images. I have been rendering synthetic scene datasets in .exr format, where each pixel is the radiance measurement in a np.float32 format, usually with max value around or less than 10. I wonder if there is a trivial way to convert the .jxr images (max 2xxxx or 3xxxx) to .exr? Or is this the case that the .jxr image values DOES NOT record the TRUE RADIANCE of the camera rays, but only useful when e.g. used to convert to LDR images with embedded color profiles?