Description Usage Arguments Details Value Warning Author(s) References See Also Examples

This function will generate images of a specified type

1 | ```
simTexture(n = 256, sd = 1, K = 150, imtype = "S1", ...)
``` |

`n` |
The dimension of the image to be generated. |

`sd` |
The standard deviation of the increments of the LS2W process to be generated. |

`K` |
The number of images to generate. |

`imtype` |
The type of image(s) to create. Must be one of "S1","S2","S3","S4","S5", "NS1","NS2", "NS3", "NS4","NS5","NS6", "NS7". See details for descriptions of the processes. |

`...` |
Any other optional arguments needed for the image generation (see details). |

Several different processes can be generated with the `simTexture`

function. The stationary processes are: a random normal process of specified standard deviation, `sd`

(`S1`

); a spatial moving average process with parameter `rho`

(`S2`

); an isotropic random field with a Matern covariance with shape parameter `nu`

(`S3`

); a Gaussian random field with exponential covariance, range parameter 2 (`S4`

), and a *diagonal Haar moving average* process of a specified order `order`

and standard deviation `sd`

(`S5`

) (see the `Haar2MA.diag`

function in the `LS2W`

package for more details).

The nonstationary processes are: a random field with unit standard deviation on the first half-plane, concatenated with a random normal half-plane of standard deviation `sd`

(`NS1`

); a white noise half-plane concatenated with a Matern stationary process (`NS2`

); a *Haar Montage* of specified standard deviation `sd`

(`NS3`

) (see the `LS2W`

`HaarMontage`

function for more details); a process with a slowly-varying covariance structure (`NS4`

); a white noise process with a central subregion of random Normal deviates with non-unit standard deviation `sd`

(`NS5`

); a white noise process with a subregion of random Normal deviates with non-unit standard deviation in the middle section of the top left quadrant `sd`

(`NS6`

); the final process is similar to `NS5`

, except that there is an additional texture in a subregion of the image. In other words, the image is a montage of three two-dimensional Normal processes with differing standard deviations. The base texture is again of unit variance, whereas the other two textures have standard deviations `sd`

and
`sd2`

(`NS7`

).

The other optional arguments for `simTexture`

are as follows:

`type`

- the type of neighbourhood dependence for the random field, either `"queen"`

or `"rook"`

(see the `cell2nb`

function documentation in the `spdep`

package for more details).

`rho`

- moving average parameter for the process `S2`

.

`nu`

- shape parameter for the Matern covariance for process `S3`

.

`order`

- Haar moving average order for `S5`

.

`fn`

- `scurve`

or `lincurve`

for `NS4`

.

`start`

- start value for `NS4`

(passed into `scurve`

or `lincurve`

).

`end`

- end value for `NS4`

(passed into `scurve`

or `lincurve`

).

`a`

- "gradient" for `NS4`

(passed into `scurve`

or `lincurve`

).

`prop`

- proportion of inserted subimage for `NS5`

, `NS6`

and the first subimage (`NS7`

).

`sd2`

- standard deviation of second inserted subimage for `NS7`

.

`prop2`

- proportion of second inserted subimage for `NS7`

.

`pos1`

- position of first inserted subimage for `NS7`

.

`pos2`

- position of second inserted subimage for `NS7`

.

`images` |
A list of length |

Generating lots of images of high dimension may take a long time!

Sarah L. Taylor and Matt Nunes

Matern, B. (1960) Spatial variation. Stochastic models and their application to some problems in forest surveys and other sampling investigations *Meddleanden fran statens Skogsforskningsinstitut* **49** (5).

Eckley, I.A., Nason, G.P., and Treloar, R.L. (2010) Locally stationary wavelet fields with application to the modelling and analysis of image texture *Journal of the Royal Statistical Society Series C*, **59**, 595-616.

Taylor, S.L., Eckley, I.A., and Nunes, M.A. (2014) A Test of Stationarity for Textured Images. *Technometrics*, **56** (3), 291-301.

1 2 3 4 5 6 7 8 9 10 | ```
X1 <- simTexture(128,K=1,imtype="S5",order=3)
X2 <- simTexture(128,K=1,imtype="NS4",fn=lincurve,a=.25,start=1,end=2)
X3 <- simTexture(128,K=1,imtype="NS5",sd=1.6,prop=.25)
X4 <- simTexture(128,K=1,imtype="NS6",sd=1.6,prop=.25)
X5 <- simTexture(128,K=1,imtype="NS7",sd=1.6,prop=.25,sd2=2.8, prop2=0.25,
pos1=c(10,10),pos2="e")
# try plotting the images:
## Not run: image(plotmtx(X1[[1]]))
``` |

LS2Wstat documentation built on July 19, 2018, 9:02 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.