Low- and high-pass filter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Low- and high-pass filter

Vincent Wolowski
Dear all,

I am trying to understand how to use the Process/FFT/Bandpass Filter
for low- and high-pass filter on 16-bit images. I have read the
documentation here: http://rsb.info.nih.gov/ij/plugins/fft-filter.html
but I am not completely sure yet.

I think a low-pass filter can be achieved in the following way:
Let's say the image is 800x800 and only small objects with a size of a
few pixels, e.g. 3 pixels, are contained.
For a low-pass filter set the filter for large structures to 800 so
that low frequency signals pass and the filter for small structures to
3 in order to filter out high frequency signals.
Is this correct?

Would a high-pass filter then be achieved in the following way?
Set the filter for large structures to e.g. 3 and the filter for small
structures to 800.

Cheers,
Vincent

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Low- and high-pass filter

Michael Schmid
Hi Vincent,

your question is not very clear...
Anyhow, for more details on the Fourier-domain filter, see this recent post (beware of a possible line break introduced by the mailer in the link):

https://list.nih.gov/cgi-bin/wa.exe?A2=ind1311&L=IMAGEJ&D=0&1=IMAGEJ&9=A&P=187719

Essentially, you can do the same type of filtering with Process>Filters>Gaussian Blur (low pass) or subtracting the Gaussian blurred image (highpass). A high pass filter working like this is also available as a filter with preview:
http://imagejdocu.tudor.lu/doku.php?id=plugin:filter:highpass_filter:start

Michael
________________________________________________________________


On Nov 25, 2013, at 14:02, Vincent Wolowski wrote:

> Dear all,
>
> I am trying to understand how to use the Process/FFT/Bandpass Filter
> for low- and high-pass filter on 16-bit images. I have read the
> documentation here: http://rsb.info.nih.gov/ij/plugins/fft-filter.html
> but I am not completely sure yet.
>
> I think a low-pass filter can be achieved in the following way:
> Let's say the image is 800x800 and only small objects with a size of a
> few pixels, e.g. 3 pixels, are contained.
> For a low-pass filter set the filter for large structures to 800 so
> that low frequency signals pass and the filter for small structures to
> 3 in order to filter out high frequency signals.
> Is this correct?
>
> Would a high-pass filter then be achieved in the following way?
> Set the filter for large structures to e.g. 3 and the filter for small
> structures to 800.
>
> Cheers,
> Vincent

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Low- and high-pass filter

Vincent Wolowski
In reply to this post by Vincent Wolowski
Hi Michael,

thanks a lot for your feedback!

As far as I can see the functionality of Process>Filters>Gaussian Blur
is based on the class ij.plugin.filter.GaussianBlur.
I have tested programmatically the filtering provided by the class
GaussianBlur with various different values for radius and accuracy
always set to 0.01,
and compared the results to the FFT filter of Joachim Walter provided
here: http://rsb.info.nih.gov/ij/plugins/fft-filter.html in an
automatic fashion to find the best parameters.
I have read that applying the Fourier transformation and filtering in
the frequency domain is like a Gaussian smoothing in the spatial
domain.
However, in all the measures I used for comparison the above FFT
filter performed much better.

Have you experienced any differences when applying FFT filtering
compared to Gaussian blurring?
Might there be some implementation details that are different and that
could cause the different outcome?

Best regards,
Vincent



On Thu, Nov 28, 2013 at 9:57 AM, Michael Schmid <[hidden email]> wrote:

> Hi Vincent,
>
> your question is not very clear...
> Anyhow, for more details on the Fourier-domain filter, see this recent post (beware of a possible line break introduced by the mailer in the link):
>
> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1311&L=IMAGEJ&D=0&1=IMAGEJ&9=A&P=187719
>
> Essentially, you can do the same type of filtering with Process>Filters>Gaussian Blur (low pass) or subtracting the Gaussian blurred image (highpass). A high pass filter working like this is also available as a filter with preview:
> http://imagejdocu.tudor.lu/doku.php?id=plugin:filter:highpass_filter:start
>
> Michael
> ________________________________________________________________
>
>
> On Nov 25, 2013, at 14:02, Vincent Wolowski wrote:
>
>> Dear all,
>>
>> I am trying to understand how to use the Process/FFT/Bandpass Filter
>> for low- and high-pass filter on 16-bit images. I have read the
>> documentation here: http://rsb.info.nih.gov/ij/plugins/fft-filter.html
>> but I am not completely sure yet.
>>
>> I think a low-pass filter can be achieved in the following way:
>> Let's say the image is 800x800 and only small objects with a size of a
>> few pixels, e.g. 3 pixels, are contained.
>> For a low-pass filter set the filter for large structures to 800 so
>> that low frequency signals pass and the filter for small structures to
>> 3 in order to filter out high frequency signals.
>> Is this correct?
>>
>> Would a high-pass filter then be achieved in the following way?
>> Set the filter for large structures to e.g. 3 and the filter for small
>> structures to 800.
>>
>> Cheers,
>> Vincent
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Low- and high-pass filter

