Breast thermograms are digitally classified by means of a principal component analysis of a training set of breast spectral differences obtained in coherent light. The results are compared to the usual partition in categories of medical diagnosis. The statistical operators initiating the classification being expressed in terms of spatial frequencies, the thermograms can be optically classified by using optical representations of the operators that play the role of filters. In coherent light one deals with a conventional spatial frequency filtering, and in incoherent light the thermograms are processed by imaging through suitable coding pupils. In both cases the principal components are easily computed from the measurement of luminous intensities. Such analog computers are expected to increase the throughput of processed images by avoiding needless digitization.