2d cross-correlation / convolution
- From: PB <hpbenton@xxxxxxxxx>
- Date: Tue, 6 May 2008 15:54:55 -0700 (PDT)
Dear all,
I'm not sure if this is the right place for this so if not sorry.
I'm trying to get a 2D matrix correlated with a reference matrix.
I've been told I need to do this with convolution. I have the
convolution down but now i have a complex number that I don't know how
to convert back to a real number. But more over how can I get the
correlation coefficient from this matrix? Currently I'm using R to do
the analysis so the code below is from that.
Cheers,
Paul
m<-c(10,20,30,40,50,60)
i<-c(1,1,5,2,1,1)
m1<-cbind(m,i)
j<-c(0,10,50,20,10,0)
m2<-cbind(m,j)
aa<-fft(fft(m2)* fft(m1), inverse=TRUE)m j
aa
[1,] 87000+0i 55800+0i
[2,] 97200+0i 60000-0i
[3,] 100680+0i 32520-0i
[4,] 97560-0i 28800-0i
[5,] 88800-0i 33000+0i
[6,] 69840+0i 44400+0i
.
- Follow-Ups:
- Re: 2d cross-correlation / convolution
- From: jacko
- Re: 2d cross-correlation / convolution
- From: jacko
- Re: 2d cross-correlation / convolution
- From: jacko
- Re: 2d cross-correlation / convolution
- Prev by Date: Re: Questions on turing machine problems
- Next by Date: Re: 2d cross-correlation / convolution
- Previous by thread: Questions on turing machine problems
- Next by thread: Re: 2d cross-correlation / convolution
- Index(es):