Correlation postprocessing-based method for the detection of defocused images

We present a method to detect patterns in defocused scenes by means of a joint transform correlator. We describe analytically the correlation plane, and we also introduce an original procedure to recognize the target by postprocessing the correlation plane. The performance of the methodology when the defocused images are corrupted by additive noise is also considered. © 1997 Optical Society of America


Introduction
In a pattern-recognition process, when the scene is recorded by means of an imaging system, the image can be affected by different kinds of degradation, such as distortion, noise, defocusing, atmospheric turbulence, or relative movement between the scene and the recording system.These degradations affect the behavior of the recognition methods, yielding a lower detection capability and reduced discrimination between similar objects.However, detection difficulties derived from problems related to defocusing have not been studied in depth.These degradations can be present in the stored scene when the optical system works in low-illumination conditions.In this case the aperture of the imaging lenses should be opened, which implies a loss of depth of field.
Recently, the performance of a binary joint transform correlator ͑BJTC͒ with defocused scenes with different thresholding methods was described. 1,2In this paper we present an original method to detect patterns in defocused images by means of a BJTC.This procedure is valid for any blurring that presents circular symmetry.This approach postprocesses the correlation to obtain reliable detections.To show the robustness of the method, it has been tested with defocused scenes that are also corrupted by Gaussian zero-mean additive noise.

Joint Transform Correlation Review
Joint transform correlators 3 have been shown to be powerful coherent processors for optical pattern recognition. 4Since 1966 several improvements in this architecture have been proposed to obtain real-time detection with liquid-crystal devices. 5,6During the past few years most authors of papers published in the pattern-recognition field have analyzed different systems to increase discrimination capability.In particular, the binarization of the joint power spectrum ͑JPS͒ has been used widely and has been shown to be a reliable method. 7The JPS is described by the following equation: where ͉F R ͑u, v͉͒exp͓i R ͑u, v͔͒ and ͉F S ͑u, v͉͒exp͓i S ͑u, v͔͒ are the Fourier transforms ͑FT's͒ of the reference f R ͑ x, y͒ and the scene f S ͑ x, y͒, respectively.We assume that the scene is located at ͑ x 0 ͞2, y 0 ͞2͒ and the reference at ͑Ϫx 0 ͞2, Ϫy 0 ͞2͒.The binary JPS I b ͑u, v͒ is obtained by assignment of the values ϩ1 or Ϫ1 to I͑u, v͒, in the manner of Eq. ͑2͒: where I T ͑u, v͒ is a predetermined threshold function.This bipolar function can be expressed as a Fourier expansion 7 : An appropriate threshold function I T ͑u, v͒ is presented in Eq. ͑4͒ 8 : To remove the intraclass terms of Eq. ͑1͒, we can evaluate separately the intensity of the FT of the scene and the reference, and then obtain by computer the subtraction between Eqs. ͑1͒ and ͑4͒.Now Eq. ͑3͒ becomes Fourier transforming Eq. ͑5͒ and taking n ϭ 1, we obtain the correlation:

Defocused-Image Joint Transform Correlation Analysis
The intensity of a scene acquired by means of an optical system can be described by f S ͑ x, y͒ ϭ f I ͑x, y͒ ‫ء‬ h͑x, y͒, where f S ͑ x, y͒ is the registered image, f I ͑ x, y͒ is the ideal image, h͑ x, y͒ is the point-spread function ͑PSF͒ of the optical system, and the asterisk represents the convolution operator.This assumption is valid if we suppose that an imaging system is space invariant.By Fourier-transforming the former expression we obtain F S ͑u, v͒ ϭ F I ͑u, v͒H͑u, v͒, where F S ͑u, v͒ and F I ͑u, v͒ are the respective FT's of f S ͑ x, y͒ and f I ͑ x, y͒, and H͑u, v͒ is the optical transfer function ͑OTF͒.In an on-focus aberration-free system, if we ignore diffraction effects, it is obvious that h͑ x, y͒ ϭ ␦͑x, y͒.For a defocused optical system the JPS is described by where sign͑ x͒ is a function defined as Note that, if the system is affected by only defocusing, the OTF is real.Binarizing the JPS with the threshold function of Eq. ͑4͒ and taking the first term we obtain and finally the correlation is FT͕sign͓H͑u, v͔͖͒ It is the term FT ͕sign͓H͑u, v͔͖͒ that is responsible for the degradation of the correlation.If the elimination of this term were possible, the correlation process would be successful.
In this research we obtained synthetic defocused scenes by convolving an on-focus image with a PSF.Stockseth 9 derived an analytic approximation of the OTF specially suitable for moderate and large amounts of defocusing.The approximation has the form where a ϭ 4ws͞, and s is the reduced spatial frequency that varies in the range 0 Յ s Յ 2. For ͉s͉ Ͼ 2 Eq.͑11͒ is equal to zero and s ϭ 2 corresponds to the cutoff frequency of the optical system.The parameter w is the optical distance between the optical system's emergent wave front and the reference sphere centered on the axis at the out-of-focus point, measured along the extreme pupil ray.Equation ͑11͒ is easier to calculate, and for w Ͼ 1 its use is fairly accurate.We use this equation to simulate different degrees of defocusing in realistic conditions, as described earlier in this section.
As is shown in Eq. ͑10͒ the form of the correlation is described by FT ͕sign͓H͑u, v͔͖͒.Notice that in this case H͑u, v͒ ϭ H͑͒ presents circular symmetry, so sign͓H͔͑͒ can be described in terms of circ͑͒ functions and the zeros of H͑͒.The circ͑ x, y͒ distribution is defined as Let R 1 Ͻ R 2 Ͻ R 3 Ͻ . . .Ͻ R k be the values where H͑͒ ϭ 0. Note that the number of poles is finite owing to the existence of the cutoff frequency in the Fourier domain.Then we can write sign͓H͔͑͒ as an expansion as by Fourier-transforming the latter expression: where r ϭ ͑x 2 ϩ y 2 ͒ 1͞2 .Finally, by combining Eqs.͑6͒, ͑10͒, and ͑14͒ and assuming a diffractometer constant fЈ, we can describe the correlation plane by To illustrate the performance of the correlation described by Eq. ͑15͒, we computed a particular case considering R i ϭ i and fЈ ϭ 1.Because Eq. ͑11͒ is nearly periodic, the assumption of R i ϭ i seems suitable.And because of a severe difficulty in dealing with the JPS with defocused images-the dynamic range of current detector arrays is limited to two or three decades and at least 3 orders of magnitude are required to cover the intensity of the first zeros of the OTF-two situations are considered.Fig. 1 shows a plot of the correlation section with Eq. ͑15͒.The solid and dashed plots correspond to set k ϭ 3 and set k ϭ 10, respectively, illustrating a comparison between two very different situations of recording the JPS.In both cases the correlation section is confined around the detection point.

