a spatial median filter determines a median of a plurality of values by dividing the plurality of values into a plurality of groups of values . the values in each of the groups are sorted to determine its median . then , the medians of the plurality of groups are fully sorted . certain of the sorted values are eliminated from prescribed ones of the groups in accordance with prescribed criteria based on the number of values in the group and the median value of the group values . the remaining values are sorted to determine the median of the plurality of values .