Michael Schmid
Hi Vincent,

what do you want to say with "the FFT filter performed much better"?
(a) Computing speed? (in my experience, the Gaussian Blur is faster, at
least on multiprocessor machines - in contrast to FFT it can use several
CPUs in parallel)
(b) The result, and if so, compared to what?

The main difference between the results of the two is in the boundary
conditions, i.e. what is assumed for pixels outside the image (these have
to be included in the smoothing operation):

(1) The FFT bandpass filter uses mirrored version of the image inside.
(2) The Gaussian Blur assumes out-of pixels are the same as the nearest
edge pixel.

Approach (1) is less sensitive to noise of the edge pixels
Approach (2) has the advantage that a dark or bright object inside the
image (not touching the edge) gives a nice blurred edge all around, with
no 'bridge' towards the edge.

Concerning numerical noise, the Gaussian Blur is slightly better.

So it depends on your needs...

Michael
_________________________________________________________________________


On Sun, December 1, 2013 18:54, Vincent Wolowski wrote:

> Hi Michael,
>
> thanks a lot for your feedback!
>
> As far as I can see the functionality of Process>Filters>Gaussian Blur
> is based on the class ij.plugin.filter.GaussianBlur.
> I have tested programmatically the filtering provided by the class
> GaussianBlur with various different values for radius and accuracy
> always set to 0.01,
> and compared the results to the FFT filter of Joachim Walter provided
> here: http://rsb.info.nih.gov/ij/plugins/fft-filter.html in an
> automatic fashion to find the best parameters.
> I have read that applying the Fourier transformation and filtering in
> the frequency domain is like a Gaussian smoothing in the spatial
> domain.
> However, in all the measures I used for comparison the above FFT
> filter performed much better.
>
> Have you experienced any differences when applying FFT filtering
> compared to Gaussian blurring?
> Might there be some implementation details that are different and that
> could cause the different outcome?
>
> Best regards,
> Vincent
>
>
>
> On Thu, Nov 28, 2013 at 9:57 AM, Michael Schmid <[hidden email]>
> wrote:
>> Hi Vincent,
>>
>> your question is not very clear...
>> Anyhow, for more details on the Fourier-domain filter, see this recent
>> post (beware of a possible line break introduced by the mailer in the
>> link):
>>
>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1311&L=IMAGEJ&D=0&1=IMAGEJ&9=A&P=187719
>>
>> Essentially, you can do the same type of filtering with
>> Process>Filters>Gaussian Blur (low pass) or subtracting the Gaussian
>> blurred image (highpass). A high pass filter working like this is also
>> available as a filter with preview:
>> http://imagejdocu.tudor.lu/doku.php?id=plugin:filter:highpass_filter:start
>>
>> Michael
>> ________________________________________________________________
>>
>>
>> On Nov 25, 2013, at 14:02, Vincent Wolowski wrote:
>>
>>> Dear all,
>>>
>>> I am trying to understand how to use the Process/FFT/Bandpass Filter
>>> for low- and high-pass filter on 16-bit images. I have read the
>>> documentation here: http://rsb.info.nih.gov/ij/plugins/fft-filter.html
>>> but I am not completely sure yet.
>>>
>>> I think a low-pass filter can be achieved in the following way:
>>> Let's say the image is 800x800 and only small objects with a size of a
>>> few pixels, e.g. 3 pixels, are contained.
>>> For a low-pass filter set the filter for large structures to 800 so
>>> that low frequency signals pass and the filter for small structures to
>>> 3 in order to filter out high frequency signals.
>>> Is this correct?
>>>
>>> Would a high-pass filter then be achieved in the following way?
>>> Set the filter for large structures to e.g. 3 and the filter for small
>>> structures to 800.
>>>
>>> Cheers,
>>> Vincent
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html