CN107180439B - Color cast characteristic extraction and color cast detection method based on Lab chromaticity space - Google Patents

Color cast characteristic extraction and color cast detection method based on Lab chromaticity space Download PDF

Info

Publication number
CN107180439B
CN107180439B CN201610559667.4A CN201610559667A CN107180439B CN 107180439 B CN107180439 B CN 107180439B CN 201610559667 A CN201610559667 A CN 201610559667A CN 107180439 B CN107180439 B CN 107180439B
Authority
CN
China
Prior art keywords
color cast
histogram
color
image
characteristic
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.)
Active
Application number
CN201610559667.4A
Other languages
Chinese (zh)
Other versions
CN107180439A (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.)
Chongqing University
Original Assignee
Chongqing 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 Chongqing University filed Critical Chongqing University
Priority to CN201610559667.4A priority Critical patent/CN107180439B/en
Publication of CN107180439A publication Critical patent/CN107180439A/en
Application granted granted Critical
Publication of CN107180439B publication Critical patent/CN107180439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention discloses a color cast characteristic extraction and color cast detection method based on Lab chromaticity space, which comprises the following steps: firstly), defining a color cast characteristic h in the height direction, defining the change rate of the color cast characteristic of an NNO area and defining the color cast characteristic of a brightness channel, and secondly), extracting the color cast characteristic h and the color cast characteristic of the brightness channel; the color cast detection method comprises the following steps: 1) calculating equivalent circle features u and sigma of the chromaticity histogram on an ab plane according to a formula; 2) executing a 'preliminary color cast detection' process; 3) and executing a non-color deviation image re-detection flow and the like. The invention more comprehensively considers the peak value distribution characteristic of the color chart histogram in the height direction, further considers the change rule of the color cast characteristics in the original image and the NNO area and the aggregation distribution characteristic of the color cast characteristics in the brightness channel, makes up the defects of the prior method in the aspects of definition and extraction of the color cast characteristics, and improves the color cast detection precision.

Description

