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.
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?
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.
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!
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.
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).
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.