CN116128982A - Color grading/color measurement method, system, equipment and medium based on hyperspectral image - Google Patents

Color grading/color measurement method, system, equipment and medium based on hyperspectral image Download PDF

Info

Publication number
CN116128982A
CN116128982A CN202211677866.7A CN202211677866A CN116128982A CN 116128982 A CN116128982 A CN 116128982A CN 202211677866 A CN202211677866 A CN 202211677866A CN 116128982 A CN116128982 A CN 116128982A
Authority
CN
China
Prior art keywords
color
vector
standard colorimetric
abundance
hyperspectral
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.)
Granted
Application number
CN202211677866.7A
Other languages
Chinese (zh)
Other versions
CN116128982B (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.)
Shaanxi University of Science and Technology
Original Assignee
Shaanxi University of Science and Technology
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 Shaanxi University of Science and Technology filed Critical Shaanxi University of Science and Technology
Priority to CN202211677866.7A priority Critical patent/CN116128982B/en
Publication of CN116128982A publication Critical patent/CN116128982A/en
Application granted granted Critical
Publication of CN116128982B publication Critical patent/CN116128982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • G06T2207/10036Multispectral image; Hyperspectral image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/10Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in agriculture

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

Color grading/color measurement method, system, equipment and medium based on hyperspectral image, and the method comprises the following steps: collecting hyperspectral images of the colorimetric samples by using a hyperspectral camera, and creating a standard colorimetric sample library; collecting a hyperspectral image of a sample to be detected by using a hyperspectral camera; based on an original standard colorimetric sample library, rough estimation of the abundance vector is realized; based on the result of the last step, cutting a standard colorimetric sample library and realizing the fine estimation of the abundance vector; based on the result of the last step, realizing the color discrimination of the sample to be tested; the system, the equipment and the medium realize a color grading/color measurement method based on hyperspectral images through the storage and the utilization of related functional modules; the invention overcomes the influence of complex light, larger standard colorimetric sample library and test position of a sample on a test result in a test scene without increasing complexity; the accuracy of the color grading/color measuring method based on the hyperspectral image and the performance of the device are improved.

Description

