Main Content

hdrread

Read high dynamic range (HDR) image

Description

example

hdr = hdrread(filename) reads the high dynamic range (HDR) image, hdr, from the file specified by filename. For scene-referred data sets, pixel values usually are scene illumination in radiance units.

Examples

collapse all

Read high dynamic range image into the workspace.

hdr = hdrread('office.hdr');

Convert the HDR image to a lower dynamic range, suitable for display.

rgb = tonemap(hdr);

Display the image.

imshow(rgb);

Input Arguments

collapse all

File name of HDR image, specified as a character vector or string scalar.

Example: 'office.hdr' or "office.hdr"

Data Types: char | string

Output Arguments

collapse all

HDR image, returned as an m-by-n-by-3 numeric array with values in the range [0,Inf).

Data Types: single

Tips

  • To display HDR images, use an appropriate tone-mapping function, such as tonemap.

References

[1] Larson, Greg W. "Radiance File Formats". http://radsite.lbl.gov/radiance/refer/filefmts.pdf

Version History

Introduced in R2007b