Computes the spatial moving statistics (SMS) for pixels in a given image.
sms(img, stat = c("ad", "bp"), w, Fr, gamma = (w + 1)/2)
the image to compute the SMS for.
the statistic used in the SMS. Must be either "ad"
(default) or "bp"
.
the spatial moving window size. Must be an odd number >= 3.
the reference ecdf with exponential tail approximation (see exptailecdf
). Only used when stat = "ad"
.
the bandwidth parameter for kerMat
. It must be a positive integer and only used when stat = "bp"
. The default value is recommended.
A matrix containing the SMS values computed for the pixels in img
.
Bui, A.T., and Apley., D.W. (2017) A Monitoring and Diagnostic Approach for Stochastic Textured Surfaces", Technometrics (in press).
# NOT RUN {
img <- matrix(rnorm(100),10,10)
ms.ad <- sms(img, "ad", 3, exptailecdf(rnorm(1000)))
ms.bp <- sms(img, "bp", 3)
# }
Run the code above in your browser using DataLab