makehdr
Create high dynamic range image
Syntax
Description
creates the single-precision, high dynamic range image HDR
= makehdr(imds
)HDR
from
the set of spatially registered LDR images stored as ImageDatastore
object,
imds
.
uses name-value pairs to control various aspects of the image creation in addition
to the input argument from any of the previous syntaxes.HDR
= makehdr(___,Name,Value
)
Note
The input image files must contain the Exchangeable Image File Format
(EXIF) exposure metadata. makehdr
uses the middle
exposure between the brightest and darkest images as the base exposure for
the HDR calculations. This value does not need to appear in any particular
file. For more information about calculating this middle exposure value, see
Algorithms.
creates the single-precision HDR image HDR
= makehdr(images
,Name,Value
)HDR
from the set of
spatially registered LDR images stored in a cell array images
.
Specify the exposure values for images in the input cell array by using the
name-value pair 'ExposureValues'
or
'RelativeExposure'
.
Note
When input is a cell array of LDR images, you must specify either the
exposure or the relative exposure values as the second input argument. To
specify the exposure values, use the name-value pair
'ExposureValues'
. To specify the relative exposure
values, use the name-value pair
'RelativeExposure'
.
Examples
Input Arguments
Output Arguments
Algorithms
The makehdr
function calculates the middle exposure value by using the
exposure values (EVs) of the input images. The exposure value for each image is computed
based on the aperture and shutter speed. The aperture and shutter speed values are
stored in the EXIF metadata of that input file or is specified using the
'ExposureValues'
name-value pair. The middle EV is calculated as
an average of the highest and lowest EVs and is used as the base exposure.
References
[1] Reinhard et al. High Dynamic Range Imaging 2006. Ch. 4.
[2] Debevec, P.E., and J. Malik. "Recovering High Dynamic Range Radiance Maps from Photographs." In ACM SIGGRAPH 2008 classes, Article No. 31. New York, NY: ACM, 2008.
Version History
Introduced in R2008a