Color cast characteristic extraction and color cast detection method based on Lab chromaticity space
Technical Field
The invention relates to the technical field of color cast detection of color images, in particular to a method for extracting color cast characteristics and detecting color cast.
Background
When a human being observes the world, the reflection of the optic nerve on color, shape, surface texture and detail features gradually weakens. Moreover, compared with characters and sound, the color image has richer connotation and stronger expressive ability. Therefore, color is the most important characteristic clue for obtaining objective world information, and is also a key factor for directly measuring the imaging quality of equipment. However, when the light source of the scene environment, the reflection characteristic of the object itself, or the light-sensitive coefficient of the capturing device changes, the color value of the object in the image recorded by the imaging device deviates from its own color, and the whole image has a color shift phenomenon. The method not only affects the visual effect of the image, but also affects subsequent processing such as image segmentation and target recognition, so that color cast detection and color cast correction are an indispensable link in the fields of color image processing and machine vision.
The most classical color shift detection is a class of methods based on color constancy. The general process of the method is that the illumination of a scene is estimated firstly, and then an input image shot under unknown illumination is converted into standard illumination through a von Kries model, so that the purposes of color cast detection and correction are achieved. The White Patch algorithm assumes that there is always a White surface in the scene, and takes the maximum value of the RGB color channels in the image as the estimated light source. The greenworld algorithm assumes that the color information in the scene is rich enough and that the reflection of all physical surfaces is achromatic (i.e., gray), and obtains the estimated light source by averaging the RGB color channels in the image. The Shades of Grey algorithm assumes that the whole scene still has no chromatic aberration after nonlinear reversible transformation, and uses Minkowski-norm distance to replace simple averaging, thereby neglecting the local correlation among pixels. The color constancy algorithm based on Bayesian inference estimates the illumination of the image from the posterior probability of the image color distribution by establishing a model between the surface reflectivity and the image illumination. And establishing a mapping model between scene illumination distribution and image color distribution by using a multilayer neural network or SVR respectively based on a color constancy algorithm of the neural network or the SVM, and predicting illumination of a new input image according to the model. However, such color shift detection methods based on color constancy are usually only suitable for application environments that satisfy specific scene assumptions, and if the assumption conditions cannot be satisfied, algorithm adaptability is difficult to achieve the expected effect.
In recent years, a color cast detection algorithm based on a Lab chromaticity histogram is widely used in consideration of a certain vector correlation between RGB color channels of a color image. Gasparini et al describe such algorithms completely. First, the luminance component of the L channel and the chrominance component of the ab channel are obtained by the conversion from RGB to Lab color space. Then, the distribution characteristics of the chromaticity histogram are counted by adopting a method based on the equivalent circle and the NNO area, and the quantitative calculation of the color cast characteristic and the color cast detection are realized. Similarly, Lifeng, Chen and the like judge color cast and non-color cast images by using two-dimensional chromaticity distribution characteristics of Lab color space, and provide a Gaussian mixture clustering model to distinguish essential color cast from real color cast. Compared with a color cast detection method based on color constancy, the method does not need scene hypothesis, has better scene adaptability, and can distinguish essential color cast from real color cast.
However, in the color cast feature extraction based on the equivalent circle, only the overall projection position information of the chromaticity histogram on the ab plane is substantially considered, which makes the method still coarse and insufficient in the definition and extraction of the color cast feature, thereby directly causing the existing Lab color cast detection algorithm to still have low color cast detection accuracy.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a color shift feature extraction and color shift detection method based on a Lab chromaticity space, which more fully considers a peak distribution characteristic of a color map histogram in a height direction, and further considers a variation rule of a color shift feature in an original image and an NNO region and an aggregation distribution characteristic of the color shift feature in a luminance channel, so as to solve a technical problem that an existing color shift detection algorithm based on the Lab chromaticity histogram still has a deficiency in definition and extraction of the color shift feature, thereby directly resulting in a low color shift detection accuracy.
The invention relates to a color cast characteristic extraction method based on Lab chromaticity space, which comprises the following steps:
one) defining color shift characteristics
1) The two-dimensional chromaticity histogram distribution function defining the channels a and b is as follows:
H=F(a,b)
wherein, a, b ∈ [ -128,127] is the chroma value of a, b color channel respectively, H is the number of pixel points corresponding to chroma value (a, b) in the image, the distribution function F (-) is a three-dimensional space distribution function;
2) defining the color cast characteristic h of the chromaticity histogram in the height direction as follows:
Figure GDA0002191302060000031
wherein the content of the first and second substances,
Figure GDA0002191302060000032
and hσRespectively representing the mean value and the variance of the chroma histogram in the height direction;
3) defining the color cast characteristic change rate of the NNO area:
Figure GDA0002191302060000033
wherein u isNNOAnd σNNOFor the circle-equivalent feature of the NNO region chromaticity histogram on the ab plane, hNNOIs the color shift characteristic of the NNO area chromaticity histogram in the height direction, then ucr、σcrAnd hcrRespectively representing the relative change rate of the equivalent circle feature and the height feature of the chromaticity histogram between the original image and the NNO area image;
4) defining the fitting degree R of a fitting curve and an envelope curve and the half width c of the fitting function as the color cast characteristic of a brightness channel by a brightness histogram envelope fitting algorithm based on a Gaussian distribution function,
the gaussian distribution function is:
Figure GDA0002191302060000034
wherein, a, b and c respectively represent the peak value size, the peak value center position and the half width information of Gaussian distribution, and x and y respectively represent independent variables and function values;
II) extracting color cast characteristics
1) Extracting the color cast characteristic h, comprising the following steps:
a) standardizing color images with different sizes into original images I to be detected with the same size1(i,j);
b) Computing a chroma histogram height matrix H for the normalized image0
Figure GDA0002191302060000041
Where n-256 denotes the chroma level of the a and b channels, and hijF (i-129, j-129) represents the number of pixels corresponding to the chrominance component a-i-129 and b-j-129 in the two-dimensional chrominance histogram distribution function;
c) to pairH0And performing filtering operation to eliminate the influence of image noise and small elements of peak values in the chrominance histogram:
H1=H0if h isij<T1M1Then h isij=0
Wherein H1For the filtered chrominance histogram height matrix, T1To filter the threshold, M1Is a height matrix H0Average value of (d):
Figure GDA0002191302060000042
d) calculating the mean value of the chrominance histogram in the height direction
Figure GDA0002191302060000045
Sum variance hσ
Wherein p is H1The number of middle 8 neighborhood connected regions, omegacWhere c is 1, …, p, denotes the c-th local connected domain, ScIs the area of communication of the region,
Figure GDA0002191302060000044
is the local height mean of the area;
2) extracting color cast characteristics of a brightness channel, comprising the following steps:
a) computing an L-channel histogram matrix N of a normalized image0
N0=[n0n1… n100]
Wherein n isiF (i), i is 0-100, which represents the number of pixel points corresponding to the brightness L, and f (·) is a brightness histogram function;
b) for luminance histogram N0Filtering to eliminate the influence of image noise and small peak value elements in the brightness histogram and obtain the filtered L-component histogram matrix N1
N1=N0If n isi<T2S2Then n isi=0
Wherein S is2=max(ni) Is a luminance histogram matrix N0Maximum element in (1), T2Is a filtering threshold;
c) adopting the Gaussian distribution function in the step four), and based on a least square algorithm, carrying out on the filtered brightness histogram N1I, y n, and the envelope data x ═ i, y ═ niAnd (5) carrying out curve fitting on the i-0-100 to obtain a fitted L-component histogram matrix N2
Figure GDA0002191302060000051
Wherein the content of the first and second substances,
Figure GDA0002191302060000052
representing the fitting result corresponding to the brightness L ═ i, g (·) is the gaussian distribution function described in step four), whose parameters a, b, and c have been obtained by the fitting algorithm;
d) according to the L component histogram matrix N after filtering and fitting1And N2And calculating the fitting degree R of the two by adopting a decision coefficient:
Figure GDA0002191302060000053
wherein i is 0 to 100 and represents the brightness level of L channel, and niRepresenting the filtered histogram matrix N1The sample value corresponding to the luminance L ═ i,
Figure GDA0002191302060000054
representing the fitted histogram matrix N2Corresponding to the fitted value of luminance L ═ i,
Figure GDA0002191302060000055
is N1Mean value of all elements in (R ∈ [0,1 ])]The joint approximation degree of the fitting value to the sample value is shown, and the closer R is to 1The higher the accuracy.
The invention also discloses a color cast detection method based on the Lab chromaticity space, which comprises the following steps:
step 1):
according to formula (1):
Figure GDA0002191302060000056
formula (2): c ═ u (u)a,ub),
Figure GDA0002191302060000057
And formula (3):
Figure GDA0002191302060000058
calculating equivalent circle features u and sigma of the chromaticity histogram on an ab plane; in formula (1), F (a, b) is a chromaticity histogram distribution function, k is a, b represents integration on the a-axis or b-axis, and u iskAnd σkRespectively representing the mean value and the variance of the chromaticity histogram on a k axis; c in the formula (2) is the center of the equivalent circle, and sigma is the radius of the equivalent circle;
step 2):
executing a 'preliminary color cast detection' process: if formula (4) is satisfied: (D > 10 and Dσ>0.6)or(DσMore than 1.5), the image is classified as 'color cast', and the step 5) is carried out; otherwise, the image is classified as 'no color cast', and the step 3) is carried out;
step 3):
and executing a non-color deviation image re-detection flow: according to equation (6):
Figure GDA0002191302060000061
according to the criterion, the image is divided into three types of color cast, no color cast and unrecognizable; turning to step 4) for the 'unrecognizable' image; for the image with color cast, turning to step 5);
step 4):
executing a 'recognizable image retest' process:
1) the feature extraction algorithm according to claim 1, calculating a color shift feature h of the chromaticity histogram in the height direction;
2) the feature extraction algorithm of claim 1, calculating the feature change rate u of the chroma channel in the NNO regioncr、σcrAnd hcr
3) Adopting the following criteria to detect the unrecognized image again:
Figure GDA0002191302060000062
step 5):
and executing a color cast image redetection flow:
1) the feature extraction algorithm of claim 1, calculating color shift features R and c of a luminance channel;
2) and adopting the following criteria to detect the color cast image again:
Figure GDA0002191302060000071
the invention has the beneficial effects that:
according to the color cast characteristic extraction and detection method based on the Lab chromaticity space, the peak value distribution characteristic of a color map histogram in the height direction is more comprehensively considered on the basis of a classical Lab color cast detection algorithm, the change rule of the color cast characteristic in an original image and an NNO region and the aggregation distribution characteristic of the color cast characteristic in a brightness channel are further considered, the defects of the existing method in the aspects of definition and extraction of the color cast characteristic are made up, and the color cast detection precision is improved.
Drawings
FIG. 1 is a flowchart of a color cast detection method based on Lab chromaticity space in the embodiment.
Detailed Description
The invention is further described below.
The color cast detection algorithm based on the Lab chromaticity histogram has the core idea that the vector correlation among colors is considered from the distribution characteristic of image color information. In order to quantitatively analyze the distribution characteristics of the chromaticity histogram, the classical Lab color cast detection algorithm realizes color cast characteristic extraction and color cast detection by introducing an equivalent circle and an NNO region. The classic Lab color cast detection algorithm flow is as follows:
step 1: and performing RGB-to-Lab color space conversion on the color image to be detected to obtain an image brightness component L and chrominance components a and b.
Step 2: the histogram of the chrominance component is counted, and the following theoretical basis can be found according to the distribution characteristics: the chromaticity histogram of the unbiased image should appear as a plurality of discrete peaks, and most of the peaks should be distributed around the neutral point (a ═ 0, b ═ 0); while the chroma histogram of a color cast image appears to contain zero or one concentrated peak, and the peak is offset from the neutral point.
And step 3: in order to quantitatively describe the concentration degree of the chromaticity histogram and the distance relation between the peak value distribution and the neutral point of the chromaticity histogram, an equivalence circle is introduced to calculate the characteristics of the chromaticity histogram.
Figure GDA0002191302060000081
Where F (a, b) is a chromaticity histogram distribution function, k ═ a, b denotes integration on the a axis or b axis, and u iskAnd σkRespectively mean and variance of the chrominance histogram on the k-axis. Then, according to the formula (1), the center C and the radius sigma of the equivalent circle are calculated:
Figure GDA0002191302060000082
on the basis, the following equivalent circular color cast characteristics are defined:
Figure GDA0002191302060000083
where u is the distance from the center of the circle to the neutral point (a is 0 and b is 0), D is the distance from the outside of the equivalent circle to the neutral point, and D is the distance from the outside of the equivalent circle to the neutral pointσIndicating the degree to which the equivalent circle deviates from the neutral point. DσThe larger the value, the more serious the deviation of the chromaticity histogram of the image from the neutral point or the stronger the aggregation of the peak value thereof, that is, the degree of color shiftThe more severe.
And 4, step 4: the equivalent circle feature of the chromaticity histogram is analyzed, and when the following condition is satisfied,
(D>10 and Dσ>0.6)or(Dσ>1.5) (4)
the chromaticity histogram is considered to be deviated from a neutral point and the peak values are gathered, and is initially classified as a color cast image; otherwise, the image is preliminarily classified as a "no color cast image".
And 5: further consider the following theoretical basis: the achromatic surface (the gray surface under the standard white light, namely the neutral gray area of the color image) in the image scene can completely reflect the color of the incident illumination in the scene, so the illumination offset condition of the image can be accurately estimated through the analysis of the NNO area in the scene. The method for finding the NNO area of the image is as follows:
Figure GDA0002191302060000091
l, a and b are three components of the image in Lab color space respectively, d is the maximum value of the chromaticity radius, and in order to prevent noise interference, the pixel point where d is located and the pixel point I in each NNO area are limitedNNO(i, j) are non-isolated points.
Step 6: and (3) extracting the NNO area image of the image preliminarily classified as 'no color cast' in the step (4) for detecting again, and solving the color cast characteristic D of the NNO area image by adopting the same method of the formula (1) to the formula (3)σNNOAnd performing the following determination:
Figure GDA0002191302060000092
and 7: and (3) for the images classified as color cast in the step (4) and the step (6), carrying out classification and identification by adopting a clustering learning algorithm: if the area of the image scene containing the dominant hue colors of the ocean, the blue sky, the grassland and the like reaches more than 40 percent of the total area of the image, the image is classified as 'intrinsic color cast'; otherwise, it is considered as "true color shift".
Obviously, the accuracy of the Lab color cast detection algorithm depends on the vector correlation analysis and quantitative calculation of the Lab color space distribution characteristics. Therefore, the invention mainly aims at improving the color cast characteristic based on the Lab chromaticity histogram and the characteristic extraction algorithm thereof, and provides a complete color cast detection improvement algorithm on the basis of a new color cast characteristic and a classic Lab color cast detection algorithm.
The color cast characteristic extraction method based on the Lab chromaticity space comprises the following steps:
one) two-dimensional chroma histogram distribution function defining a, b channels is:
H=F(a,b) (7)
wherein, a, b ∈ [ -128,127] is the chroma value of a, b color channel respectively, H is the number of pixel points corresponding to chroma value (a, b) in the image, and the distribution function F (·) is a three-dimensional spatial distribution function. In a classical Lab color cast detection algorithm, an equivalent circle is the only basis for extracting color cast characteristics from distribution of a chromaticity histogram, and although the equivalent circle can better describe distribution characteristics such as the overall position (distance u from a circle center to a neutral point) and the overall aggregation (radius sigma) of the chromaticity histogram, in the process of mapping the three-dimensional spatial distribution projection of the color map histogram to a two-dimensional ab plane where the equivalent circle is located, an important characteristic clue of histogram height information is obviously lost.
In the research, the information of the chromaticity histogram in the height direction can well reflect the difference degree of the color cast image and the non-color cast image. The theoretical basis is as follows: for an image without color cast, as various chrominance components in the image are rich and have obvious dispersity, the distribution of the main tone and other secondary tones in the height direction is less different; in contrast, in the case of a color cast image, since the chroma components exhibit significant aggregability, the difference in the distribution of the dominant hue and the other subordinate hues in the height direction is large.
Second) in order to quantitatively describe and calculate the size distribution and the difference degree of the chromaticity histogram in the height direction, the present embodiment defines the color shift characteristic h of the chromaticity histogram in the height direction as:
Figure GDA0002191302060000101
wherein the content of the first and second substances,
Figure GDA0002191302060000102
and hσRespectively, mean and variance of the chrominance histogram in the height direction.
The specific algorithm for extracting the color cast characteristic h is described as follows:
step 1: standardizing color images with different sizes into original images I to be detected with the same size1(i, j), although the image processed in this way may be distorted in visual effect, the statistical properties of the color distribution are not changed.
Step 2: computing a chroma histogram height matrix H for the normalized image0
Figure GDA0002191302060000103
Where n-256 denotes the chroma level of the a and b channels, and hijF (i-129, j-129) represents the number of pixels corresponding to the chrominance component a-i-129 and b-j-129 in the two-dimensional chrominance histogram distribution function.
And step 3: to H0And performing filtering operation to eliminate the influence of image noise and small elements of peak values in the chrominance histogram:
H1=H0if h isij<T1M1Then h isij=0 (10)
Wherein H1For the filtered chrominance histogram height matrix, T1To filter the threshold, M1Is a height matrix H0Average value of (d):
Figure GDA0002191302060000111
and 4, step 4: calculating the mean value of the chrominance histogram in the height direction
Figure GDA0002191302060000115
Sum variance hσ
Figure GDA0002191302060000112
Wherein p is H1The number of middle 8 neighborhood connected regions, omegacWhere c is 1, …, p, denotes the c-th local connected domain, ScIs the area of communication of the region,is the local height mean of the region.
Thirdly), in a classical Lab color cast detection algorithm, only the parameter characteristics of the equivalent circle of the two-dimensional chromaticity histogram of the NNO area image are considered, and quantitative analysis before and after feature change is not carried out by combining the relevant parameters of the original image. Therefore, in the process of re-detecting the NNO area that is preliminarily determined as the "unbiased image", a false determination phenomenon is likely to occur.
In our research, it is found that if the color cast characteristics of the chromaticity histogram in the equivalent circular plane and the height direction are quantitatively analyzed by combining the original image and the NNO area image, the difference degree between the color cast image and the non-color cast image can be better reflected. The theoretical basis is as follows: for an unbiased image, the equivalent circle radius of the NNO area is reduced by a larger amplitude and is closer to a neutral point, and the feature change amplitude of the chromaticity histogram of the NNO area in the height direction is smaller; and for the color cast image, the equivalent circle radius reduction amplitude of the NNO area is smaller and is further away from the neutral point, and the characteristic variation amplitude of the chromaticity histogram of the NNO area in the height direction is larger. In order to quantitatively describe and calculate the change rule of the color cast characteristic between the original image and the NNO area image, the present embodiment further defines the following NNO area color cast characteristic change rate:
wherein u isNNOAnd σNNOFor the equivalent circular feature of the NNO area chroma histogram on the ab plane,hNNOis the color shift characteristic of the NNO area chromaticity histogram in the height direction, then ucr、σcrAnd hcrRepresenting the relative rates of change of the equivalent circle and height features of the chrominance histogram between the original image and the NNO area image, respectively.
Fourth) in the classical Lab color cast detection algorithm, only the distribution characteristics of the two-dimensional chrominance components a and b are considered, and the channel characteristic of the luminance component L is not considered. In our research, it is found that the L component in the Lab chromaticity space can better reflect the difference degree between the intrinsic color shift and the true color shift: for an intrinsic color cast image, the L-channel histogram thereof shows a regional unimodal aggregation distribution; for a real color cast image, the L-channel histogram of the real color cast image presents a more uniform discrete distribution.
Consider the following gaussian distribution function:
Figure GDA0002191302060000121
wherein, a, b and c respectively represent the peak size, peak center position and half-width information of the Gaussian distribution, and x and y respectively represent the independent variable and the function value. This gaussian distribution function also exhibits a regionally unimodal aggregate distribution characteristic, with smaller half-widths c indicating a more aggregated gaussian distribution.
In order to quantitatively describe and calculate the distribution characteristics of the L-channel histogram, the present embodiment proposes a luminance histogram envelope fitting algorithm based on gaussian distribution, and defines the fitting degree R of the fitting curve and the envelope curve, and the half width c of the fitting function as the color shift characteristic of the luminance channel. Obviously, the higher the degree of fit (the larger R) and the better the region clustering (the smaller c), the more apparent the clustering of the single peak representing the L-channel histogram, the more likely the corresponding color image is to be intrinsically color-shifted.
The specific algorithm for extracting the color cast characteristic of the brightness channel is described as follows:
step 1: computing an L-channel histogram matrix N of a normalized image0
N0=[n0n1… n100](15)
Wherein n isiAnd f (i), wherein i is 0-100, the number of pixels corresponding to the brightness L is i, and f (·) is a brightness histogram function.
Step 2: for luminance histogram N0Filtering to eliminate the influence of image noise and small peak value elements in the brightness histogram and obtain the filtered L-component histogram matrix N1
N1=N0If n isi<T2S2Then n isi=0 (16)
Wherein S is2=max(ni) Is a luminance histogram matrix N0Maximum element in (1), T2For filtering threshold, T is taken in this embodiment2=0.2。
And step 3: using the Gaussian distribution function described by the formula (14), based on the least square algorithm, to obtain the filtered brightness histogram N1I, y n, and the envelope data x ═ i, y ═ niAnd (5) carrying out curve fitting on the i-0-100 to obtain a fitted L-component histogram matrix N2
Figure GDA0002191302060000131
Wherein the content of the first and second substances,
Figure GDA0002191302060000132
the fitting result corresponding to the luminance L ═ i is shown, and g (·) is a gaussian distribution function described by equation (14), and the parameters a, b, and c have been obtained by the fitting algorithm.
And 4, step 4: according to the L component histogram matrix N after filtering and fitting1And N2And calculating the fitting degree R of the two by adopting a decision coefficient:
Figure GDA0002191302060000133
wherein i is 0 to 100 and represents the brightness level of L channel, and niRepresenting the filtered histogram matrix N1The sample value corresponding to the luminance L ═ i,
Figure GDA0002191302060000134
representing the fitted histogram matrix N2Corresponding to the fitted value of luminance L ═ i,
Figure GDA0002191302060000135
is N1Mean value of all elements in (R ∈ [0,1 ])]The joint approximation of the fitting values to the sample values is shown, with the fitting accuracy being higher the closer R is to 1.
The color cast detection method based on the Lab chromaticity space comprises the following steps:
step 1: according to the equations (1) to (3), equivalent circle features u and σ of the chromaticity histogram on the ab plane are calculated.
Step 2: executing a 'preliminary color cast detection' process: if the condition of the formula (4) is met, classifying the image as color cast, and turning to the step 5; otherwise, the image is classified as 'no color cast', and step 3 is carried out.
And step 3: and executing a non-color deviation image re-detection flow: according to the criterion of the formula (6), the image is divided into three categories of color cast, no color cast and unrecognizable; turning to step 4 for the image which cannot be identified; for "color cast" images, go to step 5.
And 4, step 4: executing a 'recognizable image retest' process:
1) calculating the color cast characteristic h of the chromaticity histogram in the height direction according to the extraction algorithm of the color cast characteristic h;
2) calculating the characteristic change rate u of the chrominance channel in the NNO region according to the characteristic extraction algorithm of the color cast characteristic of the luminance channelcr、σcrAnd hcr
3) Adopting the following criteria to detect the unrecognized image again:
Figure GDA0002191302060000141
and 5: and executing a color cast image redetection flow:
1) calculating color cast characteristics R and c of the brightness channel according to a characteristic extraction algorithm of the color cast characteristics of the brightness channel;
2) and adopting the following criteria to detect the color cast image again:
Figure GDA0002191302060000142
in this embodiment, in order to verify the validity of the color cast characteristic proposed by the present invention, a test data set consisting of 480 color images was constructed. Where the numbers of the color cast and non-color cast images are 191 and 289, respectively. In this experiment, the improved color shift characteristic was first obtained using the color shift characteristic extraction method based on the Lab colorimetric space in the present embodiment. Then, color shift detection was performed using the Lab colorimetric space-based color shift detection method in this example. For the images which are not identified in step 6) of the classical Lab color cast detection algorithm, the following processing is performed to obtain higher accuracy:
Figure GDA0002191302060000143
as can be seen from the detection results listed in Table I, the color cast characteristic and the characteristic extraction method provided by the invention are feasible; in addition, compared with a classical Lab-based color cast detection algorithm, the characteristics and the detection method provided by the invention have higher accuracy.
Table-test results of all test images
Figure GDA0002191302060000151
Finally, the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all of them should be covered in the claims of the present invention.