Color grading/color measurement method, system, equipment and medium based on hyperspectral image
Technical Field
The invention relates to the technical field of image processing analysis, in particular to a color grading/color measuring method, a system, equipment and a medium based on hyperspectral images.
Background
Color grading and color measurement have wide application in many fields, such as gemstone color grading, printed matter color measurement, leather/textile dyeing effect analysis, and the like.
The traditional mode of color grading and color measurement is that a set of standard colorimetric specimens is collected and established first, and then a sample to be measured is compared with the standard colorimetric specimens. For example, in the field of diamond color grading, a set of standard colorimetric stones is generally prepared, and then a color grade of a sample to be measured is obtained by comparing the sample to be measured with the standard colorimetric stones. The conventional approach generally has two drawbacks. First, in many areas, such as the field of gemstone color grading, the cost of standard colorimetric specimens is often high, and standard colorimetric specimens from different laboratories may deviate; secondly, the conventional method needs to use naked eyes for testing, and the factors influencing the testing result are more, such as the surrounding environment, light brightness, the level of experimenters and the like.
Existing color grading/color measurement methods based on hyperspectral images generally suffer from the following three drawbacks. Firstly, the existing color grading/color measurement method based on hyperspectral images generally adopts a linear model, but when a test scene is complex, for example, when light rays have multiple reflections, a test result generally has larger errors; second, when the standard colorimetric sample library is large, the color grading/color measurement method based on hyperspectral images usually has large errors; third, the test results are typically associated with the test location of the sample to be tested, and errors in the test results are typically large when the imaging location is taken near the skin, such as when grading the color of the nephrite.
Patent application CN103090973B discloses a spectrum-based rapid grading method for type Ia diamond color, comprising: irradiating the balanced compound light onto the diamond to be measured; collecting the composite light reflected by the tested diamond by using an integrating sphere; after the light collected by the integrating sphere is split, a CCD detector is used for detection, and then the reflection spectrum of the diamond to be detected is obtained; after normalizing the reflection spectrum of the measured diamond, selecting a nitrogen absorption band from the normalized reflection spectrum, and then calculating the area of the nitrogen absorption band; comparing the area of the nitrogen absorption band with a standard threshold file, and grading the color of the measured diamond, wherein the invention selects the nitrogen absorption band from the acquired reflection spectrum of the measured diamond, calculates the area of the nitrogen absorption band, and then compares the area of the nitrogen absorption band with the standard threshold file, thereby realizing the color grading of the diamond, but 1) the invention can only be applied to laboratory environments with better conditions, and has certain requirements on a light source and an integrating sphere; 2) The abnormal test points cannot be automatically removed in the detection process, namely, the test result is related to the tested position of the sample to be tested.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to provide a color grading/color measuring method, a system, equipment and a medium based on hyperspectral images, which overcome the problem that the error of a test result is larger due to the fact that a test scene is complex by introducing a nonlinear term into a signal model; the problem that when a standard colorimetric sample library is large, errors are large for a color grading/color measuring method based on hyperspectral images is solved by adding sparse constraint on abundance vectors; by introducing a local space regular term, the influence of the test position of the sample to be tested on the test result is overcome while the complexity is not increased; the accuracy of the color grading/color measuring method based on the hyperspectral image and the performance of the device are improved.
In order to achieve the above purpose, the invention adopts the following technical scheme:
the color grading/color measuring method based on the hyperspectral image specifically comprises the following steps:
step 1, collecting hyperspectral images of colorimetric samples by using a hyperspectral camera, and creating a standard colorimetric sample library;
step 2, collecting hyperspectral images of a sample to be detected by using a hyperspectral camera;
step 3, based on a standard colorimetric sample library, roughly estimating an abundance vector is realized;
step 4, cutting a standard colorimetric sample library based on the result of the step 3, and realizing fine estimation of the abundance vector;
and 5, based on the result of the step 4, realizing the color discrimination of the sample to be detected.
The step 3 specifically comprises the following steps: when the number of the standard colorimetric sample library samples in the step 1 is more than a self-defined threshold value, introducing sparse constraint lambda alpha to the abundance vector alpha n || 1 The method comprises the steps of carrying out a first treatment on the surface of the In addition, in order to eliminate the influence of the test position of the sample to be tested on the test result as far as possible, a local spatial regularization term on the abundance vector alpha is introduced
Figure BDA0004017819310000031
The proposed cost function is:
Figure BDA0004017819310000032
wherein the subscript n denotes the nth pixel, α n Represents the abundance vector of the nth pixel,
Figure BDA0004017819310000035
observation vector r representing nth pixel n Is>
Figure BDA0004017819310000036
Element(s)>
Figure BDA0004017819310000037
Represents the neighborhood of the nth pixel and assumes +.>
Figure BDA0004017819310000038
Knowing, i.e. having obtained an estimate, ω m Is->
Figure BDA0004017819310000039
Weight factor of->
Figure BDA00040178193100000310
Described is the difference between the abundance vectors of the nth and mth pixels;
for the above obtainedThe hyperspectral image is processed pixel by pixel: defining the neighborhood of the nth pixel as { n-1, n-W+1, n-W-1}, wherein W is the image width; when (when)
Figure BDA0004017819310000041
When the current pixel is larger than a self-defined threshold value, the current pixel is eliminated if the current pixel is an abnormal point with larger difference from surrounding pixels; when the neighborhood { n-1, n-W+1, n-W-1} of the nth pixel does not exist, namely when the 1 st pixel is processed, a local space regularization term is not required to be introduced into the cost function (1), and the solving method is similar to that of the formula (1);
introducing an auxiliary variable ζ, solving a cost function (1), and rewriting the equation (1) into the following form:
Figure BDA0004017819310000042
wherein the function is
Figure BDA0004017819310000043
The functions of (2) are as follows: function +.>
Figure BDA0004017819310000044
The value of (2) is zero; function +.>
Figure BDA0004017819310000045
The value of (2) is positive infinity; the introduction of the auxiliary variable ζ allows for the introduction of +.>
Figure BDA0004017819310000046
The norms regular terms are decoupled from the constraint optimization problem, as shown in the formula (2); solving the formula (2) by using a split-Bregman iterative algorithm to obtain the following formula
Figure BDA0004017819310000047
And
Figure BDA0004017819310000048
respectively optimizing and solving alpha by using iterative method n ,ψ nlin And ζ, the steps are as follows:
3.1 Optimized solution of alpha n ,ψ nlin
Discarding extraneous variables, optimizing the degradation of problem equation (3) to:
Figure BDA0004017819310000051
by introducing Lagrangian multipliers
Figure BDA0004017819310000053
The augmented lagrangian equation for the above problem can be written as:
Figure BDA0004017819310000054
when the original variable satisfies the following condition, in formula (6)
Figure BDA0004017819310000055
The optimal solution can be obtained:
Figure BDA0004017819310000056
wherein ,
Figure BDA0004017819310000058
bringing formula (7) into formula (6) to obtain an equation for the Lagrangian multiplier β, deriving the equation for β and zeroing it to obtain β (k+1) Is a new value of (1); beta will be (k+1) The updated value of (2) is brought into the first equation in equation (7) to obtain the updated abundance vector +.>
Figure BDA0004017819310000057
3.2 Optimally solving ζ: discarding extraneous variables, optimizing the degradation of problem equation (3) to:
Figure BDA0004017819310000061
solving the equation (8) by a soft threshold operator can be obtained:
Figure BDA0004017819310000062
/>
wherein the soft threshold operator is expressed as
Figure BDA0004017819310000068
The formula is as follows
Figure BDA0004017819310000069
(·) + Representing mapping the argument to a non-negative quadrant by zeroing out the negative element;
repeating the iteration of the steps 3.1) and 3.2) until convergence; when the error is smaller than a preset threshold η, the iterative process is considered to have converged.
Step 3 the weighting factor omega m The calculation steps of (a) are as follows:
1) By passing through
Figure BDA0004017819310000063
Calculate->
Figure BDA0004017819310000064
Which represents the (normalized) spectral distance of the nth and mth pixels;
2) By passing through
Figure BDA0004017819310000065
Calculating omega m
The step 4 specifically comprises the following steps:
by passing throughStep 3 optimization solving alpha n ,ψ nlin And ζ, obtaining a preliminary estimate of the abundance vector for a standard colorimetric sample library when the number of samples in the standard colorimetric sample library is greater than the custom threshold
Figure BDA0004017819310000066
On the basis of this, by means of the vector +.>
Figure BDA0004017819310000067
Discarding samples corresponding to the elements with zero in the sample, so as to obtain a smaller standard colorimetric sample library, and obtaining a more accurate estimated value of the abundance vector by solving a cost function of the formula (11):
Figure BDA0004017819310000071
wherein ,
Figure BDA0004017819310000073
is a vector consisting of 0 and 1, when +.>
Figure BDA0004017819310000074
When the element of (2) is 0, ">
Figure BDA0004017819310000075
The corresponding element is 0; when->
Figure BDA0004017819310000076
When the element of (2) is not equal to 0,/o>
Figure BDA0004017819310000077
The corresponding element is 1, the symbol ≡indicates Hadamard product (Hadamard product), vector ≡>
Figure BDA0004017819310000078
Vector->
Figure BDA0004017819310000079
Hadamard product of (A) plays a role in clippingThe original standard colorimetric sample library acts; equation (11) can be solved by the same method as solving equation (1), thereby obtaining a more accurate estimated value of the abundance vector +.>
Figure BDA00040178193100000710
The step 5 specifically comprises the following steps:
accurate estimated value based on abundance vector obtained in step 4
Figure BDA00040178193100000711
And the standard colorimetric specimen closest to the color of the standard colorimetric specimen can be obtained by finding out the position corresponding to the maximum element and comprehensively judging the proximity degree of the standard colorimetric specimen with other standard specimens, so that the color grading/color measurement is realized.
A hyperspectral image based color grading/color measurement system comprising:
the hyperspectral image acquisition module is used for carrying out hyperspectral image acquisition on the standard colorimetric specimen and the sample to be detected;
the standard colorimetric sample library creating module is used for creating a standard colorimetric sample library;
the abundance vector rough estimation module is used for preliminarily roughly estimating abundance vectors;
the standard colorimetric sample library clipping and abundance vector fine estimation module clips the standard colorimetric sample library according to the result of the abundance vector coarse estimation module, and obtains an accurate estimated value of the abundance vector;
the color judging module is used for judging the color of the sample according to the accurate estimated value of the abundance vector.
A hyperspectral image based color grading/color measuring apparatus comprising:
a memory for storing a computer program;
a processor for implementing the method of color grading/color measurement based on hyperspectral images as described in steps 1 to 5 when executing the computer program.
A computer readable storage medium storing a computer program which, when executed by a processor, enables computational analysis of color grading/colorimetry based on hyperspectral images.
Compared with the prior art, the invention has the beneficial effects that:
1) According to the invention, by introducing the nonlinear term into the signal model, the problem of large test result error caused by a complex test scene can be solved.
2) According to the invention, the problem that when the standard colorimetric sample library is large, errors are large in the color grading/color measuring method based on hyperspectral images is solved by increasing the sparse constraint on the abundance vectors. When colour measurement/colour grading precious stones, printed matter, textiles, leather articles, it is common to make a detection of a certain solid colour location. In the standard colorimetric sample library, the sample closest to the color of the sample is found out by a color grading/color measurement method based on the hyperspectral image. That is, although the standard colorimetric sample library may be large, the test sample is only the closest color to one of the samples. The abundance vector should be sparse in theory. Thus, errors in the hyperspectral image based color grading/color measurement method can be significantly improved by increasing the sparse constraint on the abundance vector.
3) According to the invention, by introducing the local space regular term, the influence of the test position of the sample to be tested on the test result is overcome while the complexity is not increased, and the accuracy of the color grading/color measuring method based on the hyperspectral image is improved. When colour measurement/colour grading precious stones, printed matter, textiles, leather articles, it is common to make a detection of a certain solid colour location. However, the conventional color grading/color measurement method based on hyperspectral images is generally only capable of analyzing pixel by pixel, and abnormal points such as the crust of Hetian jade, broken points of paper or textile and the like cannot be removed. By introducing the local spatial regular term, the invention can eliminate the abnormal points and improve the performance of the color grading/color measurement method based on the hyperspectral image.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a system configuration diagram of the present invention.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
It is assumed that each pixel of the hyperspectral image consists of L consecutive spectral bands, i.e. the observed pixel
Figure BDA0004017819310000091
Meanwhile, the number of samples in the standard colorimetric sample library is assumed to be R, and the spectrum library is
Figure BDA0004017819310000092
wherein ,/>
Figure BDA0004017819310000093
By using
Figure BDA0004017819310000094
Is indicated at +.>
Figure BDA0004017819310000095
Spectral characteristics of R samples in each band by +.>
Figure BDA0004017819310000096
Representing an abundance vector; in addition, it is assumed that the spectral library M has been constructed in advance by hyperspectral imaging of R specimens, i.e. M is known;
the general nonlinear model is expressed as
r=ψ(M,α)+n
Wherein, the function psi describes the interaction mode of the sample to be tested and the light source, alpha represents the abundance vector, and n represents the modeling error; however, it is difficult to simply and fully express the above expression by using parameters, so that the general nonlinear signal model of the above expression is simplified into the following expression by introducing a semi-parameterized model.
Figure BDA0004017819310000101
The signal model in the above is composed of a linear part and a non-linear partSex part (psi) nlin ) Composition;
Figure BDA0004017819310000102
for regenerating the nuclear Hilbert space->
Figure BDA0004017819310000103
Is expressed as +.>
Figure BDA0004017819310000104
I.e.
Figure BDA0004017819310000105
Regeneration core
Figure BDA0004017819310000106
Using Gaussian kernels, i.e.
Figure BDA0004017819310000107
As shown in fig. 1, a color grading/color measurement method based on hyperspectral image specifically includes the following steps:
step 1, collecting hyperspectral images of colorimetric samples by using a hyperspectral camera, and creating a standard colorimetric sample library;
step 2, collecting hyperspectral images of a sample to be detected by using a hyperspectral camera;
step 3, based on a standard colorimetric sample library, rough estimation of abundance vectors is achieved:
when the number of the standard colorimetric sample library samples in the step 1 is more than a self-defined threshold value, introducing sparse constraint lambda alpha to the abundance vector alpha n || 1 The method comprises the steps of carrying out a first treatment on the surface of the In addition, in order to eliminate the influence of the test position of the sample to be tested on the test result as far as possible, a local spatial regularization term on the abundance vector alpha is introduced
Figure BDA0004017819310000108
The proposed cost function is:
Figure BDA0004017819310000111
wherein the subscript n denotes the nth pixel, α n Represents the abundance vector of the nth pixel,
Figure BDA0004017819310000114
observation vector r representing nth pixel n Is>
Figure BDA0004017819310000115
Element(s)>
Figure BDA0004017819310000116
Represents the neighborhood of the nth pixel and assumes +.>
Figure BDA0004017819310000117
Knowing (i.e. having obtained an estimate of) ω m Is->
Figure BDA0004017819310000118
Weight factor of->
Figure BDA0004017819310000119
Described is the difference between the abundance vectors of the nth and mth pixels;
weighting factor omega m The calculation steps of (a) are as follows:
by passing through
Figure BDA00040178193100001110
Calculate->
Figure BDA00040178193100001111
Which represents the (normalized) spectral distance of the nth and mth pixels;
by passing through
Figure BDA00040178193100001112
Calculating omega m ;/>
Performing pixel-by-pixel processing on the hyperspectral image obtained above: defining the neighborhood of the nth pixel as { n-1, n-W+1, n-W-1}, wherein W is the image width; when (when)
Figure BDA00040178193100001113
When the current pixel is larger than a self-defined threshold value, the current pixel is eliminated if the current pixel is an abnormal point with larger difference from surrounding pixels; when the neighborhood { n-1, n-W+1, n-W-1} of the nth pixel does not exist, namely when the 1 st pixel is processed, a local spatial regularization term does not need to be introduced into the cost function (1), and the solving method is similar to that of the formula (1).
Introducing an auxiliary variable ζ, solving a cost function (1), and rewriting the equation (1) into the following form:
Figure BDA0004017819310000121
wherein the function is
Figure BDA0004017819310000123
The functions of (2) are as follows: function +.>
Figure BDA0004017819310000124
The value of (2) is zero; function +.>
Figure BDA0004017819310000125
The value of (2) is positive infinity; the introduction of the auxiliary variable ζ allows for the introduction of +.>
Figure BDA0004017819310000126
The norms regular terms are decoupled from the constraint optimization problem, as shown in the formula (2); solving the formula (2) by using a split-Bregman iterative algorithm to obtain the following formula
Figure BDA0004017819310000127
And
Figure BDA0004017819310000128
respectively optimizing and solving alpha by using iterative method n ,ψ nlin And ζ, the steps are as follows:
3.1 Optimized solution of alpha n ,ψ nlin
Discarding extraneous variables, optimizing the degradation of problem equation (3) to:
Figure BDA0004017819310000129
by introducing Lagrangian multipliers
Figure BDA00040178193100001211
The augmented lagrangian equation for the above problem can be written as:
Figure BDA0004017819310000131
/>
when the original variable satisfies the following condition, formula (6)
Figure BDA0004017819310000132
The optimal solution can be obtained:
Figure BDA0004017819310000133
wherein ,
Figure BDA0004017819310000137
bringing formula (7) into formula (6) to obtain an equation for the Lagrangian multiplier β, deriving the equation for β and zeroing it to obtain β (k+1) Is a new value of (1); beta will be (k+1) The updated value of (2) is brought into the first equation in equation (7) to obtain the updated abundance vector +.>
Figure BDA0004017819310000134
3.2 Optimally solving ζ: discarding extraneous variables, optimizing the degradation of problem equation (3) to:
Figure BDA0004017819310000135
solving the equation (8) by a soft threshold operator can be obtained:
Figure BDA0004017819310000136
wherein the soft threshold operator is expressed as
Figure BDA0004017819310000138
The formula is as follows
Figure BDA0004017819310000139
(·) + Representing mapping the argument to a non-negative quadrant by zeroing out the negative element;
repeating the iteration of the steps 3.1) and 3.2) until convergence; when the error is smaller than a preset threshold η, the iterative process is considered to have converged.
Step 4, cutting a standard colorimetric sample library based on the result of the step 3, and realizing fine estimation of abundance vectors:
optimization of solving for alpha by step 3 n ,ψ nlin And ζ, obtaining a preliminary estimate of the abundance vector for a standard colorimetric sample library when the number of samples in the standard colorimetric sample library is greater than the custom threshold
Figure BDA0004017819310000141
On the basis of this, by means of the vector +.>
Figure BDA0004017819310000142
Discarding the specimen corresponding to the element with zero in the sample, thereby obtaining a small standard ratio color codeThe library obtains a more accurate estimated value of the abundance vector by solving a cost function of the formula (11):
Figure BDA0004017819310000143
wherein
Figure BDA0004017819310000144
Is a vector consisting of 0 and 1, when +.>
Figure BDA0004017819310000145
When the element of (2) is 0, ">
Figure BDA0004017819310000146
The corresponding element is 0; when->
Figure BDA0004017819310000147
When the element of (2) is not equal to 0,/o>
Figure BDA0004017819310000148
The corresponding element is 1, the symbol ≡indicates Hadamard product (Hadamard product), vector ≡>
Figure BDA0004017819310000149
Vector->
Figure BDA00040178193100001410
The Hadamard product of (2) plays a role in cutting an original standard colorimetric sample library; equation (11) can be solved by the same method as solving equation (1), thereby obtaining a more accurate estimate of the abundance vector
Figure BDA00040178193100001411
/>
And 5, based on the result of the step 4, realizing color discrimination of the sample to be detected:
accurate estimation based on abundance vector
Figure BDA00040178193100001412
And the standard colorimetric specimen closest to the color of the standard colorimetric specimen can be obtained by finding out the position corresponding to the maximum element and comprehensively judging the proximity degree of the standard colorimetric specimen with other standard specimens, so that the color grading/color measurement is realized.
Referring to fig. 2, a color grading/colorimetry system based on hyperspectral images, comprising:
the hyperspectral image acquisition module is used for carrying out hyperspectral image acquisition on the standard colorimetric specimen and the sample to be detected;
the standard colorimetric sample library creating module is used for creating a standard colorimetric sample library;
the abundance vector rough estimation module is used for preliminarily roughly estimating abundance vectors;
the standard colorimetric sample library clipping and abundance vector fine estimation module clips the standard colorimetric sample library according to the result of the abundance vector coarse estimation module, and obtains an accurate estimated value of the abundance vector;
the color judging module is used for judging the color of the sample according to the accurate estimated value of the abundance vector.
A hyperspectral image based color grading/color measuring apparatus comprising:
a memory for storing a computer program;
a processor for implementing the method of color grading/color measurement based on hyperspectral images as described in steps 1 to 5 when executing the computer program.
A computer readable storage medium storing a computer program which, when executed by a processor, enables computational analysis of color grading/colorimetry based on hyperspectral images.
According to the invention, by introducing nonlinear items into the signal model, the problem of large test result errors caused by complex test scenes can be solved; the problem that when a standard colorimetric sample library is large, errors are large for a color grading/color measuring method based on hyperspectral images is solved by adding sparse constraint on abundance vectors; the error of the color grading/color measurement method based on hyperspectral images can be remarkably improved by increasing the sparse constraint on the abundance vectors; by introducing the local space regular term, the influence of the test position of the sample to be tested on the test result is overcome while the complexity is not increased, and the accuracy of the color grading/color measuring method based on the hyperspectral image is improved.

