CN111028300A - Spectral reflectivity reconstruction method based on genetic algorithm - Google Patents

Spectral reflectivity reconstruction method based on genetic algorithm Download PDF

Info

Publication number
CN111028300A
CN111028300A CN201811174659.3A CN201811174659A CN111028300A CN 111028300 A CN111028300 A CN 111028300A CN 201811174659 A CN201811174659 A CN 201811174659A CN 111028300 A CN111028300 A CN 111028300A
Authority
CN
China
Prior art keywords
genetic
individuals
light sources
value
target light
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.)
Pending
Application number
CN201811174659.3A
Other languages
Chinese (zh)
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.)
Shanghai Publishing and Printing College
University of Shanghai for Science and Technology
Original Assignee
Shanghai Publishing and Printing College
University of Shanghai for 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 Shanghai Publishing and Printing College, University of Shanghai for Science and Technology filed Critical Shanghai Publishing and Printing College
Priority to CN201811174659.3A priority Critical patent/CN111028300A/en
Publication of CN111028300A publication Critical patent/CN111028300A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/123DNA computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Genetics & Genomics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Physiology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

The application provides a spectral reflectivity reconstruction method based on a genetic algorithm, a plurality of target light sources suitable for color sample reconstruction can be quickly and automatically found through the genetic algorithm, and more color information is provided for spectral reflectivity reconstruction by calculating CIE tri-stimulus values under the plurality of target light sources, so that the spectral reflectivity reconstruction precision is improved, and the problem that the spectral reflectivity is not ideal based on RGB three-channel information reconstruction is solved.

Description

