CN106683140B - Color identification method and system - Google Patents

Color identification method and system Download PDF

Info

Publication number
CN106683140B
CN106683140B CN201611169819.6A CN201611169819A CN106683140B CN 106683140 B CN106683140 B CN 106683140B CN 201611169819 A CN201611169819 A CN 201611169819A CN 106683140 B CN106683140 B CN 106683140B
Authority
CN
China
Prior art keywords
pixel point
spectral
target pixel
color
component
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
CN201611169819.6A
Other languages
Chinese (zh)
Other versions
CN106683140A (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.)
SHENZHEN WAYHO TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN WAYHO TECHNOLOGY Co Ltd
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 SHENZHEN WAYHO TECHNOLOGY Co Ltd filed Critical SHENZHEN WAYHO TECHNOLOGY Co Ltd
Priority to CN201611169819.6A priority Critical patent/CN106683140B/en
Publication of CN106683140A publication Critical patent/CN106683140A/en
Priority to PCT/CN2017/114326 priority patent/WO2018107983A1/en
Application granted granted Critical
Publication of CN106683140B publication Critical patent/CN106683140B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

The invention belongs to the technical field of machine vision, and provides a color identification method and a color identification system. According to the method, the normalized color data of the target pixel point relative to the reference background is calculated, the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples is calculated according to the normalized color data of the target pixel point and the normalized color data of the plurality of prestored standard samples, the color value of the standard sample with the maximum correlation with the color value of the target pixel point is selected and identified as the real color value of the target pixel point, and therefore the color value of the target substance is identified under the conditions of good data stability, high accuracy and low cost.

Description

