sarGen | R Documentation |
Generates a 2D stochastic AR(1) image.
sarGen(phi1 = .6, phi2 = .35, sigma = .01, m = 250, n = 250, border = 200)
phi1 |
the parameter |
phi2 |
the parameter |
sigma |
the parameter |
m |
the number of rows of the generated image. |
n |
the number of columns of the generated image. |
border |
the number of top rows/left columns to be cut off from the generated image. This helps reduce the effect of the starting condition. |
The pixel y(i,j)
of the 2D AR(1) process satisfies: y(i,j) = phi1*y(i-1,j) + phi2*y(i,j-1) + e(i,j)
, where e(i,j)
follows a zero-mean Gaussian distribution with standard deviation of sigma
. The process is then rescaled to [0, 255] to produce a greyscale image.
The generated image in the matrix format.
Anh Bui
Bui, A.T. and Apley., D.W. (2018a) "A Monitoring and Diagnostic Approach for Stochastic Textured Surfaces", Technometrics, 60, 1-13.
imposeDefect
## generate an image without defects img <- sarGen(m = 100, n = 100, border = 50) image(img,col=gray(c(0:32)/32))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.