That’s how everything started, back in 1998 - MATPIV and OpenPIV



MATLAB Central - Particle Image Velocimetry
Particle Image Velocimetry

Hello,

does anyone know of a matlab code to do the cross-correlation between to
successive images of particles, for Particle Image Velocimetry?

Thanks,
philo.
--
L'Autre: Je donne ma folie. (il la drape d'une etole rouge). Oui son
eclat te va. Regarde bien Victoire, tu me ressembles un peu... non, ne
t'en vas pas. (nadia tueni, piece en plusieurs poemes et plusieurs titres)

philo@ccwf.cc.utexas.edu (philo von mtein) writes:

> Hello,
>
> does anyone know of a matlab code to do the cross-correlation between to
> successive images of particles, for Particle Image Velocimetry?
>
> Thanks,
> philo.

This is fairly easy to do in matlab. I'm currently working on a piece of
code to do PIV, but it is still too "buggy" to be released.
If you want to I can send you a version in a couple of weeks from now when
I had the time to test the m-files (a total of 5 files).

The program does standard PIV in a single pass through the images and
the displacement bias is removed by dividing out the convolution of a1 and b1
where a1=b1=ones(64);
To calculate the crosscorrelation I am (and almost everybody else is) using
the correlation theorem which states that correlation in the spatial domain
is equivalent to multiplication in the frequency domain (of the complex
conjugate of the FFT of im1 times the FFT of im2).
If you have two interrogation images im1 and im2 of, say, 64*64 pixels the
correlation (biased) is given by:
R=(1/(64*64))*real(fftshift(ifft2( conj(fft2(im1,128,128)) ...
.* fft2(im2,128,128) )));

This bias can also be removed by doing the interrogation more than one time.
In the first pass you find the displacements in integer values and then in
second pass you shift the interrogation windows by the local integer value
that was found in the first pass.
This also increases the S/N-ratio and it is therefore often possible to use
smaller interrogation windows (and thereby somewhat increasing the spatial
resolution).
I am currently also working on a set of m-files that utilizes this method,
but they will not be finished for a while :-)

Let me know if you are interested in a copy.

regards,

Kristian
--
Johan Kristian Sveen, jks@math.uio.no
"I wish there was a knob on the TV to turn up the intelligence.
There's a knob called `brightness', but it doesn't work."

Johan Kristian Sveen wrote:
>
> philo@ccwf.cc.utexas.edu (philo von mtein) writes:
>
> > Hello,
> >
> > does anyone know of a matlab code to do the cross-correlation between to
> > successive images of particles, for Particle Image Velocimetry?
> >
> > Thanks,
> > philo.
>
> This is fairly easy to do in matlab. I'm currently working on a piece of
> code to do PIV, but it is still too "buggy" to be released.
> If you want to I can send you a version in a couple of weeks from now when
> I had the time to test the m-files (a total of 5 files).
>
.... skipped code .....

> I am currently also working on a set of m-files that utilizes this method,
> but they will not be finished for a while :-)
>
> Let me know if you are interested in a copy.
>
> regards,
>
> Kristian
> --
> Johan Kristian Sveen, jks@math.uio.no
> "I wish there was a knob on the TV to turn up the intelligence.
> There's a knob called `brightness', but it doesn't work."

Hello,

We're glad to see this discussion in Matlab's users group, because we're
actually working on the same project these days. We have a "not perfect"
implementation of the same algorithm of cross-correlation with FFT
method.

We would appreciate getting your code too (thanks in advance), and we're
ready to share our experience in Matlab PIV implementation.


By the way - we have a reflection problem in our experiment: we try to
measure the air flow velocity in a glass round pipe, and we're using
Nd:YAG laser (160 mJ/pulse). We would appreciate receiving any kind of
advice to solve the reflection problem. Thanks again.

Best regards,
Alex Liberzon & Roi Gurka

--
Alex Liberzon <liberzon@aluf.technion.ac.il>
Roi Gurka <gurka@aluf.technion.ac.il>


https://www.mathworks.com/matlabcentral/newsreader/view_thread/5935

comments powered by Disqus