Spectral reflectivity reconstruction method based on genetic algorithm
Technical Field
The application relates to the field of image processing, in particular to a spectral reflectivity reconstruction method based on a genetic algorithm.
Background
At present, the reconstruction of the spectral reflectivity based on the RGB three-channel information values is an important method in the image processing technology, but the accuracy of the reconstruction of the spectral reflectivity in the existing method is not ideal, and in order to solve the problem, it can be known by analyzing the working principle of spectral imaging based on an optical band-pass filter, and compared with a color digital camera, the method has the main advantage that the number of channels for digital image acquisition is increased by matching with the optical filter, and higher-dimensional input information is provided for spectral reconstruction, so that the accuracy of the spectral reconstruction is improved. Based on the above teaching, many researchers have developed the related research of using the response value expansion method of the color digital camera to realize the spectral reflectivity reconstruction of the surface of the object, for example, Dupont et al have proposed earlier the spectral reconstruction of the tristimulus value signal by using the polynomial expansion and the pseudo-inverse solution method; the HARIFI et al improves on the basis of Dupont, the HARIFI method reconstructs the CIE tristimulus value under one light source through a weighted linear regression model and then performs spectrum reconstruction on two groups of tristimulus value signals based on a principal component analysis method; zhang et al directly predicts tristimulus values under a plurality of light sources from the response values of the digital camera through a polynomial regression model, and then performs spectrum reconstruction on a plurality of groups of tristimulus value signals based on a pseudo-inverse method.
The above studies show that reconstructing the spectral reflectance based on the tristimulus values of a plurality of light sources can actually improve the reconstruction accuracy, however, the number of light sources is increased, and the data volume is also increased, so how to select the optimal light source combination as the problem to be solved. The light sources chosen by HARIFI et al are the D65 and CIEA light sources, and Zhang et al, using an exhaustive approach, found the best spectral reflectance reconstruction accuracy based on the combination of CIEA, D65 and D90 from CIE E, A, D50, D65, D90, F2, F7 and F11 light sources. However, in practice, the light sources selected for different reconstructed samples should be different, and the exhaustion method is inefficient and the effect of reconstructing all samples with the same set of light sources is not ideal. Therefore, a better solution for selecting an optimal light source combination among a plurality of light sources is needed.
Application forContent providing method and apparatus
An object of the present application is to provide a spectral reflectance reconstruction method based on a genetic algorithm.
In order to achieve the above object, the present application provides a spectral reflectance reconstruction method based on a genetic algorithm, wherein the method comprises the following steps:
the method comprises the following steps: determining the number of target light sources, and coding the genetic individuals according to the number of the target light sources;
step two: generating an initial population from the genetic individuals;
step three: acquiring spectral reflectivity reconstruction accuracy of tristimulus values under a plurality of candidate light sources, and determining the reconstruction accuracy as fitness of genetic individuals;
step four: determining target genetic individuals in an initial population, and performing crossover or mutation operation on the target genetic individuals;
step five: judging whether the genetic algebra reaches a preset genetic algebra, and returning to the third step to execute if the genetic algebra does not reach the preset genetic algebra; and if so, acquiring the genetic individual with the maximum fitness, and decoding the genetic individual to obtain the combination of the target light source and the spectral reflectivity reconstruction accuracy, wherein the decoding of the genetic individual comprises acquiring a plurality of genes with preset values in the genetic individual, and determining a candidate light source corresponding to the genes as the target light source.
Further, the first step comprises the following steps:
step 1-1: determining the number of target light sources in a genetic individual;
step 1-2: and randomly generating a plurality of genetic individuals according to the number of the target light sources and the number of the candidate light sources, wherein the genetic individuals are chromosomes comprising a plurality of genes, and the genes are used for indicating whether the target light sources are the target light sources or not.
Further, the second step comprises the following steps:
based on the codes of the genetic individuals, an initial population matrix C is determined, which is of the form:
Figure BDA0001823405090000021
wherein N is the number of random individuals, i.e. the size of the initial population, ckThe value of k is 1 to N, c for the coding of genetic individualsijThe value range of i is 1 to N, and the value range of j is 1 to N.
Further, the third step comprises the following steps:
step 3-1: calculating the response value of RGB three channels of the digital camera, wherein the expression is as follows:
Figure BDA0001823405090000031
wherein d iskR, G, B, k ranges from 1 to 3, l (λ) represents the sensitivity of the camera CCD, S (λ) represents the spectral power distribution of the illumination source, τ (λ) represents the transmittance of the camera color filter, r (λ) represents the spectral reflectance of the object surface, ξkAdditive noise representing the kth channel;
step 3-2: calculating the CIE tristimulus value of the training sample under the target light source based on the target light source determined by the genetic individuals, wherein the expression is as follows:
Figure BDA0001823405090000032
wherein, TjRepresents the CIE tristimulus value under the jth light source, the value range of j is 1 to e, SλjRepresents the relative spectral distribution energy of the jth light source, oλValues, r, representing the CIE observer color matching functions x, y, zλRepresenting spectral reflectance, expression TjIs of the matrix form:
T=[A]-1r
wherein T represents the tristimulus value of the target light source, A represents the product matrix of the light source and the tristimulus value, [ alpha ]]-1Representing transposed symbols, r represents spectral reflectance;
step 3-3: calculating a polynomial regression model according to the RGB three-channel response value of the training sample and the CIE tristimulus value under the target light source, wherein the matrix form is as follows:
T=MD
wherein T is an mx 3n matrix, D is an mx c matrix, c is an extension of the polynomial model, and M is a mx 3n matrix representing coefficients of the polynomial model;
step 3-4: inputting RGB three-channel response values of the test sample into the polynomial regression model, and calculating CIE tristimulus values of the test sample under a plurality of candidate light sources;
step 3-5: reconstructing the spectral reflectivity according to the CIE tristimulus values of the obtained test sample under the plurality of candidate light sources, wherein the expression is as follows:
Figure BDA0001823405090000033
wherein,
Figure BDA0001823405090000034
representing the spectral reflectance, TtestExpressing the CIE tristimulus values of the test sample under a plurality of candidate light sources, wherein Q is a transformation matrix of the spectral reflectivity and the CIE tristimulus values under the plurality of candidate light sources;
step 3-6: determining a target light source according to the error between the spectral reflectivity reconstruction value and the actual measurement value of the test sample, and optimally selecting the target light source from a plurality of candidate light sources according to the following expression:
Figure BDA0001823405090000041
wherein,
Figure BDA0001823405090000042
representing the error between the reconstructed value of the spectral reflectivity of the test sample and the actual measured value, g being such that
Figure BDA0001823405090000043
Obtaining the variable corresponding to the maximum value,
Figure BDA0001823405090000044
Is defined as follows:
Figure BDA0001823405090000045
wherein m is the number of test samples,
Figure BDA0001823405090000046
represents the root mean square error of the actual measured value of the spectral reflectivity and the reconstructed value of the spectral reflectivity of the jth test sample,
calculating the fitness of the genetic individual, wherein the expression of the fitness function is as follows:
Figure BDA0001823405090000047
further, the fourth step includes the following steps:
step 4-1: selecting two genetic individuals from an initial population according to the fitness of the genetic individuals by using a roulette selection method, and exchanging gene values of the genetic individuals with a preset cross probability to generate new genetic individuals; the cross probability can be adjusted according to the fitness values of all genetic individuals in the initial population, and the expression for calculating the cross probability is as follows:
Figure BDA0001823405090000048
wherein p iscTo cross probability, k1Is a small cross constant, k2Is a large cross constant, fmaxIs the maximum fitness of the genetic individuals in the initial population, favgThe average fitness of genetic individuals in the initial population;
step 4-2: randomly selecting a genetic individual from an initial population, changing the value of a randomly selected gene in the genetic individual according to a preset variation probability, and generating a new genetic individual; the variation probability can be adjusted according to the fitness values of all genetic individuals in the initial population, and the expression for calculating the variation probability is as follows:
Figure BDA0001823405090000049
wherein p ismAs the mutation probability, k3Is a small variation constant, k4Is a large variation constant, fmaxIs the maximum fitness of the genetic individuals in the initial population, favgIs the average fitness of the genetic individuals in the initial population.
Compared with the prior art, on the aspect of the selection problem of multiple light sources, the scheme provided by the application can quickly and automatically find multiple target light sources suitable for color sample reconstruction through a genetic algorithm, and more color information is provided for spectral reflectivity reconstruction through calculating CIE tristimulus values under the multiple target light sources, so that the spectral reflectivity reconstruction precision is improved, and the problem that the spectral reflectivity is not ideal based on RGB three-channel information reconstruction is solved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1is a flowchart of a spectral reflectance reconstruction method based on a genetic algorithm according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a crossover operation provided in an embodiment of the present application.
Fig. 3 is a schematic diagram illustrating a selection result of target light sources when the number of the target light sources is changed according to an embodiment of the present application.
Fig. 4 is a schematic diagram illustrating a selection result of another target light source when the number of target light sources is changed according to an embodiment of the present application.
Fig. 5 is a schematic diagram of root mean square errors of two test samples of RC24 and SG140 reconstructed by several schemes provided in the embodiments of the present application.
Fig. 6 is a schematic diagram illustrating the reconstruction effect of several schemes provided in the present embodiment to reconstruct two test samples of RC24 and SG 140.
Detailed Description
The present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
The application provides a spectral reflectivity reconstruction method based on a genetic algorithm, as shown in figure 1, the method comprises the following steps:
the method comprises the following steps: determining the number of target light sources, and coding the genetic individuals according to the number of the target light sources;
step two: generating an initial population from the genetic individuals;
step three: acquiring spectral reflectivity reconstruction accuracy of tristimulus values under a plurality of candidate light sources, and determining the reconstruction accuracy as fitness of genetic individuals;
step four: determining target genetic individuals in an initial population, and performing crossover or mutation operation on the target genetic individuals;
step five: judging whether the genetic algebra reaches a preset genetic algebra, and returning to the third step to execute if the genetic algebra does not reach the preset genetic algebra; and if so, acquiring the genetic individual with the maximum fitness, and decoding the genetic individual to obtain the combination of the target light source and the spectral reflectivity reconstruction accuracy, wherein the decoding of the genetic individual comprises acquiring a plurality of genes with preset values in the genetic individual, and determining a candidate light source corresponding to the genes as the target light source.
In the embodiment of the application, a Munsell Color card manufactured by GretagMacbeth company is selected as a training sample, ColorChecker Color rendezvous (hereinafter, referred to as RC24 Color) and ColorChecker SG (hereinafter, referred to as SG140 Color) are selected as test samples, and RGB three-channel information of each Color block in the Color card is obtained by shooting in a standard darkroom. The experimental light sources were CIE light sources A, B, C, D65, D50, F2, F8, F11, and 82 light emitting diode Light Sources (LEDs). Meanwhile, the spectral reflectance of each color block was measured using an X-Ritei1iSis autoscan spectrophotometer, and the tristimulus values of the training samples under each light source were calculated. All spectral reflectances and spectral relative energy distributions of standard light sources were sampled at 10nm intervals between 400nm and 700nm, and the number of expansion terms in the polynomial regression model was set to 24. In the genetic algorithm, the population size N is set to be 100, the maximum genetic algebra is set to be 200, and a cross constant and a variation constant k are set1、k2、k3、k4The values of (a) are 1,1,0.5, respectively. In an embodiment of the present application, the number of candidate light sources may be 11, and the number of target light sources may be 3.
In step one, determining the number of target light sources, and encoding the genetic individuals according to the number of target light sources. Specifically, the method specifically comprises the following steps:
step 1-1: determining the number of target light sources in a genetic individual;
step 1-2: and randomly generating a plurality of genetic individuals according to the number of the target light sources and the number of the candidate light sources, wherein the genetic individuals are chromosomes comprising a plurality of genes, and the genes are used for indicating whether the target light sources are the target light sources or not.
Specifically, in step 1-1, the number of target light sources in a genetic individual can be represented by e, which is 3.
Specifically, in step 1-2, all candidate light sources may be encoded from 1 to n, where n is the number of candidate light sources, each genetic entity is a chromosome comprising n genes, where the gene value corresponding to the target light source is 1, and the gene value corresponding to the non-target light source is 0, so that in the case of selecting 3 target light sources from 90 candidate light sources, each genetic entity is encoded as a chromosome comprising 3 genes with a value of 1, and the vector form of the genetic entity may be, for example: c ═ 10110000000, the genetic individual vector indicates where the number of target light sources is 3, the target light sources being candidate light sources corresponding to codes 1, 3, 4.
In step two, an initial population is generated based on the genetic individuals. Specifically, the method can comprise the following steps:
based on the codes of the genetic individuals, an initial population matrix C is determined, which is of the form:
Figure BDA0001823405090000071
wherein N is the number of random individuals, i.e. the size of the initial population, ckThe value of k is 1 to N, c for the coding of genetic individualsijThe value range of i is 1 to N, and the value range of j is 1 to N.
In the third step, the spectral reflectivity reconstruction accuracy of the tristimulus values under the multiple candidate light sources is obtained, and the reconstruction accuracy is determined as the fitness of the genetic individuals. Specifically, the method can comprise the following steps:
step 3-1: calculating the response value of RGB three channels of the digital camera, wherein the expression is as follows:
Figure BDA0001823405090000081
wherein d iskR, G, B, k ranges from 1 to 3, l (λ) represents the sensitivity of the camera CCD, S (λ) represents the spectral power distribution of the illumination source, τ (λ) represents the transmittance of the camera color filter, r (λ) represents the spectral reflectance of the object surface, ξkRepresenting the additive noise of the k-th channel.
Step 3-2: calculating the CIE tristimulus value of the training sample under the target light source based on the target light source determined by the genetic individuals, wherein the expression is as follows:
Figure BDA0001823405090000082
wherein, TjRepresents the CIE tristimulus value under the jth light source, and the value range of j is 1 to e. SλjRepresents the relative spectral distribution energy of the jth light source, oλValues, r, representing the CIE observer color matching functions x, y, zλRepresenting spectral reflectance, expression TjIs of the matrix form:
T=[A]-1r
wherein T represents the tristimulus value of the target light source, A represents the product matrix of the light source and the tristimulus value, [ alpha ]]-1Representing transposed symbols, r represents spectral reflectance;
step 3-3: calculating a polynomial regression model according to the RGB three-channel response value of the training sample and the CIE tristimulus value under the target light source, wherein the matrix form is as follows:
T=MD
where T is an M x 3n matrix, D is an M x c matrix, c is an extension of the polynomial model, and M is a c x 3n matrix representing coefficients of the polynomial model.
Step 3-4: inputting RGB three-channel response values of the test sample into the polynomial regression model, and calculating CIE tristimulus values of the test sample under a plurality of candidate light sources;
step 3-5: reconstructing the spectral reflectivity according to the CIE tristimulus values of the obtained test sample under the plurality of candidate light sources, wherein the expression is as follows:
Figure BDA0001823405090000083
wherein,
Figure BDA0001823405090000084
representing the spectral reflectance, TtestAnd Q is a transformation matrix of the spectral reflectivity and the CIE tristimulus values of the plurality of candidate light sources.
Step 3-6: and determining the target light source according to the error between the spectral reflectivity reconstruction value and the actual measurement value of the test sample. The expression for optimal selection of a target light source from a plurality of candidate light sources is as follows:
Figure BDA0001823405090000085
wherein,
Figure BDA0001823405090000091
representing the error between the reconstructed value of the spectral reflectivity of the test sample and the actual measured value, g being such that
Figure BDA0001823405090000092
And obtaining the variable corresponding to the maximum value.
Figure BDA0001823405090000093
Is defined as follows:
Figure BDA0001823405090000094
wherein m is the number of test samples,
Figure BDA0001823405090000095
and the root mean square error of the actual measured value of the spectral reflectivity and the reconstructed value of the spectral reflectivity of the jth test sample is represented.
Calculating the fitness of the genetic individual, wherein the expression of the fitness function is as follows:
Figure BDA0001823405090000096
in step 3-2, the number of training samples is denoted m, by TjThe expression (c) calculates the CIE tristimulus values of the training sample under the plurality of candidate light sources for each genetic individual. The CIE1931 standard observer eye color matching function table is shown in the following table 1, where the CIE observer color matching functions x, y, and z are color matching functions in the CIE1931 standard observer standard:
Figure BDA0001823405090000097
Figure BDA0001823405090000101
Figure BDA0001823405090000111
TABLE 1CIE1931 Standard observer eye matching function Table
In step 3-5, a pseudo-inverse spectrum reconstruction method based on a training mode can be adopted, a training sample is selected based on an Euclidean distance method, and the spectral reflectivity reconstruction expression is as follows:
Figure BDA0001823405090000112
wherein r istrainRepresenting the spectral reflectance, t, of the training sampletrainRepresenting the CIE tristimulus values of the training sample under a plurality of candidate illuminant,
Figure BDA0001823405090000113
is the spectral reflectance.
In steps 3-6, genetic individuals with small fitness values are eliminated with a greater probability, and vice versa.
In step four, the target genetic individuals are determined in the initial population, and the target genetic individuals are subjected to crossover or mutation operations. Specifically, the method comprises the following steps:
step 4-1: selecting two genetic individuals from an initial population according to the fitness of the genetic individuals by using a roulette selection method, and exchanging gene values of the genetic individuals with a preset cross probability to generate new genetic individuals; the cross probability can be adjusted according to the fitness values of all genetic individuals in the initial population, and the expression for calculating the cross probability is as follows:
Figure BDA0001823405090000114
wherein p iscTo cross probability, k1Is a small cross constant, k2Is a large cross constant, fmaxIs the maximum fitness of the genetic individuals in the initial population, favgThe average fitness of genetic individuals in the initial population;
step 4-2: randomly selecting a genetic individual from an initial population, changing the value of a randomly selected gene in the genetic individual according to a preset variation probability, and generating a new genetic individual; the variation probability can be adjusted according to the fitness values of all genetic individuals in the initial population, and the expression for calculating the variation probability is as follows:
Figure BDA0001823405090000115
wherein p ismAs the mutation probability, k3Is a small variation constant, k4Is a large variation constant, fmaxIs the maximum fitness of the genetic individuals in the initial population, favgIs the average fitness of the genetic individuals in the initial population.
In the embodiment of the present application, the genetic individuals 1 (indigo 1) and 2 (indigo 2) represent two parents selected by roulette, as shown in fig. 2, and then the two parents are crossed, and in order to ensure that the number of target light sources is not changed during the crossing, the rule of crossing the two parents is designed. First, the positions with different corresponding gene values are found in the two parents, which are respectively positions 1, 2, 9 and 11 in fig. 2, and then the positions with different corresponding gene values are randomly selected from the four positions, for example, positions 2 and 9 are selected to be crossed, so that a new genetic Individual 1(new Individual 1) can be obtained, wherein the number of light sources is still 3. In order to keep the number of light sources to be selected constant during the mutation operation, two positions with different gene values are randomly found out from 11 gene positions of an individual, and then the gene values of the two positions are exchanged. In FIG. 2, positions 1 and 3 of the new genetic Individual 1(new Indvidual 1) are interchanged to obtain a new genetic Individual 2(new Indvidual 2). Crossover and mutation operations result in new individuals and thus new offspring.
In the fifth step, judging whether the genetic algebra reaches a preset genetic algebra, and if not, returning to the third step to execute; and if so, acquiring the genetic individual with the maximum fitness, and decoding the genetic individual to obtain the combination of the target light source and the spectral reflectivity reconstruction accuracy, wherein the decoding of the genetic individual comprises acquiring a plurality of genes with preset values in the genetic individual, and determining a candidate light source corresponding to the genes as the target light source.
When the number of the target light sources is changed within the range of 2-11, the light source combination result of two test sample sets under different target light source numbers can be obtained, as shown in fig. 3 and 4.
Fig. 5 shows the root mean square error of the spectral reflectance reconstruction method under multiple light sources selected based on the exhaustive method and proposed by the zhangqiang, and pseudo-inverse reconstruction RC24 and SG140 under the light source a, and it can be seen from the figure that the root mean square error of the method provided by the embodiment of the present application is significantly better than that of the other two methods.
Fig. 6 shows the spectral reflectance reconstruction effect of several methods, and it can be seen from the graph that the method provided by the embodiment of the present application has a better reconstruction effect.
In summary, in the aspect of the selection problem of multiple light sources, the scheme provided by the application can quickly and automatically find multiple target light sources suitable for color sample reconstruction through a genetic algorithm, and then provide more color information for spectral reflectance reconstruction by calculating CIE tristimulus values under the multiple target light sources, so that the accuracy of spectral reflectance reconstruction is improved, and the problem that the spectral reflectance reconstruction based on RGB three-channel information is not ideal is solved.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises a device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the device to perform a method and/or a solution according to the aforementioned embodiments of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware.