Claims (2)

1. A color cast characteristic extraction method based on Lab chromaticity space is characterized by comprising the following steps: the method comprises the following steps:
one) defining color shift characteristics
1) The two-dimensional chromaticity histogram distribution function defining the channels a and b is as follows:
H=F(a,b)
wherein, a, b ∈ [ -128,127] is the chroma value of a, b color channel respectively, H is the number of pixel points corresponding to chroma value (a, b) in the image, the distribution function F (-) is a three-dimensional space distribution function;
2) defining the color cast characteristic h of the chromaticity histogram in the height direction as follows:
Figure FDA0002307977550000011
wherein the content of the first and second substances,
Figure FDA0002307977550000012
and hσRespectively representing the mean value and the variance of the chroma histogram in the height direction;
3) defining the color cast characteristic change rate of the NNO area:
Figure FDA0002307977550000013
wherein u and sigma are equivalent circle features of the chromaticity histogram on the ab plane, and uNNOAnd σNNOFor the circle-equivalent feature of the NNO region chromaticity histogram on the ab plane, hNNOIs the color shift characteristic of the NNO area chromaticity histogram in the height direction, then ucr、σcrAnd hcrRespectively representing the relative change rate of the equivalent circle feature and the height feature of the chromaticity histogram between the original image and the NNO area image;
4) defining the fitting degree R of a fitting curve and an envelope curve and the half width c of the fitting function as the color cast characteristic of a brightness channel by a brightness histogram envelope fitting algorithm based on a Gaussian distribution function,
the gaussian distribution function is:
Figure FDA0002307977550000014
wherein, a, b and c respectively represent the peak value size, the peak value center position and the half width information of Gaussian distribution, and x and y respectively represent independent variables and function values;
II) extracting color cast characteristics
1) Extracting the color cast characteristic h, comprising the following steps:
a) standardizing color images with different sizes into original images I to be detected with the same size1(i,j);
b) Computing a chroma histogram height matrix H for the normalized image0
Figure FDA0002307977550000021
Where n-256 denotes the chroma level of the a and b channels, and hijF (i-129, j-129) represents the number of pixels corresponding to the chrominance component a-i-129 and b-j-129 in the two-dimensional chrominance histogram distribution function;
c) to H0And performing filtering operation to eliminate the influence of image noise and small elements of peak values in the chrominance histogram:
H1=H0if h isij<T1M1Then h isij=0
Wherein H1For the filtered chrominance histogram height matrix, T1To filter the threshold, M1Is a height matrix H0Average value of (d):
wherein n-256 represents the chroma level of the a and b channels;
d) calculating the mean value of the chrominance histogram in the height direction
Figure FDA0002307977550000023
Sum variance hσ
Figure FDA0002307977550000024
Wherein p is H1The number of middle 8 neighborhood connected regions, omegacWhere c is 1, …, p, denotes the c-th local connected domain, ScIs the area of communication of the region,
Figure FDA0002307977550000025
is the local height mean of the area;
2) extracting color cast characteristics of a brightness channel, comprising the following steps:
a) computing an L-channel histogram matrix N of a normalized image0
N0=[n0n1… n100]
Wherein n isiF (i), i is 0-100, which represents the number of pixel points corresponding to the brightness L, and f (·) is a brightness histogram function;
b) for luminance histogram N0Filtering to eliminate the influence of image noise and small peak value elements in the brightness histogram and obtain the filtered L-component histogram matrix N1
N1=N0If n isi<T2S2Then n isi=0
Wherein S is2=max(ni) Is a luminance histogram matrix N0Maximum element in (1), T2Is a filtering threshold;
c) adopting the Gaussian distribution function in the step four), and based on a least square algorithm, carrying out on the filtered brightness histogram N1I, y n, and the envelope data x ═ i, y ═ niAnd (5) carrying out curve fitting on the i-0-100 to obtain a fitted L-component histogram matrix N2
Figure FDA0002307977550000031
Wherein the content of the first and second substances,
Figure FDA0002307977550000032
representing the fitting result corresponding to the brightness L ═ i, g (·) is the gaussian distribution function described in step four), whose parameters a, b, and c have been obtained by the fitting algorithm;
d) according to the L component histogram matrix N after filtering and fitting1And N2And calculating the fitting degree R of the two by adopting a decision coefficient:
wherein i is 0 to 100 and represents the brightness level of L channel, and niRepresenting the filtered histogram matrix N1The sample value corresponding to the luminance L ═ i,
Figure FDA0002307977550000034
representing the fitted histogram matrix N2Corresponding to the fitted value of luminance L ═ i,is N1Mean value of all elements in (R ∈ [0,1 ])]The joint approximation of the fitting values to the sample values is shown, with the fitting accuracy being higher the closer R is to 1.
2. A color cast detection method based on the Lab colorimetric space color cast feature extraction method as claimed in claim 1, wherein: the method comprises the following steps:
step 1):
according to formula (1):
Figure FDA0002307977550000041
formula (2):
Figure FDA0002307977550000042
and formula (3):
Figure FDA0002307977550000043
calculating equivalent circle features u and sigma of the chromaticity histogram on an ab plane; in formula (1), F (a, b) is a chromaticity histogram distribution function, k is a, b represents integration on the a-axis or b-axis, and u iskAnd σkRespectively representing the mean value and the variance of the chromaticity histogram on a k axis; c in the formula (2) is the center of the equivalent circle, and sigma is the radius of the equivalent circle;
step 2):
executing a 'preliminary color cast detection' process: if formula (4) is satisfied: (D > 10 and Dσ>0.6)or(DσMore than 1.5), the image is classified as 'color cast', and the step 5) is carried out; otherwise, the image is classified as 'no color cast', and the step 3) is carried out;
step 3):
and executing a non-color deviation image re-detection flow: according to equation (6):
Figure FDA0002307977550000044
according to the criterion, the image is divided into three types of color cast, no color cast and unrecognizable; turning to step 4) for the 'unrecognizable' image; for the image with color cast, turning to step 5);
step 4):
executing a 'recognizable image retest' process:
1) the feature extraction method according to claim 1, calculating a color shift feature h of the chromaticity histogram in the height direction;
2) the feature extraction method of claim 1, calculating the feature change rate u of the chrominance channels in the NNO regioncr、σcrAnd hcr
3) Adopting the following criteria to detect the unrecognized image again:
Figure FDA0002307977550000051
step 5):
and executing a color cast image redetection flow:
1) the feature extraction method according to claim 1, wherein color cast features R and c of the luminance channel are calculated, R is the fitting degree of a fitting curve and an envelope curve, and c is the half width of a fitting function;
2) and adopting the following criteria to detect the color cast image again:
Figure FDA0002307977550000052
CN201610559667.4A 2016-07-15 2016-07-15 Color cast characteristic extraction and color cast detection method based on Lab chromaticity space Active CN107180439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610559667.4A CN107180439B (en) 2016-07-15 2016-07-15 Color cast characteristic extraction and color cast detection method based on Lab chromaticity space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610559667.4A CN107180439B (en) 2016-07-15 2016-07-15 Color cast characteristic extraction and color cast detection method based on Lab chromaticity space

