Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Calculate weights for image pixels based on image gradient

`W = gradientweight(I)`

`W = gradientweight(I,sigma)`

`W = gradientweight(___,Name,Value)`

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.

Was this topic helpful?