Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Is there a reasonable way to quantify the amount of local correlations in an image? For example, I want to justify the correlations between a neighbourhood of pixels is much higher than the correlations between pixels in entirely different regions of the image.

Would showing the xcorr2(A,A) as the 2-d autocorrelation of the image be a valid way to show this? ie: if if there are large values mostly located at the center of the matrix.

share|improve this question
It sounds to me like you might be interested in geographically weighted regression. ncg.nuim.ie/ncg/GWR/whatis.htm – Andy W May 10 '11 at 14:26

2 Answers

up vote 1 down vote accepted

Local Moran's I statistic

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer: please explain why you're recommending it as a solution. Answers that don't explain anything will be deleted. See Good Subjective, Bad Subjective for more information.

One straightforward way of doing this is to consider arbitrarily-sized patches of the image. For example, let's say we are interested in all 9*9 regions of pixels that can be taken from the image. Extract each of these image patches, and transform each image patch to a row vector. Consider the entire set of image patches (8464 row vectors for a 100*100 pixel image) as a matrix M.

Compute the correlation (or covariance, corr(M) and cov(M) in Matlab) between each of the columns in M. For your specific question, look at the three columns of the correlation/covariance matrix corresponding to the central pixel in the image. Reshape these back to the size of the image patch, and plot these. For natural images, you should find that the central pixel is highly correlated with adjacent pixels, and that the correlation decreases as distance from the central pixel increases across each of the three color channels.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.