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 PDFInfo
- 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
Links
- 238000000691 measurement method Methods 0.000 title claims abstract description 17
- 239000013598 vector Substances 0.000 claims abstract description 73
- 238000000034 method Methods 0.000 claims abstract description 33
- 238000012360 testing method Methods 0.000 claims abstract description 31
- 230000006870 function Effects 0.000 claims description 25
- 238000005259 measurement Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 9
- 230000002159 abnormal effect Effects 0.000 claims description 6
- 230000015556 catabolic process Effects 0.000 claims description 6
- 238000004737 colorimetric analysis Methods 0.000 claims description 6
- 238000006731 degradation reaction Methods 0.000 claims description 6
- 238000005457 optimization Methods 0.000 claims description 6
- 230000003595 spectral effect Effects 0.000 claims description 6
- 230000003190 augmentative effect Effects 0.000 claims description 3
- 238000004422 calculation algorithm Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000010205 computational analysis Methods 0.000 claims description 3
- 238000012804 iterative process Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- IJGRMHOSHXDMSA-UHFFFAOYSA-N Atomic nitrogen Chemical compound N#N IJGRMHOSHXDMSA-UHFFFAOYSA-N 0.000 description 12
- 239000010432 diamond Substances 0.000 description 9
- 229910003460 diamond Inorganic materials 0.000 description 9
- 238000010521 absorption reaction Methods 0.000 description 6
- 229910052757 nitrogen Inorganic materials 0.000 description 6
- 238000001228 spectrum Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 4
- 239000010437 gem Substances 0.000 description 4
- 239000004753 textile Substances 0.000 description 4
- 239000010985 leather Substances 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 229910001751 gemstone Inorganic materials 0.000 description 2
- -1 printed matter Substances 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000701 chemical imaging Methods 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000004043 dyeing Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000001678 irradiating effect Effects 0.000 description 1
- 239000010977 jade Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000001172 regenerating effect Effects 0.000 description 1
- 230000008929 regeneration Effects 0.000 description 1
- 238000011069 regeneration method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/11—Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10032—Satellite or aerial image; Remote sensing
- G06T2207/10036—Multispectral image; Hyperspectral image
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A40/00—Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
- Y02A40/10—Adaptation 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
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 introducedThe proposed cost function is:
wherein the subscript n denotes the nth pixel, α n Represents the abundance vector of the nth pixel,observation vector r representing nth pixel n Is>Element(s)>Represents the neighborhood of the nth pixel and assumes +.>Knowing, i.e. having obtained an estimate, ω m Is->Weight factor of->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)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:
wherein the function isThe functions of (2) are as follows: function +.>The value of (2) is zero; function +.>The value of (2) is positive infinity; the introduction of the auxiliary variable ζ allows for the introduction of +.>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
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:
by introducing Lagrangian multipliersThe augmented lagrangian equation for the above problem can be written as:
when the original variable satisfies the following condition, in formula (6)The optimal solution can be obtained:
wherein ,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 +.>
3.2 Optimally solving ζ: discarding extraneous variables, optimizing the degradation of problem equation (3) to:
solving the equation (8) by a soft threshold operator can be obtained:
(·) + 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 throughCalculate->Which represents the (normalized) spectral distance of the nth and mth pixels;
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 thresholdOn the basis of this, by means of the vector +.>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):
wherein ,is a vector consisting of 0 and 1, when +.>When the element of (2) is 0, ">The corresponding element is 0; when->When the element of (2) is not equal to 0,/o>The corresponding element is 1, the symbol ≡indicates Hadamard product (Hadamard product), vector ≡>Vector->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 +.>
The step 5 specifically comprises the following steps:
accurate estimated value based on abundance vector obtained in step 4And 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 pixelMeanwhile, the number of samples in the standard colorimetric sample library is assumed to be R, and the spectrum library is wherein ,
By usingIs indicated at +.>Spectral characteristics of R samples in each band by +.>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.
The signal model in the above is composed of a linear part and a non-linear partSex part (psi) nlin ) Composition;for regenerating the nuclear Hilbert space->Is expressed as +.>I.e.
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 introducedThe proposed cost function is:
wherein the subscript n denotes the nth pixel, α n Represents the abundance vector of the nth pixel,observation vector r representing nth pixel n Is>Element(s)>Represents the neighborhood of the nth pixel and assumes +.>Knowing (i.e. having obtained an estimate of) ω m Is->Weight factor of->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 throughCalculate->Which represents the (normalized) spectral distance 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)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:
wherein the function isThe functions of (2) are as follows: function +.>The value of (2) is zero; function +.>The value of (2) is positive infinity; the introduction of the auxiliary variable ζ allows for the introduction of +.>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
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:
by introducing Lagrangian multipliersThe augmented lagrangian equation for the above problem can be written as:
when the original variable satisfies the following condition, formula (6)The optimal solution can be obtained:
wherein ,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 +.>
3.2 Optimally solving ζ: discarding extraneous variables, optimizing the degradation of problem equation (3) to:
solving the equation (8) by a soft threshold operator can be obtained:
(·) + 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 thresholdOn the basis of this, by means of the vector +.>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):
wherein Is a vector consisting of 0 and 1, when +.>When the element of (2) is 0, ">The corresponding element is 0; when->When the element of (2) is not equal to 0,/o>The corresponding element is 1, the symbol ≡indicates Hadamard product (Hadamard product), vector ≡>Vector->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
And 5, based on the result of the step 4, realizing color discrimination of the sample to be detected:
accurate estimation based on abundance vectorAnd 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 introducedThe proposed cost function is:
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),represents the neighborhood of the nth pixel and assumes +.>Knowing, i.e. having obtained an estimate, ω m Is->Weight factor of->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)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:
wherein the function isThe functions of (2) are as follows:function +.>The value of (2) is zero; function +.>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
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:
by introducing Lagrangian multipliersThe augmented lagrangian equation for the above problem can be written as:
when the original variable satisfies the following condition, formula (6)The optimal solution can be obtained:
wherein ,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 +.>
3.2 Optimally solving ζ: discarding extraneous variables, optimizing the degradation of problem equation (3) to:
solving the equation (8) by a soft threshold operator can be obtained:
(·) + 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 throughCalculate->Which represents the (normalized) spectral distance of the nth and mth pixels;
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 thresholdOn the basis of this, by means of the vector +.>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):
s.t.α n ≥0
(11)
wherein ,is a vector consisting of 0 and 1, when +.>When the element of (2) is 0, ">The corresponding element is 0; when->When the element of (2) is not equal to 0,/o>The corresponding element is 1, the symbol ≡indicates Hadamard product (Hadamard product), vector ≡>Vector->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 +.>
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 vectorAnd 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.
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)
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 |
-
2022
- 2022-12-26 CN CN202211677866.7A patent/CN116128982B/en active Active
Patent Citations (9)
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)
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 | |
WO2017206322A1 (en) | Method for removing noise from astronomical image | |
Kiruthika et al. | Matching of different rice grains using digital image processing | |
CN116883674B (en) | Multispectral image denoising device and food quality detection system using same | |
JP5305618B2 (en) | Image processing apparatus and image processing program | |
CN113763368B (en) | Multi-type damage detection characteristic analysis method for large-size test piece | |
CN111292266A (en) | GF-5 remote sensing image mixed noise removing method based on double low rank matrix decomposition | |
CN114049571A (en) | Method and device for extracting water body area of hyperspectral image and electronic equipment | |
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 | |
Pollatou | An automated method for removal of striping artifacts in fluorescent whole-slide microscopy | |
Astola | Stain separation in digital bright field histopathology | |
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 | |
US9122904B2 (en) | Method for optimization of quantitative video-microscopy and associated system | |
CN114166850A (en) | Light-excited infrared thermal imaging defect detection method based on differential tensor decomposition | |
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 | |
CN116523755A (en) | Defect super-resolution detection method based on infrared imaging physical core | |
Harish et al. | Quantifying Relative Turbidity Levels using Image Processing Techniques | |
Valera et al. | Sparsity-based background removal for STORM super-resolution images | |
WO2023153316A1 (en) | Signal processing method, signal processing device, and signal processing system |
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 |