Matterport icon indicating copy to clipboard operation
Matterport copied to clipboard

Can't read data inside HDR images(.jxr format)

Open a0026 opened this issue 7 years ago • 4 comments

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?

a0026 avatar Nov 08 '17 11:11 a0026

You can use Xnviewmp or GIMP plugin for viewing. Works for me under Ubuntu 16.04.

DBobkov avatar Feb 28 '18 16:02 DBobkov

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.

priyakasimbeg avatar Aug 26 '19 23:08 priyakasimbeg

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).

kevinj22 avatar Jan 17 '20 21:01 kevinj22

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!

Jerrypiglet avatar Feb 13 '23 12:02 Jerrypiglet