Claims (5)

1. A spectral reflectivity reconstruction method based on a genetic algorithm is characterized by comprising the following steps:
the method comprises the following steps: determining the number of target light sources, and coding the genetic individuals according to the number of the target light sources;
step two: generating an initial population from the genetic individuals;
step three: acquiring spectral reflectivity reconstruction accuracy of tristimulus values under a plurality of candidate light sources, and determining the reconstruction accuracy as fitness of genetic individuals;
step four: determining target genetic individuals in an initial population, and performing crossover or mutation operation on the target genetic individuals;
step five: judging whether the genetic algebra reaches a preset genetic algebra, and returning to the third step to execute if the genetic algebra does not reach the preset genetic algebra; and if so, acquiring the genetic individual with the maximum fitness, and decoding the genetic individual to obtain the combination of the target light source and the spectral reflectivity reconstruction accuracy, wherein the decoding of the genetic individual comprises acquiring a plurality of genes with preset values in the genetic individual, and determining a candidate light source corresponding to the genes as the target light source.
2. The method of claim 1, wherein step one comprises the steps of:
step 1-1: determining the number of target light sources in a genetic individual;
step 1-2: and randomly generating a plurality of genetic individuals according to the number of the target light sources and the number of the candidate light sources, wherein the genetic individuals are chromosomes comprising a plurality of genes, and the genes are used for indicating whether the target light sources are the target light sources or not.
3. The method of claim 1, wherein step two comprises the steps of:
based on the codes of the genetic individuals, an initial population matrix C is determined, which is of the form:
Figure FDA0001823405080000011
wherein N is the number of random individuals, i.e. the size of the initial population, ckThe value of k is 1 to N, c for the coding of genetic individualsijThe value range of i is 1 to N, and the value range of j is 1 to N.
4. The method of claim 1, wherein step three comprises the steps of:
step 3-1: calculating the response value of RGB three channels of the digital camera, wherein the expression is as follows:
Figure FDA0001823405080000021
wherein d iskR, G, B, k ranges from 1 to 3, l (λ) represents the sensitivity of the camera CCD, S (λ) represents the spectral power distribution of the illumination source, τ (λ) represents the transmittance of the camera color filter, r (λ) represents the spectral reflectance of the object surface, ξkAdditive noise representing the kth channel;
step 3-2: calculating the CIE tristimulus value of the training sample under the target light source based on the target light source determined by the genetic individuals, wherein the expression is as follows:
Figure FDA0001823405080000022
wherein, TjRepresents the CIE tristimulus value under the jth light source, the value range of j is 1 to e, SλjRepresents the relative spectral distribution energy of the jth light source, oλValues, r, representing the CIE observer color matching functions x, y, zλRepresenting spectral reflectance, expression TjIs of the matrix form:
T=[A]-1r
wherein T represents the tristimulus value of the target light source, A represents the product matrix of the light source and the tristimulus value, [ alpha ]]-1Representing transposed symbols, r represents spectral reflectance;
step 3-3: calculating a polynomial regression model according to the RGB three-channel response value of the training sample and the CIE tristimulus value under the target light source, wherein the matrix form is as follows:
T=MD
wherein T is an mx 3n matrix, D is an mx c matrix, c is an extension of the polynomial model, and M is a mx 3n matrix representing coefficients of the polynomial model;
step 3-4: inputting RGB three-channel response values of the test sample into the polynomial regression model, and calculating CIE tristimulus values of the test sample under a plurality of candidate light sources;
step 3-5: reconstructing the spectral reflectivity according to the CIE tristimulus values of the obtained test sample under the plurality of candidate light sources, wherein the expression is as follows:
Figure FDA0001823405080000031
wherein,
Figure FDA0001823405080000032
representing the spectral reflectance, TtestExpressing the CIE tristimulus values of the test sample under a plurality of candidate light sources, and Q is the spectral reflectivity and the number of candidate light sourcesA transformation matrix of CIE tristimulus values of;
step 3-6: determining a target light source according to the error between the spectral reflectivity reconstruction value and the actual measurement value of the test sample; the expression for optimal selection of a target light source from a plurality of candidate light sources is as follows:
Figure FDA0001823405080000033
wherein,
Figure FDA0001823405080000034
representing the error between the reconstructed value of the spectral reflectivity of the test sample and the actual measured value, g being such that
Figure FDA0001823405080000035
Obtaining the variable corresponding to the maximum value,
Figure FDA0001823405080000036
is defined as follows:
Figure FDA0001823405080000037
wherein m is the number of test samples,
Figure FDA0001823405080000038
the root mean square error of the actual measured value of the spectral reflectivity and the reconstructed value of the spectral reflectivity of the jth test sample is represented;
calculating the fitness of the genetic individual, wherein the expression of the fitness function is as follows:
Figure FDA0001823405080000039
5. the method of claim 1, wherein step four comprises the steps of:
step 4-1: selecting two genetic individuals from an initial population according to the fitness of the genetic individuals by using a roulette selection method, and exchanging gene values of the genetic individuals with a preset cross probability to generate new genetic individuals; the cross probability can be adjusted according to the fitness values of all genetic individuals in the initial population, and the expression for calculating the cross probability is as follows:
Figure FDA00018234050800000310
wherein p iscTo cross probability, k1Is a small cross constant, k2Is a large cross constant, fmaxIs the maximum fitness of the genetic individuals in the initial population, favgThe average fitness of genetic individuals in the initial population;
step 4-2: randomly selecting a genetic individual from an initial population, changing the value of a randomly selected gene in the genetic individual according to a preset variation probability, and generating a new genetic individual; the variation probability can be adjusted according to the fitness values of all genetic individuals in the initial population, and the expression for calculating the variation probability is as follows:
Figure FDA0001823405080000041
wherein p ismAs the mutation probability, k3Is a small variation constant, k4Is a large variation constant, fmaxIs the maximum fitness of the genetic individuals in the initial population, favgIs the average fitness of the genetic individuals in the initial population.
CN201811174659.3A 2018-10-09 2018-10-09 Spectral reflectivity reconstruction method based on genetic algorithm Pending CN111028300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811174659.3A CN111028300A (en) 2018-10-09 2018-10-09 Spectral reflectivity reconstruction method based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811174659.3A CN111028300A (en) 2018-10-09 2018-10-09 Spectral reflectivity reconstruction method based on genetic algorithm

