1. An optical pattern recognition system for detecting the presence of one or more predefined targets, the system comprising: a processing device coupled with a database of synthetic discriminant function (SDF) reference images, the processor for controlling the modulation and transformation operations; a laser light source for providing a coherent monochromatic light for a base carrier signal; a collimating lens for receiving the coherent monochromatic light and producing a parallel beam; a spatial light modulator (SLM) that includes phase mask and a fringe-adjusted filter capabilities, the SLM for receiving a phase encoded reference image and an input image to form a joint image such that the coherent monochromatic light passing through the SLM is modulated by the joint image; a Fourier lens for receiving the coherent monochromatic light modulated by the joint image; a recording device for capturing the Fourier transformed coherent monochromatic light modulated by the joint image and recording the intensity of the spectral signal as the joint power spectrum (JPS); switching circuitry for receiving the JPS signal and feeding it back into the SLM such that the Fourier lens will perform an inverse Fourier transformation and the recording device will record the magnitude yielding a final correlation signal; a PCR means for determining a peak-to-clutter ratio (PCR) for the final correlation signal; means for comparing the PCR to a threshold value such that one of the predefined targets is present in the input image when the PCR is greater than or equal to the threshold value; wherein the SDF reference images are combined to form a composite SDF reference image for the phase encoded reference image; wherein the composite SDF reference image is obtained from a plurality of training images by executing instructions in a processor that: (a) construct a synthesized weighted average function of the training images according to: r SDF ⁡ ( x , y ) = ∑ i = 1 N ⁢ ⁢ a i ⁢ r i ⁡ ( x , y ) ∑ i = 1 N ⁢ ⁢ a i wherein a i represents a coefficient for each training image; (b) initialize the a i coefficients to unity; (c) calculate an SDF reference image for each iteration; (d) create a correlation matrix by comparing each training image with the current SDF reference image according to: 
 corr i k ( x,y )= r SDF k ( x,y )⊕ r i ( x,y ) where k is the iteration number and ⊕ represents the correlation operation; (e) determine the correlation peak intensities for each training image; (f) determine an error value based on the maximum correlation peak intensity and minimum correlation peak intensity among the training images according to: ξ k = ( C max k - C min k ) C max k where ξ k is the error calculated in the k-th iteration and C max k and C min k are the maximum and the minimum correlation peaks computed in the k-th iteration; and (g) if the error value is not within a predetermined threshold, then (h) update the a i coefficients for the next iteration according to: 
 a i k+1 =a i k +( C max k −C i k )δ where δ is a relaxation factor that determines the rate of changing the coefficients from one iteration to the next; and (i) repeat steps (c) through (g) until the error value is within the predefined threshold.