Method and apparatus for automatically determining image foreground color
8 claims: 1 independent, 7 dependent
- 1A method for automatically determining a foreground color of a predetermined foreground text or graphic object (704) to be placed against a selected region (113) of a background digital image (111), comprising:(a) automatically dividing (202) colors of pixels of at least a part of the background digital image (111) into a number of color clusters in a color space;(b) automatically segmenting the part of the background digital image (111) into regions according to the color clusters;(c) automatically dividing the color clusters into a set of clusters which have regions that overlap with the selected region (113), called interference clusters;and a set of clusters which do not have regions overlapping with the selected region (113), called benign clusters;(d) automatically selecting the foreground color related to at least one interference cluster according to predetermined, criteria and at least one benign cluster according to a color harmony criterion, and (e) one of automatically displaying and storing the predetermined foreground text or graphic object (704) using the selected foreground color.
70 paragraphs in 4 sections, as filed
BACKGROUND OF INVENTION
0001The invention is directed to a method for automatically determining a foreground color for a digital image, in particular, for placing a text or graphic object against a background image.
0002In many different areas, a text or a graphic object is combined with an image to be displayed together. In these cases, usually the text or the graphic object constitutes a foreground object whereas the image is the background. A combination of the text and image is used, for example, for esthetical reasons or to illustrate the text by means of the background image.
0003A graphic designer is often confronted with the task of adding a foreground text object to a given background image in such a way that the text is clearly legible. In such a case, the selection of a suitable color poses a problem due to the usually large number of possible and available colors for the text object.
0004Furthermore, a combination of a text object with a background image is encountered on many web pages where the text is provided on a colored background. However, web pages are to be displayed on a variety of different devices such as different types of computer monitors or of handhelds or mobile phones. Depending on the capabilities of the device or the graphic card, the text and the background image are displayed differently. In particular, a designer cannot exclude that in some cases, the text and the background image are displayed in such a way that the color of the text and the color or colors of the background image are almost the same which makes it difficult to read the text.
0005Methods for selecting a color are known from different fields. For example, <patcit id="pcit0001" dnum="US5508718A"><text>U.S. Patent No. 5,508,718</text></patcit> discloses a computerized color selection system which selects colors based on a user's designation of color impact objectives which specify how colors affect those who view the colors rather than specifying the colors themselves. Other methods for color selection or for evaluating graphical data are known, for example, from <patcit id="pcit0002" dnum="US5889932A"><text>U.S. Patent Nos. 5,889,932</text></patcit>, <patcit id="pcit0003" dnum="US5424945A"><text>5,424,945</text></patcit>, <patcit id="pcit0004" dnum="US5909220A"><text>5,909,220</text></patcit>, and <patcit id="pcit0005" dnum="US5615320A"><text>5,615,320</text></patcit>, and <patcit id="pcit0006" dnum="US20010049591A1"><text>U.S. Patent Publication 2001/0049591 A1</text></patcit>.
0006Notwithstanding these advances in color selection, there continues to exist a need for automatically determining a foreground color for a given background image. It would also be desirable that such a method for automatically determining a foreground color for a digital image allows an improved representation of a text or graphic object against an image background.
0007<patcit id="pcit0007" dnum="US20020027561A1"><text>US 2002/0027561 A1</text></patcit> describes colour adviser. A method of determining image representative colors for an image comprising a plurality of image elements having color information associated therewith. Initially, the image elements are grouped into a plurality of image element groups on the basis of their colors. An initial representative color is then generated for each of the image element groups, the initial representative colors subsequently being clustered together into color clusters in a color space. Finally, an image representative color is determined based on each respective color cluster. Also shown is a method of using one or more of the image representative colors as a basis for providing one or more aesthetic color suggestions for a given image. A set of color selection rules is provided, and an aesthetic color suggested on the basis thereof.
SUMMARY OF THE INVENTION
0008It is the object of the present invention to improve automatic determination of a foreground color for a given background image. This object is achieved by providing a method for automatically determining a foreground color according to claim 1 and a system for automatically determining a foreground color according to claim 8. Embodiments of the invention are set forth in the dependent claims.
BRIEF DESCRIPTION OF DRAWINGS
0009These and other aspects of the invention will become apparent from the following description read in conjunction with the accompanying drawings wherein the same reference numerals have been applied to like parts, and in which:
0010<figref idref="f0001">Figure 1</figref> illustrates elements of an example system for automatically determining a foreground color according to the invention;
0011<figref idref="f0002">Figure 2</figref> is a flow diagram illustrating an example of a method for automatically determining a foreground color according to the invention;
0012<figref idref="f0003">Figures 3</figref> illustrates an example background image;
0013<figref idref="f0003">Figure 4</figref> illustrates an example of clustering the pixels of the background image shown in <figref idref="f0003">Figure 3</figref>;
0014<figref idref="f0004">Figures 5</figref> and illustrates an example results of segmenting the image shown in <figref idref="f0003">Figure 3</figref>;
0015<figref idref="f0005">Figure 7</figref> illustrates interference and benign color clusters for a foreground block 704 that intersects a background image segment;
0016<figref idref="f0005">Figure 8</figref> illustrates an example of the background image shown in <figref idref="f0003">Figure 3</figref> displayed together with foreground regions; and
0017<figref idref="f0006">Figure 9</figref> is a flow diagram illustrating a method for recommending a color for foreground of a background region of an image.
DETAILED DESCRIPTION
A. Methods For Determining Foreground Color
0018<figref idref="f0001">Figure 1</figref> illustrates elements of an example of a system 100 for performing a method for automatically determining a foreground color. The system 100 comprises a color clustering module 101, a (optional) color segmentation module 102, and a color selection module 103. A digital image 111 is input to the color clustering module 101 and the color segmentation module 102. This digital image 111 is intended as the background image. It is the aim to present a (predetermined) foreground text or graphic object against this background image in a selected region of the background image. The foreground color to be determined for the foreground text or graphics object depends on the region of the image where the text or graphic is to be placed. In view of this, a selected region (also called a candidate region) 113 is to be provided.
0019In the example shown in <figref idref="f0001">Figure 1</figref>, this candidate region 113 is provided to the color selection module 103. The region 113 can be provided by a user via a suitable interface. For example, the digital image 111 can be displayed on a monitor and a user can select a region 113 using a cursor or mouse pointer. Alternatively, the candidate region 113 can be selected automatically using appropriate image processing methods with appropriate criteria.
0020Instead of the case illustrated in <figref idref="f0001">Figure 1</figref>, it is also possible to provide a pre-selected candidate region 113 to the color clustering module 101. This is particularly useful if color clustering, color segmentation and color selection are not performed for the whole image but only for the part of the image, for example, consisting of the selected region or a larger area comprising the selected region.
0021Upon completing color selection for the digital image, the recommended color or colors output at 115 for the foreground text or graphics object input at 117 intended to be placed on the background image 111 may be combined or overlaid by image coalescing module 118 and output (or simply provided as a recommendation) at 119. It is to be understood that more than one text or graphic object can be placed against the background of a digital image 111. In such a case, more than one candidate region 113 is to be provided resulting in a recommended color for each candidate region.
0022It will be appreciated that the method according to the invention and the exemplary system shown in <figref idref="f0001">Figure 1</figref> can be used in various environments. In particular, it can be used for recommending different foreground colors when presenting a web p age on d ifferent d isplay devices. Many w eb p ages a re d esigned with elements where a text is placed over a photograph or another colored background. Doing such design automatically without the benefit of foreground recommendations provided by the invention, creates a risk that a color and/or a placement would be chosen such that the text is not legible or that colors would be chosen that do not coordinate with the overall color scheme of the image.
0023Such a color foreground selection problem particularly arises if a corresponding web page is displayed on a device having a different color resolution or a different display area than expected by the web designer (for example when displaying on a mobile phone or a personal digital assistant (PDA)). In such situations, the web page is actually displayed with different colors or with the image scaled to a certain dimension. In the event, the web designer saves the text or graphic object together with the background image in a single bitmap file, a scaling or displaying with different colors (depending on the display device) could render the page illegible. Thus depending on expected display conditions, it would be advantageous to provide the background image and the foreground object separately such that an appropriate color for the foreground image can be determined that is adapted to the display conditions using the method according to the invention. Such an adaption, including providing a recommended color, could be performed on the web server (after having received the display characteristics of the display device) or by the display device (such as a mobile phone or a PDA) itself.
0024Another environment in which the present invention may be advantageously used is within the context of automated document layout (ADL). By providing an ADL system with the ability to combine images with graphics and text in an appropriate way increases the range and the quality of documents that can be produced. In one embodiment, such an ADL program which automatically places text or graphics on images can be implemented within a graphic art editing program that provides foreground color recommendations in accordance with the invention.
0025Furthermore, a color matching method and system 100 as described herein can be used as a design aid for modifying an existing environment with a new element. For instance, the system 100 may be adapted to provide recommendations for a user that wishes to add a sign to a storefront or choose the color of a rug to complement existing furniture. In such a case, the user would take a photograph of the scene, upload it into the computer, analyze the image using the method according to the invention and even see the resulting image modified with the new element.
0026A flow diagram illustrating an example of a method according to the invention is shown in <figref idref="f0002">Figure 2</figref>. Initially, a digital image 111 is provided to the corresponding system 100.
0027At step 201, the image data (the color values of the image pixels) is converted to a predetermined color format. Many color formats or color spaces are possible, for example, RGB, HSL, L*a*b*, etc.). RGB is a common color representation for computers and HSL is commonly used in graphic arts. Another alternative is the L*a*b* which is based on the physiology of human color perception where the distance corresponds to human color discrimination. Depending on the intended use of the foreground object with the background image, different color spaces can be appropriate.
0028At step 202, the colors of the formatted image data are clustered into a small number of groups or labels in order to determine the dominant colors of the overall document (digital image). In many cases, for example, if the background image is a photograph, the image may contain many colors related in a complex way. Such a phenomenon can arise for several reasons. Textures often contain many colors. Shading means that an object of a single hue contains many colors of differing luminance. Colored light sources and reflections from nearby objects can result in a variation in hue of the colors of an object. Image degradations such as noise and blur can also create additional colors.
0029In the field of pattern recognition, different methods for clustering are known. An advantageous family of methods is based on the Expectation-Maximization (EM) method as applied to estimating a Gaussian mixture model. In this method, one starts with a given number of clusters. A corresponding number of data points are taken randomly as cluster means (centroid, center of gravity).
0030In the EM expectation step, for all data points, the conditional probability is determined that a data point arises from each cluster using a MAP (Maximum A Posteriori) principle. In the EM maximization step, the parameters of the clusters are re-estimated given the conditional probabilities of the data. These steps are repeated until the overall likelihood changes less than a predetermined threshold or after a predetermined number of iterations.
0031In the embodiment described above, clustering at step 202 is performed for a given number of clusters. However, usually this number is not known in advance. In view of this, step 202 can be repeated several times, each time with a different number of clusters, for example, starting with one or two clusters and repeating the step up to a predetermined maximum number of clusters.
0032At step 203, the optimal clustering is determined. In this step, the best number of clusters can be determined by several model selection methods including a Bayesian Information Criterion or a Universal Model-based Minimum Description Length Principle. Alternatively or additionally, other criteria such as the Integrated Completed Likelihood (ICL), the Normalized Entropy Criterion (NEC), or the cross-validation criterion (CV) can be used for model selection. In one alternate embodiment at 203, a user may determine the optimal number of clusters. In yet another embodiment at 203, the optimal number of clusters may be a predefined fixed number of clusters.
0033An example of Expectation-Maximization clustering for one to four clusters is shown in <figref idref="f0003">Figure 4</figref> for an example image shown in <figref idref="f0003">Figure 3</figref>. For this example of Expectation-Maximization clustering, the example image shown in <figref idref="f0003">Figure 3</figref> represents a background image comprised of a red fox on a blue background. More specifically, <figref idref="f0003">Figure 4</figref> shows the data points in color space (RGB) with the results of Expectation-Maximization clustering for one cluster at 401, two clusters at 402, three clusters at 403, and four clusters at 404. The ellipsoids shown in <figref idref="f0003">Figure 4</figref> are the 50% probability ellipsoids of the corresponding Gaussian distribution.
0034Continuing with step 204, image segmentation is performed. In this step, each area of the whole image or a part of the image (depending on whether the color clustering was performed for the whole image or only a part of it) is assigned a cluster label in order to determine the local colors of the image 111. In particular, the goal at 204 is to label each pixel such that the fit of the pixel to the label is high and the piecewise smoothness of the region is preserved. Different methods are possible for carrying out image segmentation at 204.
0035A first embodiment for performing image segmentation is based on a normalized cut criterion. This method is described, for example, in J. Shi and J. Malik, "Normalized Cuts and Image Segmentation", IEEE Transactions on Pattern Analysis and Machine Intelligence 22, 888- 905 (2000). Further alternatives are region-growing, region-splitting, or energy-minimization methods. Additionally, other methods of image segmentation known in the art may be used as will be appreciated by those skilled in the art, some of which are disclosed in the following publications: K.S. Fu and J.K. Mui, "A Survey On Image Segmentation", Pattern Recognition, vol. 13, pp. 3-16, 1981; R.M. Haralick, "Image Segmentation Survey", in Fundamentals in Computer Vision, O. D. Faugeras (ed.), pp. 209-224, Cambridge University Press, Cambridge, 1983; R.M. Haralick and L.G. Shapiro, "Survey - Image Segmentation Techniques", Computer Vision Graphics and Image Processing, vol. 29, pp. 100-132, 1985; N.R. Pal and S.K. Pal, "A Review On Image Segmentation Techniques", Pattern Recognition, vol. 26, pp. 1277-1294, 1993; and P.K. Sahoo, S. Soltani, A.K.C. Wong and Y.C. Chen, "A Survey Of Thresholding Techniques", Computer Vision, Graphics and Image Processing, vol. 41, pp. 233-260, 1988.
0036As an example, image segmentation was performed for the image shown in <figref idref="f0003">Figure 3</figref>. For this image, Expectation-Maximization clustering with three clusters at 403 (as shown in <figref idref="f0003">Figure 4</figref>) yields the best result according to model selection. Image segmentation was performed using the best result according to model selection. Thus, image segmentation was performed using a graph cut method and the three cluster Expectation-Maximization model. The result of this segmentation is shown in <figref idref="f0004">Figures 5 and 6</figref>, in which <figref idref="f0004">Figure 5</figref> shows a first segmented portion of the image in <figref idref="f0003">Figure 3</figref> (which is made up of one of the three clusters at 403) and <figref idref="f0004">Figure 6</figref> shows a second segmented portion of the image in <figref idref="f0003">Figure 3</figref> (which is made up of two of the three clusters at 403).
0037Returning to <figref idref="f0002">Figure 2</figref>, the method continues with the cluster grouping of step 205. In order to perform this step 205, a selected region or candidate region is to be provided where a foreground object is to be placed. This region should be large enough to contain the foreground object and possibly include an amount of padding around the foreground object. Then at 205, the color clusters are divided into two sets: the clusters which have regions that overlap with the foreground region (i.e., interference clusters) and the clusters which do not have regions overlapping with the foreground region (i.e., benign clusters). It may happen that all clusters are interference clusters.
0038In alternate embodiments, the grouping of clusters performed at 205 may be performed without first segmenting the image at step 204. Thus in an alternate embodiment, colors may be grouped at 205, for example, by labeling pixels with a most likely cluster and finding the most frequently occurring label. In another embodiment, grouping is optional at 202, for example, by considering all clusters as interference clusters.
0039<figref idref="f0005">Figure 7</figref> illustrates interference and benign color clusters for a foreground text or graphics block candidate region 704 that intersects a background image segment 702. Color clusters with segments A, B, C of the image 702 that overlap with the text block 704 are interference clusters. Color clusters with segments D and E of the image 702 that do not overlap with the text block 704 are benign clusters. However, since segment C' of the image 702 is associated with the same color cluster as the image segment C, the image segment C' is treated as an interference cluster even though it does not overlap with the text block 704.
0040Continuing at step 207 with the image data clustered into a set of interference and benign clusters, a design function (or method) is evaluated to recommend a foreground color for the candidate background region, the details and embodiments of which are discussed below. The design function (and method) is based on predetermined criteria.
0041If an acceptable or a superior candidate background color is identified at 208, the system may automatically combine image data with foreground text and/or graphics object having the recommended color to produce output a single image or an overlaid image (e.g., text and/or graphics overlaying the background image) at 209. If no acceptable or superior result is identified at 208, the user may be presented at 210 with alternatives to foreground colors to evaluate, and a selection requested at 211. The presentation at 210 may include either alternative foreground color recommendations and/or examples of the background image overlaid with the foreground text and/or graphics object having the recommended color.
0042It is to be understood that the method set forth in <figref idref="f0002">Figure 2</figref> need not be performed for a single foreground region, but can be used for several foreground regions of an image as well. In such a way, it is possible to place more than one text or graphics object on a background image or to provide alternative regions with corresponding color recommendations for a single text or graphics object. For example, <figref idref="f0005">Figure 8</figref> illustrates the background image in <figref idref="f0003">Figure 3</figref> in which two foreground texts, "RED" and "FOX", are provided to the system as foreground text to be placed on segmented portions of the background image shown in <figref idref="f0004">Figures 5 and 6</figref>, respectively. In this example, the system determines the recommended color for the foreground texts "RED" and "FOX" are red-orange and blue, respectively, which are in two different regions of the image.
0043Furthermore, additional properties of the background image can be used in order to identify placement of the text or graphics forming part of the foreground image on the background. For example, the scale and variance of the texture of the background image may play a role in the scale chosen for foreground text of a certain size and semantic analysis of the background image might prohibit the placing of foreground text or graphics over human faces forming part of the background image.
0044With reference again to <figref idref="f0001">Figure 1</figref>, in one embodiment steps 201, 202 and 203 set forth in <figref idref="f0002">Figure 2</figref> are performed in color clustering module 101, steps 204 and 205 are performed by image segmentation module 102, and the remaining steps set forth in <figref idref="f0002">Figure 2</figref> are performed by color selection module 103 and coalescing module 118. In this embodiment, the coalescing module 118 may receive as input foreground text and/or graphics (e.g., text "RED FOX") and the background image 111 (e.g., the image shown in <figref idref="f0003">Figure 3</figref>) and output in addition to or in place of recommended color or colors 115, an output image that coalesces the background image 111 and the foreground text and/or graphics (e.g., the image in shown in <figref idref="f0005">Figure 8</figref>).
B. Criteria For Determining Foreground Color
0045Referring again to evaluating a design function at 207 in <figref idref="f0002">Figure 2</figref>, several embodiments for recommending or selecting a color for a candidate region of a background image are described below.
0046In a first embodiment for evaluating the design function at 207 according to predetermined criteria, a legibility criterion is evaluated. In this embodiment, the legibility criterion is evaluated by: (A) computing local measures of contrast between background and foreground in a neighborhood of a candidate region of the background image; and subsequently (B) computing a legibility score representative of the lowest few contrast values observed over the candidate region.
0047In one embodiment, the lowest few contrast values observed over the candidate region is the minimum value of all local contrast measures taken over the entire candidate region. In another embodiment, the lowest few contrast values observed over the candidate region are those values in the tenth percentile of the contrast values taken over the entire candidate region. In yet another embodiment, the lowest few contrast values observed over the candidate region is an average those lowest contrast values in the lower quartile taken over the entire candidate region.
0048Generally in computing the local measures of contrast, the local contrasts are computed over a scale that is proportional to, for example, the foreground text size to determine an overall contrast. Subsequently, the overall contrast is then multiplied by a factor proportional to the foreground text size. The local measures are functions that decrease with increasing local background variation. The overall contrast score may be supplemented with additional factors such as the intrinsic legibility of a font.
0049Specifically in taking the local measures of contrast, one embodiment may involve the following steps: (a) down-sample a region of the image containing the text so that uppercase text is approximately thirty pixels high; (b) derive normalized versions of the color channels by dividing the red and blue channels by two; (c) compute Gaussian weighted averages of the background pixels and the foreground pixels over the image, where the Gaussian width is two; (d) compute local variances of the Gaussian weighted averages, where variance is computed over a window of size of sixty pixels; (e) estimate the sums of the variances of all three color channels; (f) compute a first contrast measure as the squared difference between local mean foreground and local mean background colors, divided by the variance estimate; (g) compute a second contrast measure by dilating (i.e., taking local maxima of) the first contrast measure with a square structuring element (e.g., nine-by-nine pixels); (h) compute the output contrast measure by multiplying the second contrast measure by the text height.
0050Advantageously, this first embodiment for recommending the foreground color using a legibility criterion is adapted to handle multi-color background images and foreground text and/or graphics. A further advantage of this first embodiment for recommending the foreground color using a legibility criterion is that it has been found experimentally to produce legibility comparisons that are in good agreement with human perception.
0051Further it will be appreciated that many other uses of this method for determining the legibility of an image may be made in addition to recommending and/or selecting a foreground color for an image, such as: (a) top roof an existing layout for legibility; (b) to select the position of placement of text given a text color and the image; (c) to select a size of text of a given text color and the image; (d) to select the image from a set of alternative images on which to place text, given the text color; (e) to select a "screen" (i.e., region of reduced background contrast) or direction in which to desaturate the image (e.g., a sepia tone), given the text color.
0052According to this method for determining the legibility of an image, a design function may be defined to use the following legibility criterion to recommend the foreground color. The legibility criterion is based on a likelihood ratio for two models (a) that the image <i>I</i> contains text <i>T</i> and (b) that the image <i>I</i> just contains background <i>B</i>, which may be given by:<maths id="math0001"><math display="block"><mi>score</mi><mfenced><mi>T</mi></mfenced><mo>=</mo><mi>h</mi><mo></mo><mi>log</mi><mo></mo><mfrac><mrow><mi>Pr</mi><mfenced><mi>I</mi><mrow><mo>|</mo></mrow><mi>T</mi></mfenced></mrow><mrow><mi>Pr</mi><mfenced><mi>I</mi><mrow><mo>|</mo></mrow><mi>B</mi></mfenced></mrow></mfrac><mn>.</mn></math><img file="EP1555634B1_D0001.tif" /></maths> Under the assumption of independent pixels, the sum over the parts of the image <i>I</i> that contains text <i>T</i> which are foreground according to the text model may be given by:<maths id="math0002"><math display="block"><mi>score</mi><mfenced><mi>T</mi></mfenced><mo>=</mo><mstyle displaystyle="false"><mstyle displaystyle="true"><munder><mo>∑</mo><mrow><mi>x</mi><mo>∈</mo><mi>T</mi></mrow></munder></mstyle><mi>r</mi><mfenced><mi>x</mi></mfenced></mstyle><mo>,</mo><mi>with</mi><mspace width="1em" /><mi>r</mi><mfenced><mi>x</mi></mfenced><mo>=</mo><mi>h</mi><mo></mo><mi>log</mi><mo></mo><mfrac><mrow><mi>Pr</mi><mfenced><mi>I</mi><mrow><mo>|</mo></mrow><mi>T</mi></mfenced></mrow><mrow><mi>Pr</mi><mfenced><mi>I</mi><mrow><mo>|</mo></mrow><mi>B</mi></mfenced></mrow></mfrac><mo>,</mo></math><img file="EP1555634B1_D0002.tif" /></maths> where <i>h</i> is a number representative of the size of size <i>T</i> , for instance, the baseline height in pixels. Pr(<i>I</i>(x) |<i>T</i>) denotes heuristic or other models of likelihoods that the image <i>I</i> contains text <i>T</i> at a given pixel <i>x</i> and Pr(<i>I</i>(x)| <i>B</i>) denotes heuristic or other models of likelihoods that the image <i>I</i> contains background <i>B</i> at the given pixel <i>x</i> .
0053The metric of for legibility is the difference in score to the so-called closest incorrect text <i>T</i>' as given by:<maths id="math0003"><math display="block"><mi>legibility</mi><mo>=</mo><mi>score</mi><mfenced><mi>T</mi></mfenced><mo>-</mo><munder><mi>max</mi><mrow><mi>Tʹ</mi><mo>≠</mo><mi>T</mi></mrow></munder><mspace width="1em" /><mi>score</mi><mfenced><mi mathvariant="italic">Tʹ</mi></mfenced><mo>,</mo></math><img file="EP1555634B1_D0003.tif" /></maths> wherein for generating an incorrect text <i>T</i>', it is prescribed that it is sufficient for the image of the text to change from foreground to background over a small disc (e.g., enough to change an "e" to a "c"). Then, legibility reduces to<maths id="math0004"><math display="block"><mi>legibility</mi><mo>=</mo><munder><mi>min</mi><mrow><mi>x</mi><mo>∈</mo><mi>T</mi></mrow></munder><mspace width="1em" /><munder><mi>max</mi><mrow><mi>y</mi><mo>∈</mo><msubsup><mi>C</mi><mi>ε</mi><mn>2</mn></msubsup></mrow></munder><mspace width="1em" /><mi>r</mi><mo></mo><mfenced><mi>x</mi><mo>+</mo><mi>y</mi></mfenced><mo>,</mo></math><img file="EP1555634B1_D0004.tif" /></maths> wherein <maths id="math0005"><math display="inline"><msubsup><mi>C</mi><mi>g</mi><mn>2</mn></msubsup></math><img file="EP1555634B1_D0005.tif" /></maths> is a small disc (with radius ε ).
0054Particularly, a Gaussian model can be taken for each point of the image with equal variance for each color coordinate, but with different means F and B for foreground and background. Then, each term of the score may be given by:<maths id="math0006"><math display="block"><mi>r</mi><mo>=</mo><mfrac><msup><mrow><mo>‖</mo><mi>F</mi><mo>-</mo><mi>B</mi><mo>‖</mo></mrow><mn>2</mn></msup><msup><mi>σ</mi><mn>2</mn></msup></mfrac><mo>=</mo><mfrac><mstyle displaystyle="false"><mstyle displaystyle="true"><munder><mo>∑</mo><mi>c</mi></munder></mstyle><msup><mfenced><msub><mi>F</mi><mi>c</mi></msub><mo>+</mo><msub><mi>B</mi><mi>c</mi></msub></mfenced><mn>2</mn></msup></mstyle><mstyle displaystyle="true"><munder><mo>∑</mo><mi>c</mi></munder><msup><mi>σ</mi><mn>2</mn></msup></mstyle></mfrac><mn>.</mn></math><img file="EP1555634B1_D0006.tif" /></maths> The means F and B and the variance σ<sup>2</sup> of the background are estimated by taking local averages of foreground and background in the composite image (at the same scale as the "small disc"). For instance, using a Gaussian windowing function <i>G<sub>ε</sub></i> (<i>u</i>) on the composite image <i>I</i> with text region <i>T</i> and non-text region <i>T</i> one can take: <maths id="math0007"><math display="block"><msub><mi>F</mi><mi>c</mi></msub><mfenced><mi>x</mi></mfenced><mo>=</mo><mfrac><mstyle displaystyle="false"><mstyle displaystyle="true"><munder><mo>∑</mo><mrow><mi mathvariant="italic">pixels u</mi><mo>∈</mo><mi>T</mi></mrow></munder></mstyle><msub><mi>I</mi><mi>c</mi></msub><mfenced><mi>u</mi></mfenced><msub><mi>G</mi><mi>ε</mi></msub><mfenced><mi>x</mi><mo>-</mo><mi>u</mi></mfenced></mstyle><mstyle displaystyle="true"><munder><mo>∑</mo><mrow><mi mathvariant="italic">pixels u</mi><mo>∈</mo><mi>T</mi></mrow></munder><msub><mi>G</mi><mi>ε</mi></msub><mfenced><mi>x</mi><mo>-</mo><mi>u</mi></mfenced></mstyle></mfrac><mspace width="1em" /><mi>and</mi><mspace width="1em" /><msub><mi>B</mi><mi>c</mi></msub><mfenced><mi>x</mi></mfenced><mo>=</mo><mfrac><mstyle displaystyle="false"><mstyle displaystyle="true"><munder><mo>∑</mo><mrow><mi mathvariant="italic">pixels u</mi><mo>∈</mo><mover><mi>T</mi><mo>‾</mo></mover></mrow></munder></mstyle><msub><mi>I</mi><mi>c</mi></msub><mfenced><mi>u</mi></mfenced><msub><mi>G</mi><mi>ε</mi></msub><mfenced><mi>x</mi><mo>-</mo><mi>u</mi></mfenced></mstyle><mstyle displaystyle="true"><munder><mo>∑</mo><mrow><mi mathvariant="italic">pixels u</mi><mo>∈</mo><mover><mi>T</mi><mo>‾</mo></mover></mrow></munder><msub><mi>G</mi><mi>ε</mi></msub><mfenced><mi>x</mi><mo>-</mo><mi>u</mi></mfenced></mstyle></mfrac><mn>.</mn></math><img file="EP1555634B1_D0007.tif" /></maths>
0055In a second embodiment for evaluating the design function at 207 according to predetermined criteria, a color harmony criterion is evaluated. In this embodiment, a color harmony function is defined for recommending a foreground color with respect to one or more interference clusters and/or benign clusters. The color harmony function can have a form so as to fulfill a predetermined design principle such as: the distance to one of the benign clusters is small (repetition of elements); or a color harmony principle such as the color lies along a line in RGB space which joins the origin and the center of one of the interference clusters (i.e., monotonic color harmony); the color is nearly opposite in hue to a specific color cluster (e.g., a major cluster comprising a majority of the pixels), either interference or benign (complementary color harmony); the color's hue and the hue of other clusters divide the color wheel into equal increments (e.g., triadic and quadric color harmony). The color harmony function can take the value 1 if a color adheres to a specific color model and 0 if not. For example, if <i>c</i> = <i>kq<sub>i</sub></i> where <i>q<sub>i</sub> ∈ Q<sub>i</sub></i> is the color of a benign cluster <i>Q<sub>i</sub></i>, then the value of the corresponding color harmony function is <i>h<sub>mono</sub> (c</i>,<i>Q<sub>i</sub></i>)=1.
0056In evaluating the design function at 207 according to predetermined criteria, other design criteria and/or combinations of such design criteria including color harmony and legibility may be used as well which could be based on, for example, traditional design principles, physiological phenomena, cognitive experiment data, or machine-learned relationships from examples given to the system. According to one alternative embodiment, a color harmony criterion and a legibility criterion can be applied together to select a foreground color. Ideally in these embodiments, the recommended foreground color at 207 should fall into a section in color space which is sufficiently far away from all interference clusters such that it is legible but, preferably, related to at least one of the interference clusters in a way which is harmonious.
0057In a third embodiment for evaluating the design function at 207, a combination of color harmony and legibility criteria is used in a design method to recommend a color for a candidate region, for which a flow diagram is shown in <figref idref="f0006">Figure 9</figref>. The design method involves initially selecting, at 901, a harmonious color set with respect to clustered colors of the background image using a color harmony function, as described in more detail above. Subsequently, the harmonious color set (i.e., a subset of the clustered colors) is tested using a legibility function at 902 from which one or more colors are selected for recommendation at 903.
0058In an example embodiment combining the evaluation of color harmony and legibility criteria, the harmonious color set may be selected (as shown in <figref idref="f0006">Figure 9 at 901</figref>) by determining a subspace (set of colors) of the color space where a given color model (e.g., monotonic, triadic, etc.) is valid. In this way, a large number of colors can already be eliminated. It is even possible to sub-sample this subspace to further reduce the number of possible candidate colors. Then at 902 in <figref idref="f0006">Figure 9</figref>, after determining a subspace of the color space, the maximum (or a value sufficiently large) of the legibility function is determined for the colors of this subspace.
0059There might not necessarily be a unique maximum of the legibility function. One can try to solve this problem by searching for the maximum of the legibility function over several color harmony models. Alternatively or additionally (if there is still no unique maximum), it may be tested for example at step 208 (shown in <figref idref="f0002">Figure 2</figref>) whether the resulting maximum is actually unique. If yes, the method would proceed to step 209 where the background image is output (e.g., displayed, printed, transmitted, etc.) together with a foreground text or graphics that has been provided to the system. If the maximum is not unique, the possible maxima can be presented to a user at step 210. In a following step 211, then, the user can be requested to select a color among the suggestions from the system. Otherwise, the maxima can be chosen randomly or by another criterion.
0060In a fourth embodiment for evaluating the design function at 207, a combination of color harmony and legibility criteria are maximized in a linear design function to produce, a recommended color. One possible form of the linear design function may be defined as:<maths id="math0008"><math display="block"><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>M</mi></munderover><msub><mi>α</mi><mi>i</mi></msub><mo></mo><mi>l</mi><mfenced><mi>c</mi><msub><mi>P</mi><mi>i</mi></msub></mfenced><mo>+</mo><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>M</mi></munderover><msub><mi>γ</mi><mi>k</mi></msub><mo></mo><mi>h</mi><mfenced><mi>c</mi><msub><mi>K</mi><mi>k</mi></msub></mfenced><mo>,</mo></math><img file="EP1555634B1_D0008.tif" /></maths> where <i>P<sub>i</sub></i> denote the interference clusters, <i>K<sub>k</sub></i> denotes all clusters, both benign and interference, <i>l</i> is a legibility function in color space, <i>h</i> is a color harmony function, and α<i><sub>i</sub></i> and γ<i><sub>k</sub></i> are weighting factors.
0061The legibility and color harmony functions forming part of the linear design function can themselves be combinations of other functions. The color harmony and legibility functions can have a form as described above, in particular, with predetermined weightings of the coordinates in color space such as a higher weighting of the luminance than hue or saturation.
C. Miscellaneous
0062The configuration of the described system 100 is intended to be modular in nature so that it can be combined with other document quality measures and integrated into a larger document layout system.
0063Using the foregoing specification, the invention may be implemented as a machine (or system), process (or method), or article of manufacture by using standard programming and/or engineering techniques to produce programming software, firmware, hardware, or any combination thereof. It will be appreciated by those skilled in the art that the flow diagrams described in the specification are meant to provide an understanding of different possible embodiments of the invention. As such, alternative ordering of the steps, performing one or more steps in parallel, and/or performing additional or fewer steps may be done in alternative embodiments of the invention.
0064Any resulting program(s), having computer-readable program code, may be embodied within one or more computer-usable media such as memory devices or transmitting devices, thereby making a computer program product or article of manufacture according to the invention. As such, the terms "article of manufacture" and "computer program product" as used herein are intended to encompass a computer program existent (permanently, temporarily, or transitorily) on any computer-usable medium such as on any memory device or in any transmitting device.
0065Executing program code directly from one medium, s toring program code onto a medium, copying the code from one medium to another medium, transmitting the code using a transmitting device, or other equivalent acts may involve the use of a memory or transmitting device which only embodies program code transitorily as a preliminary or final step in making, using, or selling the invention.
0066Memory devices include, but are not limited to, fixed (hard) disk drives, floppy disks (or diskettes), optical disks, magnetic tape, semiconductor memories such as RAM, ROM, Proms, etc. Transmitting devices include, but are not limited to, the Internet, intranets, electronic bulletin board and message/note exchanges, telephone/modem based network communication, hard-wired/cabled communication network, cellular communication, radio wave communication, satellite communication, and other stationary or mobile network systems/communication links.
0067A machine embodying the invention may involve one or more processing systems including, but not limited to, CPU, memory/storage devices, communication links, communication/transmitting devices, servers, I/O devices, or any subcomponents or individual parts of one or more processing systems, including software, firmware, hardware, or any combination or subcombination thereof, which embody the invention as set forth in the claims.
Contents4
14 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| US2002113801A1 | Cites | United States of America | Examiner |
| US2002027561A1 | Cites | United States of America | – |
| US2002113801A1 | Cites | United States of America | – |
| PATENT ABSTRACTS OF JAPAN vol. 013, no. 209 (P-871), 17 May 1989 (1989-05-17) & JP 01 025285 A (FUJITSU LTD), 27 January 1989 (1989-01-27) | Non-patent | – | – |
| PING GUO ET AL: "A study on color space selection for determining image segmentation region number" PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE. IC-AI'2000 CSREA PRESS ATHENS, GA, USA, vol. 3, 26 June 2000 (2000-06-26), - 29 June 2000 (2000-06-29) pages 1127-1132, XP002322629 ISBN: 1-892512-59-9 | Non-patent | – | – |
| PATENT ABSTRACTS OF JAPAN vol. 2002, no. 09, 4 September 2002 (2002-09-04) & JP 2002 158860 A (CANON INC), 31 May 2002 (2002-05-31) | Non-patent | – | – |
4 members in 2 offices; this record represents the family
Members4
| Document | Office | Kind | |
|---|---|---|---|
| EP1555634A1 | European Patent Office (EPO) | A1 | |
| US2005157926A1 | United States of America | A1 | |
| US7536048B2 | United States of America | B2 | |
| EP1555634B1This record | European Patent Office (EPO) | B1 |
27 legal events, as 4 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Notification of lapseLapsedST | ST | FR | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Gb: european patent ceased through non-payment of renewal feeCeasedGBPC | GBPC | EP | |
| Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal feeWithdrawnR119 | R119 | DE | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Fee paymentPLFP | PLFP | FR | |
| Fee paymentPLFP | PLFP | FR | |
| No opposition filed against granted patent, or epo opposition proceedings concluded without decisionGrantedR097 | R097 | DE | |
| No opposition filedOpposition26N | 26N | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Dpma publication of mentioned ep patent grantGrantedR096 | R096 | DE | |
| Designated contracting statesAK | AK | EP | |
| European patent grantedGrantedFG4D | FG4D | GB | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| Grant fee paidORIGINAL CODE: EPIDOSNIGR3GRAS | GRAS | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOSNIGR1GRAP | GRAP | EP | |
| First examination report despatched17Q | 17Q | EP | |
| Designation fees paidAKX | AKX | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Request for extension of the european patentAX | AX | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 1555634
- Application
- 51002434
Titles3
- German
- Verfahren und Vorrichtung zur automatischen Vorgabe der Vordergrundsfarbe in einem Bild
- English
- Method and apparatus for automatically determining image foreground color
- French
- Méthode et dispositif pour déterminer automatiquement la couleur de premier plan d'image
Classification
- CPC, 2
- G06T11/60
- G06T11/10
- IPC, 2
- G06T11 60
- G06T11 00
Designated states3
- Contracting states, 3
- Germany
- France
- United Kingdom
