Calculate weights for image pixels based on image gradient
calculates the pixel weight for each pixel in image
W
= gradientweight(I
)I
based on the gradient magnitude at
that pixel, and returns the weight array W
. The
weight of a pixel is inversely related to the gradient values at the
pixel location. Pixels with small gradient magnitude (smooth
regions) have a large weight and pixels with large gradient
magnitude (such as on the edges) have a small weight.
returns
the weight array W
= gradientweight(___,Name,Value
)W
using name-value pairs to
control aspects of weight computation.
gradientweight
uses double-precision
floating point operations for internal computations for all classes
of I
, except when I
is of class single
,
in which case gradientweight
uses single-precision
floating point operations internally.