1
$\begingroup$

I am relatively new to computer vision and image processing. I have a single EXR file with 7 channels: 1-3 give me the RGB values, 4-6 give me the surface normals coded as RGB values and 7th channel contains depth information from the camera of the rendered image. I obtained this from the mitsuba renderer using the multi-channel plug-in.

I was wondering if there was any way to view these 7 channels separately. For eg. I would like an image showing only the depth values in grayscale. So far I haven't found a multi-channel EXR file viewer that does this for me. An example of what I'm talking about is shown in the link: https://www.mitsuba-renderer.org/devblog/wp-content/uploads/2014/02/multichannel.jpg

Really looking forward to any help. Thanks!!

$\endgroup$

1 Answer 1

1
$\begingroup$

I don't know any IDE-based tools that do this but a quick Python script should do the trick. I usually use Thijs Vogels' PyEXR to read the multi-channel EXR. Assuming your depth channel is called distance (which needs to be specified in your Mitsuba XML file under your hdrfilm), you can visualize it with the following code:

import pyexr

fp = pyexr.open('multichannel.exr')
img = fp.get('distance')
pyexr.write('distance.exr', img)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.