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..