How Can I Use the Two-Point Correlation Function to Compare Image Structures?

Click For Summary

Discussion Overview

The discussion centers around the application of the two-point correlation function to compare the structures of two images at different scales. Participants explore the numerical calculation of this function and its advantages over Fourier transforms, particularly in the context of isotropic images.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant recalls the use of the two-point correlation function in cosmology for analyzing the Cosmic Microwave Background (CMB) and expresses a desire to apply this method to their images.
  • Another participant suggests that the two-dimensional Fourier transform can be used to calculate the power spectrum of the image, noting that it does not bias towards horizontal or vertical modes.
  • There is a mention of the importance of measuring the amplitude and separation between peaks in the power spectrum, with some uncertainty about the behavior of peaks beyond the first two.
  • One participant indicates they have developed a distance binning algorithm but seeks clarification on its application.
  • There is a misunderstanding regarding the interpretation of data, with one participant clarifying that they did not mean to imply anyone was ignoring data.

Areas of Agreement / Disagreement

Participants express differing views on the interpretation of data and the application of the distance binning algorithm. There is no consensus on the best approach to measuring peaks in the power spectrum or the implications of the data sets.

Contextual Notes

Some assumptions about the isotropy of the images and the nature of the data sets remain unaddressed, and the discussion does not resolve the uncertainties regarding the behavior of peaks in the power spectrum.

mikeph
Messages
1,229
Reaction score
18
Hi

I have two images and I want to compare the "structures" of them at different scales. I remember from cosmology that the two point correlation function was used to extract similar structural information from the CMB, generating a graph of structure Vs scale. Then at certain length scales you have peaks which correspond to physical occurrences.

edit-this is the image I'm talking about.

cmb-cmbpowerspectrum.png
This is exactly what I'd like to apply to my image, but after searching the internet I can't find much that helps me actually numerically calculate this for an image. Does anyone know any good tutorials for actually doing this?It's my understanding that this method is favourable to taking a Fourier/cosine transform as these methods are biased towards finding structure along the x-y axes? My image is isotropic so I have no reason to care about one direction more than another.

Any help or pointing me in the right direction would be brilliant, thanks
Mike
 
Space news on Phys.org
MikeyW said:
Hi

I have two images and I want to compare the "structures" of them at different scales. I remember from cosmology that the two point correlation function was used to extract similar structural information from the CMB, generating a graph of structure Vs scale. Then at certain length scales you have peaks which correspond to physical occurrences.

edit-this is the image I'm talking about.

cmb-cmbpowerspectrum.png



This is exactly what I'd like to apply to my image, but after searching the internet I can't find much that helps me actually numerically calculate this for an image. Does anyone know any good tutorials for actually doing this?


It's my understanding that this method is favourable to taking a Fourier/cosine transform as these methods are biased towards finding structure along the x-y axes? My image is isotropic so I have no reason to care about one direction more than another.

Any help or pointing me in the right direction would be brilliant, thanks
Mike
Yeah, if you want to calculate this sort of thing for a flat, rectangular image, you just take the two-dimensional Fourier transform of the image (this doesn't bias things towards horizontal/vertical modes, by the way...it just as well represents diagonal modes). Then, once that's done, the image above is what is known as a "power spectrum": it is an estimate of the magnitude of modes of each size.

So, if your FFT is defined as [itex]a(k_x, k_y)[/itex], then the power spectrum can be estimated by producing a series of bins where [itex]k_x^2 + k_y^2[/itex] are approximately equal, and averaging [itex]aa^*[/itex] in each bin.

A rather easy way to do the binning would be to, for each [itex]k_x, k_y[/itex] pair, compute [itex]\sqrt{k_x^2 + k_y^2}[/itex], and the bin it goes into is the nearest integer.
 
Measuring the amplitude and separation between peaks is the important part of this exercise. The first two peaks are solid. It gets squishy after that. You can't ignore data sets because they don't match the model.
 
Thanks Chalnoth - I already wrote a kind of distance binning algorithm, just didn't know how to use it.

Chronos- I'm not sure I understand your reply, I'm not ignoring any data.
 
MikeyW said:
Thanks Chalnoth - I already wrote a kind of distance binning algorithm, just didn't know how to use it.

Chronos- I'm not sure I understand your reply, I'm not ignoring any data.
No problem! If you have any further questions, feel free to ask. This kind of thing is what I do :)

...and I think he misread you.
 
Apologies, I never meant to suggest anyone was ignoring data.
 
Apologies, I never meant to suggest anyone was ignoring data.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K