Publications (2)

Publication Number Publication Date
CN107180439A CN107180439A (en) 2017-09-19
CN107180439B true CN107180439B (en) 2020-02-04

Family

ID=59830522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610559667.4A Active CN107180439B (en) 2016-07-15 2016-07-15 Color cast characteristic extraction and color cast detection method based on Lab chromaticity space

Country Status (1)

Country Link
CN (1) CN107180439B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110807739A (en) * 2019-09-17 2020-02-18 中国科学院自动化研究所 Image color feature processing method, system and device for target detection and storage medium
CN111091532B (en) * 2019-10-30 2023-07-18 中国四维测绘技术有限公司 Remote sensing image color evaluation method and system based on multilayer perceptron
CN111724396B (en) * 2020-06-17 2023-07-14 泰康保险集团股份有限公司 Image segmentation method and device, computer readable storage medium and electronic equipment
CN112184838B (en) * 2020-10-09 2022-06-21 哈尔滨工程大学 Multi-background camouflage pattern dominant color extraction method based on color correlation
CN114136959A (en) * 2021-11-27 2022-03-04 北京中医药大学 Urine color quantification method and classification standard
CN114322833B (en) * 2021-12-31 2022-09-06 中国科学院长春光学精密机械与物理研究所 White light scanning interference three-dimensional reconstruction method based on pseudo Wigner-Ville distribution
CN117524090B (en) * 2023-12-08 2024-06-21 广州卓奥科技有限公司 LED display color self-calibration method and system based on artificial intelligence

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103402117A (en) * 2013-08-06 2013-11-20 夏东 Method for detecting color cast of video image based on Lab chrominance space
CN103500457A (en) * 2013-10-23 2014-01-08 武汉东智科技有限公司 Method of color cast detection of video image
CN104168478A (en) * 2014-07-29 2014-11-26 银江股份有限公司 Video image off-color detection method based on Lab space and correlation function
CN104202596A (en) * 2014-09-17 2014-12-10 西安电子科技大学 Image color-cast detection method and system applied to intelligent terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI423166B (en) * 2009-12-04 2014-01-11 Huper Lab Co Ltd Method for determining if an input image is a foggy image, method for determining a foggy level of an input image and cleaning method for foggy images

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103402117A (en) * 2013-08-06 2013-11-20 夏东 Method for detecting color cast of video image based on Lab chrominance space
CN103500457A (en) * 2013-10-23 2014-01-08 武汉东智科技有限公司 Method of color cast detection of video image
CN104168478A (en) * 2014-07-29 2014-11-26 银江股份有限公司 Video image off-color detection method based on Lab space and correlation function
CN104202596A (en) * 2014-09-17 2014-12-10 西安电子科技大学 Image color-cast detection method and system applied to intelligent terminal

