0

I'm going through this tutorial and I'm reworking it in R and I was able to do so.

I tried to extend this tutorial by thinking of ways to objectively detect differences in images; e.g., can I run a hypothesis test that takes the pixel matrices of the images and return a p-value indicating the confidence of image dissimilarity -- this would be a good application for comparing images with noise to originals and answering the question of whether or not the image came from the original.

Anyway, for the following image, I used the pixel matrices to run a Mantel test (ape library) to consider the correlation between the matrices. That, of course, came back that the pixel matrices are correlated because most of the images are the same.

enter image description here

Is there any statistical procedure for completing this task that I haven't been able to find? Mantel test gets at the correlation of the matrices, not necessarily their structural difference -- for this example there's a clear correlation though the images are not the same.

I converted the pixel matrices to discrete distributions by appropriately scaling the data thinking that I might be able to compare the distributions, which describe the centers/scale/shape/etc. I came across the cramer.test function (cramer library) and npdeneqtest function (np library), but these require samples and not empirical distributions.

The necessary sample sizes to get a representative sample are too large to run the cramer.test and prohibitive for npdeneqtest even after resizing the image to 32x32. Is there another method for doing tests like for large matrices?

user1329307
  • 117
  • 2
  • 16
  • Have you looked into [SSI](https://en.wikipedia.org/wiki/Structural_similarity)? – dylanjm Jul 01 '19 at 20:56
  • You seem to be asking for recommendations for statistical tests. Such questions belong on [stats.se] or maybe even [datascience.se], not Stack Overflow. Stack Overflow is for specific programming questions. – MrFlick Jul 01 '19 at 20:57
  • You may even look into [KL-Divergence](https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence) – dylanjm Jul 01 '19 at 20:58

0 Answers0