Matterport
Matterport copied to clipboard
Can't read data inside HDR images(.jxr format)
I have tried to use libjxr to access hdr image data, but it says format is different. Also none of other commercial HDR software could import .jxr for either visualization and tonemapping. Will the dataset include jxr format specification used in released dataset, preferably with sample code to access raw data?
I'm having a hard time loading the jxr into Python. I've tried imageio(with freeimage plugin) as well as imagemagik (wand). Could you please let me know what package can be used in python to open jxr format? Thanks.
You can install the following two packages:
sudo apt-get install libjxr-dev sudo apt-get install libjxr-tools
Then use the JxrDecApp to uncompress the jxr into a tif file using the -c 10 48bppRGB format which is technically a HDR image format according to https://imagemagick.org/script/high-dynamic-range.php "Other HDR formats include TIFF 48-bit integer".
i.e JxrDecApp -i fc94c2a0445640028200b2f96e1fe90c_j0_5.jxr -o check_10.tif -c 10 -a 0
When you load the tif file in using python each channel is a 16 bit unsigned int from 0 to 65,536 (so effectively 32 bits in the positive range alone).
From here save it as whatever format you wish (i.e OpenExr or HDR).
Hey @kevinj22 thanks for pointing towards the conversion to .tif! However I wonder if you can further point out how to convert from .tif to .exr (in Python or command line)? I tried multiple solutions but wasn't able to get a .exr image in HDR format as output (dynamic range in .tif file always get crushed which every tool I use). Thanks a lot!