Results: Correlation Postprocessing
To obtain defocused images we calculated the convolution between the scene depicted in Fig. 2 and a PSF we obtained starting from the OTF pointed out in Eq. ͑11͒.We applied this equation for simulating realistic conditions: the imaging system is a standard photographic objective of fЈ ϭ 50 mm, working with an aperture of f͞11 and wavelength of ϭ 600 nm.
The cut-off frequency ͑s ϭ 2͒ is approximately 300 line pairs͞mm ͑lp͞mm͒.The image is registered by means of a commercial CCD with 512 ϫ 512 pixels and a size of 8 mm ϫ 6 mm.The effective resolution of the electronic device is more than 30 mm Ϫ1 .
Figure 2͑a͒ shows a scene used in the simulations, and Fig. 2͑b͒ shows the same scene affected by severe defocusing of w ϭ 6. Figure 3͑a͒ shows the BJTC between the defocused scene and the larger satellite.We produced Fig. 3͑b͒ by taking the smaller satellite as a reference.As described in Section 3, a circular-symmetry distribution appears centered at the detection point and, in both cases, detection is almost impossible.Nevertheless, in Fig. 3͑b͒, the circular-symmetry distribution is not as evident, owing to the presence of background clutter in the neighborhood of the target.
To deal with this correlation and to determine with precision the position of the target, we propose the  following procedure based on a postprocessing of the correlation plane: perform a local convolution between the correlation plane and a circle of suitable radius.We can evaluate a proper radius by considering the first zero R 1 in the degraded JPS.This decision is based in the discussion regarding the plots of Fig. 1.By using the Airy formula we can generate a circle related to the real defocusing of the system.
Finally, Figs.4͑a͒ and 4͑b͒ show the simulated crosscorrelation between the results presented in Figs.3͑a͒ and 3͑b͒ and a circle obtained from the first zero of the degraded JPS.In both cases the procedure is successful.

Detection of Defocused Scenes in Presence of Noise
To study the robustness of the method, a numerical simulation that involves defocused scenes corrupted by Gaussian zero-mean additive noise has been carried out.To test the postprocessing we took into account several defocused versions of the larger satellite, from w ϭ 2 to w ϭ 6.The variance of the noise added to the image varies from 2 ϭ 10 -10,000.To establish a ratio between the signal and the noise, we considered the input signal-to-noise ratio ͑SNR͒ we obtained by computing the square of the average of the pixel of the scene between the noise variance.Fifty noise realizations were generated for each image to secure reliable results.Two metrics to assess the quality of the correlation were considered: the SNR and the detection probability.
Figure 5͑a͒ shows the evolution of the correlation SNR as a function of the input SNR ͑SNR i ͒.As we expected, the plot shows a decreasing trend.For small values of noise ͑high SNR i ͒ and depending on the defocusing degree, the values of the SNR vary  from 10 3 to 10 4 .For small SNR i , the correlation SNR falls to values between 50 and 100. Figure 5͑b͒ shows the detection probability as a measure of the accuracy of the detection.Correlation peaks located at a distance above 1 pixel of the true position are considered errors.For small and medium defocused inputs ͑w Ͻ 5͒, the detection is always correct with independence of the noise.For w ϭ 5 or w ϭ 6, allocation errors sometimes appear for SNR i Ͻ 0.01.Moreover, no false alarms due to sidelobes far from the detection position have been detected in all the simulations carried out.In conclusion, these results show the robustness of the method.

Conclusion
A procedure for the recognition of objects in defocused scenes by means of a BJTC has been demonstrated.The correlation is analytically described and a method for solving the problem is studied.The method consists of convolving the crosscorrelation term with a circle of a suitable radius.This is obtained starting from the first zero of the defocused JPS.
To test the method when a defocused scene is corrupted by additive noise, a numerical simulation is carried out.The analysis of the SNR and, in particular, the study of the allocation errors as a function of the noise in the signal show that reliable detections are obtained even when a defocused scene is corrupted with additive noise.This research was supported in part by Comisio ´n Interministerial de Ciencia y Tecnologı ´a ͑CICYT͒ project TAP94-0303.

Fig. 1 .
Fig. 1.Section of the correlation when using defocused scenes.Solid curve: k ϭ 3; dotted curve: k ϭ 10.The vertical coordinate is in arbitrary units.

Fig. 3 .
Fig. 3. ͑a͒ BJTC between scene of Fig. 2͑b͒ and the larger satellite.͑b͒ BJTC between scene of Fig. 2͑b͒ and the smaller satellite.