Publications (1)

Publication Number Publication Date
CN111028300A true CN111028300A (en) 2020-04-17

Family

ID=70191044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811174659.3A Pending CN111028300A (en) 2018-10-09 2018-10-09 Spectral reflectivity reconstruction method based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN111028300A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111750992A (en) * 2020-06-04 2020-10-09 武汉纺织大学 Spectrum estimation method based on self-adaptive weighted linear regression
CN112730336A (en) * 2020-12-25 2021-04-30 温州晶彩光电有限公司 Spectral reflectivity reconstruction method and system based on color sensor

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105136714A (en) * 2015-09-06 2015-12-09 河南工业大学 Terahertz spectral wavelength selection method based on genetic algorithm
CN108020519A (en) * 2017-12-11 2018-05-11 齐鲁工业大学 A kind of virtual multiple light courcess spectrum reconstruction method based on color constancy

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105136714A (en) * 2015-09-06 2015-12-09 河南工业大学 Terahertz spectral wavelength selection method based on genetic algorithm
CN108020519A (en) * 2017-12-11 2018-05-11 齐鲁工业大学 A kind of virtual multiple light courcess spectrum reconstruction method based on color constancy

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
《兵器工业科学技术辞典》编辑委员会编: "《兵器工业科学技术辞典 光学工程》", 国防工业出版社, pages: 8 - 21 *
XIANDOU ZHANG ETL: "Estimating Spectral Reflectance From Camera Responses Based On CIE XYZ Tristimulus Values Under Multi-illuminats", pages 68 - 77 *
YUQI LI ETL: "Locally Linear Embedded Sparse Coding for Spectral Reconstruction From RGB Images", pages 363 *
徐鹏: "基于多光谱成像技术的光谱图像重构与显示研究", pages 138 - 20 *
曾茜等: "基于向量夹角样本选择的光谱反射率重建", vol. 39, no. 39, pages 216 - 220 *
朱广帅: "遗传算法在光纤光栅光谱分析中的应用研究", pages 135 - 61 *
赵子琦: "多光谱图像的获取及重构算法的研究", pages 005 - 28 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111750992A (en) * 2020-06-04 2020-10-09 武汉纺织大学 Spectrum estimation method based on self-adaptive weighted linear regression
CN111750992B (en) * 2020-06-04 2022-10-14 武汉纺织大学 Spectrum estimation method based on self-adaptive weighted linear regression
CN112730336A (en) * 2020-12-25 2021-04-30 温州晶彩光电有限公司 Spectral reflectivity reconstruction method and system based on color sensor

