Learn R Programming

LS2Wstat (version 2.1-5)

compareImages: Assesses whether two textured images are the same texture.

Description

The function combines two images together, and then tests the montage for stationarity.

Usage

compareImages(Im1, Im2, testsize = min(nrow(Im1), nrow(Im2)), alpha=0.05,...)

Value

montageres

A boolean value indicating whether the montage of Im1 and Im2 is stationary.

Arguments

Im1

The first image to be compared.

Im2

The second image to be compared.

testsize

The size of the combined image montage to be tested for stationarity.

alpha

The significance of the stationarity test.

...

Any other optional arguments to TOS2D.

Author

Sarah L. Taylor and Matt Nunes

Details

An image montage of two images is created, and the homogeneity measure TOS2D is used in combination with getpval to assess stationarity of the montage. If the image is assessed as stationary, the two images are considered as the same texture.

References

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

See Also

TOS2D, countTextures

Examples

Run this code

# create two images to be compared:
X1<-simTexture(32,K=1,imtype="S1")[[1]]
X2<-simTexture(32,K=1,imtype="S1", sd=1.6)[[1]]
                             
# use the test to compare them:

test<-compareImages(X1,X2,nsamples=100, smooth=FALSE)

Run the code above in your browser using DataLab