Claims (8)

1. The color grading/color measuring method based on the hyperspectral image is characterized by comprising the following steps of: the method specifically comprises the following steps:
step 1, collecting hyperspectral images of colorimetric samples by using a hyperspectral camera, and creating a standard colorimetric sample library;
step 2, collecting hyperspectral images of a sample to be detected by using a hyperspectral camera;
step 3, based on a standard colorimetric sample library, roughly estimating an abundance vector is realized;
step 4, cutting a standard colorimetric sample library based on the result of the step 3, and realizing fine estimation of the abundance vector;
and 5, based on the result of the step 4, realizing the color discrimination of the sample to be detected.
2. A color grading/color measurement method based on hyperspectral image as claimed in claim 1, wherein: the step 3 specifically comprises the following steps:
when the number of the standard colorimetric sample library samples in the step 1 is more than a self-defined threshold value, introducing sparse constraint lambda alpha to the abundance vector alpha n || 1 The method comprises the steps of carrying out a first treatment on the surface of the In addition, in order to eliminate the influence of the test position of the sample to be tested on the test result as far as possible, a local spatial regularization term on the abundance vector alpha is introduced
Figure FDA0004017819300000011
The proposed cost function is:
Figure FDA0004017819300000012
wherein the subscript n denotes the nth pixel, α n Representing the abundance of the nth pixelDegree vector, r n,l Observation vector r representing nth pixel n Is a first element of the (c) a (c),
Figure FDA0004017819300000013
represents the neighborhood of the nth pixel and assumes +.>
Figure FDA0004017819300000014
Knowing, i.e. having obtained an estimate, ω m Is->
Figure FDA0004017819300000015
Weight factor of->
Figure FDA0004017819300000021
Described is the difference between the abundance vectors of the nth and mth pixels;
performing pixel-by-pixel processing on the hyperspectral image obtained above: defining the neighborhood of the nth pixel as { n-1, n-W+1, n-W-1}, wherein W is the image width; when (when)
Figure FDA0004017819300000022
When the current pixel is larger than a self-defined threshold value, the current pixel is eliminated if the current pixel is an abnormal point with larger difference from surrounding pixels; when the neighborhood { n-1, n-W+1, n-W-1} of the nth pixel does not exist, namely when the 1 st pixel is processed, a local space regularization term is not required to be introduced into the cost function (1), and the solving method is similar to that of the formula (1);
introducing an auxiliary variable ζ, solving a cost function (1), and rewriting the equation (1) into the following form:
Figure FDA0004017819300000023
wherein the function is
Figure FDA0004017819300000024
The functions of (2) are as follows:function +.>
Figure FDA0004017819300000025
The value of (2) is zero; function +.>
Figure FDA0004017819300000026
The value of (2) is positive infinity; the introduction of the auxiliary variable ζ allows the introduction of l 1 The norms regular terms are decoupled from the constraint optimization problem, as shown in the formula (2); solving the formula (2) by using a split-Bregman iterative algorithm to obtain the following formula
Figure FDA0004017819300000027
Figure FDA0004017819300000031
And
Figure FDA0004017819300000032
respectively optimizing and solving alpha by using iterative method n ,ψ nlin And ζ, the steps are as follows:
3.1 Optimized solution of alpha n ,ψ nlin
Discarding extraneous variables, optimizing the degradation of problem equation (3) to:
Figure FDA0004017819300000033
by introducing Lagrangian multipliers
Figure FDA0004017819300000034
The augmented lagrangian equation for the above problem can be written as:
Figure FDA0004017819300000035
when the original variable satisfies the following condition, formula (6)
Figure FDA0004017819300000036
The optimal solution can be obtained:
Figure FDA0004017819300000037
wherein ,
Figure FDA0004017819300000038
bringing formula (7) into formula (6) to obtain an equation for the Lagrangian multiplier β, deriving the equation for β and zeroing it to obtain β (k+1) Is a new value of (1); beta will be (k+1) The updated value of (2) is brought into the first equation in equation (7) to obtain the updated abundance vector +.>
Figure FDA0004017819300000041
3.2 Optimally solving ζ: discarding extraneous variables, optimizing the degradation of problem equation (3) to:
Figure FDA0004017819300000042
solving the equation (8) by a soft threshold operator can be obtained:
Figure FDA0004017819300000043
wherein the soft threshold operator is expressed as
Figure FDA0004017819300000044
The formula is +.>
Figure FDA0004017819300000045
(·) + Representing mapping the argument to a non-negative quadrant by zeroing out the negative element;
repeating the iteration of steps 3.1) to 3.2) until convergence; when the error is smaller than a preset threshold η, the iterative process is considered to have converged.
3. A color grading/color measurement method based on hyperspectral image as claimed in claim 3, wherein: step 3 the weighting factor omega m The calculation method of (1) is as follows:
1) By passing through
Figure FDA0004017819300000046
Calculate->
Figure FDA0004017819300000047
Which represents the (normalized) spectral distance of the nth and mth pixels;
2) By passing through
Figure FDA0004017819300000048
Calculating omega m
4. A color grading/color measurement method based on hyperspectral image as claimed in claim 1, wherein: the step 4 specifically comprises the following steps: optimization of solving for alpha by step 3 n ,ψ nlin And ζ, obtaining a preliminary estimate of the abundance vector for a standard colorimetric sample library when the number of samples in the standard colorimetric sample library is greater than the custom threshold
Figure FDA0004017819300000051
On the basis of this, by means of the vector +.>
Figure FDA0004017819300000052
Element of zero inDiscarding samples corresponding to the elements, thereby obtaining a smaller standard colorimetric sample library, and obtaining a more accurate estimated value of the abundance vector by solving a cost function (11):
Figure FDA0004017819300000053
s.t.α n ≥0
(11)
wherein ,
Figure FDA0004017819300000054
is a vector consisting of 0 and 1, when +.>
Figure FDA0004017819300000055
When the element of (2) is 0, ">
Figure FDA0004017819300000056
The corresponding element is 0; when->
Figure FDA0004017819300000057
When the element of (2) is not equal to 0,/o>
Figure FDA0004017819300000058
The corresponding element is 1, the symbol ≡indicates Hadamard product (Hadamard product), vector ≡>
Figure FDA0004017819300000059
Vector->
Figure FDA00040178193000000510
The Hadamard product of (2) plays a role in cutting an original standard colorimetric sample library; equation (11) can be solved by the same method as solving equation (1), thereby obtaining a more accurate estimated value of the abundance vector +.>
Figure FDA00040178193000000511
5. A color grading/color measurement method based on hyperspectral image as claimed in claim 1, wherein: the step 5 specifically comprises the following steps:
accurate estimation based on abundance vector
Figure FDA00040178193000000512
And the standard colorimetric specimen closest to the color of the standard colorimetric specimen can be obtained by finding out the position corresponding to the maximum element and comprehensively judging the proximity degree of the standard colorimetric specimen with other standard specimens, so that the color grading/color measurement is realized.
6. A color grading/colorimetry system for hyperspectral images based on the method of claim 1, comprising:
the hyperspectral image acquisition module is used for carrying out hyperspectral image acquisition on the standard colorimetric specimen and the sample to be detected;
the standard colorimetric sample library creating module is used for creating a standard colorimetric sample library;
the abundance vector rough estimation module is used for preliminarily roughly estimating abundance vectors;
the standard colorimetric sample library clipping and abundance vector fine estimation module clips the standard colorimetric sample library according to the result of the abundance vector coarse estimation module, and obtains an accurate estimated value of the abundance vector;
the color judging module is used for judging the color of the sample according to the accurate estimated value of the abundance vector.
7. A color grading/colorimetry apparatus for hyperspectral images based on the method of claim 1 comprising:
a memory for storing a computer program;
a processor for implementing the method of color grading/color measurement based on hyperspectral images as claimed in claims 1 to 5 when executing the computer program.
8. A computer readable storage medium storing a computer program which, when executed by a processor, enables computational analysis of color grading/colorimetry based on hyperspectral images.
CN202211677866.7A 2022-12-26 2022-12-26 Color grading/color measurement method, system, equipment and medium based on hyperspectral image Active CN116128982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211677866.7A CN116128982B (en) 2022-12-26 2022-12-26 Color grading/color measurement method, system, equipment and medium based on hyperspectral image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211677866.7A CN116128982B (en) 2022-12-26 2022-12-26 Color grading/color measurement method, system, equipment and medium based on hyperspectral image

