CN104240197B - A kind of erasing method for keeping contrast, colour consistency and gray-scale pixels feature - Google Patents

A kind of erasing method for keeping contrast, colour consistency and gray-scale pixels feature Download PDF

Info

Publication number
CN104240197B
CN104240197B CN201410424531.3A CN201410424531A CN104240197B CN 104240197 B CN104240197 B CN 104240197B CN 201410424531 A CN201410424531 A CN 201410424531A CN 104240197 B CN104240197 B CN 104240197B
Authority
CN
China
Prior art keywords
pixel
gray
color
formula
image
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.)
Expired - Fee Related
Application number
CN201410424531.3A
Other languages
Chinese (zh)
Other versions
CN104240197A (en
Inventor
刘春晓
罗婷婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Gongshang University
Original Assignee
Zhejiang Gongshang University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang Gongshang University filed Critical Zhejiang Gongshang University
Priority to CN201410424531.3A priority Critical patent/CN104240197B/en
Publication of CN104240197A publication Critical patent/CN104240197A/en
Application granted granted Critical
Publication of CN104240197B publication Critical patent/CN104240197B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses a kind of colour killing algorithm for keeping contrast, colour consistency and gray-scale pixels feature.The contrast that we are built by double gaussian model between pixel pair keeps energy term, structure and the local contrast information that original image is kept with this;We use and are locally linear embedding into model construction colour consistency bound energy item simultaneously, it is ensured that the pixel of solid colour also possesses the same gray level in result images in original image;In order to keep gray-scale pixels feature, we first mark the gray-scale pixels in original image, and the gray value of mandatory provision these pixels is known and is consistently equal to their R values during colour killing converts, the gray feature holding energy term between gray-scale pixels and other pixels is then constructed with double gaussian model.We linearly combine these three energy terms, obtain objective energy function, are then sent as an envoy to the gray value that total energy value reaches minimum by solution by iterative method again, so as to obtain final colour killing result.

Description

Decoloring method for keeping contrast, color consistency and gray pixel characteristics
Technical Field
The invention belongs to the field of computers, relates to the technical field of color image graying algorithm design, and particularly relates to a color erasing method for keeping contrast, color consistency and gray pixel characteristics.
Background
With the development of the scientific and technical level in recent years, the current digital printing technology cannot meet the requirement of people on the original image retention degree. Although the color printing technology appears in the market at present, more detailed information can be kept, the color printing technology needs much energy consumption and is expensive, and the color printing technology cannot be popularized in daily life for a while; meanwhile, many digital cameras design many different styles according to the requirements of customers, wherein the graying style of the images loses many important detailed information, and the requirements of art researchers with strict requirements on the images cannot be met. For this problem, if a new image graying algorithm can be proposed, the resulting image can keep the contrast information of the original image as much as possible, so that the digital printing technology and the image stylizing technology can better meet the requirements of the current market.
In the field of computers, a grayscale image is an image in which each pixel has only one sample color. Such images are typically displayed in gray scale from the darkest black to the brightest white, with gray scale values ranging from 0,255. Whereas a color image contains R, G, B three channel values, the task of converting a color image into a grayscale image is to reduce the dimensionality of the image, which necessarily loses a portion of the information, so that if a good result is to be achieved, the contrast of the original image must be maintained as much as possible.
However, current research on the human visual perception system indicates that the human visual system cannot accurately perceive changes in hue and brightness, and that each person has different sensitivity to changes in brightness. Meanwhile, as can be seen from the principle of achromatic transformation, limited gray levels cannot represent each color in the color space in a one-to-one correspondence, so that we can only retain as much of the contrast variation part as possible, which is most sensitive to visual perception. Also, since the human eye is most sensitive to color variations in adjacent regions of an image, we consider that information between adjacent pixels plays an important role in gray scale conversion. Moreover, the current graying algorithm rarely considers the problem of the characteristics of the gray pixels, and none of the algorithms can well maintain the color consistency, the contrast information and the characteristics of the gray pixels of the original image.
In light of the foregoing drawbacks and the conclusions drawn, we propose an achromatic method that preserves contrast, color consistency, and grayscale pixel characteristics. Compared with the existing algorithm, the algorithm can better maintain the structure and local contrast information of the original image, and can also maintain the color consistency and the gray pixel characteristics of the image.
Disclosure of Invention
To overcome the above problems, it is an object of the present invention to provide an achromatizing method that maintains contrast, color consistency and gray scale pixel characteristics.
A color erasing method for maintaining contrast, color consistency and gray scale pixel characteristics includes the following steps
(1) Reading a color image with the size of M multiplied by N, and converting the color image into a double-precision floating point type;
(2) calculating the corresponding color contrast of each pixel of the whole image by using a formula (3); then, calculating a contrast maintaining energy term of the whole image by using a formula (1);
in the formula (3), the reaction mixture is,
x is a pixel on the image, y is a 4-domain adjacent pixel of x, (x, y) belongs to NP, and NP represents an adjacent pixel set;
l, a and b respectively represent a brightness channel and two color channels of the color image in the Lab color space;
Lx,axand bxRespectively representing three color values of the pixel x on the Lab color space;
Ly,ayand byRespectively representing three color values of the pixel y on a Lab color space;
in the formula (1), G: (xy2) Expressing the Gaussian function, the concrete formula is as formula (2)
Wherein σ ∈ [0,1]Is a variable for controlling the degree of smoothing, gxAnd gyThe gray values of the x and y pixels to be solved;
in the formula (1), the reaction mixture is,αxyrepresenting the correspondence of pixels x and yxyThe calculation method is as shown in formula (6)
Wherein R isx,GxAnd BxRespectively representing three color values of the pixel x on the RGB color space; ry,GyAnd ByRespectively representing three color values of a pixel y on an RGB color space;
if αxy1, then the pixel pair obeys a single gaussian distribution function G (c:)xy2) Or G-xy2) Otherwise, we make the difference between the pixel pairs obey a double-gaussian distribution;
(3) finding out K nearest neighbors x corresponding to each pixel x by LLE algorithmjJ is 1,2, L, K, then calculating the weight value of each nearest neighbor in the process of fitting the original pixel by using a formula (8), and calculating the color consistency constraint energy item corresponding to the image by using a formula (7);
wherein,represents the weight occupied by the jth nearest neighbor in reconstructing pixel x, and satisfies the requirement for any fixed pixel x
U denotes all pixels of the entire image,for the jth nearest neighbor x of the pixel x to be solvedjThe gray value of (a);
(4) identifying three gray pixels t with equal color values in RGB color space in the whole image, and then calculating an error energy function between the gray pixels and other pixels x by using a formula (9), namely a gray pixel characteristic energy item;
wherein,
p represents the set of all gray pixels in the image;
xtthe calculation formula (3-1) of (c),
the difference lies in L in the formula (3)y,ayAnd byThree color values L in Lab color space for each pixel tt,atAnd btReplacing;
αxtthe calculation formula (6-1) of (a),
with the difference that R in formula (6)y,GyAnd ByThree color values R in RGB color space, respectively, of a pixel tt,GtAnd BtReplacing;
G(xt2) The calculation formula (2-1) of (a),
with the difference that g in formula (2)tThe gray value representing the gray pixel is a known quantity whose value is equal to the R corresponding to the pixel ttA value;
(5) finally, the three energy terms obtained above are linearly combined to obtain a total energy function shown in a formula (11), and an image gray value which enables the energy value to be minimum is obtained through an iterative solution method, so that an achromatic gray image is obtained
E=λ1E12E23E3(11)
Wherein E1Representing a contrast preserving energy term, E2Representing a color consistency constraint energy term, E3Representing a characteristic energy term, λ, of a gray-scale pixel1、λ2And λ3Are the weighting coefficients of the three energy terms, respectively.
Preferably, in the step (2), the gaussian function of formula (2) isxyHas reached the maximum value, andxyis not only related to the contrast between the pixel pair, but also to the gray scale symbol weight α of the pixel pairxyCorrelation due to gray scale symbol weighting αxyThere is no exact physical meaning in the formula, so we improve the flexibility of contrast retention constraint by adjusting its positive and negative;
for such color pairs that can clearly distinguish the order, we use the single gaussian function of equation (2);
the determination conditions are defined according to equation (4) to determine which color pairs are distinguishable:
Rx≤Ry&Gx≤Gy&Bx≤By(4)
wherein R isx,GxAnd BxRespectively representing the RGB colors of pixel xThree color values in space; ry,GyAnd ByRespectively representing three color values of a pixel y on an RGB color space;
if a pair of pixel pairs x, y can satisfy the condition in formula (4), the color order of the pair of pixel pairs can be clearly distinguished, and a single gaussian function shown in formula (2) is adopted; at this timexyIs directly dependent on gx-gy
If the pair of pixel pairs x, y cannot satisfy the condition in the formula (4), the designation is not made explicitlyxyUsing a double Gaussian model of equation (5) to automatically find a suitable color sequence
Preferably, said step (3) is in the process of treatingAs a whole, and thus gxAndobeys a gaussian distribution function; and since K nearest neighbors can well reconstruct the pixel x, the color contrast difference between the K nearest neighbors is ignored, and the sign problem does not need to be considered.
The invention is further described below, and the technical solution adopted to solve the technical problems of the invention is as follows:
1) contrast preserving energy term
To preserve the local and global contrast of the original image, we construct an energy function by a double gaussian model as follows:
for each pixel x, we first find its neighbor y, (x, y) ∈ N, N representing the set of neighbors, and then create the corresponding energy function according to the double Gaussian modelxy2) Expressing the Gaussian function, the concrete formula is as follows
Wherein σ ∈ [0,1]Is a variable for controlling the degree of smoothing;xythe color contrast is expressed, and the specific expression is as follows:
l, a and b denote a luminance channel and two color channels of the color image in the Lab space, respectively.
From equation (2), the Gaussian function isxyHas reached the maximum value, andxyis not only related to the contrast between the pixel pair, but also to the gray scale symbol weight α of the pixel pairxyAnd (4) correlating. Since the gray scale symbol weights have no exact physical significance in the formula, we improve the flexibility of the contrast preserving constraint by adjusting its positive and negative. How to select the symbol will be described in detail below.
In a color image, we can easily discern which color of the color pair is more intense. For example, any other color appears brighter than black to normal persons. For such color pairs that can clearly distinguish the order, we use a single gaussian function, as in equation (2). To better judge which color pairs are distinguishable, we define the judgment conditions as follows:
if a pair of pixel pairs x, y satisfies the condition of formula (4), we consider that the color order of the pair of pixel pairs can be clearly distinguished, and this timexyIs directly dependent on gx-gy. Otherwise we do not explicitly specifyxyBut instead a double gaussian model is used to automatically find a suitable color order. The double-Gaussian model is as follows:
according to the previously defined color order judgment method, we functionalize the judgment condition:
if αxy1, then the pixel pair adopts a single gaussian function G (c:)xy2) Or G-xy2). Otherwise, we subject the difference between the color pairs to a double Gaussian distribution, as in equation (5), to automatically select the symbol.
2) Color consistency constraint terms
In order to maintain the color consistency characteristic of an image, i.e. pixels with the same color possess the same gray value after gray-scale transformation, we construct an energy term as follows:
u represents all pixels of the entire image; w is axjRepresents the weight occupied by the jth nearest neighbor when reconstructing pixel x, and the value can be calculated by a Local Linear Embedding (LLE) algorithm.
The LLE algorithm is a nonlinear dimension reduction method for projecting a group of high-dimensional data onto a low-dimensional space, and can enable the data after dimension reduction to better keep the original flow pattern structure. Suppose a given set of data sets X1,......,XNWherein X isxA set of eigenvectors representing pixel x (in our approach, R, G, B three eigenvalues are used). For each XxWe find its K nearest neighbors, namely Xx1,......,Xxk. Then, a set of good reconstructions of X is calculated by minimizing the following energy functionxWeight w ofxj
Weight wxjIt is also necessary to satisfy a constraint condition, i.e.From the method described by Roweis and Saul, a weight matrix W (W) can be calculatedxjThe xj-th element representing W) that contains flow pattern information of the data set in the feature space. In our achromatization method, we wish to maintain this flow pattern structure, thereby ensuring that the image retains color consistency characteristics after achromatization. However, to maintain such a flow pattern structure, it is necessary to makegxRepresenting the achromatic result of pixel x. In the process, we willAs a whole, and thus gxAndobeys a gaussian distribution function. Since K nearest neighbors can well reconstruct the pixel x, the color contrast difference between the K nearest neighbors is ignored, and the symbol interval does not need to be consideredTo give a title. Based on these factors, we create the energy term E as shown in equation (7)2
3) Grayscale feature preserving energy term
There are pixels in a color image with three equal values of RGB, which we refer to as grayscale pixels. In theory, when performing gradation conversion, the gradation value of the gradation pixel is fixed to the R value. However, if we only include E in the objective function1And E2The term may cause the gray value of the gray pixel to change during image erasing. Thus, we define a grayscale feature preserving energy term.
Firstly, marking gray pixels from all pixels of an original image; these gray pixels are then considered as known quantities and an energy function is constructed. But if we only calculate these pixels as known pixel points, the difference in the magnitude of the gray-scale pixel from the other pixels will cause the gray-scale pixel to be particularly prominent in the resulting image. Therefore, in order to make the resulting image relatively harmonious and maintain the contrast ratio required by us, when creating the energy function, the gray-scale pixel is used as a hard constraint condition, so that the gray-scale values of other pixels can be adjusted according to the gray-scale value of the gray-scale pixel. The energy function is as follows:
the energy term indicates that each pixel needs to be subjected to one energy calculation with all gray pixels, wherein P represents the set of all gray pixels in the image, αxtRepresenting the correspondence of pixel xxtThe calculation method of the symbol weight of (2) is the same as that of equation (6). G (xt2) A gaussian function, which represents the difference between pixel x and gray-scale pixel t, follows the formula:
wherein g istRepresenting a gray pixel is a known quantity whose value is equal to the R value corresponding to pixel t.
The three energies are linearly combined to obtain the total energy function shown below
E=λ1E12E23E3(11)
Wherein E1Representing a contrast preserving energy term, E2Representing a color consistency constraint, E3Representing the grayscale features preserves the energy term. After a total objective function is established, an image gray value which enables an energy value to reach the minimum is obtained through an iterative method, and therefore a gray image is obtained.
The invention not only can better keep the structure and local contrast information of the original image, but also can simultaneously keep the color consistency and the gray pixel characteristics of the image.
The invention discloses a color erasing method for keeping contrast, color consistency and gray pixel characteristics. The core of our algorithm is to create and solve an objective energy function, which mainly contains three energy terms-contrast preserving energy term, color consistency constraining term and gray feature preserving energy term. In the algorithm, contrast maintaining energy terms between pixel pairs are constructed through a double-Gaussian model, so that the structure and local contrast information of an original image are maintained; meanwhile, a local linear embedding model is adopted to construct a color consistency constraint energy item, so that pixels with consistent colors in an original image are ensured to have the same gray level in a result image; to preserve the gray pixel characteristics, we first mark the gray pixels in the original image (i.e., R, G, B pixels with equal values) and force that the gray values of these pixels are known and always equal to their R values during the achromatic transformation, and then construct the gray feature preserving energy terms between the gray pixels and the other pixels using the double gaussian model. The three energy terms are linearly combined to obtain a target energy function, and then the gray value enabling the total energy value to reach the minimum is solved through an iteration method, so that the final achromatic result is obtained. The image obtained by our method can simultaneously maintain the contrast, color consistency and gray pixel characteristics of the original image.
Drawings
FIG. 1 shows the algorithm according to the invention for 6 different groups of images and the Grundland and Dodgson algorithms, respectively[1]And Smith et al[2]A comparative graph of (a).
FIG. 2 is a diagram of the algorithm of the present invention and Grundland and Dodgson's algorithms[1]And Lu et al algorithm[3]And its detail magnifies the comparison graph; (a) original color image, (b) algorithm of the present invention, (c) Grundland and Dodgson's algorithm [1](d) Lu et al [3](e-h) is the magnification effect of the selected area of the white box in (a-d).
Since the original image in the drawing is a color image and cannot be displayed in the text due to the limitation of the patent application specification, the original image is grayed by the rgb2gray function in matalab and displayed as the original image.
Detailed Description
The present invention is further illustrated below with reference to specific examples, which are to be understood as merely illustrative and not limitative of the scope of the present invention.
Examples
1. Reading an M multiplied by N color image, wherein the image data is integer type, and the calculation is for floating point type data, so that the image is firstly converted into double-precision floating point type;
2. calculating the corresponding color contrast of each pixel of the whole image by using a formula (3); then, calculating a contrast maintaining energy term of the whole image by using a formula (1);
in the formula (3), the reaction mixture is,
x is a pixel on the image, y is a 4-domain adjacent pixel of x, (x, y) belongs to NP, and NP represents an adjacent pixel set;
l, a and b respectively represent a brightness channel and two color channels of the color image in the Lab color space;
Lx,axand bxRespectively representing three color values of the pixel x on the Lab color space;
Ly,ayand byRespectively representing three color values of the pixel y on a Lab color space;
in the formula (1), G: (xy2) Expressing the Gaussian function, the concrete formula is as formula (2)
Wherein σ ∈ [0,1]Is a variable for controlling the degree of smoothing, gxAnd gyThe gray values of the x and y pixels to be solved;
in formula (1), αxyRepresenting the correspondence of pixels x and yxyThe calculation method is as shown in formula (6)
Wherein R isx,GxAnd BxRespectively representing three color values of the pixel x on the RGB color space; ry,GyAnd ByRespectively representing three color values of a pixel y on an RGB color space;
if αxy1, then the pixel pair obeys a single gaussian distribution function G (c:)xy2) Or G-xy2) Otherwise, we make the difference between the pixel pairs obey a double-gaussian distribution;
3. finding out K nearest neighbors x corresponding to each pixel by LLE algorithmjJ is 1,2, L, K, then calculating the weight value of each nearest neighbor in the process of fitting the original pixel by using a formula (8), and calculating the color consistency constraint energy item corresponding to the image by using an equation (7);
wherein, wxjRepresents the weight w occupied by the jth nearest neighbor in reconstructing pixel xxjSatisfy the requirement of
U denotes all pixels of the entire image,for the jth nearest neighbor x of the pixel x to be solvedjThe gray value of (a);
4. marking pixels with the same RGB values in the whole image, and then calculating an error energy function between the gray-scale pixels and the non-gray-scale pixels by using a formula (9), namely a gray-scale pixel characteristic energy item;
wherein,
p represents the set of all gray pixels in the image;
xtthe calculation formula (3-1) of (c),
the difference lies in L in the formula (3)y,ayAnd byThree color values L in Lab color space for each pixel tt,atAnd btReplacing;
αxtthe calculation formula (6-1) of (a),
with the difference that R in formula (6)y,GyAnd ByThree color values R in RGB color space, respectively, of a pixel tt,GtAnd BtReplacing;
G(xt2) The calculation formula (2-1) of (a),
with the difference that g in formula (2)tRepresenting the gray value of a gray pixel, which is oneA known quantity having a value equal to R corresponding to the pixel ttThe value is obtained.
5. Finally, the three energy terms obtained above are linearly combined to obtain a total energy function shown in a formula (11), and an image gray value which enables the energy value to be minimum is obtained through an iterative solution method, so that an achromatic gray image is obtained
E=λ1E12E23E3(11)
Wherein E1Representing a contrast preserving energy term, E2Representing a color consistency constraint, E3Representing a gray-scale feature preserving energy term, λ1、λ2And λ3Are the weighting coefficients of the three energy terms, respectively.
In order to more directly highlight the superiority of the algorithm, the results of the algorithm are compared with the results of three algorithms respectively throughThe two algorithms that have been found by the test of (1) have better performance-Grundland and Dodgson's algorithms[1]And Smith et al[2]And the better Lu et al algorithm in the field of color image graying in recent years[3]
FIG. 1 shows a comparison of 6 different sets of images from which we can find the results of Smith et al[2]Most of the local information is lost. And Grundland and Dodgson[1]Although more local contrast information can be maintained, it has certain limitations. The method is suitable for images with rich contents such as (e) and (f), and the effect of maintaining local contrast is not ideal for images with single contents and obvious color change such as (a), (b), (c) and (d). The method is not only suitable for the images with rich contents but also suitable for the images with single contents, and can well keep the global structure and the local contrast information of the original images at the same time.
For maintaining color consistency, the algorithm makes the pixels with the same color in the original image obtain the same gray value after conversion, and of course, the feature can also be embodied in the other two methods. The gray pixel parts of the images (a) and (b) are white edge parts in the images, in our result, the gray values of the gray pixels are always equal to the original R values, and the results of the other two algorithms are also white in appearance, but the gray values of the gray pixels are actually changed, so that the algorithms do not keep the gray pixel characteristics of the original images.
Fig. 2 is a detail comparison, and we can clearly see the wrinkles on the blue clothes in the original color image (a). Grundland and Dodgson, if used[1]And Lu et al[3]The algorithm of (a) performs achromatic transformation, and we obtain the results as shown in the graphs (c) and (d), and the wrinkles become smooth, which shows that the two methods lose important local detail information. In contrast, our method can clearly maintain these detailed information, as shown in fig. (b). FIG. 2: (a) original color image, (b) text algorithm, (c) Grundland and Dodgson's algorithm[1]And (d) Lu et al[3](e-h) is the magnification effect of the selected area of the white box in (a-d). Compared with Grundland and Dodgson algorithm[1]And Lu et al algorithm[3]Our algorithm is better able to maintain more detailed information.
Reference documents:
[1] krylon mark, daxon denier antoni achromatization: fast, contrast-enhanced color-to-grayscale conversion [ J ]. Pattern recognition, 2007,40(11): 2891-.
M.Grundland,N.A.Dodgson.Decolorize:Fast,contrast enhancing,color tograyscale conversion[J].Pattern Recognition,2007,40(11):2891–2896.
[2] Smith kelvin, rands peelle, telun julle, mackoviski carol significant graying: a simple and fast perceptually accurate video conversion method [ J ].
Computer graphics forum, 2008,27(2): 193- "200.
K.Smith,P.Landes,J.Thollot,and K.Myszkowski.Apparent greyscale:Asimple and fast conversion to perceptually accurate images and video[J].
Computer Graphics Forum,2008,27(2):193–200.
[3] Achromatism algorithm for contrast preservation [ C ] of the institute of electrical and electronics engineers, american society of electrical and electronics engineers, 2012,1-7.
Cewu Lu,Li Xu and Jiaya Jia.Contrast Preserving Decolorization[C].Proceedings of IEEE International Conference on Computational Photography,2012,1-7.
[4] Perceptual evaluation of Katik Martin color to grayscale image conversion [ J ] computer graphics Forum, 2008,27(7): 1745-.
M.Perceptual Evaluation of Color-to-Grayscale Image Conversions[J].Computer Graphics Forum,2008,27(7):1745-1754.

