|
Description  |
|
|
FIELD OF INVENTION
This invention relates to an image comparison system, and more particularly
to such a system which detects extreme levels in a phase-only image to
locate differences between a test image and a reference image.
BACKGROUND OF INVENTION
Image comparison methods and equipment are widely used in manufacturing,
testing, surveillance and many other applications. Current techniques of
image comparison include image subtraction, color overlay and image
flashing or alternating. Image subtraction algebraically combines the
magnitude of each point or pixel of the reference image and test image so
that like parts cancel and only differences remain. In the color overlay
approach, each image is filtered with a different color so that
differences appear in one or the other color and like parts appear as a
blend of both colors. In image flashing, first one and then the other
image is flashed on a screen: like parts remain steady; differences blink.
However, these methods have a number of shortcomings and may fail or give
poor results because of image-to-image misregistration and differences in
overall intensity levels of the two images.
SUMMARY OF INVENTION
It is therefore an object of this invention to provide a comparison system
and method which is insensitive to misregistration between test and
reference images.
It is a further object of this invention to provide such a system and
method which is insensitive to differences in overall intensity levels
between the reference and test images.
It is a further object of this invention to provide such a method and
system in which the image data is normalized and permits the use of a
universal threshold to detect differences between the test and reference
images.
The invention results from the realization that by forming a composite
image from a reference and test image, the like parts of the two images
become periodic and so can be easily suppressed in a phase-only image
while the unlike parts are aperiodic and thus easily detected.
The invention features an image comparison system having means for forming
a composite image composed of a reference image and a test image. There
are means for generating a two-dimensional image spectrum from the
composite image and means for whitening the two-dimensional image spectrum
by setting the magnitude of every point of the two-dimensional image
spectrum to a uniform level. There are means responsive to the means for
whitening to construct the phase-only image of the composite image, and
there are means for detecting a value of the phase-only image exceeding a
predetermined threshold which is representative of the location of a
difference between the reference and the test images.
In a preferred embodiment, the means for forming may include an image
buffer for combining the reference and test images into the composite
image. A sensor may be used for obtaining one or both of the reference and
test images. A storage device may also be used for storing one or both of
the reference and test images. The image buffer may include an optical
storage means. The means for generating may include a transform circuit,
which may be a Fourier transform circuit, a Fast Fourier transform
circuit, a Hadamard transform circuit, or a similar transform circuit. The
means for generating may instead include optical means, such as a lens.
The means for whitening may include means for normalizing the complex
components at each point of the two-dimensional image. The means for
constructing may include an inverse transform circuit, such as a Fourier,
Fast Fourier, Hadamard, or any other transform circuit as previously
indicated. In certain transformations, such as those using the Hadamard
approach, each point of the phase-only image may have a phase of either
zero or 180 degrees.
The invention also features a method of image comparison, which includes
forming a composite image composed of a reference image and a test image
and generating a two-dimensional image spectrum from the composite image.
The two-dimensional image spectrum is then whitened by setting the
magnitude of every point of the two-dimensional image spectrum to a
uniform level. The phase-only image of the composite image is then
constructed. Finally, values of the phase-only image exceeding a
predetermined threshold are detected representative of the location of a
difference between the reference and test image.
DISCLOSURE OF PREFERRED EMBODIMENT
Other objects, features and advantages will occur from the following
description of a preferred embodiment and the accompanying drawings, in
which:
FIG. 1 is a block diagram of an image comparison system according to this
invention;
FIG. 2 is an illustration of a composite image including a reference image
and a test image;
FIG. 3 is a graphical illustration of one slice of a reference image and
test image making up a composite image;
FIG. 4 is an illustration of the characteristic spectrum of the transformed
composite image;
FIG. 5 is an illustration of the image after whitening by normalization;
FIG. 6 is an illustration of the phase-only image;
FIG. 7 is a graphical illustration of the vector representing a point or
pixel of the image spectrum before whitening;
FIG. 8 is an illustration similar to FIG. 7 after normalization or
whitening;
FIG. 9 is a representation of the phase-only image of the reference and
test images;
FIG. 10 is a graphical illustration of the image signal after whitening
with the detector threshold levels superimposed;
FIG. 11 is a block diagram of an electronic implementation of the image
comparison system according to this invention;
FIG. 12 is a schematic representation of the implementation of the
two-dimensional transform unit of FIG. 11;
FIG. 13 is a schematic showing a network of circuits such as shown in FIG.
12;
FIG. 14 is a more detailed block diagram of the whitening unit of FIG. 11;
FIG. 15 is an optical implementation of the image comparison system of this
invention; and
FIG. 16 is a diagram showing the method of this invention.
There is shown in FIG. 1 an image comparison system 10 according to this
invention which includes a two-dimensional transform unit 12, a whitening
operation unit 14, a two-dimensional inverse transform unit 16 and a
detection unit 17. A composite image 18, FIG. 2, composed of a reference
image 20 and test image 22, is fed into the two-dimensional transform unit
12. There a transform is made of the image using Fourier, Fast Fourier,
Hadamard, or other techniques, such as cosine, M-sequence or others, using
either cartesian or polar coordinates. The image spectrum thereby produced
is delivered to the whitening operation unit 14, where the magnitude of
each point of the image spectrum is normalized to produce a uniform level
of amplitude and produce a white noise-like spectrum. The white noise-like
spectrum is then submitted to the two-dimensional inverse transform unit
16, which again performs according to a known transform technique such as
the Fourier, Hadamard or any of the others previously listed with respect
to unit 12. The phase-only image at the output of two-dimensional inverse
transform unit 16 is delivered to detector unit 17, which compares each of
the image point or pixel values to a reference threshold and responds to
those that exceed that threshold as an indication of a difference between
the reference image 20 and test image 22. For example, the defect 23 in
test image 22, FIG. 2, appears at position 23a in the phase-only image 25,
FIG. 9, which appears at the output of inverse transform unit 16. In this
inverse transform operation the phase-only image of the original composite
image is constructed. It is a phase-only image because the amplitude
levels have been eliminated in the whitening operation and only the phase
angle of the information relating to each point in the image spectrum
still remains.
The processing of the composite image through system 10 to the final
phase-only image is depicted in FIGS. 3-6, where a slice through the
composite image is represented, FIG. 3, by two triangular wave shapes 30,
32, which represent the reference image and test image respectively. The
test image has a defect 34. After the first transform operation by
two-dimensional transform unit 12, the image spectrum appears as shown in
FIG. 4, where the spectral characteristic 36 has a peak 38 due to the
repeated like components of the images, and the defect 34 is typically
contained in the higher frequency extent 40 of characteristic 36. Peak 37
is derived from the average level of the composite image. It is the
periodicity reflected by wave shapes 30 and 32 that enables the use of the
phase-only image technique to detect defects. Following this, in the
whitening step, characteristic 36, FIG. 5, is normalized, resulting in a
single uniform amplitude level 42 for all of the points in the spectrum.
Thus, peaks 37 and 38 have been decreased and the lower area of higher
frequency derivation has been increased. Inverse transformation, FIG. 6,
results in the cancellation of peaks 37, 38, and lower section 40, and the
emphasizing of the defect 34 contained in the lower section 40.
The whitening or normalizing operation can be understood by referring to
FIG. 7, which illustrates the complex value of a single point 50 of the
image, whose magnitude is represented by vector 52 having a real component
A and an imaginary component iB. When each of those components is
normalized, that is divided by .sqroot.A.sup.2 +B.sup.2, the magnitude of
each of the points in the image is made uniform, for example, at unity or
at some other value, as shown in FIG. 8, and the only variation then
remaining is the phase angle. That is the condition pictured in FIG. 5.
When applying a Hadamard transform, the whitening results in a
normalization that provides only two phase angles: zero and 180 degrees.
This is also known as a sign-only image, since zero and 180 may be viewed
as plus and minus values.
Since the normalizing or whitening operation effects a white noise-like
spectrum output 70, FIG. 10, the mean value 72 of the output is
essentially zero. The threshold, both positive and negative, 74 and 76, is
then set at a level which accepts substantially all of the output signals
70 with the exception of extreme excursions, such as 78, which are
interpreted as defects or differences between the test and the reference
image. In one application, a threshold setting at approximately seven
standard deviations provided a probability of error of one part in a
million. Since the image has been normalized in the whitening process, the
threshold level will be the same for all images of the same size, that is
having the same number of pixels, and thus a universal threshold level can
be used to apply to all applications of the system.
In one construction, an essentially electronic implementation of the image
comparison system 10a, FIG. 11, according to this invention may be made
using a control computer 80, using, for example, an Intel 8086
microprocessor, and having an image buffer 79 for receiving the test image
82 from sensor 84 and forming it into a composite image in conjunction
with the reference image from memory 86. Throughout the figures, like
parts are given like numbers and similar parts like numbers accompanied by
successive lower case letters. The composite image is then delivered by
computer 80 over line 88 to two-dimensional transform unit 12a, where the
composite image is processed as previously explained with respect to FIGS.
1-10. The phase-only image from unit 16 or the detection information 17
may then be fed back to computer 80 for processing or display on monitor
90. Although in FIG. 11 the reference image is illustrated as stored in
memory 86 and test image 82 is presented through sensor 84, this is not a
necessary limitation of the invention. For example, their sources could be
interchanged, or both could be provided through memory, or both provided
through an input sensor.
Two-dimensional transform unit 12a may be implemented with a standard
butterfly circuit 100, FIG. 12, which when used to perform a fast Fourier
transform receives pixel signals U, V at its inputs, multiplies the V
signal by the complex number W.sup.k.sub.N, and obtains at its output X
and Y, where X=U+VW.sup.k.sub.N, and Y=U-VW.sup.k.sub.N,. Butterfly
circuit 100 may be used in groups, as shown in FIG. 13, to increase the
speed of processing. Such circuits are fully explained in Theory and
Application of Digital Signal Processing, L. R. Rabiner and B. Gold,
Prentice-Hall, Englewood Cliffs, New Jersey, 1975.
The normalization process which occurs in whitening operation unit 14, as
explained in FIG. 7 and 8, employs squarer circuits 102 and 104, FIG. 14,
to square the A and B values in adder 106 to combine those values. The
combined value at the output of adder 106 is then submitted to square root
circuit 108, whose output is submitted to divider circuit 110 as the
divisor for the value A and divider 112 as the divisor for value B, which
results in the uniform value for vector 52a of FIG. 8.
In FIG. 11, in the electronic implementation of the image comparison system
of FIG. 1, the means for forming a composite image includes image buffer
79 in computer 80. Alternatively, in an optical implementation, FIG. 15,
the composite image may be formed in an optical input transducer 120 such
as a liquid crystal or on a frame of film. The composite image is
delivered to the two-dimensional transform unit 12b, which may consist
simply of a lens, which transforms and projects the composite image as a
Fourier transform in the Fourier transform plane 122. Subsequently, the
image spectrum at the Fourier transform plane 122 may be normalized in a
whitening operation unit 14b and then resubmitted to lens 12b or a similar
lens for the inverse Fourier transformation, after which detection may be
accomplished.
A simple and straightforward understanding of the method of this invention
may be understood with respect to FIG. 16, where the reference image 160
and test image 162 are delivered and formed into a composite image in step
164. Following that, there is generated in step 166 a two-dimensional
image spectrum from the composite image. Then the image spectrum is
whitened in step 168 and a reverse transform is performed to construct the
phase-only image in step 170 from the whitened image spectrum. Finally,
extreme values of amplitude are detected from the phase-only image to
determine differences between the reference image and the test image in
step 172.
Other embodiments will occur to those skilled in the art and are within the
following claims:
* * * * *
|
|
|
|
|
Description  |
|