Top - hat filter - baseline correction

4 views (last 30 days)
Jonasz
Jonasz on 17 Sep 2013
Hello. I would like to use top hat filter in order to correct baseline in mass spectrum. Does anyone know how to implement this in Matlab ( I try to avoid ready function msbackadj)

Answers (1)

Image Analyst
Image Analyst on 18 Sep 2013
Edited: Image Analyst on 18 Sep 2013
There is a Fourier top hat filter, and there is morphological top hat filter (sometimes called top hat transform, like Wikipedia does to distinguish it from the Fourier version). Not sure which you want.
The morphological one is in the Image Processing Toolbox. If you don't have that you can perform it via blockproc(). It will detect little bright or dark blips on a varying background.
The Fourier one sounds like a low pass filter (blurring) to me. So you can implement that simply with taking the FFT and multiplying all frequencies higher than a certain frequency by zero, then inverse transforming. In imaging we call that sliding mean filter, box filter, blurring, averaging filter, sliding average filter, convolution, low pass filter, or something like that (to avoid confusion with the more common morphological top hat filter).
I only use the morphological top hat filter. If I do use the Fourier one to blur things, I call it by different names..

Categories

Find more on Filter Banks in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!