Claims (3)

1. An achromatization method for preserving contrast, color consistency and gray scale pixel characteristics, comprising: comprises the following steps
(1) Reading a color image with the size of M multiplied by N, and converting the color image into a double-precision floating point type;
(2) calculating the corresponding color contrast of each pixel of the whole image by using a formula (3); then, calculating a contrast maintaining energy term of the whole image by using a formula (1);
in the formula (3), the reaction mixture is,
x is a pixel on the image, y is a 4-domain adjacent pixel of x, (x, y) belongs to NP, and NP represents an adjacent pixel set;
l, a and b respectively represent a brightness channel and two color channels of the color image in the Lab color space;
Lx,axand bxRespectively representing three color values of the pixel x on the Lab color space;
Ly,ayand byRespectively representing three color values of the pixel y on a Lab color space;
in the formula (1), G: (xy2) Expressing the Gaussian function, the concrete formula is as formula (2)
Wherein σ ∈ [0,1]Is a variable for controlling the degree of smoothing, gxAnd gyThe gray values of the x and y pixels to be solved;
in formula (1), αxyRepresenting the correspondence of pixels x and yxyThe calculation method is as shown in formula (6)
Wherein R isx,GxAnd BxRespectively representing three color values of the pixel x on the RGB color space; ry,GyAnd ByRespectively representing three color values of a pixel y on an RGB color space;
if αxy1, then the pixel pair obeys a single gaussian distribution function G (c:)xy2) Or G-xy2) Otherwise, let us say that pixelThe difference between pairs obeys double-Gaussian distribution;
(3) finding out K nearest neighbors x corresponding to each pixel x by LLE algorithmjJ is 1,2, L, K …, then calculating the weight value of each nearest neighbor when fitting the original pixel by using formula (8), and then calculating the color consistency constraint energy item corresponding to the image by using formula (7);
wherein,represents the weight occupied by the jth nearest neighbor in reconstructing pixel x, and satisfies the requirement for any fixed pixel x
U denotes all pixels of the entire image,for the jth nearest neighbor x of the pixel x to be solvedjThe gray value of (a);
(4) identifying three gray pixels t with equal color values in RGB color space in the whole image, and then calculating an error energy function between the gray pixels and other pixels x by using a formula (9), namely a gray pixel characteristic energy item;
wherein,
p represents the set of all gray pixels in the image;
xtthe calculation formula (3-1) of (c),
the difference lies in L in the formula (3)y,ayAnd byThree color values L in Lab color space for each pixel tt,atAnd btReplacing;
αxtthe calculation formula (6-1) of (a),
with the difference that R in formula (6)y,GyAnd ByThree color values R in RGB color space, respectively, of a pixel tt,GtAnd BtReplacing;
G(xt2) The calculation formula (2-1) of (a),
with the difference that g in formula (2)tThe gray value representing the gray pixel is a known quantity whose value is equal to the R corresponding to the pixel ttA value;
(5) finally, the three energy terms obtained above are linearly combined to obtain a total energy function shown in a formula (11), and an image gray value which enables the energy value to be minimum is obtained through an iterative solution method, so that an achromatic gray image is obtained
E=λ1E12E23E3(11)
Wherein E1Representing a contrast preserving energy term, E2Representing a color consistency constraint energy term, E3Representing a characteristic energy term, λ, of a gray-scale pixel1、λ2And λ3Are the weighting coefficients of the three energy terms, respectively.
2. Maintaining contrast, color consistency and gray scale images as claimed in claim 1An achromatic method for pixel characteristics, comprising: in the step (2), the Gaussian function of the formula (2) isxyHas reached the maximum value, andxyis not only related to the contrast between the pixel pair, but also to the gray scale symbol weight α of the pixel pairxyCorrelation due to gray scale symbol weighting αxyThere is no exact physical meaning in the formula, so we improve the flexibility of contrast retention constraint by adjusting its positive and negative;
for such color pairs that can clearly distinguish the order, we use the single gaussian function of equation (2);
the determination conditions are defined according to equation (4) to determine which color pairs are distinguishable:
Rx≤Ry&Gx≤Gy&Bx≤By(4)
wherein R isx,GxAnd BxRespectively representing three color values of the pixel x on the RGB color space; ry,GyAnd ByRespectively representing three color values of a pixel y on an RGB color space;
if a pair of pixel pairs x, y can satisfy the condition in formula (4), the color order of the pair of pixel pairs can be clearly distinguished, and a single gaussian function shown in formula (2) is adopted; at this timexyIs directly dependent on gx-gy
If the pair of pixel pairs x, y cannot satisfy the condition in the formula (4), the designation is not made explicitlyxyUsing a double Gaussian model of equation (5) to automatically find a suitable color sequence
3. A method of achromatization preserving contrast, color consistency and gray scale pixel characteristics as claimed in claim 1 or 2, characterized in that: said step (3) is that in the treatment, theAs a whole, and thus gxAndobeys a gaussian distribution function; and since K nearest neighbors can well reconstruct the pixel x, the color contrast difference between the K nearest neighbors is ignored, and the sign problem does not need to be considered.
CN201410424531.3A 2014-08-26 2014-08-26 A kind of erasing method for keeping contrast, colour consistency and gray-scale pixels feature Expired - Fee Related CN104240197B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410424531.3A CN104240197B (en) 2014-08-26 2014-08-26 A kind of erasing method for keeping contrast, colour consistency and gray-scale pixels feature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410424531.3A CN104240197B (en) 2014-08-26 2014-08-26 A kind of erasing method for keeping contrast, colour consistency and gray-scale pixels feature

