Preprocessing of the input scene can be used to improve the performance of an optical correlator. The result of the preprocessing algorithms can be bipolar real-valued images, with positive and negative values, for input to the optical correlator. We present different procedures for the implementation of the bipolar real-valued signal with spatial light modulators that work in either amplitude-only or phase-only regimes. We apply these techniques to the implementation of bipolar real-valued preprocessed input images in color pattern recognition. © 1998 Society of Photo-Optical Instrumentation Engineers.