The aim of pattern recognition by image analysis is to accurately determine the parameters of a given object so that recognition can be achieved. The recognition procedure finds its mathematical tools in signal processing. In the classification of wheats by image processing, spots and dust particles, considered 'noise' in the terminology of signal processing, may significantly decrease the performance of an edge detection algorithm. To remove a pulse noise and to extract the boundary of a geometry, rank-order filters have been proved to yield good results in the processing of an image. The developed software ImPro for Windows employs the median filtering technique to remove such impurities and to smooth out the surface of wheat grains. It also employs the range-order filtering technique to detect boundaries in the classification of wheat varieties. A captured image can be sent to the software directly from a frame grabber. Under standard lighting conditions, boundaries of grains are fit to ellipses, and feature parameters are determined. The parameters determined by fitting procedure, as well as the features determined by direct extraction, are used in the classification. Results show that the dimensionless rational features are useful in distinguishing most of the cultivars and advanced breeding lines tested.