Open Source HDR library recommendations [closed]
Asked Answered
P

3

3

So I'm doing some research related to High Dynamic Range Imaging (HDRI). I've already done some work in OpenCV related to aligning and ghost removal (no actual HDR manipulation or creation yet), and now I would like to be able to start working with HDR images.

Can anyone recommend a good open source HDR library that would ideally allow me to do the following:

  • Read/ Write an HDR format (I'm not commited to a particular format yet, so I'm open to suggestions here)

  • Combine exposure-bracketed images to get HDR images, but in a way that allows me to access the camera function that gets created so that I can later use this to do things like using different numbers of EB images to contribute to different parts of the HDR image.

  • Interface relatively easily with OpenCV (see below for details).

If it's a library that allows easy interfacing with OpenCV, that would be ideal. I don't think there is currently any HDR functionality in OpenCV, but can anyone tell me if there's a way to convert an HDR image into a format that OpenCV algorithns such as inpainting will work with? For example, I know OpenCV can work with 64-bit floating point images; can I just convert an HDR image into one of these formats and run with it?

Thanks.

Parkway answered 20/7, 2010 at 21:21 Comment(0)
P
3

Hey, I asked this a long time ago, and just stumbled on my question again through google, so I thought I'd provide a quick update.

I tried Image Magick with Magick++. After a fair bit of work, I managed to get it working with OpenEXR format, but was never able to get Radiance (.hdr) working which is a shame because I do a lot of work in MATLAB which only reads/writes Radiance for HDR.

Next, I tried FreeImage. I was able to read/write hdr as well as PFM formats with this, but I found the Fibitmap format really closed, i.e. difficult to get data from a fibitmap into an OpenCV Mat, and near impossible to get it back into a Fibitmap.

In the end, I just started using Portable Float Maps (PFMs), and reading and writing them with my own code because the format is so simple. Again, this is in a research setting, so while PFM is a pretty ungainly format for long-term storange or commercial use, it's pretty nice for research purposes.

Parkway answered 6/3, 2011 at 22:50 Comment(1)
How about combining multiple images with different exposures, did you find a library for this?Brentwood
B
1

I am using FreeImage library to load HDR images (this library supports most raw camera formats, floating-point image types, and 48bpp, 64bpp images).

Then I did a converter class in C++ that is able to convert from FreeImage-type images to OpenCV and vice-versa. FreeImage also has tone-mapping conversions to change HDR images to 32bpp images.

Brittani answered 30/7, 2010 at 15:31 Comment(1)
Hey, this is pretty helpful. Do you have any suggestions for recovering the camera function? I believe this can be done with Pfstools, but I haven't had a chance to experiment with those yet. Thanks.Parkway
M
0

I would say converting would probably just be easiest. I would look at the imagemagick (http://www.imagemagick.org) libraries for conversion.

Metallize answered 23/7, 2010 at 2:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.