Publications (2)

Publication Number Publication Date
CN104240197A CN104240197A (en) 2014-12-24
CN104240197B true CN104240197B (en) 2017-12-15

Family

ID=52228206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410424531.3A Expired - Fee Related CN104240197B (en) 2014-08-26 2014-08-26 A kind of erasing method for keeping contrast, colour consistency and gray-scale pixels feature

Country Status (1)

Country Link
CN (1) CN104240197B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794690A (en) * 2015-04-01 2015-07-22 国家电网公司 Three-dimensional image color-to-gray correcting method based on SIFT (scale invariant feature transform) matching
CN107392967B (en) * 2017-07-05 2018-07-10 温州大学 A kind of coloured image gray processing method based on multimodal gauss of distribution function
CN115396622B (en) * 2022-10-28 2023-03-24 广东电网有限责任公司中山供电局 Electronic equipment for low-bit-rate video reconstruction
CN115598138B (en) * 2022-11-23 2023-04-07 惠州威尔高电子有限公司 Power control circuit board flaw detection method and system based on significance detection

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499167A (en) * 2009-03-17 2009-08-05 杨星 Graying method based on spectral reflection characteristics and three-color imaging principle
US7706606B1 (en) * 2006-05-31 2010-04-27 Adobe Systems Incorporated Fast, adaptive color to grayscale conversion
CN101951523A (en) * 2010-09-21 2011-01-19 北京工业大学 Adaptive colour image processing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7706606B1 (en) * 2006-05-31 2010-04-27 Adobe Systems Incorporated Fast, adaptive color to grayscale conversion
CN101499167A (en) * 2009-03-17 2009-08-05 杨星 Graying method based on spectral reflection characteristics and three-color imaging principle
CN101951523A (en) * 2010-09-21 2011-01-19 北京工业大学 Adaptive colour image processing method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Contrast Preserving Decolorization;Cewu Lu 等;《Proceedings of IEEE International Conference on Computational Photography》;20121231;1-7 *
改进的非线性全局映射灰度化方法;王辉 等;《计算机辅助设计与图形学学报》;20131031;第25卷(第10期);1476-1479,1488 *

