US 7486418 B2 Abstract In a digital image having pixels p
_{i }(i=1,2, . . . ) and a brightness B(p_{i}) at each pixel p_{i}, the contrast editing is performed by replacing the brightness B(p_{i}) with B*(p_{i})=B_{avg} ^{1−ε}(p_{i})×B_{o} ^{ε}(p_{i}), where ε is a positive constant other than 1, and B_{avg }is a weighted average of the B values in an image region R(p_{i}) containing the pixel p_{i}. The image can be a color image, with color represented using digital values B (brightness), e and f such that B=√{square root over (D^{2}+E^{2}+F^{2})}, e=E/B, f=F/B, where DEF is a linear color coordinate system. Alternatively, color can be represented using digital values B, C (chroma) and H (hue), where cos C=D/B and tan H=E/F. The contrast can be edited without a color shift (i.e. without changing the chromaticity coordinates) by changing the B coordinate and leaving unchanged the other coordinates e and f or C and H. Sharpness can be edited using the same techniques with a small region R(p_{i}).Claims(34) 1. A circuitry-implemented method comprising image editing, the method comprising:
(1) obtaining digital data for image portions p
_{1}, p_{2}, . . . , wherein for each image portion p (p=p_{1}, p_{2}, . . . ), the digital data represent coordinates of a color S(p) of the portion p in a first coordinate system, wherein for a color S having tristimulus values T_{1}, T_{2}, T_{3 }in a second coordinate system, the coordinates of the color S in the first coordinate system are coordinates S_{1}, S_{2}, S_{3}, or a linear transformation of the coordinates S_{1}, S_{2}, S_{3}, wherein:(A) the coordinate S
_{1 }is defined by a B value
B=√{square root over (g_{11} T _{1} ^{2} +g _{22} T _{2} ^{2} +g _{33} T _{3} ^{2} +g _{12} T _{1} T _{2} +g _{13} T _{1} T _{3} +g _{23} T _{2} T _{3})}wherein g
_{11}, g_{22}, g_{33}, g_{12}, g_{13}, g_{23 }are predefined constants, and g_{11}, g_{22}, g_{33 }are not equal to zero, or
(B) the coordinate S
_{1 }is defined by the B value and by a sign of a predefined function of one or more of T_{1}, T_{2}, T_{3};(2) for at least one image portion p
_{i }which is one of p_{1}, p_{2}, . . . and whose respective color S(p_{i}) has tristimulus values T_{1}=T_{1}(p_{i}), T_{2}=T_{2}(p_{i}), T_{3}=T_{3}(p_{i}) in the second coordinate system and has a B value B(p_{i}), obtaining color coordinates in the first color coordinate system of a modified color S*(p_{i}) which has tristimulus values T_{1}=T_{1}*(p_{i}), T_{2}=T_{2}*(p_{i}), T_{3}=T_{3}*(p_{i}) in the second coordinate system and has a B value B*(p_{i}) such that:wherein:
ƒ is a predefined strictly increasing non-identity function; and
B
_{avg}(p_{i}) is a function of the B values of image portions in an image region R(p_{i}) containing a plurality of image portions including the portion p_{i}.2. The method of
_{min}(p_{i})≦B_{avg}(p_{i})≦B_{max}(p_{i}), wherein B_{min}(p_{i}) is the minimum of the B values in the region R(p_{i}), and B_{max}(p_{i}) is the maximum of the B values in the region R(p_{i}).3. The method of
_{i }with each image region R(p_{i}) having a predefined geometry with respect to the respective portion p_{i}.4. The method of
_{i}) contains all said image portions.5. The method of
_{i}) contains at most 30% of said pixels.6. The method of
_{i}) contains at least 10% of said pixels.7. The method of
_{i}) contains at most 1% of said pixels.8. The method of
_{i}) is contained in a rectangle of at most 31 pixels by 31 pixels, the rectangle being centered at the pixel p_{i}.9. The method of
receiving a command to edit an image comprising said image portions;
determining if the command is a command of a first type or a command of a second type;
if the command is a command of a first type, then performing the operation (2) with the image region R(p
_{i}) being contained in a rectangle of at most 31 pixels by 31 pixels, the rectangle being centered at the pixel p_{i; } if the command is of a second type, than performing the operation (2) with the image region R(p
_{i}) comprising at least 10% of the pixels.10. The method of
11. The method of
_{avg }is a weighted average of the B values of the image region R(p_{i}), and the sum of the weights is equal to 1.12. The method of
_{2}/B and T_{3}/B for the color S(p_{i}) are the same as for the color S*(p_{i}).13. The method of
_{1}/B for the color S(p_{i}) is the same as for the color S*(p_{i}).14. The method of
B=√{square root over (α_{1} ^{2}(T _{1} ,T _{2} ,T _{3})+α_{2} ^{2}(T _{1} ,T _{2} ,T _{3})+α_{3} ^{2}(T_{1},T_{2},T_{3}))}{square root over (α_{1} ^{2}(T _{1} ,T _{2} ,T _{3})+α_{2} ^{2}(T _{1} ,T _{2} ,T _{3})+α_{3} ^{2}(T_{1},T_{2},T_{3}))}{square root over (α_{1} ^{2}(T _{1} ,T _{2} ,T _{3})+α_{2} ^{2}(T _{1} ,T _{2} ,T _{3})+α_{3} ^{2}(T_{1},T_{2},T_{3}))}wherein
α _{1}(T _{1} ,T _{2} ,T _{3})=α_{11} ×T _{1}+α_{12} ×T _{2}+α_{13} ×T _{3 } α _{2}(T _{1} ,T _{2} ,T _{3})=α_{21} ×T _{1}+α_{22} ×T _{2}+α_{23} ×T _{3 } α _{3}(T _{1} ,T _{2} ,T _{3})=α_{31} ×T _{1}+α_{32} ×T _{2}+α_{33} ×T _{3 } wherein α
_{11}, α_{12}, α_{13}, α_{21}, α_{22}, α_{23}, α_{31}, α_{32}, α_{33 }are predefined numbers such that the following matrix Λ is non-degenerate:15. The method of
_{1}(T_{1},T_{2},T_{3}), α_{2}(T_{1},T_{2},T_{3}), α_{3}(T_{1},T_{2},T_{3}) are tristimulus values corresponding to 70%-orthonormal color matching functions.16. The method of
_{1}(T_{1},T_{2},T_{3}), α_{2}(T_{1},T_{2},T_{3}), α_{3}(T_{1},T_{2},T_{3}) are tristimulus values corresponding to 90%-orthonormal color matching functions.17. The method of
the value T
_{1 }is one of values D, E, F, the value T_{2 }is another one of D, F, F, and the value T_{3 }is the third one of D, F, F, wherewhere the matrix A has elements which, up to rounding, are as follows:
where X, Y, Z are the coordinates of the color S in the CIE 1931 XYZ color coordinate system for a 2° field;
wherein up to a constant multiple, Λ is a 70%-orthonormal matrix.
18. Circuitry for performing the method of
19. One or more computer-readable mediums comprising computer instructions to cause a computer system to perform the method of
20. A circuitry-implemented method comprising image editing, the method comprising:
(1) obtaining digital data for image portions p
_{1}, p_{2 }. . . , wherein for each image portion p (p=p_{1},p_{2}, . . . ), the digital data represent a brightness B(p) of the portion p;(2) for at least one image portion p
_{i}, which is one of p_{1},p_{2}, . . . , obtaining a brightness B* of a modified image, such that:wherein:
ƒ is a predefined strictly increasing non-identity function; and
B
_{avg}(p_{i}) is a function of the brightness values B(p_{j}) of image portions p_{j }in an image region R(p_{i}) containing the portion p_{1}.21. The method of
_{i}, with each image region R(p_{i}) having a predefined geometry with respect to the respective portion p_{i}.22. The method of
_{i}) contains all said image portions.23. The method of
_{i}) contains at most 30% of said pixels.24. The method of
_{i}) contains at least 10% of said pixels.25. The method of
_{i}) contains at most 1% of said pixels.26. The method of
_{i}) is contained in a rectangle of at most 31 pixels by 31 pixels, the rectangle being centered at the pixel p_{i}.27. The method of
receiving a command to edit an image comprising said image portions;
determining if the command is a command of a first type or a command of a second type;
if the command is a command of a first type, then performing the operation (2) with the image region R(p
_{i}) being contained in a rectangle of at most 31 pixels by 31 pixels, the rectangle being centered at the pixel p_{i};if the command is of a second type, than performing the operation (2) with the image region R(p
_{i}) comprising at least 10% of the pixels.28. The method of
29. Circuitry for performing the method of
30. One or more computer-readable mediums comprising computer instructions to cause a computer system to perform the method of
31. The method of
B*(p _{i})=B _{avg} ^{1−ε}(p _{i})×B ^{ε}(p _{i})wherein ε a positive constant other than 1, and B
_{avg }is the mean of the B values of the image region R(p_{i}).32. The method of
B*(p _{i})=B _{avg} ^{1−ε}(p _{i})×B ^{ε}(p _{i})wherein ε is a positive constant other than 1, and B
_{avg }is a weighted average of the brightness values of the image region R(p_{i}).33. A data transmission method comprising transmitting a computer program over a network link, wherein the computer program is operable to cause a computer system to perform the method of
34. A data transmission method comprising transmitting a computer program over a network link, wherein the computer program is operable to cause a computer system to perform the method of
Description The present application is a continuation-in-part of U.S. patent application Ser. No. 11/321,443, filed Dec. 28, 2005 by Sergey N. Bezryadin, entitled “COLOR EDITING (INCLUDING BRIGHTNESS EDITING) USING COLOR COORDINATE SYSTEMS INCLUDING SYSTEMS WITH A COORDINATE DEFINED BY A SQUARE ROOT OF A QUADRATIC POLYNOMIAL IN TRISTIMULUS VALUES AND, POSSIBLY, BY A SIGN OF A FUNCTION OF ONE OR MORE OF TRISTIMULUS VALUES”, incorporated herein by reference. The present application is also a continuation-in-part of U.S. patent application Ser. No. 11/322,111, filed Dec. 28, 2005 by Sergey N. Bezryadin, entitled “COLOR COORDINATE SYSTEMS INCLUDING SYSTEMS WITH A COORDINATE DEFINED BY A SQUARE ROOT OF A QUADRATIC POLYNOMIAL IN TRISTIMULUS VALUES AND, POSSIBLY, BY A SIGN OF A FUNCTION OF ONE OR MORE OF TRISTIMULUS VALUES”, incorporated herein by reference. The present invention relates to editing of digital images, including both color and monochromatic images. A digital representation of an image can be stored in a storage device (e.g. a computer memory, a digital video recorder, or some other device). Such representation can be transmitted over a network, and can be used to display the image on a computer monitor, a television screen, a printer, or some other device. The image can be edited using a suitable computer program. Color is a sensation caused by electromagnetic radiation (light) entering a human eye. The light causing the color sensation is called “color stimulus”. Color depends on the radiant power and spectral composition of the color stimulus, but different stimuli can cause the same color sensation. Therefore, a large number of colors can be reproduced (“matched”) by mixing just three “primary” color stimuli, e.g. a Red, a Blue and a Green. The primary stimuli can be produced by three “primary” light beams which, when mixed and reflected from an ideal diffuse surface, produce a desired color. The color can be represented by its coordinates, which specify the intensities of the primary light beams. For example, in linear RGB color coordinate systems, a color S is represented by coordinates R, G, B which define the intensities of the respective Red, Green and Blue primary light beams needed to match the color S. If P(λ) is the radiance (i.e. the energy per unit of time per unit wavelength) of a light source generating the color S, then the RGB coordinates can be computed as: The RGB system of As seen from New linear color coordinate systems can be obtained as non-degenerate linear transformations of other systems. For example, the 1931 CIE XYZ color coordinate system for a 2° field is obtained from the CIE RGB system of
There are also non-linear color coordinate systems. One example is a non-linear sRGB system standardized by International Electrotechnical Commission (IEC) as IEC 61966-2-1. The sRGB coordinates can be converted to the XYZ coordinates (4) or the CIE RGB coordinates (1). Another example is HSB (Hue, Saturation, Brightness). The HSB system is based on sRGB. In the HSB system, the colors can be visualized as points of a vertical cylinder. The Hue coordinate is an angle on the cylinder's horizontal circular cross section. The pure Red color corresponds to Hue=0°; the pure Green to Hue=120°; the pure Blue to Hue=240°. The angles between 0° and 120° correspond to mixtures of the Red and the Green; the angles between 120° and 240° correspond to mixtures of the Green and the Blue; the angles between 240° and 360° correspond to mixtures of the Red and the Blue. The radial distance from the center indicates the color's Saturation, i.e. the amount of White (White means here that R=G=B). At the circumference, the Saturation is maximal, which means that the White amount is 0 (this means that at least one of the R, G, and B coordinates is 0). At the center, the Saturation is 0 because the center represents the White color (R=G=B). The Brightness is measured along the vertical axis of the cylinder, and is defined as max(R,G,B). Different color coordinate systems are suitable for different purposes. For example, the sRGB system is convenient for rendering color on certain types of monitors which recognize the sRGB coordinates and automatically convert these coordinates into color. The HSB system is convenient for some color editing operations including brightness adjustments. Brightness can be thought of as a degree of intensity of a color stimulus. Brightness corresponds to our sensation of an object being “bright” or “dim”. Brightness has been represented as the Y value of the XYZ system of Contrast can be thought of as the brightness difference between the brightest and the dimmest portions of the image or part of the image. Exemplary contrast editing techniques are described in William K. Pratt, “DIGITAL IMAGE PROCESSING” (3ed. 2001), pages 243-252, incorporated herein by reference. Sharpness relates to object boundary definition. The image is sharp if the object boundaries are well defined. The image is blurry if it is not sharp. It is desirable to obtain color coordinate systems which facilitate contrast editing and other types of image editing of color and monochromatic images. This section summarizes some features of the invention. The invention is not limited to these features. The invention is defined by the appended claims. In some embodiments, the contrast is edited as follows. Let us suppose that a digital image consist of a number of pixels. Let us enumerate these pixels as p
The invention is not limited to such embodiments. For example, the brightness can be edited according to the equation: In some embodiments, the image is a color image. The color coordinate system is chosen so that the brightness B is one of the coordinates which can be changed without changing the chromaticity coordinates. For a linear color coordinate system with coordinates T In some embodiments, the color coordinate system has the following coordinates:
the Y coordinate of the xyY system is the same as the Y coordinate of the XYZ system;
Linear transformations of such color coordinate systems can be used to obtain other novel color coordinate systems. The techniques described above can be used to adjust either the global contrast, i.e. when the region R(p The inventor has observed that the same techniques can be used to change the image sharpness if the region R(p The invention is not limited to the features and advantages described above. Other features are described below. The invention is defined by the appended claims. The embodiments described in this section illustrate but do not limit the invention. The invention is defined by the appended claims. Some embodiments of the present invention use color coordinate systems Bef and BCH which can be defined, for example, as follows. First, a linear color coordinate system DEF is defined as a linear transformation of the 1931 CIE XYZ color coordinate system of As seen in When D>0 and E=F=0, the color is white or a shade of gray. Such colors coincide, up to a constant multiple, with the CIE D If a color is produced by a monochromatic radiation with λ=700 nm (this is a red color), then F=0 and E>0. The color matching functions The integrals in (9) can be replaced with sums if the CMF's are defined at discrete λ values, i.e.: If S The dot product (11) does not depend on the color coordinate system as long as the color coordinate system is orthonormal in the sense of equations (9) or (10) and its CMF's are linear combinations of The brightness B of a color S can be represented as the length (the norm) of the vector S:
Since D is never negative, the D, E, F values can be determined from the B, e, f values as follows:
The Bef system is convenient for brightness editing because the brightness can be changed by changing the B coordinate and leaving e and f unchanged. Thus, if it is desired to change from some value B to a value k×B for some factor k, the new Bef color coordinates B*, e*, f* can be computed as:
The brightness can be changed over the whole image or over a part of the image as desired. The brightness transformation can be performed using computer equipment known in the art. For example, in Another color coordinate system that facilitates the brightness editing is the spherical coordinate system for the DEF space. This coordinate system BCH (Brightness, Chroma, Hue) is defined as follows (see also C (“chroma”) is the angle between the color S and the D axis; H (“hue”) is the angle between (i) the orthogonal projection S The term “chroma” has been used to represent a degree of saturation (see Malacara's book cited above). Recall that in the HSB system, the Saturation coordinate of a color represents the white amount in the color. In the BCH system, the C coordinate of a color is a good representation of saturation (and hence of chroma) because the C coordinate represents how much the color deviates from the white color D The H coordinate of the BCH system represents the angle between the projection S Transformation from BCH to DEF can be performed as follows:
Transformation from DEF to BCH can be performed as follows. The B coordinate can be computed as in (18). The C and H computations depend on the range of these angles. Any suitable ranges can be chosen. In some embodiments, the angle C is in the range [0,π/2], and hence
Transformation from BCH to Bef can be performed as follows:
As with Bef, the BCH system has the property that a change in the B coordinate without changing C and H corresponds to multiplying the tristimulus values D, E, F by some constant k (see equations (17)). The brightness editing is therefore simple to perform. In The Bef and BCH systems are also suitable for contrast editing. In some embodiments, the contrast is enhanced by increasing the brightness difference between brighter and dimmer image portions. For the sake of illustration, suppose the image consists of a two-dimensional set of pixels p The contrast adjustment can be performed over pixels p Similarly, in the BCH system, the B coordinate is computed as in (27.1), and the C and H coordinates are unchanged:
In some embodiments, the region R(p In some embodiments, the regions R(p Efficient algorithms exist for calculating the mean values B In In In some embodiments, B In some embodiments, the function The contrast editing techniques described above can be used to adjust either the global contrast, i.e. when the region R(p The same techniques can be used to change the image sharpness if the region R(p The contrast and sharpness editing can also be performed on monochromatic images. These images are formed with a single color of possibly varying intensity. In such images, the brightness B represents the color's intensity. In some embodiments, the brightness B is the only color coordinate. The same techniques can be employed for this case as described above except that the equations (27.2), (27.3), (29.2), (29.3) can be ignored. In some embodiments, the Bef and BCH systems are used to adjust a shadow portion or a highlight portion of the image (e.g. to deepen the shadow and/or brighten (highlight) a brighter image portion). As in equations (27.2), (27.3), (29.2), (29.3) the e and f coordinates or the C and H coordinates are unchanged. The brightness is modified as follows:
B B ε is a pre-defined constant; ε is in the interval (0,1) if it is desired to increase the brightness range near the pixel p The Bef and BCH systems are also convenient for performing hue and saturation transformations. In these transformations, the brightness B is unchanged. The hue transformation corresponds to rotating the color vector S ( -
- while H*>H
_{max }do H*=H−2π - while H*≦H
_{min }do H*=H+2π The H* computation places the result into the proper range from H_{min }to H_{max}, e.g. from −π to π or from 0 to 2π. If the H* value is outside the interval, then 2π is added or subtracted until the H* value in the interval is obtained. These additions and subtractions can be replaced with more efficient techniques, such as division modulo 2π, as known in the art. In some embodiments, the “>” sign is replaced by “≧” and “≦” by “<” (depending on whether the point H_{min }or H_{max }is in the allowable range of the H values).
- while H*>H
In the Bef system, the hue transformation is given by the following equations:
A saturation transformation can be specified as the change in the chroma angle C, e.g. multiplying C by some positive constant k. The hue and the brightness are unchanged. Since D is never negative, the C coordinate is at most π/2. The maximum C value C In the Bef system, it is convenient to specify the desired saturation transformation by specifying the desired change in the e and f coordinates. The saturation change corresponds to rotating the S vector in the plane perpendicular to the EF plane. The angle H remains unchanged. Hence, the ratio e/f=tan H is unchanged, so the saturation transformation can be specified by specifying the ratio e*/e=f*/f. Denoting this ratio by k, the transformation can be performed as follows:
if g>1, then
The invention includes systems and methods for color image editing and display. The Bef and BCH color coordinates can be transmitted in a data carrier such as a wireless or wired network link, a computer readable disk, or other types of computer readable media. The invention includes computer instructions that program a computer system to perform the brightness editing and color coordinate system conversions. Some embodiments of the invention use hardwired circuitry instead of, or together with, software programmable circuitry. In some embodiments, the Bef or BCH color coordinate system can be replaced with their linear transforms, e.g. the coordinates (B+e,e,f) or (2B,2e,2f) can be used instead of (B,e,f). The angle H can be measured from the E axis or some other position. The angle C can also be measured from some other position. The invention is not limited to the order of the coordinates. The invention is not limited to DEF, XYZ, or any other color coordinate system as the initial coordinate system. In some embodiments, the orthonormality conditions (9) or (10) are replaced with quasi-orthonormality conditions, i.e. the equations (9) or (10) hold only approximately. More particularly, CMF's - 1. each of
- 2. each of
- 1. each of
- 2. each of
The invention is not limited to the orthonormal or quasi-orthonormal CMF's or to any particular white color representation. For example, in some embodiments, the following color coordinate system (S The BCH coordinate system can be constructed from linear systems other than DEF, including orthonormal and non-orthonormal, normalized and non-normalized systems. In some embodiments, a coordinate system is used with coordinates (S In some embodiments, the value B is the square root of some other quadratic polynomial of in T The tristimulus values T The invention is not limited to the two-dimensional images (as in
Patent Citations
Non-Patent Citations
Classifications
Legal Events
Rotate |