bp | R Documentation |
Compute a Box-Pierce-type (BP) statistic for pixels in a given image. bp2()
cannot be used for pixels with the boundary problem, but is more efficient than bp()
for other pixels.
bp(img, i1, i2, w, K) bp2(img, i1, i2, w , K)
img |
the given image |
i1 |
the row index of the pixel to compute the BP statistic for. |
i2 |
the column index of the pixel to compute the BP statistic for. |
w |
the dimension of the spatial (square) moving window of the BP statistic. Must be an odd number >= 3. |
K |
the weighted (kernel) matrix. |
The BP statistic.
For pixels with the boundary problem, bp()
must be used.
bp()
is only used in sms()
for pixels with the boundary problem. It is less efficient than bp2()
for other pixels.
Anh Bui
Bui, A.T. and Apley., D.W. (2018a) "A Monitoring and Diagnostic Approach for Stochastic Textured Surfaces", Technometrics, 60, 1-13.
kerMat, spaCov, sms, ad
img <- matrix(rnorm(100),10,10) w <- 3 K <- kerMat((w + 1)/2) ## for pixels with the boundary problem, e.g., Pixel (5,1), # running bp2(img,5,1,w,K) will produce an error; instead, use bp() in this case: bp(img,5,1,w,K) ## for pixels without the boundary problem, e.g., Pixel (5,5), # both can be used, but bp2() is more efficient than bp() bp2(img,5,5,w,K) bp(img,5,5,w,K)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.