Also Published As

Publication number Publication date
CN107180439A (en) 2017-09-19

Similar Documents

Publication Publication Date Title
CN107180439B (en) Color cast characteristic extraction and color cast detection method based on Lab chromaticity space
CN108038456B (en) Anti-deception method in face recognition system
US7528991B2 (en) Method of generating a mask image of membership of single pixels to certain chromaticity classes and of adaptive improvement of a color image
US8774503B2 (en) Method for color feature extraction
CN102426649B (en) Simple steel seal digital automatic identification method with high accuracy rate
CN111666834A (en) Forest fire automatic monitoring and recognizing system and method based on image recognition technology
US20020114512A1 (en) Color clustering and segmentation using sigma filtering
CN115082451B (en) Stainless steel soup ladle defect detection method based on image processing
CN109975196B (en) Reticulocyte detection method and system
CN106651966B (en) Picture color identification method and system
Lee et al. Color image enhancement using histogram equalization method without changing hue and saturation
CN115272335A (en) Metallurgical metal surface defect detection method based on significance detection
JP2023503564A (en) Method and apparatus for identifying effect pigments in target coatings
Fang et al. Detection of building shadow in remote sensing imagery of urban areas with fine spatial resolution based on saturation and near-infrared information
CN107292897A (en) Image edge extraction method, device and terminal for YUV domains
US8026954B2 (en) System and computer-readable medium for automatic white balancing
CN113744326A (en) Fire detection method based on seed region growth rule in YCRCB color space
CN117575953A (en) Detail enhancement method for high-resolution forestry remote sensing image
Naccari et al. Natural scenes classification for color enhancement
CN111611940A (en) Rapid video face recognition method based on big data processing
Wang et al. Crop disease leaf image segmentation method based on color features
Hu et al. No reference quality assessment for Thangka color image based on superpixel
Dong et al. Vehicle color recognition based on license plate color
Apró et al. Colour space selection for entropy-based image segmentation of folded substrate images
Hadwiger et al. Towards learned color representations for image splicing detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant