Learn R Programming

spc4sts (version 0.1.1)

sms: Spatial Moving Statistic

Description

Computes the spatial moving statistics (SMS) for pixels in a given image.

Usage

sms(img, stat, ms.ws, Fr, gamma = (ms.ws + 1)%/%2)

Arguments

img

the image to compute the SMS for.

stat

the statistic used in the SMS. Can be either "ad" or "bp".

ms.ws

the moving window size. Must be an odd number.

Fr

the reference ecdf with exponential tail approximation (see exptailecdf). Only used when stat = "ad".

gamma

the bandwidth parameter for kerMat. Only used when stat = "bp". The default value is recommended.

Value

A matrix containing the SMS values computed for the pixels in img.

References

Bui, A.T., and Apley., D.W. (2017) A Monitoring and Diagnostic Approach for Stochastic Textured Surfaces", Technometrics (in press).

See Also

ad, bp, localStat

Examples

Run this code
# 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