Color identification method and system
Technical Field
the invention belongs to the technical field of machine vision, and particularly relates to a color identification method and a color identification system.
Background
color identification is an extremely important link in industrial and agricultural production. Color is essentially the integral effect of the spectral distribution of radiation or reflection of a substance with the human eye or photosensor. The color recognition of the human eye is not only dependent on ambient illumination, but also on photochemical neural processes and psychological responses, and it is often difficult to perform quantitative, standard descriptions of color. The color recognition of the photoelectric sensor not only depends on the illumination environment, but also is related to the response of the sensor and the sensor image algorithm, so that the stability of color data acquired in different illumination environments or different color recognition systems is poor, even the color data is difficult to distinguish due to color distortion, and slight color differences are difficult to recognize; moreover, when color recognition is performed by using a sensor, the light source and the like are usually required to be placed in a closed and low-reflection environment, high requirements are required on the stability of the light source and the ambient temperature and humidity, and the system is complex to operate, maintain and calibrate and high in cost.
Therefore, the existing color identification method has the problems of poor data stability, poor accuracy and high cost in the identification process of the color due to the influence of factors such as the change of the illumination environment, the difference of the sensor response, different sensor image algorithms and the like.
Disclosure of Invention
The invention aims to provide a color identification method and a color identification system, and aims to solve the problems of poor data stability, poor accuracy and high cost of a color in the process of searching and identifying due to the influences of factors such as illumination environment change, sensor response difference, different sensor image algorithms and the like in the conventional color identification method.
the present invention is achieved as such, a color recognition method comprising:
acquiring RGB values of target pixel points on a target substance and RGB values of a reference background;
calculating normalized color data of the target pixel point relative to the reference background according to the RGB value of the target pixel point and the RGB value of the reference background;
Or acquiring a spectral function and a reference background spectral function of a target pixel point on a target substance;
Calculating normalized color data of the target pixel point relative to the reference background according to the spectral function of the target pixel point and the spectral function of the reference background;
calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples according to the normalized color data of the target pixel point and the normalized color data of the plurality of prestored standard samples;
And selecting the color value of the standard sample with the maximum color value correlation with the target pixel point, and identifying the color value as the real color value of the target pixel point.
it is also an object of the present invention to provide a color recognition system, comprising:
the first acquisition unit is used for acquiring the RGB value of a target pixel point on a target substance and the RGB value of a reference background;
The first calculating unit is used for calculating the normalized color data of the target pixel point relative to the reference background according to the RGB value of the target pixel point and the RGB value of the reference background;
The second acquisition unit is used for acquiring a spectral function and a reference background spectral function of a target pixel point on a target substance;
the second calculation unit is used for calculating the normalized color data of the target pixel point relative to the reference background according to the spectral function of the target pixel point and the spectral function of the reference background;
The correlation calculation unit is used for calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of pre-stored standard samples according to the normalized color data of the target pixel point and the normalized color data of the plurality of pre-stored standard samples;
And the color identification unit is used for selecting the color value of the standard sample with the maximum color value correlation with the target pixel point and identifying the color value as the real color value of the target pixel point.
According to the method, the normalized color data of the target pixel point relative to the reference background is calculated, the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples is calculated according to the normalized color data of the target pixel point and the normalized color data of the plurality of prestored standard samples, the color value of the standard sample with the maximum correlation with the color value of the target pixel point is selected and identified as the real color value of the target pixel point, and therefore the color value of the target substance is identified under the conditions of good data stability, high accuracy and low cost.
Drawings
FIG. 1 is a block flow diagram of a color identification method provided by one embodiment of the present invention;
FIG. 2 is a block flow diagram of a color identification method provided by another embodiment of the invention;
FIG. 3 is a block diagram of a color recognition system provided by an embodiment of the present invention;
Fig. 4 is a block diagram of a color recognition system according to another embodiment of the present invention.
Detailed Description
in order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
in the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
As shown in fig. 1, an embodiment of the present invention provides a color recognition method, which includes:
Step S1011: and acquiring the RGB value of a target pixel point on the target substance and the RGB value of the reference background.
In this embodiment, the target substance specifically refers to a monochromatic or chromatic substance that needs to identify a color and is selected by a user, and the target pixel point specifically refers to any pixel point on the target substance. For a monochromatic substance, the color of the target pixel point is equal to that of the target substance; for a color substance, the color of the target substance needs to be comprehensively analyzed after the colors of all pixel points with different colors on the target substance are identified, so as to obtain the color of the target substance.
In the present embodiment, the RGB values specifically refer to various colors obtained by changing three color channels of red (R), green (G), and blue (B) and superimposing them on each other, and include an R component corresponding to red light, a G component corresponding to green light, and a B component corresponding to blue light.
in the present embodiment, the reference background specifically refers to a standard color whose spectral function (including a spectral function of transmitted light and a spectral function of reflected light) does not change with an external factor while ignoring the influence of the lighting environment, the optical lens transmission spectrum, the image sensor spectral response difference, the algorithm difference of the image sensor, and the like.
In an embodiment of the present invention, step S1011 specifically includes:
selecting or setting a reference background in an image field of view, and acquiring an image containing a target substance and the reference background by using an image sensor;
obtaining R of target pixel point on target substancei、Giand Binumerical value, while obtaining the reference background R0、G0And B0Numerical values, where i represents different pixel points.
step S1021: and calculating the normalized color data of the target pixel point relative to the reference background according to the RGB value of the target pixel point and the RGB value of the reference background.
in an embodiment of the present invention, step S1021 specifically includes:
According to the formula:Calculating normalized color data of the target pixel points;
wherein R isi、GiAnd Bir component, G component and B component of RGB value of target pixel point i respectively, R0、G0And B0r, G and B components, Y, respectively, of RGB values of a reference background 01i、Y2iAnd Y3iNormalized color data of the R component, the G component, and the B component of the RGB value of the target pixel point i with respect to the R component, the G component, and the B component of the RGB value of the reference background 0, respectively.
in this embodiment, R of the target pixel pointi、Giand Bithe numerical values are specifically:
reference background R0、G0And B0The numerical values are specifically:
wherein S isiR(λ)、SiG(lambda) and SiB(lambda) is the red, green and blue spectral functions of the light transmitted or reflected by the target pixel point i, S0R(λ)、S0G(lambda) and S0B(λ) is respectively via ginsengred, green and blue spectral functions, Q, of light transmitted or reflected against background 0R(λ)、QG(lambda) and QB(λ) is a spectral response function of R, G and B components of RGB values output by the image sensor, respectively, F (λ) is a spectral function of the light source, and Δ λ is a spectral response range of the image sensor.
According to the formula:
Then there are:
therefore, the formula for calculating the normalized color data of the target pixel point in step S1021 may also becorrespondingly, in the present embodiment, step S1011 and step S1021 may be equivalently replaced by step S1012 and step S1022 at the same time.
Wherein, step S1012 is: and acquiring a spectral function and a reference background spectral function of a target pixel point on the target substance.
In this embodiment, the spectral function specifically means that under photopic vision conditions, human eyes have different perceptibility to radiation with different wavelengths in a visible spectrum range of 380-780 nm, that is, various color lights.
Step S1022 is: and calculating the normalized color data of the target pixel point relative to the reference background according to the spectral function of the target pixel point and the spectral function of the reference background.
In a specific application, the spectral function comprises a red light spectral function, a green light spectral function and a blue light spectral function; in an embodiment of the present invention, step S1022 includes:
According to the formula:Calculating normalized color data of the target pixel points;
Wherein S isiR(λ)、SiG(lambda) and SiB(lambda) is the red light spectral function, the green light spectral function and the blue light spectral function of the light transmitted or reflected by the target pixel point respectively, S0R(λ)、S0G(lambda) and S0B(λ) are the red, green and blue spectral functions, respectively, of the light transmitted or reflected via the reference background 0, Y1i、Y2iand Y3inormalized color data of the R component, the G component, and the B component of the RGB value of the target pixel point i with respect to the R component, the G component, and the B component of the RGB value of the reference background 0, respectively.
step S103: and calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples according to the normalized color data of the target pixel point and the normalized color data of the plurality of prestored standard samples.
in this embodiment, the correlation refers to a proximity between the normalized color data of the target pixel point and the normalized color data of each of the plurality of pre-stored standard samples, and specifically reflects a similarity between the target pixel point and the color of each of the plurality of standard samples.
In an embodiment of the present invention, step S103 specifically includes:
according to the formula:Calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples;
wherein, k ═ 1,2,3, k ═ 1 corresponds to the R component, k ═ 2 corresponds to the G component, and k ═ 3 corresponds to the B component; xκjNormalized color data for the kappa component of the RGB values of the standard sample j; y isκinormalizing color data of a kappa component of an RGB value of a target pixel point i relative to a kappa component of an RGB value of a reference background 0; rijis a target pixel pointThe correlation coefficient between the color value of i and the color value of the normal sample j.
Step S104: and selecting the color value of the standard sample with the maximum color value correlation with the target pixel point, and identifying the color value as the real color value of the target pixel point.
in this embodiment, the real color value of the target pixel specifically means an actual color value of the target pixel under the condition of ignoring influences of an illumination environment, an optical lens transmission spectrum, an image sensor spectral response difference, an image sensor algorithm difference and the like, and the color value can be specifically measured by using an RGB value.
according to the method, the normalized color data of the target pixel point relative to the reference background is calculated, the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples is calculated according to the normalized color data of the target pixel point and the normalized color data of the plurality of prestored standard samples, the color value of the standard sample with the maximum correlation with the color value of the target pixel point is selected and identified as the real color value of the target pixel point, and therefore the color value of the target substance is identified under the conditions of good data stability, high accuracy and low cost.
As shown in fig. 2, in an embodiment of the present invention, before step S103, the method includes:
Step S201: the RGB value of any pixel point is obtained through an image sensor, and the spectral function of any pixel point and the spectral function of a light source used for irradiating any pixel point are obtained.
In this embodiment, any pixel point refers to any pixel point on any colored substance (including gray colors such as white and black).
In specific application, the light source can be any monochromatic light source.
step S202: and calculating the spectral response function of the image sensor according to the RGB value of any pixel point, the spectral function of any pixel point and the spectral function of the light source.
in an embodiment of the present invention, step S202 specifically includes:
According to the formula:calculating a spectral response function of the image sensor;
Wherein, I1、I2And I3Decimal expression forms of R component, G component and B component, Q, of any pixel point respectivelyR(λ)、QG(lambda) and QB(lambda) is the spectral response function of the R component, G component and B component of the image sensor, S (lambda) is the spectral function of any pixel point, F (lambda) is the spectral function of the light source, and the spectral response range of the delta lambda image sensor.
In this embodiment, the image sensor is specifically a device that converts an optical image into an electronic signal, and photosensitive elements are used as basic means for image capture, each photosensitive element corresponds to an image point in the image sensor, and RGB red, green and blue filters are covered above the photosensitive elements. When the image sensor works, the image sensor converts the information of each pixel into a digital signal after being processed by the analog-to-digital converter, the digital signal is compressed in a certain format and then stored in a buffer, and then the image data is output in the form of the digital signal and the video signal according to different requirements. I is1、I2And I3which is substantially equal to the number of photoelectrons collected by each of the three primary color channels of the image sensor.
step S203: spectral functions of a plurality of standard samples are acquired.
step S204: and calculating and obtaining normalized color data of the plurality of standard samples according to the spectral response function of the image sensor and the spectral functions of the plurality of standard samples, and storing the normalized color data.
In an embodiment of the present invention, step S204 specifically includes:
According to the formula:Calculating to obtain normalized color data of the plurality of standard samples;
Wherein, X1j、X2jand X3jNormalized color data of R, G, and B components of the RGB values of standard sample j in the plurality of standard samples, respectively.
In one embodiment of the present invention, step S204 is preceded by:
Step S2041: establishing a database;
Step S2042: storing the normalized color data for the standard sample in the database.
In specific application, a corresponding relationship between the standard sample and the color value thereof may also be established and stored in the database, and the corresponding relationship may be specifically realized by establishing a hash table or establishing a form of a mapping relationship.
in an embodiment of the present invention, on the basis of steps S2041 and S2042, step S104 may be followed by step S2043:
And storing the real color values of the identified target pixel points in a database, and updating the database.
As shown in fig. 3, an embodiment of the present invention provides a color recognition system 100 for performing the method steps in the embodiment corresponding to fig. 1, which includes:
A first obtaining unit 1011, configured to obtain RGB values of a target pixel on a target substance and RGB values of a reference background;
a first calculating unit 1021, configured to calculate normalized color data of the target pixel with respect to the reference background according to the RGB values of the target pixel and the RGB values of the reference background;
A second obtaining unit 1012, configured to obtain a spectral function of a target pixel on a target substance and a reference background spectral function;
the second calculating unit 1022, configured to calculate normalized color data of the target pixel with respect to the reference background according to the spectral function of the target pixel and the spectral function of the reference background;
The correlation calculation unit 103 is configured to calculate, according to the normalized color data of the target pixel and the normalized color data of the pre-stored multiple standard samples, a correlation between the color value of the target pixel and the color value of each of the pre-stored multiple standard samples;
And the color identification unit 104 is configured to select a color value of the standard sample having the largest color value correlation with the target pixel point, and identify the color value as a true color value of the target pixel point.
In a specific application, the first obtaining unit 1011 may specifically adopt an image sensor; the second acquiring unit 1012 may specifically be a spectrometer.
In a specific application, when calculating the normalized color data of the target pixel point by using the RGB values, the color identification system 100 may only include the first obtaining unit 1011, the first calculating unit 1021, the correlation calculating unit 103, and the color identifying unit 104; when the spectral function is employed to calculate the normalized color data of the target pixel point, the color recognition system 100 may include only the second acquisition unit 1012, the second calculation unit 1022, the correlation calculation unit 103, and the color identification unit 104.
in an embodiment of the present invention, the first obtaining unit 1011 is specifically configured to:
Selecting or setting a reference background in an image field of view, and acquiring an image containing a target substance and the reference background by using an image sensor;
obtaining R of target pixel point on target substancei、GiAnd BiNumerical value, while obtaining the reference background R0、G0And B0numerical values, where i represents different pixel points.
in an embodiment of the present invention, the first calculating unit 1021 is specifically configured to:
according to the formula:calculating normalized color data of the target pixel points;
wherein R isi、GiAnd BiR component, G component and B component of RGB value of target pixel point i respectively, R0、G0And B0are respectively aswith reference to the R, G and B components of the RGB values of background 0, Y1i、Y2iand Y3inormalized color data of the R component, the G component, and the B component of the RGB value of the target pixel point i with respect to the R component, the G component, and the B component of the RGB value of the reference background 0, respectively.
In an embodiment of the present invention, the second calculating unit S1022 is specifically configured to:
According to the formula:Calculating normalized color data of the target pixel points;
Wherein S isiR(λ)、SiG(lambda) and SiB(lambda) is the spectral function of the R, G and B components of the target pixel point i, S0R(λ)、S0G(lambda) and S0B(λ) is a spectral function of the R, G and B components, respectively, of the reference background 0, Y1i、Y2iAnd Y3inormalized color data of the R component, the G component, and the B component of the RGB value of the target pixel point i with respect to the R component, the G component, and the B component of the RGB value of the reference background 0, respectively.
in an embodiment of the present invention, the correlation calculation unit 103 is specifically configured to:
According to the formula:calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples;
Wherein, k ═ 1,2,3, k ═ 1 corresponds to the R component, k ═ 2 corresponds to the G component, and k ═ 3 corresponds to the B component; xκjNormalized color data for the kappa component of the RGB values of the standard sample j; y isκiNormalizing color data of a kappa component of an RGB value of a target pixel point i relative to a kappa component of an RGB value of a reference background 0; rijAnd the correlation coefficient between the color value of the target pixel point i and the color value of the standard sample j is obtained.
According to the method, the normalized color data of the target pixel point relative to the reference background is calculated, the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples is calculated according to the normalized color data of the target pixel point and the normalized color data of the plurality of prestored standard samples, the color value of the standard sample with the maximum correlation with the color value of the target pixel point is selected and identified as the real color value of the target pixel point, and therefore the color value of the target substance is identified under the conditions of good data stability, high accuracy and low cost.
As shown in fig. 4, in an embodiment of the present invention, corresponding to the method steps in the embodiment corresponding to fig. 2, the color recognition system 100 further includes:
A third obtaining unit 201, configured to obtain an RGB value of any pixel point through an image sensor, and obtain a spectral function of the any pixel point and a spectral function of a light source used for illuminating the any pixel point;
A third calculating unit 202, configured to calculate a spectral response function of the image sensor according to the RGB value of any pixel point, the spectral function of any pixel point, and the spectral function of the light source;
a fourth acquiring unit 203, configured to acquire spectral functions of a plurality of standard samples;
A fourth calculating unit 204, configured to calculate and obtain normalized color data of the multiple standard samples according to the spectral response function of the image sensor and the spectral functions of the multiple standard samples, and store the normalized color data.
In an embodiment of the present invention, the third calculating unit 202 is specifically configured to:
According to the formula:Calculating a spectral response function of the image sensor;
Wherein, I1、I2And I3Decimal expression forms of R component, G component and B component, Q, of any pixel point respectivelyR(λ)、QG(lambda) and QB(λ) is respectively an image sensorthe spectral response functions of the R component, the G component and the B component of the output RGB value are obtained, S (lambda) is the spectral function of any pixel point, F (lambda) is the spectral function of the light source, and delta lambda is the spectral response range of the image sensor.
In an embodiment of the present invention, the fourth calculating unit 204 is specifically configured to:
According to the formula:and calculating to obtain normalized color data of the plurality of standard samples.
wherein, X1j、X2jand X3jNormalized color data of R, G, and B components of the RGB values of standard sample j in the plurality of standard samples, respectively.
In one embodiment of the present invention, the color recognition system 100 further comprises:
the establishing unit is used for establishing a database;
and the storage unit is used for storing the normalized color data of the standard sample in the database.
In an embodiment of the present invention, the color recognition system 100 may further include:
And the updating unit is used for storing the real color values of the identified target pixel points in a database and updating the database.
In a specific application, all operations related to acquiring RGB values in the above embodiment may be completed by using the same image sensor, and all operations related to acquiring a spectral function may be completed by using the same spectrometer, and by this means, errors caused by different devices may be eliminated, so that influences of an illumination environment, an optical lens transmission spectrum, an image sensor spectral response, an image sensor algorithm, and the like may be ignored.
In this embodiment, a reference basis can be provided for subsequently calculating the color value of the target pixel point by calculating the spectral response function of the image sensor, and calculating and storing the normalized color data of the plurality of standard samples according to the spectral response function of the image sensor and the spectral functions of the plurality of standard samples. In specific application, spectral functions of more standard samples should be acquired as much as possible to calculate normalized color data of more standard samples, so as to provide data support for calculating color values of target pixels.
In a specific application, the color identification method and system provided by the embodiment of the invention can be applied to the following fields, which include:
(1) medical test paper reaction color identification
And (3) reacting the standard solution with known concentration with the test paper, and establishing a reaction color database with known concentration by using the white background of the test paper as a reference background. The RGB value of a target pixel point on a target substance and the RGB value of a white reference background of the test paper are obtained simultaneously in an imaging mode, normalized color data of the target pixel point relative to the reference background are obtained through calculation, correlation detection is carried out on the normalized color data of the target pixel point and reaction color data with known concentration, and the most relevant color is searched to serve as a detection result.
By using the color identification method, the influence of factors such as illumination environment influence, difference of quantum efficiency of different sensors, difference of sensor algorithms and the like in the imaging process can be eliminated, the universality is strong, and the reaction color of the test paper can be timely and accurately searched and identified in a complex illumination environment by using a mobile terminal such as a color camera of a smart phone.
(2) Impurity metal identification in electric vehicle battery production line
the method comprises the steps of carrying out spectral analysis on several main impurity metals such as copper, aluminum, steel and the like in a laboratory to obtain spectral functions of a plurality of standard samples of the copper, the aluminum, the steel and the like, simultaneously measuring a spectral response function of an image sensor, calculating normalized color data of the plurality of standard samples of the copper, the aluminum, the steel and the like according to the spectral response function of the image sensor and the spectral functions of the plurality of standard samples of the copper, the aluminum, the steel and the like, and taking the normalized color data as color values of the standard samples of the impurity metals (the copper, the aluminum, the steel and the like) irrelevant to the illumination environment.
The same diffuse reflection white board is arranged on a production line, the RGB value of a target pixel point on a target substance and the RGB value of the diffuse reflection white board are obtained simultaneously through a color industrial camera, normalized color data of the target pixel point relative to the diffuse reflection white board are obtained through calculation, correlation detection is carried out on the normalized color data and the color value of an impurity metal standard sample, and impurity metals in products are searched and identified.
By utilizing the color identification method, the influence of factors such as illumination environment influence, difference of quantum efficiency of different sensors, difference of sensor algorithms and the like in the imaging process can be eliminated, and the fine color difference of different impurity metals can be searched and identified with high precision.
(3) Color identification of automotive bodies
In different lighting environments, the color information of the automobile body will generate large differences. And calculating to obtain the normalized color data of the aluminum alloy hub by measuring the spectral response function of the image sensor and the spectral function of the aluminum alloy hub. When the color of the automobile body is searched and identified, the RGB value of the automobile body and the RGB value of the aluminum alloy hub are obtained by using the image sensor, the normalized color data of the automobile body relative to the aluminum alloy hub is calculated, correlation detection is carried out on the normalized color data of the automobile body relative to the aluminum alloy hub obtained by actual photographing and the normalized color data of the aluminum alloy hub, and the real color value of the automobile body, which is irrelevant to the illumination environment and photographic equipment, is determined by using the maximum correlation coefficient.
the present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A color recognition method, characterized in that the color recognition method comprises:
Acquiring a spectral function and a reference background spectral function of a target pixel point on a target substance;
Calculating normalized color data of the target pixel point relative to the reference background according to the spectral function of the target pixel point and the spectral function of the reference background;
acquiring an RGB value of any pixel point through an image sensor, and acquiring a spectral function of any pixel point and a spectral function of a light source for irradiating any pixel point;
calculating a spectral response function of the image sensor according to the RGB value of any pixel point, the spectral function of any pixel point and the spectral function of the light source;
acquiring spectral functions of a plurality of standard samples;
Calculating normalized color data of the plurality of standard samples according to the spectral response function of the image sensor and the spectral functions of the plurality of standard samples, and respectively associating and storing the normalized color data of the plurality of standard samples with the color values of the plurality of standard samples;
Calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples according to the normalized color data of the target pixel point and the normalized color data of the plurality of prestored standard samples;
selecting the color value of the standard sample with the maximum color value correlation with the target pixel point, and identifying the color value as the real color value of the target pixel point;
The spectral functions include a red light spectral function, a green light spectral function and a blue light spectral function, and the calculating of the normalized color data of the target pixel point relative to the reference background according to the spectral function of the target pixel point and the spectral function of the reference background includes:
according to the formula:calculating normalized color data of the target pixel points;
Wherein S isiR(λ)、SiG(lambda) and SiB(lambda) is the red, green and blue spectral functions of the light transmitted or reflected by the target pixel point i, S0R(λ)、S0G(lambda) and S0B(λ) is transmission or reflection, respectively, through the reference background 0red, green and blue spectral functions, Y, of light1i、Y2iAnd Y3inormalized color data of the R component, the G component, and the B component of the RGB value of the target pixel point i with respect to the R component, the G component, and the B component of the RGB value of the reference background 0, respectively.
2. The color identification method according to claim 1, wherein the RGB values include an R component, a G component, and a B component, and the calculating the spectral response function of the image sensor based on the RGB values of the any one pixel point, the spectral function of the any one pixel point, and the spectral function of the light source comprises:
according to the formula:Calculating a spectral response function of the image sensor;
Wherein, I1、I2and I3Decimal expression forms of R component, G component and B component, Q, of any pixel pointR(λ)、QG(lambda) and QB(λ) is a spectral response function of R, G and B components of the RGB values output by the image sensor, respectively, S (λ) is a spectral function of any one of the pixel points, F (λ) is a spectral function of the light source, and Δ λ is a spectral response range of the image sensor;
The calculating normalized color data of the plurality of standard samples according to the spectral response function of the image sensor and the spectral functions of the plurality of standard samples includes:
According to the formula:Calculating to obtain normalized color data of the plurality of standard samples;
wherein, X1j、X2jAnd X3jNormalized color data of R, G, and B components of the RGB values of standard sample j in the plurality of standard samples, respectively.
3. The color identification method of claim 1, wherein the calculating the correlation between the color value of the target pixel and the color value of each of the plurality of pre-stored standard samples according to the normalized color data of the target pixel and the normalized color data of the plurality of pre-stored standard samples comprises:
According to the formula:calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples;
wherein, k ═ 1,2,3, k ═ 1 corresponds to the R component, k ═ 2 corresponds to the G component, and k ═ 3 corresponds to the B component; xκjNormalized color data for the kappa component of the RGB values of the standard sample j; y isκiNormalizing color data of a kappa component of an RGB value of a target pixel point i relative to a kappa component of an RGB value of a reference background 0; rijand the correlation coefficient between the color value of the target pixel point i and the color value of the standard sample j is obtained.
4. A color recognition system, characterized in that the color recognition system comprises:
The second acquisition unit is used for acquiring a spectral function and a reference background spectral function of a target pixel point on a target substance;
The second calculation unit is used for calculating the normalized color data of the target pixel point relative to the reference background according to the spectral function of the target pixel point and the spectral function of the reference background;
The third acquisition unit is used for acquiring the RGB value of any pixel point through the image sensor and acquiring the spectral function of any pixel point and the spectral function of a light source for irradiating any pixel point;
The third calculating unit is used for calculating a spectral response function of the image sensor according to the RGB value of any pixel point, the spectral function of any pixel point and the spectral function of the light source;
A fourth acquiring unit for acquiring spectral functions of the plurality of standard samples;
The fourth calculating unit is used for calculating normalized color data of the plurality of standard samples according to the spectral response function of the image sensor and the spectral functions of the plurality of standard samples, and associating and storing the normalized color data of the plurality of standard samples with the color values of the plurality of standard samples respectively;
the correlation calculation unit is used for calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of pre-stored standard samples according to the normalized color data of the target pixel point and the normalized color data of the plurality of pre-stored standard samples;
The color identification unit is used for selecting the color value of the standard sample with the maximum color value correlation with the target pixel point and identifying the color value as the real color value of the target pixel point;
the spectral functions include a red light spectral function, a green light spectral function and a blue light spectral function, and the calculating of the normalized color data of the target pixel point relative to the reference background according to the spectral function of the target pixel point and the spectral function of the reference background includes:
According to the formula:calculating normalized color data of the target pixel points;
wherein S isiR(λ)、SiG(lambda) and SiB(lambda) is the red, green and blue spectral functions of the light transmitted or reflected by the target pixel point i, S0R(λ)、S0G(lambda) and S0B(λ) are the red, green and blue spectral functions, respectively, of the light transmitted or reflected via the reference background 0, Y1i、Y2iAnd Y3ir components of RGB values of target pixel point i respectivelyNormalized color data of R, G and B components of the RGB values of the G and B components with respect to the reference background 0.
5. The color identification system of claim 4 wherein said RGB values include an R component, a G component and a B component, said calculating a spectral response function of said image sensor from said RGB values of said any pixel, said spectral function of said any pixel and said spectral function of said light source comprises:
According to the formula:calculating a spectral response function of the image sensor;
wherein, I1、I2And I3Decimal expression forms of R component, G component and B component, Q, of any pixel pointR(λ)、QG(lambda) and QB(λ) is the spectral response function of the R, G and B components of the RGB values output by the image sensor, respectively, S (λ) is the spectral function of any of the pixel points, F (λ) is the spectral function of the light source, and Δ λ is the spectral response range of the image sensor;
the calculating normalized color data of the plurality of standard samples according to the spectral response function of the image sensor and the spectral functions of the plurality of standard samples includes:
according to the formula:Calculating to obtain normalized color data of the plurality of standard samples;
wherein, X1j、X2jand X3jNormalized color data of R, G, and B components of the RGB values of standard sample j in the plurality of standard samples, respectively.
6. The color identification system of claim 4, wherein the calculating a correlation between the color value of the target pixel and the color value of each of the plurality of pre-stored standard samples based on the normalized color data of the target pixel and the normalized color data of the plurality of pre-stored standard samples comprises:
According to the formula:calculating the correlation between the color value of the target pixel point and the color value of each standard sample in the plurality of prestored standard samples;
Wherein, k ═ 1,2,3, k ═ 1 corresponds to the R component, k ═ 2 corresponds to the G component, and k ═ 3 corresponds to the B component; xκjNormalized color data for the kappa component of the RGB values of the standard sample j; y isκinormalizing color data of a kappa component of an RGB value of a target pixel point i relative to a kappa component of an RGB value of a reference background 0;
RijAnd the correlation coefficient between the color value of the target pixel point i and the color value of the standard sample j is obtained.
CN201611169819.6A 2016-12-16 2016-12-16 Color identification method and system Active CN106683140B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611169819.6A CN106683140B (en) 2016-12-16 2016-12-16 Color identification method and system
PCT/CN2017/114326 WO2018107983A1 (en) 2016-12-16 2017-12-01 Colour recognition method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611169819.6A CN106683140B (en) 2016-12-16 2016-12-16 Color identification method and system

