1. An apparatus for classifying image data comprising: an input device that receives the image data; a peak/valley detection device that receives the image data and determines one of a peak count and a valley count within a window of the image data around a pixel under consideration, wherein the peak/valley detection device includes a neighborhood checking device that checks whether any peaks or valleys are located within a neighborhood of the pixel under consideration; and an output device that outputs a signal corresponding to a classification of the pixel under consideration based on the determination of the peak/valley detection device.