Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load *.hdr files using python

I would like to read an environment map in *.hdr file format. It seems that very popular libraries doesn't support .hdr file reading, for example, OpenCV, PIL etc.. So how to read a .hdr file into a numpy array?

like image 849
Dawei Yang Avatar asked Sep 25 '15 15:09

Dawei Yang


People also ask

How do I view a .HDR file?

HDR files can be opened with Adobe Photoshop, ACD Systems Canvas, HDRSoft Photomatix, and probably some other popular photo and graphics tools as well. You might also have luck with the online viewer at OpenHDR.org if you want to open it online, or RenderStuff.com.

What is HDR in Python?

The IHDR chunk specifies image size, colour model, bit depth, and interlacing. All possible (valid) combinations can be produced with suitable arguments to the png.

What is HDR file?

What is an HDR file? An HDR file is a High Dynamic Range (HDR) raster image file format for storing digital camera photos. It allows photo editors to enhance the color and brightness of digital images that have limited dynamic range.

What is HDR in image processing?

Theory. High-dynamic-range imaging (HDRI or HDR) is a technique used in imaging and photography to reproduce a greater dynamic range of luminosity than is possible with standard digital imaging or photographic techniques.


1 Answers

I found ImageIO very useful. It can handle many image file formats including .hdr images. Here is the list: ImageIO Formats

It can be easily installed using easy_install or pip.

like image 54
Dawei Yang Avatar answered Sep 23 '22 07:09

Dawei Yang