Publications (2)

Publication Number Publication Date
CN106683140A CN106683140A (en) 2017-05-17
CN106683140B true CN106683140B (en) 2019-12-17

Family

ID=58870767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611169819.6A Active CN106683140B (en) 2016-12-16 2016-12-16 Color identification method and system

Country Status (2)

Country Link
CN (1) CN106683140B (en)
WO (1) WO2018107983A1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106683140B (en) * 2016-12-16 2019-12-17 深圳市中达瑞和科技有限公司 Color identification method and system
US11284013B2 (en) 2017-06-30 2022-03-22 Huawei Technologies Co., Ltd. Color detection method and terminal
CN109118549A (en) * 2018-07-20 2019-01-01 上海电力学院 A method of making object of reference with white printing paper and restores object color
CN109596606B (en) * 2018-12-12 2020-09-22 华南理工大学 Ascorbic acid colorimetric detection method based on degradable nano enzyme
CN109991216A (en) * 2019-03-12 2019-07-09 深圳市象形字科技股份有限公司 A kind of uroscopy instrument test strips color identification method
CN110084808A (en) * 2019-05-06 2019-08-02 智影汇谱(宁波)科技有限公司 A kind of color solution mixing method and image processing apparatus for digital endoscope
CN110475036B (en) * 2019-06-28 2021-08-27 佛山市景瞳科技有限公司 Multi-spectral-band ceramic spectrum reduction system and method
CN110525872A (en) * 2019-08-27 2019-12-03 张紫薇 Automatic sorting replenishing method and system
CN111229649B (en) * 2020-01-20 2023-09-01 湖北民族大学 Article grading method and automatic grading system
CN111340896B (en) * 2020-02-21 2023-10-27 北京迈格威科技有限公司 Object color recognition method, device, computer equipment and storage medium
CN111582290B (en) * 2020-05-13 2023-04-07 郑州轻工业大学 Computer image recognition method
CN112474411A (en) * 2020-09-27 2021-03-12 江苏金卫机械设备有限公司 Product detection automatic processing control system based on flexible production line
CN112992039B (en) * 2021-03-27 2023-01-06 惠仁康宁(苏州)健康科技有限公司 Real-time acquisition method for optical radiation visual health information of display screen
CN113409221B (en) * 2021-06-30 2023-12-12 深圳万兴软件有限公司 Image color matting method, system, computer equipment and storage medium
CN117379033B (en) * 2023-12-13 2024-02-20 深圳市宗匠科技有限公司 Skin pigment detection method, device, computer equipment and storage medium

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3970052B2 (en) * 2002-02-27 2007-09-05 キヤノン株式会社 Image processing device
CN101282489B (en) * 2008-04-24 2010-11-10 北京中星微电子有限公司 Light source detection apparatus and method as well as image processing method
CN101334835B (en) * 2008-07-28 2011-01-12 上海高德威智能交通系统有限公司 Color recognition method
CN102184413B (en) * 2011-05-16 2013-06-12 浙江大华技术股份有限公司 Automatic vehicle body color recognition method of intelligent vehicle monitoring system
JP2014185958A (en) * 2013-03-25 2014-10-02 Seiko Epson Corp Coloration measuring device
JP6463742B2 (en) * 2013-06-10 2019-02-06 ユニバーシティー オブ ミシシッピ メディカル センター Medical image processing
CN103973980A (en) * 2014-04-25 2014-08-06 杭州电子科技大学 Method for acquiring multispectral images based on digital camera
US9135719B1 (en) * 2014-06-26 2015-09-15 Amazon Technologies, Inc. Color name generation from images and color palettes
CN104713835B (en) * 2015-03-25 2017-09-29 上海烟草集团有限责任公司 A kind of tobacco leaf color quantizes recognition methods online
CN104964973A (en) * 2015-07-08 2015-10-07 邓双胜 Test paper reading and analyzing method and system based on mobile terminal camera
CN105551052A (en) * 2016-01-08 2016-05-04 青岛农业大学 White board calibration system and calibration method of digital image data
CN105865629A (en) * 2016-03-25 2016-08-17 上海电机学院 Object color recognition method for robot
CN106683140B (en) * 2016-12-16 2019-12-17 深圳市中达瑞和科技有限公司 Color identification method and system

