stepDiff: Step Edge Detection Statistics

View source: R/stepDiff.R

stepDiffR Documentation

Step Edge Detection Statistics

Description

Compute difference between two one-sided local kernel estimates along the gradient direction.

Usage

stepDiff(image, bandwidth, degree = 1, blur = FALSE, plot = FALSE)

Arguments

image

A square matrix, no missing value allowed.

bandwidth

A positive integer that specifies the number of pixels to use in the local smoothing.

degree

An integer equal to 0 for local constant kernel smoothing or 1 for local linear kernel smoothing. The default value is 1.

blur

If blur = TRUE, in addition to a conventional 2-D kernel function, a 1-D kernel is used in local smoothing to address the issue of blur. The default value is FALSE.

plot

If plot = TRUE, an image of the detection statistics at each pixel is plotted.

Details

At each pixel, the gradient is estimated by a local linear kernel smoothing procedure. Next, the local neighborhood is divided into two halves along the direction perpendicular to (\widehat{f}'_{x}, \widehat{f}'_{y}). Then the one- sided local kernel estimates are obtained in the two half neighborhoods respectively.

Value

A matrix of the estimated difference, |\widehat{f}_+ - \widehat{f}_-|, at each pixel.

References

Kang, Y. and Qiu, P. (2014) "Jump Detection in Blurred Regression Surfaces," Technometrics, 56(4), 539 – 550, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/00401706.2013.844732")}.

See Also

roofDiff

Examples

data(sar) # SAR image is bundled with the package and it is a 
          # standard test image in statistics literature.
diff <- stepDiff(image = sar, bandwidth = 4, degree = 0)

DRIP documentation built on May 29, 2024, 4:56 a.m.

Related to stepDiff in DRIP...