We have experimentally demonstrated the feasibility of a scale, rotation, and translation invariant all-optical processor for automatic target recognition. This simple processor consists of a single Fourier lens and uses a phase-coded input image of the target obtained by the recording of the original image onto a phase-only material through a Ronchi-type grating. A logarithmic distance measure is introduced to separate two classes of targets under the experiment. A real-time implementation of the processor is suggested utilizing a specially designed spatial light modulator.