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.

Display High Dynamic Range Image

This example shows how to display a high dynamic range (HDR) image. To view an HDR image, you must first convert the data to a dynamic range that can be displayed correctly on a computer.

Read a high dynamic range (HDR) image, using hdrread. If you try to display the HDR image, notice that it does not display correctly.

hdr_image = hdrread('office.hdr');

Convert the HDR image to a dynamic range that can be viewed on a computer, using the tonemap function. This function converts the HDR image into an RGB image of class uint8 .

rgb = tonemap(hdr_image);
  Name             Size                  Bytes  Class     Attributes

  hdr_image      665x1000x3            7980000  single              
  rgb            665x1000x3            1995000  uint8               

Display the RGB image.