|
Claims  |
|
|
What is claimed:
1. A method of controllably modifying a color characteristic of a colored
image that has been spatially sampled to obtain a plurality of
color-representative data values, each of which is associated with a
respective sampling location within said image comprising the steps of:
(a) defining a region within said image whereat a color characteristic may
be selectively modified;
(b) forming a visual representation of a color variation characteristic
that is bounded by a regular geometric shape, surrounding a target color;
(c) for each sampling location within said region, identifying whether or
not the color represented by its associated data value is located within
the regular geometrical shape of the color variation characteristic
defined in step (b); and
(d) for a sampling location, the color-representative data value for which
has been identified in step (c) as being located within said regular
geometrical shape, modifying its identified color-representative data
value to a value that is representative of a `destination` color.
2. A method according to claim 1, wherein said color variation
characteristic is geometrically centered at said target color.
3. A method according to claim 2, wherein said target color is determined
in accordance with a prescribed relationship among the
color-representative data values associated with plural spatial sampling
locations within said region and said regular geometrical shape.
4. A method according to claim 3, wherein said color variation
characteristic is geometrically centered at a target color corresponding
to the average of the color-representative data values associated with
selected spatial sampling locations within said region and said regular
geometrical shape.
5. A method according to claim 4, wherein step (b) comprises the steps of:
(b1) determining a first average of a plurality of color-representative
data values, for a specified spatial location within said region and a
plurality of spatial sampling locations surrounding said selected spatial
location and geometrically centering said color variation characteristic
at a color corresponding to said first average;
(b2) determining a second average of color-representative data values
associated with all of the spatial sampling locations within said region
and said regular geometrical shape;
(b3) substituting said second average of color-representative data values
for said first average so as to recenter said color variation
characteristic at a color corresponding to said second average;
(b4) repeating steps (b2) and (b3) until the difference between successive
average iterations is less than a preselected value; and
(b5) defining said target color as the center of said color variation
characteristic that was last recentered in step (b3).
6. A method according to claim 5, wherein each of said first and second
averages is a respective weighted average.
7. A method according to claim 6, wherein, for each weighted average
determined in step (b2), the geometrical shape of said color variation
characteristic is defined in accordance with a prescribed set of
geometry-defining parameters.
8. A method according to claim 6, wherein, for each weighted average
determined in step (b2), the size of said color variation characteristic
is adjusted, as necessary, to encompass a preselected number of spatial
sampling locations within said average.
9. A method according to claim 1, wherein said color variation
characteristic is an elliptically shaped chrominance variation
characteristic, the major axis of which coincides with the saturation
direction of a chrominance coordinate system and the minor axis of which
coincides with a direction orthogonal to the saturation direction of said
chrominance coordinate system.
10. A method according to claim 9, wherein the intersection of the major
and minor axes of said elliptically shaped chrominance variation
characteristic coincides with the origin of said chrominace coordinate
system, centered at said target color.
11. A method according to claim 1, wherein step (d) comprises modifying
said identified color-representative data value to said `destination`
color representative value in accordance with a prescribed relationship
between the location of said identified color data value within said color
variation characteristic and the perimeter of said regular geometrical
shape.
12. A method according to claim 11, wherein step (d) comprises the steps of
(d1) for a sampling location the color-representative data value for which
has been identified in step (c) as lying within said regular geometrical
shape, specifying a color representative value that is representative of
said `destination` color, and
(d2) adjusting the `destination` color representative value specified in
step (d1) in accordance with a prescribed relationship between the
geometrical location of said identified color data value within said
regular geometrical shape and the border of said prescribed regular
geometrical shape.
13. A method according to claim 12, wherein said color variation
characteristic is a an elliptically shaped chrominance variation
characteristic, the major axis of which coincides with the saturation
direction of a chrominance coordinate system and the minor axis of which
coincides with a direction orthogonal to the saturation direction of said
chrominance coordinate system.
14. A method according to claim 13, wherein the intersection of the major
and minor axes of said elliptically shaped chrominance variation
characteristic coincides with the origin of said chrominance coordinate
system centered at said target color.
15. A method according to claim 12, wherein step (d2) includes adjusting
the value of the chrominance of said `destination` color specified in step
(d1) by a chrominance weight that is established in accordance with a
prescribed relationship between the geometrical location of said
identified color data value within said regular geometrical shape and the
border of said regular geometrical shape, and defining the value of the
luminance of said `destination` color specified in step (d1) in accordance
with said chrominance weight.
16. A method according to claim 15, wherein step (d2) includes the step of
defining the value of the luminance of said `destination` color specified
in step (d1) as the value of the luminance of said image at said
identified sampled location, modified by an offset based upon the
difference in luminance of said target color and said `destination` color,
said difference in luminance being weighted in accordance with said
chrominance weight and a luminance weight that is established in
accordance with a prescribed relationship between the geometrical location
of said identified color data value and the extent of a prescribed range
of luminance variation projected from said regular geometrical shape.
17. A method according to claim 1, wherein step (b) comprises the step of
defining said color variation characteristic in terms of a chrominance
coordinate system the origin of which is centered at said target color,
said color variation characteristic having a regular geometrical shape
that is centered about the origin of said chrominance coordinate system.
18. A method according to claim 17, wherein step (c) comprises, for each
sampling location within said region, defining the color represented by
its associated data value in terms of chrominance and luminance
components, and identifying whether or not the its chrominance components
lies within the regular geometrical shape of the color variation
characteristic defined in step (b).
19. A method according to claim 18, wherein step (d) comprises, for a
sampling location the chrominance component of the color-representative
data value for which has been identified in step (c) as lying within said
regular geometrical shape, modifying the value of the chrominance
component thereof to a chrominance value that is associated with of a
`destination` color.
20. A method according to claim 19, wherein step (d) comprises the steps of
(d1) for a sampling location the chrominance component for which has been
identified in step (c) as lying within said regular geometrical shape,
specifying a chrominance value that is associated with said `destination`
color, and
(d2) adjusting the `destination` color associated chrominance value
specified in step (d1) in accordance with a prescribed relationship
between the geometrical location of said identified chrominance component
within said regular geometrical shape and the border of said prescribed
regular geometrical shape.
21. A method according to claim 20, wherein step (d2) includes adjusting
the value of the chrominance component of said `destination` color
specified in step (d1) by a chrominance weight that is established in
accordance with a prescribed relationship between the geometrical location
of said identified chrominance component within said regular geometrical
shape and the border of said regular geometrical shape, and defining the
value of the luminance component of said `destination` color specified in
step (d1) in accordance with said chrominance weight.
22. A method according to claim 21, wherein step (d2) includes the step of
defining the value of the luminance component of said `destination` color
specified in step (d1) as the value of the luminance component of said
image at said identified sampled location, modified by an offset based
upon the difference in the value of the luminance component of said target
color and that of said `destination` color, said luminance value
difference being weighted in accordance with said chrominance weight and a
luminance weight that is established in accordance with a prescribed
relationship between the geometrical location of the luminance component
that is associated with said identified chrominance component location and
the extent of a prescribed range of luminance variation projected from
said regular geometrical shape.
23. A method according to claim 22, wherein said color variation
characteristic is a an elliptically shaped chrominance variation
characteristic, the major and minor axes of which intersect at the origin
of said chrominance coordinate system, and wherein said major axis
coincides with the saturation direction of said chrominance coordinate
system and said minor axis coincides with a direction orthogonal to the
saturation direction of said chrominance coordinate system.
24. A color image processing system comprising:
an image converter for generating a plurality of output signals
representative of color characteristics of a plurality of spatial
locations within a color image, prescribed color characteristics of which
are to be controllably modified;
a digital converter coupled to receive the output signals from said image
converter and generating a plurality of digital code signals, respectively
representative of the color characteristics of said image at said
plurality of spatial locations; and
a digital signal processor which receives digital codes generated by said
digital converter and controllably modifies selected ones of said digital
codes so as to effect a modification of a color characteristic of said
color image in accordance with a program through which the following steps
(a)-(d) are executed:
(a) defining a spatial region within said image whereat a color
characteristic may be selectively modified;
(b) forming a visual representation of a color variation characteristic
that is bounded by a regular geometric shape, surrounding a target color;
(c) for each sampling location within said spatial region, identifying
whether or not the color represented by its associated digital code is
located within the regular geometrical shape of the color variation
characteristic defined in step (b); and
(d) for a sampling location, the digital code for which has been identified
in step (c) as being representative of a color located within said regular
geometrical shape, modifying its identified digital code to a changed
digital code which is representative of a `destination` color.
25. A system according to claim 24, wherein said color variation
characteristic is an elliptically shaped chrominance variation
characteristic, the major axis of which coincides with the saturation
direction of a chrominance coordinate system and the minor axis of which
coincides with a direction orthogonal to the saturation direction of said
chrominance coordinate system.
26. A system according to claim 25, wherein the intersection of the major
and minor axes of said elliptically shaped chrominance variation
characteristic coincides with the origin of said chrominance coordinate
system, centered at said target color.
27. A system according to claim 24, wherein step (d) comprises modifying
said identified digital code to said changed code in accordance with a
prescribed relationship between the location of the color represented by
said digital code within said color variation characteristic and the
perimeter of said regular geometrical shape.
28. A system according to claim 27, wherein step (d) comprises the steps of
(d1) for a sampling location the color represented by the digital code for
which has been identified in step (c) as lying within said regular
geometrical shape, specifying a color representative digital code that is
representative of said `destination` color, and
(d2) adjusting said `destination` color representative digital code
specified in step (d1) in accordance with a prescribed relationship
between the geometrical location of said identified color within said
regular geometrical shape and the border of said prescribed regular
geometrical shape.
29. A system according to claim 28, wherein said color variation
characteristic is a an elliptically shaped chrominance variation
characteristic, the major axis of which coincides with the saturation
direction of a chrominance coordinate system and the minor axis of which
coincides with a direction orthogonal to the saturation direction of said
chrominance coordinate system.
30. A system according to claim 29, wherein the intersection of the major
and minor axes of said elliptically shaped chrominance variation
characteristic coincides with the origin of said chrominance coordinate
system centered at said target color.
31. A system according to claim 28, wherein step (d2) includes adjusting
the value of the chrominance of said `destination` color specified in step
(d1) by a chrominance weight that is established in accordance with a
prescribed relationship between the geometrical location the identified
color within said regular geometrical shape and the border of said regular
geometrical shape, and defining the value of the luminance of said
`destination` color specified in step (d1) in accordance with said
chrominance weight.
32. A system according to claim 31, wherein step (d2) includes the step of
defining the value of the luminance of said `destination` color specified
in step (d1) as the value of the luminance of said image at said
identified sampled location, modified by an offset based upon the
difference in luminance of said target color and said `destination` color,
said difference in luminance being weighted in accordance with said
chrominance weight and a luminance weight that is established in
accordance with a prescribed relationship between the geometrical location
of said identified color and the extent of a prescribed range of luminance
variation projected from said regular geometrical shape.
33. A system according to claim 24, wherein step (b) comprises the step of
defining said color variation characteristic in terms of a chrominance
coordinate system the origin of which is centered at said target color,
said color variation characteristic having a regular geometrical shape
that is centered about the origin of said chrominance coordinate system.
34. A system according to claim 24, wherein step (c) comprises, for each
sampling location within said spatial region, defining the color
represented by its associated digital code in terms of chrominance and
luminance components, and identifying whether or not the its chrominance
component lies within the regular geometrical shape of the color variation
characteristic defined in step (b).
35. A system according to claim 34, wherein step (d) comprises, for a
sampling location the chrominance component of the color value represented
by the digital code for which has been identified in step (c) as lying
within said regular geometrical shape, modifying the value of the
chrominance component thereof to a chrominance value that is associated
with of a `destination` color.
36. A system according to claim 35, wherein step (d) comprises the steps of
(d1) for a sampling location the chrominance component for which has been
identified in step (c) as lying within said regular geometrical shape,
specifying a chrominance code that is associated with said `destination`
color, and
(d2) adjusting the `destination` color associated chrominance code
specified in step (d1) in accordance with a prescribed relationship
between the geometrical location of said identified chrominance component
within said regular geometrical shape and the border of said prescribed
regular geometrical shape.
37. A system according to claim 36, wherein step (d2) includes adjusting
the value of the chrominance component of said `destination` color
specified in step (d1) by a chrominance weight that is established in
accordance with a prescribed relationship between the geometrical location
of said identified chrominance component within said regular geometrical
shape and the border of said regular geometrical shape, and defining the
value of the luminance component of said `destination` color specified in
step (d1) in accordance with said chrominance weight.
38. A system according to claim 37, wherein step (d2) includes the step of
defining the code value of the luminance component of said `destination`
color specified in step (d1) as the code value of the luminance component
of said image at said identified sampled location, modified by an offset
based upon the difference in the value of the luminance component of said
target color and that of said `destination` color, said luminance value
difference being weighted in accordance with said chrominance weight and a
luminance weight that is established in accordance with a prescribed
relationship between the geometrical location of the luminance component
that is associated with said identified chrominance component location and
the extent of a prescribed range of luminance variation projected from
said regular geometrical shape.
39. A system according to claim 38, wherein said color variation
characteristic is a an elliptically shaped chrominance variation
characteristic, the major and minor axes of which intersect at the origin
of said chrominance coordinate system, and wherein said major axis
coincides with the saturation direction of said chrominance coordinate
system and said minor axis coincides with a direction orthogonal to the
saturation direction of said chrominance coordinate system.
40. A system according to claim 24, wherein said color variation
characteristic is geometrically centered at said target color.
41. A system according to claim 40, wherein said target color is determined
in accordance with a prescribed relationship among the
color-representative data values associated with plural spatial sampling
locations within said region and said regular geometrical shape.
42. A system according to claim 41, wherein said color variation
characteristic is geometrically centered at a target color corresponding
to the average of the color-representative data values associated with
selected spatial sampling locations within said region and said regular
geometrical shape.
43. A system according to claim 42, wherein step (b) comprises the steps
of:
(b1) determining a first average of a plurality of color-representative
data values, for a specified spatial location within said region and a
plurality of spatial sampling locations surrounding said selected spatial
location and geometrically centering said color variation characteristic
at a color corresponding to said first average;
(b2) determining a second average of color-representative data values
associated with all of the spatial sampling locations within said region
and said regular geometrical shape;
(b3) substituting said second average of color-representative data values
for said first average so as to recenter said color variation
characteristic at a color corresponding to said second average;
(b4) repeating steps (b2) and (b3) until the difference between successive
average iterations is less than a preselected value; and
(b5) defining said target color as the center of said color variation
characteristic that was last recentered in step (b3).
44. A system according to claim 43, wherein each of said first and second
averages is a respective weighted average.
45. A system according to claim 44, wherein, for each weighted average
determined in step (b2), the geometrical shape of said color variation
characteristic is defined in accordance with a prescribed set of
geometry-defining parameters.
46. A system according to claim 44, wherein, for each weighted average
determined in step (b2), the size of said color variation characteristic
is adjusted, as necessary, to encompass a preselected number of spatial
sampling locations within said average. |
|
|
|
|
Claims  |
|
|
Description  |
|
|
FIELD OF THE INVENTION
The present invention relates in general to color image processing and is
particularly directed to a mechanism for controllably recoloring one or
more selected regions of a color image using a modification discriminator
the boundaries of which are defined in accordance with a regular
geometrical shape, such as a circle or an ellipse.
BACKGROUND OF THE INVENTION
Processor-based color correction has become a widely used `video proofing`
tool for a number of image processing applications, such as graphics arts
workstations and color photoprinting, wherein modification or `retouching`
of a specific region of an image, for example, the removal of the
`red-eye` phenomenon in a flash color photo containing a human face (or
similarly, the green or blue tinge to the eyes of animals) can correct an
otherwise less than satisfactory picture. For a discussion of the color
correction process, in general, and a number of mechanisms that have been
proposed to effect correction or modification of an image, attention may
be directed to the U.S. patents to Dalke et al, U.S. Pat. No. 4,488,245,
Klie et al, U.S. Pat. No. 4,486,772, Schure et al, U.S. Pat. No.
4,189,743, Kuhn et al, U.S. Pat. No. 4,464,677, Eicher et al, U.S. Pat.
No. 4,409,614, Pugsley, U.S. Pat. Nos. 3,893,166, 3,894,178, 3,739,078 and
3,965,289, Heltman et al, U.S. Pat. No. 4,220,965, Dobouney, U.S. Pat. No.
3,600,505, Cousin, U.S. Pat. No. 4,007,327 and Stern, U.S. Pat. No.
4,189,744. In these (patented) systems, such as that described by the
Dalke et al, the ability to effect independent precision modification of
any selected portion of a digitized color image requires the use of a very
large number of signal samples, which inherently increases the signal
processing complexity of the process.
SUMMARY OF THE INVENTION
In accordance with the present invention, precision recoloring of one or
more selected spatial regions of a color image is accomplished by means of
a digital image signal processing mechanism which employs a chrominance
modification discriminator that conforms with the tendency of an object's
color to exhibit a fairly narrow range of hue over a broader range of
saturation. In addition, the mechanism uses weighting coefficients through
which chrominance values are corrected to adjust the associated luminance
values, so as to allow specular highlights in objects, such as glints in
eyes (for correction of the `red-eye` phenomenon) to be unaffected, while
the remainder of the object may be darkened; still, the highlights are
color-changed to match the rest of the object.
More particularly, pursuant to a preferred embodiment of the present
invention, selective color modification of an image that has been
spatially sampled to obtain a plurality of color-representative data
values, each of which is associated with a respective sampling location
within the image, is effected by initially defining one or more spatial
regions within the image (such as the pupil of the eye) a color
characteristic of which (e.g. the `red-eye` phenomenon) is to be
selectively modified. In order to determine whether or not the color of an
image sample within a spatial region is to be modified, the value of the
chrominance component of each sample within the region is compared with a
regularly shaped chrominance variation discriminator that surrounds a
prescribed `target` or `reference` color of interest (e.g. red, in the
case of a `red-eye` correction).
The target color (the `red eye` color to be changed) may be determined by
an operator observing the image of interest displayed on a video monitor.
By invoking a video zoom on the image by pixel replication increase its
size to where each individual pixel is readily identifiable, and by the
manipulation of a mouse or joystick, the operator is able to point to an
individual pixel that `best exemplifies or represents` the color to be
changed.
Because an object's color tends to exhibit a fairly narrow range of hue
over a broader range of saturation, the color variation characteristic is
preferably a regular narrow geometrical shape, such as an elliptically
configured chrominance variation characteristic, the major axis of which
coincides with the saturation direction of the chrominance plane within a
luminance, chrominance (Y,I,Q) coordinate system and the minor axis of
which coincides with a direction orthogonal to the saturation direction of
the chrominance plane, so that the intersection of the major and minor
axes of the elliptical chrominance discriminator coincides with the origin
of the chrominance plane centered at the `target` color.
For each sampling location within the spatial region, the value of the
chrominance component is examined to determine whether or not it falls
within or without the elliptical chrominance discriminator. If the value
of the chrominance component falls within the ellipse, it is modified to a
new or `destination` chrominance value (e.g. that associated with the
color black). Otherwise, it is left unaltered. The magnitude of this
modification is based upon where, within the discriminator ellipse, the
chrominance value of the sample of interest falls.
In particular, the difference between the chrominance value of the sample
and the new chrominance value is multiplied by a weighting coefficient,
the value of which is dependent upon the separation between the
geometrical location (in the chrominance plane) of the chrominance
component of the image sample and the border of the ellipse. The resulting
product is then summed with the value of the chrominance component of the
sample, to obtain a final chrominance value for the modified sample point.
In a similar fashion, the value of the luminance component for the modified
sample point is modified by an offset based upon the difference in the
value of the luminance component of the target color and that of the new
color. This luminance value difference is multiplied by a luminance
weighting coefficient that is established in accordance with the product
of the previously determined chrominance weighting coefficient and a
prescribed relationship between the geometrical location of the luminance
component for the sample of interest and the extent of a prescribed range
of luminance variation projected from the elliptical discriminator along
the luminance axis of the Y,I,Q coordinate system. This luminance value
difference is then added as an offset to the luminance value of the sample
to obtain a final luminance value for the modified sample point. The
modified chrominance and luminance values are then converted into RGB
values for application to an image output device (e.g. color display,
print engine).
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of a digital image processing system for
performing selective color correction of an image;
FIG. 2 shows a spatial mask applied for correction of the `red-eye`
phenomenon;
FIG. 3 diagrammatically illustrates a chrominance (I,Q) plane, containing
an elliptical chroma-discriminator;
FIG. 4 diagrammatically shows a luminance, chrominance coordinate system in
which the color change along the perimeter of an elliptical discriminator
is softened; and
FIG. 5 shows an elliptical cylinder characteristic for a range of luminance
values projected orthogonally of the chrominance discriminator plane.
DETAILED DESCRIPTION
Before describing in detail the particular improved localized image
recoloring mechanism in accordance with the present invention, it should
be observed that the present invention resides primarily in a novel
combination of signal processing steps that are readily executed using
conventional communication and signal processing circuits and components.
Accordingly, the structure, control and arrangement of such conventional
circuits and components have been illustrated in the drawings by readily
understandable block diagrams which show only those specific details that
are pertinent to the present invention, so as not to obscure the
disclosure with structural details which will be readily apparent to those
skilled in the art having the benefit of the description herein. Thus, the
block diagram illustrations of the Figures do not necessarily represent
the mechanical structural arrangement of the exemplary system, but are
primarily intended to illustrate the major structural components of the
overall image data compression and transmission system in a convenient
functional grouping, whereby the present invention may be more readily
understood.
As pointed out previously, the present invention is directed to an
improvement in (digital) color image processing and is particularly
directed to a mechanism for controllably recoloring one or more selected
regions of a color image by means of a color modification discriminator
the boundaries of which are defined in accordance with a regular
geometrical shape, such as a circle or an ellipse. Because the color image
to be controllably modified is sampled and digitally formatted, the
recoloring process is readily executed by means of a programmed general
purpose digital computer, such as a Fortran-programmed VAX cluster
processor, manufactured by Digital Equipment Corporation and, for purposes
of the present description, will be understood to be so implemented.
However, it should be realized that a custom configured, special purpose
digital processor may be employed to carry out the sequence of signal
processing steps, through which the color image is selectively corrected,
described below.
A block diagram of an overall image processing system is shown in FIG. 1 as
comprising an image source 10 such as an image sensor, film scanner or
digital image recorder, which outputs digitally encoded, image
representative signals representative of the color content (red (R), green
(B) and blue (B) color components) of the image at an NXM array of spatial
sample points across image 12. These color component representative
digital signals are coupled to a programmed general purpose digital
computer 14, such as the above-mentioned VAX cluster processor, which is
programmed to execute the sequence of signal processing steps to be
described below with reference to FIGS. 2-5, and through which the digital
color image representative signals output by source 10 are controllably
modified, in order to effect the color correction desired. (A program
listing of the source code for this program is supplied as a separate
appendix A). The modified color image signals from processor 14 are
converted into analog format by an digital-to-analog converter 16 and then
coupled to a downstream image output device 18, such as a color print
engine or display, whereat the color corrected image is reconstructed.
As mentioned briefly above, the color correction mechanism of the present
invention allows one or more selected portions of color image having a
specified color (and density) to be changed or modified to another color
(and density), while leaving the detail, or luminance contour unaffected.
A portion of the image which has been selected for color correction is
defined in terms of both spatial and colorimetric boundaries, each of
which uses simple parameters. As a consequence, objects within a picture,
such as `red-eye`s in a flash photo, can be realistically "retouched" or
"painted", by means of a relatively simple process.
The process begins by defining the spatial region or regions within the
object that are to be subjected to the color correction process. Color
samples for pixel locations outside the spatial region are excluded or
by-passed, being left as-is. With reference to FIG. 2, using the example
of a correction of the `red-eye phenomenon, this means that a spatial mask
region, such as rectangular region 20, is defined such that it surrounds
the pupil 22, which is to be recolored (to a neutral dark). It should be
observed that the shape of mask 20 need not be rectangular, but may be, in
general, a polygon or have a curvilinear shape. The rectangular shape of
mask 20 is chosen merely as an example, and because of the ease in which
it is defined in terms of signal processing parameters. Since the
correction mechanism also is dependent upon on chromatic properties of the
object, and not simply the extent of the mask boundaries, what is
important is that region 20 be sized and shaped to encompass the entirety
of the image portion of interest, without encompassing other subject
matter of the same target color. In the example shown in FIG. 2, region 20
covers the `red-eye` pupil 22 and non-discolored eye and facial features
(that will not be color corrected because they do not have the same
chromatic properties as the pupil).
It should be observed that a single image often contains more than one
object to be corrected. In the present example of `red-eye` correction,
two to ten operations for a single image is not uncommon. While the same
process could be repeated for each object, in accordance with a preferred
embodiment of the invention (and as detailed in the source code listing),
all objects are processed within a single operation.
Given the spatial boundaries of the image to which the color correction
mechanism applies, the process according to the present invention next
examines the color content of each sample point within the masked region.
As mentioned above, the target color (the `red eye` color to be changed)
may be determined by an operator observing the image of interest displayed
on a video monitor. For this purpose the operator may employ conventional
color image processing equipment, such as that manufactured by Recognition
Concepts Inc, and invoke its video zoom mechanism, so as to enlarge the
color image sufficiently by pixel replication up to a size where each
individual pixel is readily identifiable. By manipulation of a mouse or
joystick, the operator is able to point to an individual pixel that `best
exemplifies or represents` the color to be changed. Rather than use the
color of a particular pixel as the target color, the average of the R, G
and B values of this pixel and a specified number of its closest neighbors
(e.g. its surrounding eight pixels within a three by three pixel
sub-array) is computed.
Because the color signature of an object may be more accurately defined by
converting its RGB values to a two-dimensional shape in chrominance space,
the color-representative signals for each of the sample locations with
mask region 20 in FIG. 2 are converted to their chrominance (I,Q) and
luminance (Y) components using a conventional transformation process, such
as is employed for color television applications. One suitable set of
conversion equations that may be used for this process is:
Y=0.300R+0.590G+0.110B
I=0.600R--0.280G--0.320B
Q=0.210R--0.520G+0.310B.
Alternatively, other luminance, chrominance conversion equations, such as
"ATD" and "T SPACE" conversion sets may be used. For a modified "ATD"
transform, the equation is:
Y=0.5R+0.5G+0.0B
I(or Q)=0.5R-0.5G+0.0B
Q(or I)=0.25R+0.25G-0.5B.
For a "T SPACE" transform, the equation is:
##EQU1##
Within the chrominance (I,Q) plane, diagrammatically illustrated in FIG. 3,
it has been observed that an object's color tends to exhibit a fairly
narrow range of hue, while its saturation covers a broader range. As a
consequence, when examining the chrominance components of the object of
interest (a red pupil, in the present example) one can expect the
chrominance conversion values (I,Q) to be located within a narrow region
surrounding the `target` color (red) that is to be changed. Pursuant to
one feature of the present invention, this expectancy is addressed by
defining a prescribed geometrical shape, preferably a simple regular
shape, such as a circle or an ellipse, about the target color (represented
by an average of an operator-selected pixel and some number of surrounding
closest neighbor pixels, as described above) and limiting the color
correction process to only those color data values within the spatial mask
region 20 that are also contained within the chrominance region defined by
this shape.
More particularly, as diagrammatically shown in FIG. 3, in the chrominance
(I,Q) plane, at the chrominance conversion point Pt for the target color
(e.g. red), a saturation distance St (from the origin of the I and Q axes
and a hue angle Ht (relative to I axis) are defined. Then, about this
target location (I,Q) a range of variation in hue and saturation is
delineated by the above-mentioned regular shape, such as an ellipse 30.
Because the expected variation in hue is relatively narrow (compared to
the degree of variation in saturation) the hue component can be considered
to be effectively orthogonal to the saturation component, as identified by
axis H, which passes through target point Pt. By placing ellipse 30 such
that it is symmetrical about target point Pt and is defined in accordance
with a prescribed expectancy of variation in saturation and hue, then
geometrically, ellipse 30 will be defined such that its major axis 30M is
coincident with the saturation axis S and it minor axis 30m is coincident
with the H axis. This ellipse is then used to determine whether or not the
color of an image sample that falls within spatial region 20 is to be
modified.
For this purpose, for each sampling location that falls within the spatial
mask region 20, the value of its chrominance component (Is,Qs) of a
respective sample within region 20 is examined to determine whether it
falls within the perimeter of ellipse 30, which is effectively centered
about the `targe | | |