Complex numbers for velocity components

classic Classic list List threaded Threaded
11 messages Options
Carlos Carlos
Reply | Threaded
Open this post in threaded view
|

Complex numbers for velocity components

Hi!

I am trying to analyze some pictures that represent the injection of a gas in a vessel. I would like to know the main reason to get complex values for the components of the velocity vectors afetr performing an interpolation with pivlab.

Thanks in advance for your help

Carlos

William William
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Dear Carlos, I thought I resolved that issue in one of the latest updates... Are you sure you have the latest version, and if yes: could you post your images + a guide how to reproduce the error?
Thanks,
William

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

Chris Chris
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Hi William and Carlos,

I've just got to this stage, and I notice that I also get complex numbers in the velocity components.  

I have version 1.35, and have processed the images with direct cross-correlation, interrogation size of 20 and step size 10 (my "particles" do not move far between frames).  I've tried no pre-processing and the high-pass filtering.  

Cheers,
Chris
William William
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Dear Chris,
Carlos didn't send example images, so I can't reproduce this. Could you send some + a description of what you did?

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

Chris Chris
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Hi William,

Where do you want the images sent to?  I cannot find a place to attach them here.

I used DCC, and the complex number problem was not affected by changing pre-processing, so it can't be that.  I have used both a 2-D and 1-D Gaussian for the sub-pixel accuracy, and I can find complex numbers in the result in both.  I notice that the complex numbers tend to arise in areas of the image where there is not a lot going on i.e. where there are not particles.  Before validation, as far as I can tell, there are no complex numbers, and I think some of the NaNs end up being complex.  I suppose that's through the interpolation.  Thanks for your assistance!

Cheers,
Chris
William William
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Please send them to [hidden email] along with the settings that you used. Thanks!

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

Chris Chris
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Hi William,

Images:

Frame1
Frame2

The settings are:
ROI/Mask: None
Pre-processing: High-pass, kernel size 15
PIV settings: DCC, window size 20; step size 10
Sub-pixel: 2-D Gaussian
Post-processing: local median, threshold 5; epsilon 0.1; interpolation box checked

And that's it.  Let me know if there are any settings I've missed.  As I said, the complex numbers often arise in places in the image where there are no particles.  I suppose a work-around for now is to mask these bits out of the analysis.


Cheers,
Chris
Chris Chris
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Hi again William,

Thought it might be helpful to let you know that upon closer inspection, I have found complex numbers in the vector field before post-processing.  

Cheers,
Chris
William William
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Thanks, I'll have a look in the next days!

-- Dr. William Thielicke
http://William.Thielicke.org

Am 25. November 2014 13:44:39 MEZ, schrieb "Chris [via PIVlab - Time-Resolved Digital Particle Image Velocimetry Tool for MATLAB]" <[hidden email]>:

>
>
>Hi again William,
>
>Thought it might be helpful to let you know that upon closer
>inspection, I
>have found complex numbers in the vector field before post-processing.
>
>
>Cheers,
>Chris
>
>
>
>_______________________________________________
>If you reply to this email, your message will be added to the
>discussion below:
>http://pivlab-time-resolved-digital-particle-image-velocimetry-tool-f.33690.n7.nabble.com/Complex-numbers-for-velocity-components-tp19p55.html
>To start a new topic under PIVlab - Time-Resolved Digital Particle
>Image Velocimetry Tool for MATLAB, email
>[hidden email]
>To unsubscribe from PIVlab - Time-Resolved Digital Particle Image
>Velocimetry Tool for MATLAB, visit
>

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

William William
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

In reply to this post by Chris
Hi Chris,
I just checked the files and I can reproduce the problem. I actually don't know how complex numbers can result from a cross correlation. But the real part of the complex number actually represents the true displacement. In the DFT (FFT_multi.m) algorithm, I already fixed the problem, but not in DCC yet. However, when looking at your data, I'd recommend to use the DFT approach anyway. DCC works best when there are really particles (white dots on black background), but not so good with the kind of texture that you have. Here, DFT usually delivers much better results (but disable the highpass for DFT, and enable CLAHE).

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

Chris Chris
Reply | Threaded
Open this post in threaded view
|

Re: Complex numbers for velocity components

Hi William,

Thanks a lot for looking into this, I appreciate it.  As it turns out, I have started to use the DFT method over the DCC anyway, but it's good to know that if I use DCC, I can ignore the imaginary part and still have the true displacement.

Thanks again,
Chris