CN116128982B - 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
CN116128982B
CN116128982B CN202211677866.7A CN202211677866A CN116128982B CN 116128982 B CN116128982 B CN 116128982B CN 202211677866 A CN202211677866 A CN 202211677866A CN 116128982 B CN116128982 B CN 116128982B
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.)
Active
Application number
CN202211677866.7A
Other languages
Chinese (zh)
Other versions
CN116128982A (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

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; the specific method 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 vector of the nth pixel, r n,l Representing the view of the nth pixelMeasuring vector r n Is a first element of the (c) a (c),represents the neighborhood of the nth pixel and assumes +.>It is known that its estimate has been obtained, < >>Weight factor of->Described is the difference between the abundance vectors of the nth and mth pixels;
in the formula (1)In the item, ψ nlin Representing non-linear terms in the signal model, +.>Representing the regenerated core Hilbert space, +.>Representing the functional in the regenerated nuclear Hilbert space->L of (3) 2 A norm;
in the formula (1) and />In item e l The error of the actual value and the estimated value is represented, L represents the number of spectral bands of each pixel, namely each pixel of the hyperspectral image consists of L continuous spectral bands, and mu, lambda and gamma are all compromise parameters for controlling the errorDifference item->Abundance vector sparse constraint term alpha n || 1 And spatial regularization termNonlinear term->The parameters mu, lambda and gamma are all values larger than 0 and smaller than 1, and can be set manually;
in the formula (1)Represents an abundance vector α obtained from the cost function in equation (1) n Is the optimal solution of->Representing a nonlinear term ψ found from a cost function in equation (1) nlin Is the optimal solution of (a);
in the formula (1)In the term, s.t. means "subject to", i.e. "s.t." is followed by a constraint, r n,l Observation vector r representing nth pixel n Is->Spectral features representing R samples in the first band, superscript +.>A transpose operation representing a vector or matrix;
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
and ξ(k+1) =ξ (k) +(α ( n k+1)(k+1) ) (4)
In the formula (3), ρ is a compromise parameter, and is controlledA compromise between an item and another item,the parameter ρ is a value greater than 0 and less than 1, which can be set manually, ζ is another auxiliary variable introduced for solving equation (3), wherein ξ(k) A value representing ζ after the kth iteration;
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 (c) is brought to the first equation in equation (7),the updated abundance vector is obtained>In the formula (7), ->In items>Representation-> wherein />Representing gaussian kernel, σ representing gaussian kernel bandwidth;
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:
wherein the soft threshold operator is expressed asThe formula is as follows
(·) + 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 value eta, the iteration process is considered to be converged;
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.
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;
2) By passing throughCalculating omega m
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 +.>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->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 +.>
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 usingThe spectral characteristics of R samples in the first band are expressed 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 equation is composed of a linear part and a nonlinear part (ψ nlin ) Composition, psi nlin A nonlinear process part in the interaction of a sample to be measured and light is described;for regenerating the nuclear Hilbert space->Is represented as a real function of k, i.e
The regeneration core kappa is Gaussian core
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 Representing the abundance vector of the nth pixel, 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 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;
by passing throughCalculating 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)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; introduction of auxiliary variable ζ allowsPermit 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
And
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 to optimize the problem-like (3) degradation
The method comprises the following steps:
solving the equation (8) by a soft threshold operator can be obtained:
wherein the soft threshold operator is expressed asThe formula is as follows
(·) + 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 abundance vector when the number of samples in the standard colorimetric sample library is greater than the custom threshold valueEstimated valueOn 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):
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; the formula (11) may be the same asSolving the equation (1) by the same method to obtain a more accurate estimated value 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 (7)

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; the specific method 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 imageElement alpha n Representing the abundance vector of the nth pixel, r n, Observation vector r representing nth pixel n Is the first of (2)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;
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 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
And
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 multipliersAbove-mentionedThe augmented lagrangian equation for a 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:
wherein the soft threshold operator is expressed asThe formula is as follows
(·) + 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 value eta, the iteration process is considered to be converged;
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: 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;
2) By passing throughCalculating omega m
3. 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 abundance when the number of samples in the standard colorimetric sample library is greater than the custom thresholdPreliminary estimate of vectorOn 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 clipping the originalThe function of a standard colorimetric specimen 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 +.>
4. 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.
5. 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.
6. 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 4 when executing the computer program.
7. 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 CN116128982A (en) 2023-05-16
CN116128982B true 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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7450761B2 (en) * 2004-11-02 2008-11-11 The Boeing Company Spectral geographic information system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
《基于高光谱图像的新疆红富士苹果颜色分级研究》;程国首;《新疆农业科学》;第1616-1623页 *

Also Published As

Publication number Publication date
CN116128982A (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN107705306B (en) Fabric defect detection method based on multi-feature matrix low-rank decomposition
EP1484595B1 (en) Color space transformations for use in identifying objects of interest in biological specimens
CN110261405B (en) Insulator pollution component identification method based on microscopic hyperspectral technology
CN104634745B (en) spectral reconstruction method
CN108682008A (en) A kind of Leukocyte Image clarity evaluation method and device
Kiruthika et al. Matching of different rice grains using digital image processing
CN105894477B (en) Astronomical image noise elimination method
CN109461122A (en) A kind of compressed sensing image rebuilding method based on multi-view image
CN111292266A (en) GF-5 remote sensing image mixed noise removing method based on double low rank matrix decomposition
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
CN111899196A (en) Blade defect motion blurred image restoration method based on classical restoration algorithm
CN113763368B (en) Multi-type damage detection characteristic analysis method for large-size test piece
CN111079591A (en) Bad data restoration method and system based on improved multi-scale principal component analysis
Astola Stain separation in digital bright field histopathology
Henrot et al. Edge-preserving nonnegative hyperspectral image restoration
CN114166850A (en) Light-excited infrared thermal imaging defect detection method based on differential tensor decomposition
Vandeginste et al. Spatial enhancement and restoration of chemical images from secondary ion mass spectrometry and ion scattering spectrometry
CN110836878B (en) Convolution interpolation coupling Gaussian mixture model rapid three-dimensional fluorescence peak searching method
CN114049571A (en) Method and device for extracting water body area of hyperspectral image and electronic equipment
EP2697737B1 (en) Method for optimization of quantitative video-microscopy and associated system
CN113409261B (en) Hyperspectral anomaly detection method based on spatial spectrum feature joint constraint
Harish et al. Quantifying Relative Turbidity Levels using Image Processing Techniques
CN116523755A (en) Defect super-resolution detection method based on infrared imaging physical core
Li et al. Image fast dehazing algorithm based on dark channel prior improvement

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