Computes the spatial weighted covariance of a specified pair of pixels in a given image.
spaCov(img, i1, i2, j1, j2, K)
the given image
row index of the first pixel in the pair.
column index of the first pixel in the pair.
row index of the second pixel in the pair.
column index of the second pixel in the pair.
the weighted matrix.
The spatial weighted covariance of a specified pair of pixels in a given image.
Bui, A.T., and Apley., D.W. (2017) A Monitoring and Diagnostic Approach for Stochastic Textured Surfaces", Technometrics (in press).