Vector field highpass filter

classic Classic list List threaded Threaded
7 messages Options
alex alex
Reply | Threaded
Open this post in threaded view
|

Vector field highpass filter

Hi William,

I've got 2 question regarding the high-pass filtering of the velocity vectors. If I understand correctly from the PIVlab_GUI.m code

            h = fspecial('gaussian',strength,strength) ;
            h2= fspecial('gaussian',3,3);
            ubg=imfilter(u,h,'replicate');
            vbg=imfilter(v,h,'replicate');

the program uses a gaussian low-pass filter to blur the image/vector field depending on the slider-"strenght" and afterwards substracts the filtered velocity components ubg/vbg from the orginal one to get ufilt and vfilt. But why do you apply a second gaussian filter to the already filtered velocity components with hsize and sigma of 3?

And is there a way to export the filtered velocity components together with vorticity, magnitude, ... without changing the code? It looks like the filtered velocities are just calculated on the fly and not implemented into the export data set.

Thanks,
Alex
William William
Reply | Threaded
Open this post in threaded view
|

Re: Vector field highpass filter

Hi,
highpass filtering is "experimental", as it was just an idea I once had. There's no scientific background on this specific functionality, it just "felt" to be a handy feature when setting up an experiment. Therefore I decided not to output the data anywhere.
The second gaussian filter (hsize and sigma = 3) results in a bandpass and attenuates the noise that results from highpassing.
I would recommend to write your own script when you want to have highpassed data - then you can define the exact parameters yourself...

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.

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

Re: Vector field highpass filter

so does it mean that when i use the highpass filter, the output data u_smoothed is not exactly filtered or smoothed?

but when i use clahe, it smooths and filters the data.

is this so, or didi i just get it wrong.

thanks a lot.

regards,
roul
alex alex
Reply | Threaded
Open this post in threaded view
|

Re: Vector field highpass filter

There are two kinds of filters. One is for image preprocessing and can be used together with clahe and intensity capping to remove noise.
The second one, from the tab where you can calculate the velocity magnitude, vorticity, ... is just temporay and removes the low frequency velocity parts from the calculated vector field to display high frequency parts. It doesn't change any of the output data like u_smoothed and is not exported to the matlab workspace.
roul roul
Reply | Threaded
Open this post in threaded view
|

Re: Vector field highpass filter

in the GUI, i see a filter named "Wiener2 denoise filter" under the Analysis - Image pre-processing. i guess thi sis the first filter u r talking about.

the second filter i guess u r referring to is in: Plot - Derive parameters, and there is a slider bar with "Smooth data strength". so r u saying that dragging the slider changes the values in GUI display but is not saved in u_smoothed. is this so?

if this is so, what is u_smoothed then really?

sorry for the confusion, i didnt get it properly i guess.

thanks.

roul
alex alex
Reply | Threaded
Open this post in threaded view
|

Re: Vector field highpass filter

Yes, the first one is the "Wiener2 denoise filter, this you can apply before the calculations.
In the "Derive Parameters" tab you have two sliders: One for data smoothing and one for applying a high-pass filter. If you mark the "Smooth data" box and apply a certain smoothing strenght, you can save these data afterwards to "u_smoothed" and "v_smoothed". If you don't apply the smoothing, the cells stay empty, when you export the data.

If you mark the "Highpass vector field" box, the highpass-filtered vector field is calculated just temporarily, this data is not saved and not exported to the matlab workspace.
roul roul
Reply | Threaded
Open this post in threaded view
|

Re: Vector field highpass filter

oh i see, thanks a lot for explaining this :-)