Publications (2)

Publication Number Publication Date
CN116128982A true CN116128982A (en) 2023-05-16
CN116128982B CN116128982B (en) 2023-09-26

Family

ID=86300108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211677866.7A Active CN116128982B (en) 2022-12-26 2022-12-26 Color grading/color measurement method, system, equipment and medium based on hyperspectral image

Country Status (1)

Country Link
CN (1) CN116128982B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060093223A1 (en) * 2004-11-02 2006-05-04 The Boeing Company Spectral geographic information system
CN102314685A (en) * 2011-07-23 2012-01-11 北京航空航天大学 Hyperspectral image sparse unmixing method based on random projection
CN102789639A (en) * 2012-07-16 2012-11-21 中国科学院自动化研究所 Method for fusing high-spectrum image and visible light image based on nonnegative matrix decomposition
CN103090973A (en) * 2013-01-07 2013-05-08 广州标旗电子科技有限公司 Ia type diamond color quick grading method based on spectrum
WO2013116316A1 (en) * 2012-01-30 2013-08-08 Scanadu Incorporated Hyperspectral imaging systems, units, and methods
CN104899850A (en) * 2014-03-03 2015-09-09 五邑大学 High-spectrum image unmixing method based on weighted joint sparse regression
CN112364730A (en) * 2020-10-29 2021-02-12 济南大学 Hyperspectral ground object automatic classification method and system based on sparse subspace clustering
CN112560597A (en) * 2020-12-02 2021-03-26 吉林大学 Microscopic hyperspectral COVID-19 detection and identification method
CN115131614A (en) * 2022-07-06 2022-09-30 浙江大学 Method for classifying metals from coarse to fine parts based on hyperspectral images

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060093223A1 (en) * 2004-11-02 2006-05-04 The Boeing Company Spectral geographic information system
CN102314685A (en) * 2011-07-23 2012-01-11 北京航空航天大学 Hyperspectral image sparse unmixing method based on random projection
WO2013116316A1 (en) * 2012-01-30 2013-08-08 Scanadu Incorporated Hyperspectral imaging systems, units, and methods
CN102789639A (en) * 2012-07-16 2012-11-21 中国科学院自动化研究所 Method for fusing high-spectrum image and visible light image based on nonnegative matrix decomposition
CN103090973A (en) * 2013-01-07 2013-05-08 广州标旗电子科技有限公司 Ia type diamond color quick grading method based on spectrum
CN104899850A (en) * 2014-03-03 2015-09-09 五邑大学 High-spectrum image unmixing method based on weighted joint sparse regression
CN112364730A (en) * 2020-10-29 2021-02-12 济南大学 Hyperspectral ground object automatic classification method and system based on sparse subspace clustering
CN112560597A (en) * 2020-12-02 2021-03-26 吉林大学 Microscopic hyperspectral COVID-19 detection and identification method
CN115131614A (en) * 2022-07-06 2022-09-30 浙江大学 Method for classifying metals from coarse to fine parts based on hyperspectral images

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
程国首: "《基于高光谱图像的新疆红富士苹果颜色分级研究》", 《新疆农业科学》, pages 1616 - 1623 *

