| imposeDefect {spc4sts} | R Documentation | 
Superimpose A Local Defect
Description
Superimposes a local defect (a 2D stochastic AR(1) image from sarGen) on a given image.
Usage
imposeDefect(img, loc = NULL, a = 4, b = 10, eps = 0.05, phi1 = 0, phi2 = 0, sigma = 0.01)
Arguments
| img | the image to be superimposed a defect. | 
| loc | the location of the defect in the generated image. | 
| a | 
 | 
| b | 
 | 
| eps | controls the curvature of the ellipsoidal defect. | 
| phi1 | the parameter  | 
| phi2 | the parameter  | 
| sigma | the parameter  | 
Details
The defect is generated using sarGen.
Value
A list of the following:
| img | the generated image in the matrix format. | 
| defect.info | the information of the defects. | 
Author(s)
Anh Bui
References
Bui, A.T. and Apley., D.W. (2018a) "A Monitoring and Diagnostic Approach for Stochastic Textured Surfaces", Technometrics, 60, 1-13.
Examples
## generate an image without defects
img <- sarGen(m = 100, n = 100, border = 50)
image(img,col=gray(c(0:32)/32))
## superimpose a defect
img2 <- imposeDefect(img)
image(img2$img,col=gray(c(0:32)/32))
[Package spc4sts version 0.6.3 Index]