This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

hdrread

Read high dynamic range (HDR) image

Syntax

hdr = hdrread(filename)

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

Introduced in R2007b