Top Hat Treshold Filter

Category: Image Filters
Description: Filter to carry out Top Hat Threshold Filtering for selecting bright features surrounded by dark areas. This technique is typically much more efficient than simple thresholding, where variations in background can cause it to fail. A top hat kernel is defined as a 3x3 array with 3 pixels attached to each of the sides a square with the corner pixels removed). The maximum value in the central 5 pixels (3 x 3 cross) is compared with the maximum value in the rest of the kernel (the brim). If the central maxium-peripheral maximum exceeds a threshold value, then it is retained, otherwise it is set to zero. The threshold value is set a 12 and an alternative value may be selected by holding down the option key when running the script.
Acknowledgements: For an excellent overview of image processing methods and applications see 'The Image Processing Handbook' by john Russ
Script version: 2.0
DM/GMS version: 3.6.5
Script written as a function: No
Source: Show code
Download Source Code: Download
Download Zip File: Download