Similar Documents

Publication Publication Date Title
Choma et al. Graph neural networks for icecube signal classification
Zhang et al. A survey on computational spectral reconstruction methods from RGB to hyperspectral imaging
Sztrajman et al. Neural brdf representation and importance sampling
Sazonova et al. Are all post-starbursts mergers? HST reveals hidden disturbances in the majority of PSBs
Storey-Fisher et al. Anomaly detection in Hyper Suprime-Cam galaxy images with generative adversarial networks
CN111028300A (en) Spectral reflectivity reconstruction method based on genetic algorithm
Dulecha et al. Neural reflectance transformation imaging
JP7076463B2 (en) Spectrum analyzer and spectrum analysis method
CN115516497A (en) Background correction for birefringence measurement
JP2005509167A (en) Method and apparatus for optimizing spectral sensitivity selection
Peters et al. Using moments to represent bounded signals for spectral rendering
CN109858317A (en) A kind of high spectrum image suspicious object detection method based on low-rank sparse expression
US20180025535A1 (en) Hölder Adaptive Image Synthesis
CN113256733B (en) Camera spectral sensitivity reconstruction method based on confidence voting convolutional neural network
CN207280593U (en) Spectral classifier based on computational spectral imaging technology
He et al. Single-shot hyperspectral imaging based on dual attention neural network with multi-modal learning
Hartwig et al. Learning human viewpoint preferences from sparsely annotated models
CN113947643A (en) Method, device and equipment for reconstructing RGB image into hyperspectral image and storage medium
Xu et al. Snapshot hyperspectral imaging based on equalization designed doe
CN115221932A (en) Spectrum recovery method and device based on neural network and electronic equipment
Narea-Jiménez et al. Assessment of a computed tomography imaging spectrometer using an optimized expectation-maximization algorithm
CN107560732A (en) Spectral Classifier and Classification Method Based on Computational Spectral Imaging Technology
Hua et al. ECG signals deep compressive sensing framework based on multiscale feature fusion and SE block
CN111398238A (en) Laser-induced fluorescence spectrum identification method for edible oil doped with castor oil
CN108801457B (en) Three-dimensional map acquisition and reconstruction method based on coding sampling plate design and secondary energy constraint correction

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200417

RJ01 Rejection of invention patent application after publication