2D spatial triple (auto)correlation of 2D images

1 view (last 30 days)
I would like to write some code to calculate a 2D spatial triple correlation using fft2.
For a 2D spatial (auto)correlation , I do:
fftshift(real(ifft2(fft2(image).*conj(fft2(image)))))
The resulting 2D spatial triple (auto)correlation is a 4D matrix and I tried to calculate it in this way:
imfft = fft2(image);
for i=1:1:size(image,1)
for j=1:1:size(image,1)
tcorr(:,:,i,j)=fftshift(real(ifft2(imfft(i,j).*imftt.*conj(fft2(image.*exp(-2*pi*1i/size(image,1)*(x*(i-1)+y*(j-1))))))));
end
end
But I am not sure if it's right or not.
  1 Comment
Charlie
Charlie on 6 Oct 2015
Hi Stefano,
I'm trying to calculate a triple correlation of a 1D signal. The expression I'm calculating is
P=x(t)x(t+2\tau)x(t+3\tau)
Do you have any suggestions for how I could calculate this easily in matlab?
Thanks, Charlie

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!