Also Published As

Publication number Publication date
CN104240197A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
Hwang et al. Context-based automatic local image enhancement
Berezhnoy et al. Computer analysis of van Gogh’s complementary colours
CN104240197B (en) A kind of erasing method for keeping contrast, colour consistency and gray-scale pixels feature
CN107169508B (en) Cheong-sam image emotion semantic recognition method based on fusion features
CN105118076B (en) Based on over-segmentation and the local image colorization method with global coherency
CN111127360B (en) Gray image transfer learning method based on automatic encoder
EP4057609B1 (en) Method and apparatus for image correction
CN105139385A (en) Image visual saliency region detection method based on deep automatic encoder reconfiguration
CN109920018A (en) Black-and-white photograph color recovery method, device and storage medium neural network based
CN110853119A (en) Robust reference picture-based makeup migration method
Ganesan et al. Value based semi automatic segmentation of satellite images using HSV color space, histogram equalization and modified FCM clustering algorithm
CN104331877A (en) Color image edge detection method based on fusion color gradient
Ros et al. Unsupervised image transformation for outdoor semantic labelling
CN112991371B (en) Automatic image coloring method and system based on coloring overflow constraint
Rahman et al. An automatic face detection and gender classification from color images using support vector machine
CN102184403B (en) Optimization-based intrinsic image extraction method
Zhang et al. A skin color model based on modified GLHS space for face detection
CN102542590B (en) High-resolution SAR (Synthetic Aperture Radar) image marking method based on supervised topic model
Guo Digital anti-aging in face images
CN104217403B (en) A kind of method that coloured image is converted to gray level image
Li et al. Illumination estimation based on bilayer sparse coding
Gain et al. CCC++: Optimized Color Classified Colorization with Segment Anything Model (SAM) Empowered Object Selective Color Harmonization
CN105631812B (en) Control method and control device for color enhancement of display image
CN103871084A (en) Method for recognizing patterns of blueprint cloth
Vanrell et al. Induction operators for a computational colour–texture representation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171215

Termination date: 20180826