US20150178587A1 - Device and a method for color harmonization of an image - Google Patents
Device and a method for color harmonization of an image Download PDFInfo
- Publication number
- US20150178587A1 US20150178587A1 US14/409,447 US201314409447A US2015178587A1 US 20150178587 A1 US20150178587 A1 US 20150178587A1 US 201314409447 A US201314409447 A US 201314409447A US 2015178587 A1 US2015178587 A1 US 2015178587A1
- Authority
- US
- United States
- Prior art keywords
- template
- image
- colors
- harmonious
- color
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Abandoned
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 239000003086 colorant Substances 0.000 claims abstract description 33
- 238000013507 mapping Methods 0.000 claims abstract description 30
- 238000012545 processing Methods 0.000 abstract description 22
- 230000011218 segmentation Effects 0.000 description 12
- 230000006870 function Effects 0.000 description 6
- 230000000007 visual effect Effects 0.000 description 3
- 238000012805 post-processing Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 229920006395 saturated elastomer Polymers 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
Images
Classifications
-
- G06K9/4642—
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/46—Colour picture communication systems
- H04N1/56—Processing of colour picture signals
- H04N1/60—Colour correction or control
- H04N1/6075—Corrections to the hue
-
- G06K9/4609—
-
- G06K9/4652—
-
- G06T5/005—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20172—Image enhancement details
Definitions
- the invention relates to a method and a device for processing an image. More precisely, the method of image processing comprises mapping the colors of the image into a template of harmonious colors.
- the invention is aimed at alleviating at least one of the drawbacks of the prior art.
- the invention relates to a method for processing an image comprising:
- the method according to the invention improves image perceptual quality over prior art solutions.
- the method is fully automatic.
- the method further comprises determining a color histogram of the image, selecting a second template that matches the color histogram of the image, combining the first and the second templates into a combined template and selecting a template in the set of templates that matches the combined template, wherein the final template is the template selected that matches the combined template.
- the method further comprises segmenting the image into regions of similar colors and wherein, in processing the image, pixels in the same segmented regions are mapped into one and the same portion of the final template.
- selecting a template that matches a color histogram comprises computing Kullback-Leibler divergence between a distribution of probability of the template and the color histogram.
- the color histograms are computed in the HSV color space as follows:
- Mi is the i st bin of the corresponding color histogram
- H[u,v] is the Hue value of pixel [u,v]
- S [x,y] is the Saturation value of pixel [x,y]
- V [x,y] is the Value value of pixel [x,y].
- the regions of interests are determined by binarising a saliency maps.
- mapping the colors of the image into a final template is done according to a sigmoid function.
- the method further comprises blurring the pixels located on a border.
- the invention further relates to a device for processing an image comprising:
- the device is adapted to execute the steps of the method for processing.
- FIG. 1 represents color templates
- FIG. 2 depicts a flowchart of the image processing method according to the invention
- FIG. 3 represents a hue wheel and mapping directions of two pixels A and B.
- FIG. 4 depicts an image processing device according to the invention.
- This invention aims at improving the visual experience by rendering colors in a more harmonious way. Indeed, when an image has one object of non-interest with a “strange” color (different from the global hue of the image), there is a need to correct that color.
- a template is a set of HSV values (hue, saturation and value) that are considered as rendering/reflecting a global harmonious effect when present at the same time.
- Each template is made of different portions/sectors as depicted on FIG. 1 .
- FIG. 2 A complete implementation of the invention is depicted in FIG. 2 . Some of the steps of the method are optional. The four involved steps of the method are described below. One can notice that the following method can be extended to video source by applying same process to consecutive frames.
- regions of interest are determined.
- the invention is not limited by the way the regions of interest are determined.
- a saliency map is built that represents the most visually attractive pixels with values from 0 to 255. By binarising the saliency map one is able to determine the regions of interest, i.e. the regions whose saliency value is higher than a threshold value. Building the saliency map is based on the modeling of visual system. Such a visual attention model was patented in EP patent application 04804828.4 published on Jun. 30, 2005 under number 1695288.
- one of the templates T m (m ⁇ ⁇ i, I, L, T, V, X, Y, J, O ⁇ ) depicted on FIG. 1 and defined in “Color Harmonization” from Cohen-Or is selected subject to a rotation by ⁇ . Therefore, not only a template T is selected but a template with an orientation.
- the template of type N is not used.
- a template is also used to mean a template type with an orientation.
- the color histogram M of the regions of interest or salient parts of the images is computed in HSV space such as defined below in order to help choosing one template. It is the normalized hue distribution weighted by saturation and value:
- i usually but not necessarily varies from 0 to 360.
- the appropriate template T m0 and the associated orientation ⁇ 0 that best fits the hue distribution M is chosen by minimizing the Kullback-Leibler divergence computed for each template and each orientation:
- P(m, ⁇ ) is the distribution of template m for the orientation ⁇ .
- P(m, ⁇ ) typically represents a harmonized model, description, or approximation of M.
- P i indicates one bin of the distribution and M i one bin of the histogram.
- the template T m0 and the associated orientation ⁇ 0 are selected such that it matches the hue distribution M, i.e. such that the Kullback-Leibler divergence
- the template is not necessarily the one that best fits the hue distribution M, but it is close to the hue distribution M.
- step 12 is executed another time on the whole image in order to find the template that best fits the image.
- the color histogram M′ of the original image is computed in HSV space such as defined below in order to help choosing one template. It is the normalized hue distribution weighted by saturation and value:
- the appropriate template T m1 and the associated orientation ⁇ 1 that best fits the hue distribution M′ is chosen by minimizing the Kullback-Leibler divergence computed for each template and each orientation:
- P(m, ⁇ ) is the distribution of template m for the orientation ⁇ .
- P(m, ⁇ ) typically represents a harmonized model, description, or approximation of M′.
- the distribution P(m, ⁇ ) can be uniform in each sectors/portions of HVS values or can be a bump function. The invention is not limited by the way the distribution is defined.
- the template T m1 and the associated orientation ⁇ 1 are selected such that it matches the hue distribution M, i.e. such that the Kullback-Leibler divergence
- the template is not necessarily the one that best fits the hue distribution M′, but it is close to the hue distribution M′.
- Both templates T m0 and T m1 are then combined and the most similar template to this combination, among the nine harmonious templates, is selected by minimizing the Kullback-Leibler divergence between the combination and the distribution computed for each template and each orientation.
- a template is selected such that the Kullback-Leibler divergence between the combination of templates and the distribution computed for the selected template is below a threshold value.
- both templates are combined to form a new distribution P′.
- the template T m3 and orientation ⁇ 3 most similar to the combination, among the nine harmonious templates, is found by minimizing the Kullback-Leibler divergence between the combination and the distribution computed for each template and each orientation, i.e. the template and orientation that minimizes:
- the most similar template T m3 with orientation ⁇ 3 is compared to the whole image histogram.
- the following Kullback-Leibler divergence is computed:
- this divergence d3 is higher than k times the Kullback-Leibler divergence d1 between the whole image histogram and the template T m1 with the associated orientation ⁇ 1, where k is for example equals to 2, then the next most similar template T m4 with the orientation ⁇ 4 to the combination, among the eight remaining harmonious templates (the template T m3 and orientation ⁇ 3 being removed from the set), is selected by minimizing the Kullback-Leibler divergence between the combination and the distribution computed for each template and each orientation, i.e. the template and orientation that minimizes:
- the process is iterated until the template and orientation most similar to the combination and whose Kullback-Leibler divergence with the whole image histogram is lower than k times the Kullback-Leibler divergence between the original image histogram and the template T m1 with the associated orientation ⁇ 1 is found.
- a template T m3 and an orientation ⁇ 3 are selected such that the Kullback-Leibler divergence between the combination of templates and the distribution computed for the selected template is below a threshold value.
- the template (T m3 , ⁇ 3) is not necessarily the one that best fits the hue distribution M′, but it is close to the hue distribution M′.
- the pixels of the original image are mapped into the determined template.
- the template is either determined based only on the salient areas or is the combined template. More precisely, the outliers (in the sense that they are outside the selected template) are mapped into the harmonious sector(s) or close to by applying sophisticated tone mapping functions.
- a sigmoid function is thus used to map the hue of each pixel p:
- H ′ ⁇ ( p ) C ⁇ ( p ) + Sgn * w 2 * tanh ⁇ ( 2 * ⁇ H ⁇ ( p ) - C ⁇ ( p ) ⁇ w )
- C(p) is the central hue of the sector associated with p
- w is the arc-width of the template sector
- ⁇ ⁇ refers to the arc-length distance on the hue wheel
- Sgn is the sign associated with the direction of mapping.
- a pixel is for example mapped on a sector side that is the closest. As depicted on FIG. 3 , the pixel A is for example mapped on the right side of the sector since it is the closest side while pixel B is mapped on the left side of the sector.
- the hue wheel being oriented, Sgn is positive when the direction of mapping and the orientation of the wheel are in opposite direction (case of pixel A) while the Sgn is negative (case of pixel B) otherwise.
- the direction of mapping for a given pixel is not necessarily determined so that the pixel is mapped in the closest side of the sector.
- This sigmoid has good attributes for pixel mapping. Its asymptote in extreme value auto-clamp pixels in the template and its middle section (normal behavior) is nearly linear so, at the center of a sector, hues are not changed.
- the proposed mapping function guarantees original hue values at the center of the harmonious sectors and compresses more strongly hue values outside the template. The harmonic colors are preserved, and only non-harmonic hues are modified.
- CM or segmentation map of the original image is determined in an optional step 14 and is used during the step 16 to ensure that all pixels in the same segmented area of the CM map or segmentation map are mapped in the same direction of mapping and consequently in the same sector.
- This direction of mapping is for example the one mostly assigned to the pixels in a given segmented area.
- This direction of mapping is stored for example in a direction mapping map that associates with each pixel the direction of mapping of its segmented area.
- the color quantized map CM or segmentation map defines different regions in the original image that have close colors. Any method providing such a map can be used. As an example, the method described in “ Learning Color Names for Real - World Applications ” by J. van de Weijer et al published in IEEE Transactions in Image Processing 2009 is a solution. For color harmonization, the spatial aspect of the color segmentation is not compulsory. Therefore, a histogram segmentation technique is adequate here, such as the popular K-means method. However, such histogram segmentation should respect the following constraints:
- a color segmentation method is disclosed that build on the work of Delon et al. referred to as ACoPa (Automatic Color Palette) and disclosed in the paper entitled “ A nonparametric approach for histogram segmentation ” published in IEEE Transactions on Image Processing, 16(1):253-261, 2007.
- This color segmentation technique is based on a contrario analysis of the color histogram modes. A statistical estimation of meaningful histogram modes is performed. Instead of the hierarchical estimation of modes in the H, then S, then V space, a histogram decomposition of each component is performed independently. The obtained modes are combined from all modes obtained, and segments with a very limited group of pixels are discarded. Finally, based on these histograms modes, a K-means post-processing is used to group the modes that are perceptually similar using a dictionary expressed in the Lab color space.
- This segmentation technique is approximately 10 times faster than the original version. Besides, it deals more efficiently with achromatic pixels. Using a non-spatial algorithm allows to treat all pixels having the same colors without a priori on their position.
- segmentation is not perfect and some artifacts may appear at borders of segmented areas if each area has a different direction of mapping while their colors are originally close. These artifacts appear only on frontiers of segmented areas that undergo a hue mapping in opposite directions.
- a post processing step is thus applied which blurs pixels at borders thanks to an average filter in order to overcome the above problem.
- Concerned frontiers are detected thanks to a gradient filter applied on the direction mapping map to get a mask identifying pixels to be blurred.
- the mask is used to blur the corresponding pixels in the modified hue picture obtained at step 16 .
- the number of pixels to be blurred depends on the amount of blur at this location in the source picture. Indeed originally sharp areas have not to be blurred, which could be disturbing.
- the amount of blur is for example computed based on the method disclosed in document from H. Tong, M. Li et al entitled “ Blur detection for digital images using wavelet transform, ” IEEE International Conference on Multimedia & Expo, IEEE Press, pp. 17-20, 2004.
- FIG. 4 represents an exemplary architecture of a processing device 2 according to a specific and non limiting embodiment.
- the processing device can be for example a tablet, a PDA or a cell phone.
- Processing device 2 comprises following elements that are linked together by a data and address bus 24
- the processing device 2 may comprise display means such as a screen for displaying the processed images.
- the word ⁇ register>> used in the specification can correspond to area of small capacity (some bits) or to very large area (e.g. a whole program or large amount of received or decoded data).
- algorithms of the processing method according to the invention are stored in the ROM 22 .
- RAM 23 comprises in a register, the program executed by the CPU 21 and uploaded after switch on of the processing device 2 . When switched on, the CPU 21 uploads the program in the RAM and executes the corresponding instructions.
- the images to be processed are received on one of the Input/Output interfaces 25 .
- One of the Input/Output interface 25 is adapted to transmit the images processed according to the invention.
- processing devices 2 compatible with the invention are implemented according to a purely hardware realisation, for example in the form of a dedicated component (for example in an ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array) or VLSI (Very Large Scale Integration) or of several electronic components integrated into a device or even in a form of a mix of hardware elements and software elements.
- a dedicated component for example in an ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array) or VLSI (Very Large Scale Integration) or of several electronic components integrated into a device or even in a form of a mix of hardware elements and software elements.
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- VLSI Very Large Scale Integration
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Facsimile Image Signal Circuits (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
- Color Image Communication Systems (AREA)
Abstract
A method for processing an image is disclosed. The method comprises:
-
- determining regions of interest in the image;
- determining a color histogram of the regions of interest;
- selecting a first template that matches the color histogram in a set of templates, each template defining a portion of harmonious color values; and
- processing the image, wherein processing the image comprises mapping the colors of the image into a final template, the final template being the first template.
Description
- The invention relates to a method and a device for processing an image. More precisely, the method of image processing comprises mapping the colors of the image into a template of harmonious colors.
- It is known to correct colors in images or in some parts of the images to improve the perceptual experience. As an example, images with saturated colors are advantageously processed to remove these saturated colors and thus improve the perceptual experience.
- Document entitled “Color Harmonization” from Cohen-Or teaches a method for harmonizing images based on the same harmonious templates. These templates are depicted on
FIG. 1 . This method has several drawbacks. First, algorithms are not fully automatic, but require manual annotation for “sensitive” areas (typically skin or sky that look unnatural if they lose their original color). Second, color mapping is very basic. It maps color palette of the original image by applying a Gaussian filter constraint in a template. - The invention is aimed at alleviating at least one of the drawbacks of the prior art. To this aim, the invention relates to a method for processing an image comprising:
-
- determining regions of interest in the image;
- determining a color histogram of the regions of interest;
- selecting a first template that matches the color histogram in a set of templates, each template defining a portion of harmonious color values; and
- processing the image, wherein processing the image comprises mapping the colors of the image into a final template, the final template being the first template.
- The method according to the invention improves image perceptual quality over prior art solutions. In addition, the method is fully automatic.
- According to another aspect of the invention, the method further comprises determining a color histogram of the image, selecting a second template that matches the color histogram of the image, combining the first and the second templates into a combined template and selecting a template in the set of templates that matches the combined template, wherein the final template is the template selected that matches the combined template.
- Advantageously, a template being made of different portions, the method further comprises segmenting the image into regions of similar colors and wherein, in processing the image, pixels in the same segmented regions are mapped into one and the same portion of the final template.
- According to a specific embodiment, selecting a template that matches a color histogram comprises computing Kullback-Leibler divergence between a distribution of probability of the template and the color histogram.
- According to a specific characteristic of the invention, the color histograms are computed in the HSV color space as follows:
-
- where Mi is the ist bin of the corresponding color histogram;
- H[u,v] is the Hue value of pixel [u,v];
- S [x,y] is the Saturation value of pixel [x,y]; and
- V [x,y] is the Value value of pixel [x,y].
- Advantageously, the regions of interests are determined by binarising a saliency maps.
- Advantageously, mapping the colors of the image into a final template is done according to a sigmoid function.
- According to another aspect, the method further comprises blurring the pixels located on a border.
- The invention further relates to a device for processing an image comprising:
-
- means for determining regions of interest in the image;
- means for determining a color histogram of the regions of interest;
- means for selecting a first template that matches the color histogram in a set of templates, each template defining a portion of harmonious color values; and
- means for processing the image, wherein processing the image comprises mapping the colors of the image into a final template, the final template being the first template.
- Advantageously, the device is adapted to execute the steps of the method for processing.
- Other features and advantages of the invention will appear with the following description of some of its embodiments, this description being made in connection with the drawings in which:
-
FIG. 1 represents color templates; -
FIG. 2 depicts a flowchart of the image processing method according to the invention; -
FIG. 3 represents a hue wheel and mapping directions of two pixels A and B; and -
FIG. 4 depicts an image processing device according to the invention. - This invention aims at improving the visual experience by rendering colors in a more harmonious way. Indeed, when an image has one object of non-interest with a “strange” color (different from the global hue of the image), there is a need to correct that color.
- First, regions of interest in the image are determined. Then, the color histograms of these regions of interest are computed. The method then finds the closest harmonious template by perceptually choosing the most attractive pixels. A template is a set of HSV values (hue, saturation and value) that are considered as rendering/reflecting a global harmonious effect when present at the same time. Each template is made of different portions/sectors as depicted on
FIG. 1 . Once the closest harmonious template is estimated for example via the minimization of an energy, the color considered as being non-harmonious (i.e. whose color values are outside the template's sectors) are mapped into the template (or very close to this last one) by means of a tone mapping function. - A complete implementation of the invention is depicted in
FIG. 2 . Some of the steps of the method are optional. The four involved steps of the method are described below. One can notice that the following method can be extended to video source by applying same process to consecutive frames. - At a
step 10, regions of interest are determined. The invention is not limited by the way the regions of interest are determined. According to a specific embodiment, a saliency map is built that represents the most visually attractive pixels with values from 0 to 255. By binarising the saliency map one is able to determine the regions of interest, i.e. the regions whose saliency value is higher than a threshold value. Building the saliency map is based on the modeling of visual system. Such a visual attention model was patented in EP patent application 04804828.4 published on Jun. 30, 2005 under number 1695288. - At a
step 12, one of the templates Tm (m∈ {i, I, L, T, V, X, Y, J, O}) depicted onFIG. 1 and defined in “Color Harmonization” from Cohen-Or is selected subject to a rotation by α. Therefore, not only a template T is selected but a template with an orientation. The template of type N is not used. For the sake of clarity, a template is also used to mean a template type with an orientation. The color histogram M of the regions of interest or salient parts of the images is computed in HSV space such as defined below in order to help choosing one template. It is the normalized hue distribution weighted by saturation and value: -
- i usually but not necessarily varies from 0 to 360.
- Then, the appropriate template Tm0 and the associated orientation α0 that best fits the hue distribution M is chosen by minimizing the Kullback-Leibler divergence computed for each template and each orientation:
-
- where P(m, α) is the distribution of template m for the orientation α. Here P(m, α) typically represents a harmonized model, description, or approximation of M. Pi indicates one bin of the distribution and Mi one bin of the histogram. According to a variant, the template Tm0 and the associated orientation α0 are selected such that it matches the hue distribution M, i.e. such that the Kullback-Leibler divergence
-
- is below a threshold value. In this case, the template is not necessarily the one that best fits the hue distribution M, but it is close to the hue distribution M.
- According to another embodiment,
step 12 is executed another time on the whole image in order to find the template that best fits the image. The color histogram M′ of the original image is computed in HSV space such as defined below in order to help choosing one template. It is the normalized hue distribution weighted by saturation and value: -
- Then, the appropriate template Tm1 and the associated orientation α1 that best fits the hue distribution M′ is chosen by minimizing the Kullback-Leibler divergence computed for each template and each orientation:
-
- where P(m, α) is the distribution of template m for the orientation α. Here P(m, α) typically represents a harmonized model, description, or approximation of M′. The distribution P(m, α) can be uniform in each sectors/portions of HVS values or can be a bump function. The invention is not limited by the way the distribution is defined. According to a variant, the template Tm1 and the associated orientation α1 are selected such that it matches the hue distribution M, i.e. such that the Kullback-Leibler divergence
-
- is below a threshold value. In this case, the template is not necessarily the one that best fits the hue distribution M′, but it is close to the hue distribution M′.
- Both templates Tm0 and Tm1 are then combined and the most similar template to this combination, among the nine harmonious templates, is selected by minimizing the Kullback-Leibler divergence between the combination and the distribution computed for each template and each orientation. According to a variant, a template is selected such that the Kullback-Leibler divergence between the combination of templates and the distribution computed for the selected template is below a threshold value. First, both templates are combined to form a new distribution P′. The combination comprises taking for each bin the maximum value in the histogram of the template computed on the whole image and in the template computed on the salient pixels. For each bin i, P′i=max(Pi(m0,α0),Pi(m1,α1)).
- Second, the template Tm3 and orientation α3 most similar to the combination, among the nine harmonious templates, is found by minimizing the Kullback-Leibler divergence between the combination and the distribution computed for each template and each orientation, i.e. the template and orientation that minimizes:
-
- According to a variant, the most similar template Tm3 with orientation α3 is compared to the whole image histogram. To this aim, the following Kullback-Leibler divergence is computed:
-
- If this divergence d3 is higher than k times the Kullback-Leibler divergence d1 between the whole image histogram and the template Tm1 with the associated orientation α1, where k is for example equals to 2, then the next most similar template Tm4 with the orientation α4 to the combination, among the eight remaining harmonious templates (the template Tm3 and orientation α3 being removed from the set), is selected by minimizing the Kullback-Leibler divergence between the combination and the distribution computed for each template and each orientation, i.e. the template and orientation that minimizes:
-
- The process is iterated until the template and orientation most similar to the combination and whose Kullback-Leibler divergence with the whole image histogram is lower than k times the Kullback-Leibler divergence between the original image histogram and the template Tm1 with the associated orientation α1 is found.
- According to a variant, a template Tm3 and an orientation α3 are selected such that the Kullback-Leibler divergence between the combination of templates and the distribution computed for the selected template is below a threshold value. In this case, the template (Tm3, α3) is not necessarily the one that best fits the hue distribution M′, but it is close to the hue distribution M′.
- At a
step 16, the pixels of the original image are mapped into the determined template. The template is either determined based only on the salient areas or is the combined template. More precisely, the outliers (in the sense that they are outside the selected template) are mapped into the harmonious sector(s) or close to by applying sophisticated tone mapping functions. - A sigmoid function is thus used to map the hue of each pixel p:
-
- where C(p) is the central hue of the sector associated with p, w is the arc-width of the template sector and ∥ ∥ refers to the arc-length distance on the hue wheel and Sgn is the sign associated with the direction of mapping. A pixel is for example mapped on a sector side that is the closest. As depicted on
FIG. 3 , the pixel A is for example mapped on the right side of the sector since it is the closest side while pixel B is mapped on the left side of the sector. The hue wheel being oriented, Sgn is positive when the direction of mapping and the orientation of the wheel are in opposite direction (case of pixel A) while the Sgn is negative (case of pixel B) otherwise. According to the invention, the direction of mapping for a given pixel is not necessarily determined so that the pixel is mapped in the closest side of the sector. This sigmoid has good attributes for pixel mapping. Its asymptote in extreme value auto-clamp pixels in the template and its middle section (normal behavior) is nearly linear so, at the center of a sector, hues are not changed. The proposed mapping function guarantees original hue values at the center of the harmonious sectors and compresses more strongly hue values outside the template. The harmonic colors are preserved, and only non-harmonic hues are modified. - However skin and sky areas are not natural when modified in the
pixel mapping step 16 as disclosed above. Indeed, some artifacts may be created during this step because two neighboring pixels that have similar colors can be mapped in opposite directions and consequently in opposite sides of a same sector or in different sectors. According to another embodiment, to remove these artifacts, a color quantized map CM or segmentation map of the original image is determined in anoptional step 14 and is used during thestep 16 to ensure that all pixels in the same segmented area of the CM map or segmentation map are mapped in the same direction of mapping and consequently in the same sector. This direction of mapping is for example the one mostly assigned to the pixels in a given segmented area. This direction of mapping is stored for example in a direction mapping map that associates with each pixel the direction of mapping of its segmented area. The color quantized map CM or segmentation map defines different regions in the original image that have close colors. Any method providing such a map can be used. As an example, the method described in “Learning Color Names for Real-World Applications” by J. van de Weijer et al published in IEEE Transactions in Image Processing 2009 is a solution. For color harmonization, the spatial aspect of the color segmentation is not compulsory. Therefore, a histogram segmentation technique is adequate here, such as the popular K-means method. However, such histogram segmentation should respect the following constraints: -
- It should be unsupervised, meaning that the final number of color clusters should not be a parameter. As a matter of fact, the color harmonization would be very sensitive to an incorrect number of meaningful colors.
- The histogram segmentation technique should be capable of segmenting small modes of the histogram. In other words, small regions that could be seen as color outliers should be detected as separate modes.
- In order to meet these requirements, a color segmentation method is disclosed that build on the work of Delon et al. referred to as ACoPa (Automatic Color Palette) and disclosed in the paper entitled “A nonparametric approach for histogram segmentation” published in IEEE Transactions on Image Processing, 16(1):253-261, 2007. This color segmentation technique is based on a contrario analysis of the color histogram modes. A statistical estimation of meaningful histogram modes is performed. Instead of the hierarchical estimation of modes in the H, then S, then V space, a histogram decomposition of each component is performed independently. The obtained modes are combined from all modes obtained, and segments with a very limited group of pixels are discarded. Finally, based on these histograms modes, a K-means post-processing is used to group the modes that are perceptually similar using a dictionary expressed in the Lab color space.
- This segmentation technique is approximately 10 times faster than the original version. Besides, it deals more efficiently with achromatic pixels. Using a non-spatial algorithm allows to treat all pixels having the same colors without a priori on their position.
- The segmentation is not perfect and some artifacts may appear at borders of segmented areas if each area has a different direction of mapping while their colors are originally close. These artifacts appear only on frontiers of segmented areas that undergo a hue mapping in opposite directions.
- According to another embodiment, a post processing step is thus applied which blurs pixels at borders thanks to an average filter in order to overcome the above problem. Concerned frontiers are detected thanks to a gradient filter applied on the direction mapping map to get a mask identifying pixels to be blurred. The mask is used to blur the corresponding pixels in the modified hue picture obtained at
step 16. The number of pixels to be blurred depends on the amount of blur at this location in the source picture. Indeed originally sharp areas have not to be blurred, which could be disturbing. The amount of blur is for example computed based on the method disclosed in document from H. Tong, M. Li et al entitled “Blur detection for digital images using wavelet transform,” IEEE International Conference on Multimedia & Expo, IEEE Press, pp. 17-20, 2004. -
FIG. 4 represents an exemplary architecture of aprocessing device 2 according to a specific and non limiting embodiment. The processing device can be for example a tablet, a PDA or a cell phone.Processing device 2 comprises following elements that are linked together by a data andaddress bus 24 -
- a microprocessor 21 (or CPU), which is, for example, a DSP (or Digital Signal Processor);
- a ROM (or Read Only Memory) 22;
- a RAM (or Random Access Memory) 23;
- one or several Input/Output interface(s) 25, for example a keyboard, a mouse; and
- a
battery 26.
- Each of these elements of
FIG. 3 are well known by those skilled in the art and won't be disclosed further. Theprocessing device 2 may comprise display means such as a screen for displaying the processed images. In each of mentioned memory, the word <<register>> used in the specification can correspond to area of small capacity (some bits) or to very large area (e.g. a whole program or large amount of received or decoded data). According to a particular embodiment, algorithms of the processing method according to the invention are stored in theROM 22.RAM 23 comprises in a register, the program executed by theCPU 21 and uploaded after switch on of theprocessing device 2. When switched on, theCPU 21 uploads the program in the RAM and executes the corresponding instructions. The images to be processed are received on one of the Input/Output interfaces 25. One of the Input/Output interface 25 is adapted to transmit the images processed according to the invention. - According to variants,
processing devices 2 compatible with the invention are implemented according to a purely hardware realisation, for example in the form of a dedicated component (for example in an ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array) or VLSI (Very Large Scale Integration) or of several electronic components integrated into a device or even in a form of a mix of hardware elements and software elements.
Claims (13)
1-10. (canceled)
11. A method comprising:
selecting a first template of harmonious colors matching a color histogram of regions of interest in an image; and
mapping the colors of the image into a final template determined based on the first template, wherein the first template and the final template define portion(s) of harmonious color values.
12. The method according to claim 11 , further comprising:
selecting a second template of harmonious colors matching a color histogram of said image;
combining said first and second templates into a combined template; and
selecting a template of color harmony matching said combined template, said final template being said combined template.
13. The method according to claim 11 , further comprising segmenting the image into regions of similar colors, wherein the final template of harmonious colors comprising different portions of harmonious colors, mapping the colors of the image comprises mapping all the pixels of a segmented region into one and the same portion of the final template.
14. The method according to claim 11 , wherein the regions of interests are determined by binarising a saliency map.
15. The method according to claim 11 , wherein mapping the colors of the image into the final template is done according to a sigmoid function.
16. The method according to claim 11 , further comprising blurring the pixels located on frontiers in the picture.
17. A device comprising at least a processor configured to :
select a first template of harmonious colors matching a color histogram of regions of interest in an image; and
map the colors of the image into a final template determined based on the first template, wherein the first template and the final template define portion(s) of harmonious color values.
18. The device according to claim 17 , wherein the at least one processor is further configured to:
select a second template of harmonious colors matching a color histogram of said image;
combine said first and second templates into a combined template; and
select a template of color harmony matching said combined template, said final template being said combined template.
19. The device according to claim 18 , wherein the at least one processor is further configured to segment the image into regions of similar colors, wherein the final template of harmonious colors comprising different portions of harmonious colors, mapping the colors of the image comprises mapping all the pixels of a segmented region into one and the same portion of the final template.
20. The device according to claim 17 , wherein the regions of interests are determined by binarising a saliency map.
21. The device according to claim 17 , wherein mapping the colors of the image into the final template is done according to a sigmoid function.
22. The device according to claim 17 , further comprising blurring the pixels located on frontiers in the picture.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP12305693 | 2012-06-18 | ||
EP12305693.9 | 2012-06-18 | ||
PCT/EP2013/062304 WO2013189840A1 (en) | 2012-06-18 | 2013-06-13 | A device and a method for color harmonization of an image |
Publications (1)
Publication Number | Publication Date |
---|---|
US20150178587A1 true US20150178587A1 (en) | 2015-06-25 |
Family
ID=48607297
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/409,447 Abandoned US20150178587A1 (en) | 2012-06-18 | 2013-06-13 | Device and a method for color harmonization of an image |
Country Status (6)
Country | Link |
---|---|
US (1) | US20150178587A1 (en) |
EP (1) | EP2862346A1 (en) |
JP (1) | JP2015520467A (en) |
KR (1) | KR20150031241A (en) |
CN (1) | CN104488255A (en) |
WO (1) | WO2013189840A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150154466A1 (en) * | 2013-11-29 | 2015-06-04 | Htc Corporation | Mobile device and image processing method thereof |
CN110717911A (en) * | 2019-10-16 | 2020-01-21 | 南京工程学院 | A Disease Localization Method Based on Template Matching |
CN112132774A (en) * | 2019-07-29 | 2020-12-25 | 方玉明 | A Quality Evaluation Method for Tone Mapped Images |
US20210133932A1 (en) * | 2019-11-01 | 2021-05-06 | Lg Electronics Inc. | Color restoration method and apparatus |
US11176706B2 (en) * | 2016-02-03 | 2021-11-16 | Sportlogiq Inc. | Systems and methods for automated camera calibration |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2947865B1 (en) * | 2014-05-19 | 2017-03-22 | Thomson Licensing | Method for harmonizing colors, corresponding computer program and device |
US10531103B2 (en) * | 2014-10-16 | 2020-01-07 | Purdue Research Foundation | Video coding using a saliency map |
CN105139368B (en) * | 2015-08-12 | 2017-11-03 | 旗瀚科技有限公司 | A kind of mixed type tone mapping method available for machine vision |
CN106251360A (en) * | 2016-08-23 | 2016-12-21 | 湖南文理学院 | Thresholding Method for Grey Image Segmentation based on arithmetic geometry divergence |
CN106373084B (en) * | 2016-08-30 | 2020-09-18 | 北京奇艺世纪科技有限公司 | Special effect recommendation method and device |
CN111784709B (en) * | 2020-07-07 | 2023-02-17 | 北京字节跳动网络技术有限公司 | Image processing method, image processing device, electronic equipment and computer readable medium |
CN112233195B (en) * | 2020-10-15 | 2025-02-11 | 北京达佳互联信息技术有限公司 | Color adjustment method, device, electronic device and storage medium |
Citations (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5473738A (en) * | 1993-05-10 | 1995-12-05 | Hamlin; Jay F. | Interactive color harmonizing methods and systems |
US5909220A (en) * | 1993-05-10 | 1999-06-01 | Sandow; Robin | Interactive computerized image coloring systems and methods for processing combinations of color with automated subroutines and color standardization for diverse color systems |
US20020140823A1 (en) * | 2001-03-30 | 2002-10-03 | Mikio Sakurai | Image processing method, image processing apparatus and image processing program |
US6549213B1 (en) * | 2000-08-11 | 2003-04-15 | Energia, Inc. | Color harmonizing device and method for using the same |
US6587593B1 (en) * | 1998-04-28 | 2003-07-01 | Sharp Kabushiki Kaisha | Image processing device and image processing method |
US6870544B2 (en) * | 2001-01-10 | 2005-03-22 | X-Rite, Incorporated | Harmonizing color selection system and method |
US20070192164A1 (en) * | 2006-02-15 | 2007-08-16 | Microsoft Corporation | Generation of contextual image-containing advertisements |
US7536048B2 (en) * | 2004-01-15 | 2009-05-19 | Xerox Corporation | Method and apparatus for automatically determining image foreground color |
US7602527B2 (en) * | 2005-03-04 | 2009-10-13 | Fujifilm Corporation | Album creating apparatus, album creating method and program |
US20100092085A1 (en) * | 2008-10-13 | 2010-04-15 | Xerox Corporation | Content-based image harmonization |
US20100226564A1 (en) * | 2009-03-09 | 2010-09-09 | Xerox Corporation | Framework for image thumbnailing based on visual similarity |
US20100254597A1 (en) * | 2009-04-07 | 2010-10-07 | Jonathan Yen | System and method for facial tone indexing |
US20100309344A1 (en) * | 2009-06-05 | 2010-12-09 | Apple Inc. | Chroma noise reduction for cameras |
US8000526B2 (en) * | 2007-11-08 | 2011-08-16 | Tessera Technologies Ireland Limited | Detecting redeye defects in digital images |
US8041111B1 (en) * | 2007-10-15 | 2011-10-18 | Adobe Systems Incorporated | Subjective and locatable color theme extraction for images |
US20120268612A1 (en) * | 2007-05-07 | 2012-10-25 | The Penn State Research Foundation | On-site composition and aesthetics feedback through exemplars for photographers |
US20120294549A1 (en) * | 2011-05-17 | 2012-11-22 | Apple Inc. | Positional Sensor-Assisted Image Registration for Panoramic Photography |
US20120327243A1 (en) * | 2010-12-22 | 2012-12-27 | Seyyer, Inc. | Video transmission and sharing over ultra-low bitrate wireless communication channel |
US8718381B2 (en) * | 2006-07-31 | 2014-05-06 | Hewlett-Packard Development Company, L.P. | Method for selecting an image for insertion into a document |
US20150168811A1 (en) * | 2010-03-30 | 2015-06-18 | Sony Corporation | Image processing apparatus, method, and computer program storage device |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004221635A (en) * | 2003-01-09 | 2004-08-05 | Seiko Epson Corp | Color conversion device, color conversion method, color conversion program, and print control device |
EP1544792A1 (en) | 2003-12-18 | 2005-06-22 | Thomson Licensing S.A. | Device and method for creating a saliency map of an image |
EP1838083B1 (en) * | 2006-03-23 | 2020-05-06 | InterDigital CE Patent Holdings | Color metadata for a downlink data channel |
KR100834762B1 (en) * | 2006-09-29 | 2008-06-05 | 삼성전자주식회사 | Color Gamut Mapping Method and Apparatus |
CN101620731B (en) * | 2008-06-30 | 2013-10-16 | 汤姆森许可贸易公司 | Method for detecting layout areas in a video image and method for generating a reduced size image using the detection method |
US8004576B2 (en) * | 2008-10-31 | 2011-08-23 | Digimarc Corporation | Histogram methods and systems for object recognition |
JP2011035636A (en) * | 2009-07-31 | 2011-02-17 | Casio Computer Co Ltd | Image processor and method |
JP2011090431A (en) * | 2009-10-21 | 2011-05-06 | Seiko Epson Corp | Image processor, printing system, image processing method, and program |
CN102447814B (en) * | 2010-09-30 | 2015-11-25 | 无锡中星微电子有限公司 | The storage means of indirect color image and device, method for displaying image and device |
CN102262531A (en) * | 2011-06-10 | 2011-11-30 | 上海市金山区青少年活动中心 | Palette device binding with bidirectional data |
CN102663775A (en) * | 2012-03-30 | 2012-09-12 | 温州大学 | Target tracking method oriented to video with low frame rate |
-
2013
- 2013-06-13 US US14/409,447 patent/US20150178587A1/en not_active Abandoned
- 2013-06-13 CN CN201380032371.1A patent/CN104488255A/en active Pending
- 2013-06-13 WO PCT/EP2013/062304 patent/WO2013189840A1/en active Application Filing
- 2013-06-13 KR KR1020147035226A patent/KR20150031241A/en not_active Withdrawn
- 2013-06-13 JP JP2015517696A patent/JP2015520467A/en active Pending
- 2013-06-13 EP EP13728225.7A patent/EP2862346A1/en not_active Withdrawn
Patent Citations (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5473738A (en) * | 1993-05-10 | 1995-12-05 | Hamlin; Jay F. | Interactive color harmonizing methods and systems |
US5909220A (en) * | 1993-05-10 | 1999-06-01 | Sandow; Robin | Interactive computerized image coloring systems and methods for processing combinations of color with automated subroutines and color standardization for diverse color systems |
US6587593B1 (en) * | 1998-04-28 | 2003-07-01 | Sharp Kabushiki Kaisha | Image processing device and image processing method |
US6549213B1 (en) * | 2000-08-11 | 2003-04-15 | Energia, Inc. | Color harmonizing device and method for using the same |
US6870544B2 (en) * | 2001-01-10 | 2005-03-22 | X-Rite, Incorporated | Harmonizing color selection system and method |
US20020140823A1 (en) * | 2001-03-30 | 2002-10-03 | Mikio Sakurai | Image processing method, image processing apparatus and image processing program |
US7536048B2 (en) * | 2004-01-15 | 2009-05-19 | Xerox Corporation | Method and apparatus for automatically determining image foreground color |
US7602527B2 (en) * | 2005-03-04 | 2009-10-13 | Fujifilm Corporation | Album creating apparatus, album creating method and program |
US20070192164A1 (en) * | 2006-02-15 | 2007-08-16 | Microsoft Corporation | Generation of contextual image-containing advertisements |
US8718381B2 (en) * | 2006-07-31 | 2014-05-06 | Hewlett-Packard Development Company, L.P. | Method for selecting an image for insertion into a document |
US20120268612A1 (en) * | 2007-05-07 | 2012-10-25 | The Penn State Research Foundation | On-site composition and aesthetics feedback through exemplars for photographers |
US8041111B1 (en) * | 2007-10-15 | 2011-10-18 | Adobe Systems Incorporated | Subjective and locatable color theme extraction for images |
US8000526B2 (en) * | 2007-11-08 | 2011-08-16 | Tessera Technologies Ireland Limited | Detecting redeye defects in digital images |
US20100092085A1 (en) * | 2008-10-13 | 2010-04-15 | Xerox Corporation | Content-based image harmonization |
US20100226564A1 (en) * | 2009-03-09 | 2010-09-09 | Xerox Corporation | Framework for image thumbnailing based on visual similarity |
US20100254597A1 (en) * | 2009-04-07 | 2010-10-07 | Jonathan Yen | System and method for facial tone indexing |
US20100309344A1 (en) * | 2009-06-05 | 2010-12-09 | Apple Inc. | Chroma noise reduction for cameras |
US20150168811A1 (en) * | 2010-03-30 | 2015-06-18 | Sony Corporation | Image processing apparatus, method, and computer program storage device |
US20120327243A1 (en) * | 2010-12-22 | 2012-12-27 | Seyyer, Inc. | Video transmission and sharing over ultra-low bitrate wireless communication channel |
US20120294549A1 (en) * | 2011-05-17 | 2012-11-22 | Apple Inc. | Positional Sensor-Assisted Image Registration for Panoramic Photography |
Non-Patent Citations (1)
Title |
---|
Tang et al. "Color hanmonization for images" Journal of Electronic Imaging 20 (2), 023001 (Apr-Jun 2011) * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150154466A1 (en) * | 2013-11-29 | 2015-06-04 | Htc Corporation | Mobile device and image processing method thereof |
US11176706B2 (en) * | 2016-02-03 | 2021-11-16 | Sportlogiq Inc. | Systems and methods for automated camera calibration |
CN112132774A (en) * | 2019-07-29 | 2020-12-25 | 方玉明 | A Quality Evaluation Method for Tone Mapped Images |
CN110717911A (en) * | 2019-10-16 | 2020-01-21 | 南京工程学院 | A Disease Localization Method Based on Template Matching |
US20210133932A1 (en) * | 2019-11-01 | 2021-05-06 | Lg Electronics Inc. | Color restoration method and apparatus |
US11776092B2 (en) * | 2019-11-01 | 2023-10-03 | Lg Electronics Inc. | Color restoration method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
WO2013189840A1 (en) | 2013-12-27 |
EP2862346A1 (en) | 2015-04-22 |
CN104488255A (en) | 2015-04-01 |
KR20150031241A (en) | 2015-03-23 |
JP2015520467A (en) | 2015-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20150178587A1 (en) | Device and a method for color harmonization of an image | |
CN105654436B (en) | A kind of backlight image enhancing denoising method based on prospect background separation | |
US10198801B2 (en) | Image enhancement using self-examples and external examples | |
US20170132771A1 (en) | Systems and methods for automated hierarchical image representation and haze removal | |
Luan et al. | Fast single image dehazing based on a regression model | |
CN112507842A (en) | Video character recognition method and device based on key frame extraction | |
CN113592776A (en) | Image processing method and device, electronic device and storage medium | |
US9930220B2 (en) | Method and device for mapping colors in a picture using templates of harmonious colors | |
CN111489322A (en) | Method and device for adding sky filter to static picture | |
Choi et al. | Deep learning-based computational color constancy with convoluted mixture of deep experts (CMoDE) fusion technique | |
CN111652806B (en) | Method and system for removing shadows from image | |
Noori et al. | Digital image defogging using joint Retinex theory and independent component analysis | |
US20160127705A1 (en) | Method and device for processing a video | |
CN111275729A (en) | Method and system for precisely dividing sky area and method and system for changing sky of image | |
CN110942488A (en) | Image processing apparatus, image processing system, image processing method, and recording medium | |
Wu et al. | Color transfer with salient features mapping via attention maps between images | |
CN111667499A (en) | Image segmentation method, device and equipment for traffic signal lamp and storage medium | |
CN111754412A (en) | Method and device for constructing data pairs and terminal equipment | |
US9478044B2 (en) | Method and apparatus of creating a perceptual harmony map | |
Wu et al. | A VLSI architecture for real-time gradient guided image filtering | |
CN117575969B (en) | Infrared image quality enhancement method and device, electronic equipment and storage medium | |
US20240371185A1 (en) | Methods and systems for automated realistic video image modification | |
Yang et al. | Improved local adaptive logarithmic tone reproduction strategy for high contrast scenes in all-day surveillance applications | |
Wang et al. | Haze Removal via Edge Weighted Pixel-to-Patch Fusion | |
Ahmed et al. | Texture-Based Image Enhancement using Gabor Filters and Morphological Operations |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: THOMSON LICENSING SAS, FRANCE Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CHAMARET, CHRISTEL;BAVEYE, YOANN;URBAN, FABRICE;SIGNING DATES FROM 20141104 TO 20141112;REEL/FRAME:034925/0093 |
|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |