roofDiff {DRIP}R Documentation

Roof Edge Detection Statistics

Description

Compute the difference between two one-sided gradient estimates.

Usage

   roofDiff(image, bandwidth, blur)

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.

blur

If blur = TRUE, besides the conventional 2-D kernel function, a univariate kernel function is used to address the issue of blur.

Details

At each pixel, the second-order derivarives (i.e., fxxf''_{xx}, fxyf''_{xy} and fyyf''_{yy}) are estimated by a local quadratic kernel smoothing procedure. Next, the local neighborhood is first divided into two halves along the direction perpendicular to (f^xx\widehat{f}''_{xx}, f^xy\widehat{f}''_{xy}). Then the one-sided estimates of fx+f'_{x+} and fxf'_{x-} are obtained respectively by local linear kernel smoothing. The estimates of fy+f'_{y+} and fyf'_{y-} are obtained by the same procedure except that the neighborhood is divided along the direction perpendicular to (f^xy\widehat{f}''_{xy}, f^yy\widehat{f}''_{yy}).

Value

A matrix where each entry is the maximum of the differences: f^x+f^x|\widehat{f}_{x+} - \widehat{f}_{x-}| and f^y+f^y|\widehat{f}_{y+} - \widehat{f}_{y-}| at each pixel location.

References

Qiu, P. and Kang, Y. (2015) "Blind Image Deblurring Using Jump Regression Analysis", Statistica Sinica, 25, 879 – 899, doi:10.5705/ss.2014.054.

See Also

roofEdgeParSel, roofEdge

Examples

data(peppers) 
diff <- roofDiff(image = peppers, bandwidth = 8) # Time consuming

[Package DRIP version 2.0 Index]