The Quantile User Image Macro Language Extension UMQuantile.p defines two filter macros, described below. To be sure that the extension is installed, include RequiresUser('Quantile',1) in your macro. This will give a reasonable error message if someone tries to use the macro with a copy of Image that does not contain the package. - XYQuantile, which is an extension of the median filtering, - ZQuantile, which does the same filtering "vertically" on a stack, XYQuantile ---------- The XYQuantile routine allows you to effect a median filtering on a rectangle of chosen dimensions. The user is asked to specify the values of filter width (FW), filter height (FH), and quantile (Q). For each pixel, the routine selects a rectangle of FWxFH pixels, sorts all the points in this rectangle, and replaces the original pixel by the quantile. The median value is given by Q=((FWxFH) div 2) +1. For instance, in a 5x3 rectangle, the median is the 8th quantile of the sorted values. To show the potenial of this filter, I added a "Noisy Image". Compare the filtering of this image with the Reduce Noise function if NIH, and with a median filter with the following parameters: Filter Width=5, Filter Height=1, Quantile=3. You can also specify that the routine retains another value than the median, for instance the local minimum (Quantile=1) or maximum (Quantile=FHxFW). Macro call: RequiresUser('Quantile',1); XYQuantile(FilterW, FilterH, Quantile); ZQuantile --------- The ZQuantile filter works exclusively on stacks. It perfomrs basically the same operation than the XYQuantile procedure, but vertically. It gives similar results as the Average function of the Stack menu, but there is a weaker influence of the extreme values on the median than on the average. Note that both XYQuantile and ZQuantile filterings are slow to process, and that the speed is inversely propotional to the size of the filter. Macro call: RequiresUser('Quantile',1); ZQuantile(Quantile); If you find some use of or have some comment about these filters, please contact jvanheld@dbm.ulb.ac.be