Also Published As

Publication number Publication date
CN106683140A (en) 2017-05-17
WO2018107983A1 (en) 2018-06-21

Similar Documents

Publication Publication Date Title
CN106683140B (en) Color identification method and system
US10200582B2 (en) Measuring device, system and program
JP6673833B2 (en) Analysis equipment
US10395368B2 (en) Methods and systems for assessing histological stains
Skandarajah et al. Quantitative imaging with a mobile phone microscope
US10643099B2 (en) Multi-agent training of a color identification neural network
US10514335B2 (en) Systems and methods for optical spectrometer calibration
CN106991679A (en) One kind quantifies recognition methods based on cloud platform urine test paper physical signs
CN110222698B (en) Method and system for water quality analysis based on color information processing
US10571506B2 (en) Multi-fiber identification using jacket color
US20140267782A1 (en) Apparatus And Method For Automated Self-Training Of White Balance By Electronic Cameras
JPH10221036A (en) Method and apparatus for automatically identifying kind of part
CN103077541A (en) Measuring and expressing method and system for skin color of human face
CN113609907A (en) Method, device and equipment for acquiring multispectral data
Karlsen et al. A smart phone-based robust correction algorithm for the colorimetric detection of Urinary Tract Infection
CN106605162B (en) Method for correcting color reproduction of digital microscope and digital microscope
Stanco et al. Computer graphics solutions for pottery colors specification
CN112461762B (en) Solution turbidity detection method, medium and image processing system based on HSV model
CN204313959U (en) Based on the colourity illumination photometry device of intelligent mobile terminal
CN107101955A (en) A kind of LED cottons chromatic measuring system and a kind of LED cottons method for measuring color
CN114503097A (en) Method and apparatus for color lookup using mobile device
JP2005189119A (en) Color measuring method and color measuring device
CN113874710B (en) Image processing method, image processing apparatus, imaging system, and program
CN208350647U (en) A kind of visual sensor device for realizing substance qualitative and quantitative detection based on chrominance response
CN114527116A (en) Ambient light correction array type colorimetric analysis system and method based on intelligent equipment

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and system of color recognition

Effective date of registration: 20210520

Granted publication date: 20191217

Pledgee: Shenzhen SME financing Company limited by guarantee

Pledgor: SHENZHEN WAYHO TECHNOLOGY Co.,Ltd.

Registration number: Y2021980003843

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20191217

Pledgee: Shenzhen SME financing Company limited by guarantee

Pledgor: SHENZHEN WAYHO TECHNOLOGY Co.,Ltd.

Registration number: Y2021980003843

PC01 Cancellation of the registration of the contract for pledge of patent right