Also Published As

Publication number Publication date
CN116128982B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
EP1484595B1 (en) Color space transformations for use in identifying objects of interest in biological specimens
US8135187B2 (en) Method and apparatus for removing tissue autofluorescence
US8160331B2 (en) Image processing apparatus and computer program product
Kiruthika et al. Matching of different rice grains using digital image processing
WO2017206322A1 (en) Method for removing noise from astronomical image
CN111292266A (en) GF-5 remote sensing image mixed noise removing method based on double low rank matrix decomposition
CN114611582A (en) Method and system for analyzing substance concentration based on near infrared spectrum technology
CN116128982B (en) Color grading/color measurement method, system, equipment and medium based on hyperspectral image
CN116883674B (en) Multispectral image denoising device and food quality detection system using same
Pollatou An automated method for removal of striping artifacts in fluorescent whole-slide microscopy
CN111899196A (en) Blade defect motion blurred image restoration method based on classical restoration algorithm
CN108734674B (en) OCT image blind restoration method for improving NAS-RIF
Astola Stain separation in digital bright field histopathology
US9122904B2 (en) Method for optimization of quantitative video-microscopy and associated system
CN113763368B (en) Multi-type damage detection characteristic analysis method for large-size test piece
CN116137067A (en) Hyperspectral image anomaly detection method based on coefficient analysis collaborative representation
CN114166850A (en) Light-excited infrared thermal imaging defect detection method based on differential tensor decomposition
CN114049571A (en) Method and device for extracting water body area of hyperspectral image and electronic equipment
Vandeginste et al. Spatial enhancement and restoration of chemical images from secondary ion mass spectrometry and ion scattering spectrometry
CN113409261A (en) Hyperspectral anomaly detection method based on space-spectrum feature joint constraint
EP3545495B1 (en) A method for unsupervised stain separation in pathological whole slide image
JP7329165B1 (en) Signal processing method, signal processing device, and signal processing system
KR102613961B1 (en) Determination method for cell zone of slide sample image smeared with bone-marrow and high magnification imaging method of the same cell zone
CN110135448B (en) Hyperspectral image virtual dimension estimation method based on ridge ratio shrinkage
CN116523755A (en) Defect super-resolution detection method based on infrared imaging physical core

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