Thread Subject: Cross-correlation with sub-pixel accuracy

Subject: Cross-correlation with sub-pixel accuracy

From: Peter Bone

Date: 4 Mar, 2009 16:50:18

Message: 1 of 3

I'm performing phase only correlation between 2 images to find the displacement using FFT's, which gives a discrete correlation plain. Currently I'm finding the peak location simply from the maximum value of the correlation plane. Can anyone help me find a method to find the peak location with sub-pixel accuracy by looking at the neighbouring pixels around the peak? I've seen method that use curve fitting but this is too slow. I'm looking for a simple method that can be implemented quickly without iteration. Perhaps some kind of averaging of neighbouring locations using the values as weights?
Peter

Subject: Cross-correlation with sub-pixel accuracy

From: Peter Boettcher

Date: 4 Mar, 2009 18:04:08

Message: 2 of 3

"Peter Bone" <peterbone@hotmail.com> writes:

> I'm performing phase only correlation between 2 images to find the
> displacement using FFT's, which gives a discrete correlation
> plain. Currently I'm finding the peak location simply from the maximum
> value of the correlation plane. Can anyone help me find a method to
> find the peak location with sub-pixel accuracy by looking at the
> neighbouring pixels around the peak? I've seen method that use curve
> fitting but this is too slow. I'm looking for a simple method that can
> be implemented quickly without iteration. Perhaps some kind of
> averaging of neighbouring locations using the values as weights?

How about a parabolic fit using the 2 surrounding points?

http://people.equars.com/~marco/poli/phd/node47.html

-Peter

Subject: Cross-correlation with sub-pixel accuracy

From: Matt

Date: 4 Mar, 2009 18:59:02

Message: 3 of 3

"Peter Bone" <peterbone@hotmail.com> wrote in message <gombga$fnf$1@fred.mathworks.com>...
> I'm performing phase only correlation between 2 images to find the displacement using FFT's, which gives a discrete correlation plain. Currently I'm finding the peak location simply from the maximum value of the correlation plane. Can anyone help me find a method to find the peak location with sub-pixel accuracy by looking at the neighbouring pixels around the peak? I've seen method that use curve fitting but this is too slow. I'm looking for a simple method that can be implemented quickly without iteration. Perhaps some kind of averaging of neighbouring locations using the values as weights?
> Peter


Can't you just zero-pad your FFTs before taking the IFFT? That will upsample your correlation plane (by sinc interpolation) giving you sub-pixel accuracy of the peak.

To reduce computation, you could find the displacement to pixel accuracy first. Then zero-pad your FFTs and compute only specific elements of the IFFT in the neighbourhood where you know the peak to lie.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
accuracy Peter Bone 4 Mar, 2009 11:55:04
subpixel Peter Bone 4 Mar, 2009 11:55:04
peak location Peter Bone 4 Mar, 2009 11:55:03
correlation Peter Bone 4 Mar, 2009 11:55:03
rssFeed for this Thread

Contact us at files@mathworks.com