open-sourceopencvhdrimages

Open Source HDR library recommendations


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:

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.


Solution

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