Multi-channel spectral image prediction method and system based on HMSSA-BP neural network, and storage medium
By adopting the multi-channel spectral image prediction method based on HMSSA-BP neural network in the printed color prediction model, the BP neural network model is optimized and the multi-channel spectrogram fusion is carried out, which solves the prediction deviation problem of the existing model during nonlinear factors and complex interaction processing, and achieves higher prediction accuracy and performance.
Patent Information
- Application Number
- CN202411733947.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-29
AI Technical Summary
Existing print color prediction models have prediction bias when considering nonlinear factors and complex interactions, and the model complexity and computing efficiency are low, resulting in lower prediction accuracy.
The multi-channel spectral image prediction method based on HMSSA-BP neural network is adopted, and the BP neural network model is optimized through multi-light source multi-spectral imaging technology and hybrid multi-strategy sparrow search algorithm (HMSSA), and the prediction model from C, M, Y, and K network area ratio to multi-channel spectrograms is established, and the multi-channel spectrogram fusion is carried out by adjusting factor Q.
The accuracy and prediction performance of the print prediction model are improved, prediction errors are reduced, and prediction accuracy is achieved.
Smart Images

Figure CN119559476A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of spectral prediction, and in particular to a multi-channel spectral image prediction method, system and storage medium based on HMSSA-BP neural network. Background Art
[0002] The color prediction model of printed products aims to build a mapping model between the control information of printing equipment and the post-printing color information, which can preview the effect of printed products in advance and ensure that the final printed products meet expectations. At present, the mainstream color prediction models in printing are mainly Murray-Davies model and Neugebauer model, but due to the limitation of nonlinear factors, the actual coloring situation or the complex interaction between ink and paper is not fully considered, resulting in prediction deviation. The YNSN model and Clapper-Yule model also have the problem of ignoring optical interaction, parameter limitation and relying on data adjustment, which limits their practical application and versatility. These mainstream models are established under ideal conditions, but in reality, the high nonlinearity of printing equipment and the complexity of printing conditions require more corrections to the model when using physical models, and a large number of training samples are required, resulting in complex models and low computational efficiency. Therefore, there will be errors when using traditional prediction models to predict printed images, and the model prediction accuracy is low.
[0003] In order to improve the accuracy of the printed product prediction model as much as possible and obtain a post-printing prediction image that is closest to the actual printed image, the present invention takes neural network as the basis, adopts multi-light source and multi-spectral imaging technology, and proposes a new printed product multi-channel spectral prediction model based on HMSSA-BP neural network, and also proposes an algorithm for multi-channel spectral image synthesis. Summary of the invention
[0004] In view of the defects of the existing spectral prediction model, the present invention proposes a multi-channel spectral image prediction method, system and storage medium based on HMSSA-BP neural network.
[0005] The present invention adopts the following technical solution:
[0006] A multi-channel spectral image prediction method based on HMSSA-BP neural network, the method comprising: using a multi-light source multi-spectral imaging system, adopting a hybrid multi-strategy sparrow search algorithm HMSSA to optimize a BPNN-based prediction model from C, M, Y, K theoretical dot area ratio to a multi-channel spectral graph; the HMSSA algorithm is based on an SSA algorithm combined with Tent mapping, a staged control step size strategy and a chaotic cosine variation factor; on the basis of the optimization, an adjustment factor Q is introduced to fuse the predicted multi-channel spectral graph to obtain a predicted post-printing color image.
[0007] In the above technical solution, further, specifically the following steps are included:
[0008] The first step is to use a multi-light source and multi-spectral imaging system to form a multi-channel spectral prediction model based on BPNN, including setting model input and output, model topology, loss function, and evaluation indicators;
[0009] In the second step, the hybrid multi-strategy sparrow search algorithm HMSSA is used to iteratively optimize the initial weights and thresholds of the BPNN model;
[0010] The third step is to fuse the multi-channel spectral images after prediction, including, first, introducing the adjustment factor Q to convert the multi-channel spectral values output by the prediction model into the XYZ color space; then converting it to the RGB space to obtain a fused color prediction image.
[0011] Furthermore, the BPNN-based prediction model from the theoretical dot area ratio of C, M, Y, K to the multi-channel spectrum diagram is specifically: the dot area ratio of C, M, Y, K is used as the input variable of the spectral prediction model, and the multi-channel spectrum diagram obtained by the multi-light source multi-spectral imaging system is used as the output variable of the model, wherein the dot area ratio is the proportion of dots per unit area under the ideal state without ink diffusion.
[0012] Furthermore, the topological structure of the prediction model based on BPNN is as follows:
[0013] The number of input layer nodes is 4, and the number of output layer nodes is N, that is, the number of channels of the multi-light source multi-spectral imaging system. Then the number of hidden layer nodes is determined: each hidden layer node number within the preset hidden layer node number range is selected for training, and the error component between the expected output after training and the actual output is calculated. The number of hidden layer nodes with the smallest second norm of the error component is taken as the optimal number of hidden layer nodes. The model uses mean square error as the loss function for model training, that is, the average of the sum of squares of the predicted data values deviating from the measured data values.
[0014] Furthermore, the mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), and mean absolute percentage error (MAPE) between the standard output value of the test set and the training output value are used to measure the prediction performance of the prediction model as a direct standard for judging the prediction accuracy of the model; the NY model, Ham model, and LMS-MI model are used as the evaluation index of model metamerism to evaluate the degree of model metamerism:
[0015] Assume that one spectral curve is R1 and the other spectral curve is R2. R1(λ) and R2(λ) are the spectral information of R1 and R2 at wavelength λ respectively. S(λ) is the relative spectral energy corresponding to wavelength λ. x(λ), y(λ), and z(λ) are the three standard observer matching functions.
[0016] The NY model is Among them, M y 、M z They are the results of weighting the spectral differences according to the standard observer matching functions x(λ), y(λ), and z(λ);
[0017] The Ham model is Where S(λ) is the normalized spectral power distribution under a given illumination D65 light source, and n is the number of samples;
[0018] The LMS-MI model is where x lms (λ), y lms (λ), z lms (λ) are the three standard observer matching functions x(λ), y(λ), and z(λ), respectively, through Thus, a metamerism index containing three-dimensional information is calculated
[0019] Furthermore, the hybrid multi-strategy sparrow search algorithm (HMSSA) is used to iteratively optimize the initial weights and thresholds of the BPNN model; the specific steps include:
[0020] 2.1) Based on the sparrow search algorithm SSA, introduce Tent mapping:
[0021]
[0022] Generate a chaotic sequence to optimize the initial position of the sparrow population in SSA, where x n is the value of the current iteration, belonging to the interval [0,1], x n+1 is the value of the next iteration, mu∈(0,2] is the chaos parameter, which is proportional to the chaos;
[0023] 2.2) In the discoverer position of the SSA algorithm, a phased step size control strategy is introduced, and a nonlinear attenuation factor μ is added, which is:
[0024]
[0025]
[0026] l=(a-1)·rand+1
[0027]
[0028] Where ST′∈[0.8,1] represents the security value, rand is a random number in [0,1], and ω is a constant; represents the j-th dimension value of the i-th sparrow in the t-th iteration; represents the global best position in the tth iteration; iter max represents the maximum number of iterations; R2 represents the alarm value, and the range of R2 is [0,1]; V represents a random number that obeys the normal distribution, L represents a 1×d matrix whose elements are all 1, d is the dimension of the variable to be optimized, and a is the intermediate variable;
[0029] 2.3) In the update of the joiner position in the SSA algorithm, the chaotic cosine change factor and the inertia weight η that changes with the number of iterations are introduced;
[0030]
[0031] in: δ is a constant, k is a random number between 0 and 1 generated by Circle mapping, and cos(2πk) is the chaotic cosine variation factor introduced. represents the global worst position in the t-th iteration, represents the best position of the global finder in the t+1th iteration; A is a 1×d matrix with each element randomly set to -1 or 1. + =A T (AA T ) -1 , n represents the population size, and α represents a uniform random number in the range of (0,1].
[0032] Furthermore, the multi-channel spectrograms output by the prediction model are fused, specifically including the following:
[0033] Based on the XYZ tristimulus value principle:
[0034]
[0035]
[0036]
[0037] Where: S(λ) is the relative spectral power distribution of the illumination source, R(λ) represents the spectral reflectance information, λ represents the visible light wavelength in the range of a1 to b1 nm, It represents the visual matching function of the human eye. The values of X, Y, and Z are the CIE three stimulus values. K is the adjustment factor, which is calculated when Y is 100.
[0038] The multi-channel spectral value output by the prediction model is light intensity, and φ(λ)=R(λ)S(λ), where φ(λ) is the light intensity value. In the actual multi-channel fusion process, normalization is performed and an adjustment factor Q is introduced. The processed light intensity, i.e., the multi-channel spectral value, is:
[0039]
[0040] Then convert the multi-channel spectral value to XYZ color space:
[0041]
[0042]
[0043]
[0044] Here, the adjustment factor
[0045] λ i is the illumination wavelength corresponding to the predicted i channel;
[0046] Finally, convert from XYZ color space to RGB color space:
[0047]
[0048] Thus, the N-channel spectrogram predicted by the prediction model is fused into a color image to obtain a predicted post-printing color image.
[0049] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the multi-channel spectral image prediction method based on the HMSSA-BP neural network as described in any one of the above items.
[0050] An electronic device, comprising:
[0051] one or more processors;
[0052] A memory for storing one or more programs;
[0053] When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-channel spectral image prediction method based on the HMSSA-BP neural network as described in any one of the above items.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] A multi-channel spectral image prediction method based on HMSSA-BP neural network is proposed in the present invention. Based on multi-light source and multi-spectral technology, a prediction model of C, M, Y, and K dot area ratio to multi-channel spectrum diagram of printed products is established and optimized. Compared with other prediction models, the multi-spectral prediction model proposed in this paper has higher accuracy and better prediction performance.
[0056] The present invention proposes a hybrid multi-strategy sparrow search algorithm (HMSSA), which introduces technologies such as Tent chaos mapping, chaotic cosine variation factor and staged step size control on the basis of SSA, continuously iterates to optimize, and optimizes the initial weights and thresholds of the neural network.
[0057] After the multi-channel spectrum is predicted by the multi-spectral prediction model, the present invention introduces the light intensity φ(λ) and the adjustment factor Q, converts the multi-channel spectrum into the XYZ tristimulus value color space, and then converts it into the RGB color space, and finally obtains the predicted post-printing color image with the optimal fusion effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flowchart of the multi-channel spectral image prediction method based on HMSSA-BP neural network;
[0059] Figure 2 It is a flowchart of HMSSA algorithm and its optimized BP neural network;
[0060] Figure 3 is the loss function descent process;
[0061] Figure 4 This is the original image before printing of Umbrella;
[0062] Figure 5 It is the 9-channel spectrum of the predicted umbrella image;
[0063] Figure 6 This is the actual color image after printing predicted by the method of the present invention. DETAILED DESCRIPTION
[0064] The following is a detailed description of an embodiment of the present invention. This embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation method and a specific operation process are given, but the protection scope of the present invention is not limited to the following embodiment.
[0065] like Figure 1 As shown, the present invention first utilizes a multi-light source and multi-spectral imaging system to construct a BPNN-based prediction model from the C, M, Y, and K theoretical dot area ratios to a multi-channel spectrogram; then a hybrid multi-strategy sparrow search algorithm (HMSSA) is proposed to further optimize the BPNN model. The algorithm combines Tent mapping, a staged control step size strategy, and a chaotic cosine variation factor on the basis of SSA; finally, an adjustment factor Q is introduced to fuse the predicted multi-channel spectrogram to obtain a predicted post-printing color image.
[0066] The specific steps include:
[0067] The first step is to build a multi-channel printed spectrum prediction model, including the design of model input and output, model topology, loss function, evaluation index, etc.
[0068] In the second step, the hybrid multi-strategy sparrow search algorithm (HMSSA) is used to iterate and optimize the initial weights and thresholds of the BPNN model;
[0069] The third step is to fuse the multi-channel spectral images after prediction, which is roughly divided into two steps. First, the adjustment factor Q is proposed to convert the multi-channel spectral values output by the prediction model into the XYZ color space, and then converted to the RGB space to obtain the fused color prediction image.
[0070] Furthermore, the specific steps of constructing the multi-channel printed matter spectrum prediction model in the first step are as follows:
[0071] 1.1) The dot area ratio of C, M, Y, and K is used as the input variable of the spectrum prediction model. The dot area ratio used here refers to the theoretical dot area ratio, which refers to the proportion of dots per unit area under the ideal state without ink diffusion;
[0072] 1.2) The multi-channel spectrum obtained by the multi-light source multi-spectral imaging system is used as the output variable of the model. According to a specific embodiment of the present invention, the multi-light source multi-spectral imaging system adopted is the American Blue View Mega Vision system, which obtains spectrum diagrams under 9 wavelength light sources of 420nm, 450nm, 470nm, 505nm, 530nm, 560nm, 590nm, 630nm, and 655nm, that is, a 9-channel spectrum diagram.
[0073] 1.3) The four colors of ink, C, M, Y, and K, are arranged and combined according to different dot area ratios to obtain a large number of color block images. The multispectral imaging system obtains 9 channel spectra of the post-printing color block images, and the obtained data is divided into a training set and a test set;
[0074] 1.4) The number of nodes in the model input layer is 4, the number of nodes in the output layer is 9, and then the number of nodes in the hidden layer is determined: according to the empirical formula of hidden layer nodes Where x is the number of hidden layer nodes, m and N are the number of input layer and output layer nodes (i.e., the number of channels), α is an adjustment constant between 1 and 10, and the range of the number of hidden layer nodes of the training sample is determined to be [a, b]. Each hidden layer node number within the interval is selected for training, and the error component between the expected output after training and the actual output is calculated. The hidden layer node number with the smallest error component two-norm is taken as the optimal hidden layer node number, and the error two-norm is Wherein the j represents the error of the jth sample, which is the error between the predicted value and the actual value, and n is the number of samples;
[0075] 1.5) The model uses mean square error as the loss function for model training, that is, the average of the sum of squares of the predicted data values that deviate from the measured data values. Where N represents the number of channels of spectral values, r i represents the measured spectral value, r i1 represents the spectral value predicted by the model;
[0076] 1.6) The mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), mean absolute percentage error (MAPE) between the standard output value of the test set and the training output value provide different perspectives to measure the prediction performance of the model as a direct criterion for judging the prediction accuracy of the model.
[0077] 1.7) The NY model, Ham model and LMS-MI model are used as the evaluation index of model metamerism to evaluate the degree of model metamerism. Metamerism means that the colors are matched under a certain lighting or observation condition, but when the lighting or observation conditions change, the colors will no longer match.
[0078] 1.8) Let one spectral curve be R1 and the other spectral curve be R2. R1(λ) and R2(λ) are the spectral information of R1 and R2 at wavelength λ respectively. S(λ) is the relative spectral energy corresponding to wavelength λ. x(λ), y(λ), and z(λ) are the three standard observer matching functions. The NY model is The M x 、M y 、M z are the results of weighting the spectral differences according to the standard observer matching functions x(λ), y(λ), and z(λ). The Ham model is Where S(λ) is the normalized spectral power distribution under a given D65 light source, and n is the number of samples. The LMS-MI model is Where x lms (λ), y lms (λ), z lms (λ) are the three standard observer matching functions x(λ), y(λ), and z(λ), respectively, through Thus, a metamerism index containing three-dimensional information is calculated
[0079] Furthermore, the hybrid multi-strategy sparrow search algorithm (HMSSA) described in the second step optimizes the BPNN model, such as Figure 2 As shown, the specific steps are as follows:
[0080] 2.1) Based on the Sparrow Search Algorithm (SSA), the Tent Mapping Algorithm is introduced Generate a chaotic sequence and optimize the initial position of the sparrow population in SSA. n is the value of the current iteration, belonging to the interval [0,1], x n+1 is the value of the next iteration, mu∈(0,2] is the chaos parameter, which is proportional to the chaos;
[0081] 2.2) In the discoverer position of the SSA algorithm, a phased step size control strategy is introduced, and a nonlinear attenuation factor μ is added, which is:
[0082]
[0083]
[0084] l=(a-1)·rnd+1,
[0085]
[0086] Wherein, ST′∈[0.8,1] represents a security value, rand is a random number in [0,1], and ω is a constant. represents the j-th dimension value of the i-th sparrow in the t-th iteration; represents the global best position in the tth iteration; iter max represents the maximum number of iterations; R2 represents the alarm value, and the range of R2 is [0,1]; V represents a random number that obeys the normal distribution, L represents a 1×d matrix whose elements are all 1, and d is the dimension of the variable to be optimized;
[0087] 2.3) In the update of the joiner position in the SSA algorithm, the chaotic cosine change factor and the inertia weight η that changes with the number of iterations are introduced, and we have:
[0088]
[0089] It is stated Wherein, δ is a constant, and k is a random number between 0 and 1 generated by Circle mapping. represents the global worst position in the t-th iteration, represents the best position of the global finder in the t+1th iteration. L represents a 1×d matrix whose elements are all 1, d is the dimension of the variable to be optimized, and A is a 1×d matrix whose elements are randomly -1 or 1. + =A T (AA T ) -1 n represents the population size, α represents a uniform random number in the range of (0,1], iter maxIndicates the maximum number of iterations.
[0090] Furthermore, the specific steps of the multi-channel spectral image fusion algorithm in the third step are as follows:
[0091] 3.1) Convert the predicted multi-channel spectrum to XYZ color space. Based on the XYZ tristimulus value principle, Wherein S(λ) is the relative spectral power distribution of the illumination source, R(λ) represents the spectral reflectance information, λ represents the visible light wavelength in the range of 380 to 780 nm, where a1 is 380 and b1 is 780. represents the human eye visual matching function, where the X, Y, and Z values are CIE tristimulus values, and k is the adjustment factor, which is calculated when Y is 100.
[0092] 3.2) The multi-channel spectrum value predicted by the present invention is actually the light intensity, so it is proposed that φ(λ)=R(λ)S(λ), where φ(λ) is the light intensity value. In the actual multi-channel fusion process, normalization is performed, and an adjustment factor Q is introduced to improve the fusion accuracy.
[0093] 3.3) Finally, the algorithm for converting multi-channel spectral values into XYZ color space is obtained. The n is 9, and the λ values correspond to the predicted illumination wavelengths of the 9 channels. The corresponding adjustment factors are
[0094] 3.4) Convert to RGB color space,
[0095] Combining the above knowledge of colorimetry and computer graphics and imaging, the 9-channel spectrum map predicted by the model can be fused into a color image to obtain the predicted post-printing color image.
[0096] Example
[0097] In this embodiment, the multi-channel spectral image prediction method based on the HMSSA-BP neural network of the present invention is adopted, and the specific steps are as follows:
[0098] 1) To ensure the richness of the samples and the wide coverage of the color gamut, this embodiment adopts multi-primary color overprinting, and the four colors of ink C, M, Y, and K are arranged and combined according to the dot area rates of 0%, 2%, 4%, 6%, 8%, 10%, 12%, 14%, 16%, 18%, 20%, 23%, 26%, 29%, 32%, 36%, 40%, 44%, 50%, 56%, 64%, 71%, and 91%, respectively, to form 279841 color block images;
[0099] 2) This embodiment adopts the multi-light source multi-spectral imaging system of Blue View Mega Vision of the United States. The color block image printed in 1) is photographed by the multi-spectral imaging system. The device is a multi-spectral imaging system based on LED lighting, which sequentially obtains the spectrum under the nine wavelength light sources of 420nm, 450nm, 470nm, 505nm, 530nm, 560nm, 590nm, 630nm and 655nm, that is, a nine-channel spectrum;
[0100] 3) Samples were collected through a multi-light source multi-spectral imaging system, with a total of 92*9 spectra, corresponding to 279841 sets of data, each of which is 9-dimensional. The theoretical dot area ratio of the color block images C, M, Y, and K was used as the model input, and the input data was 4*279841 sets of data; the spectral values of the corresponding 9 channels of the color block image after printing obtained in 2) were used as output, and the output data was 9*279841 sets of data. A 4-input, 9-output HMSSA-BP neural network model was established. 90% of them were randomly selected as training samples and 10% as test samples;
[0101] 4) The number of hidden layer nodes is calculated according to the formula Determine the node number range interval as [4,13], select the number of nodes in each hidden layer within the interval for training, calculate the error component between the expected output after training and the actual output, and take the error component bi-norm The minimum number of hidden layer nodes is the optimal number of hidden layer nodes, and the final number of hidden layer nodes is 11;
[0102] 5) The hidden layer activation function is the Tansig function, the output layer activation function is the Purelin function, the loss function is the MSE, the number of training times is 2000, the learning rate is 0.01, the performance indicator monitoring is the RMSE, the target error is 0.0001, the gradient is 1.00e-06, and the training function is the trainlm function;
[0103] 6) In the HMSSA algorithm, the sparrow population popsize is 80, the dimension dim is 163, and the maximum number of iterations Max_iteration is 40;
[0104] 7) Based on the SSA algorithm, the Tent algorithm traverses and generates chaotic sequences to evenly cover the search space as the initial position of the sparrow population; a phased control step size strategy is adopted to improve the position update of the discoverer, and a chaotic cosine change factor and an inertia weight η that changes with the number of iterations are introduced into the position update of the joiner to reduce the risk of the algorithm falling into the local optimum, which can improve the global and local search capabilities of the algorithm at different stages of iteration and greatly improve the accuracy of the prediction model;
[0105] 8) The HMSSA algorithm continuously iterates to find the best solution, with a total of 40 iterations. The fitness value changes of the sparrow iterations are shown in Table 1. The optimal position of the sparrow with the best fitness value, i.e., fitness = 0.019892, is assigned to the initial weights and thresholds of the BP neural network to train the HMSSA-BP model.
[0106] Table 1 HMSSA sparrow iteration fitness value
[0107]
[0108] 9) The model starts training, using mean square error (MSE) as the loss function. The loss function decreases during the model training process, and the final minimum value of MSE is 0.00030132. The model training is completed. Figure 3 As shown; and the fitting effect of the HMSSA-BP model is higher than 0.99, the model has good generalization ability and high prediction accuracy;
[0109] 10) The test set data was used for testing, and the prediction accuracy of the model was verified by using four indicators: mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), and mean absolute percentage error (MAPE) between the standard output value of the test sample and the training output value. Table 2 is a comparison of the four indicator errors of the HMSSA-BP model, SSA-BP model, and BP model. Compared with the standard SSA algorithm improved BP model, the errors of each indicator of the HMSSA algorithm have been significantly reduced, and compared with the BP model, they have also been greatly reduced. Therefore, the hybrid multi-strategy sparrow search algorithm has a significant improvement effect, and the HMSSA-BP model has high prediction accuracy and good prediction performance.
[0110] Table 2 Errors of various indicators of various models
[0111]
[0112]
[0113] 11) The NY model, Ham model and LMS-MI model are used as the metamerism evaluation index of the model. The metamerism index I of the HMSSA-BP model, SSA-BP model and BP model is NY The average values are 7.938, 12.860, 30.400, I Ham The average values are 9.334, 14.780, 34.540, I lms The mean values are 0.025, 0.039, and 0.093, respectively, as shown in Table 3. Therefore, the HMSSA-BP model can accurately predict the spectrum values that are very close to the actual printed image spectrum, and can avoid the problem of metamerism to a large extent.
[0114] Table 3 Metamerism evaluation index
[0115]
[0116] 12) Finally, a high-precision multi-channel spectral prediction model based on HMSSA-BP was obtained.
[0117] Next, this embodiment will use an umbrella image with an image resolution of 9072×12096 as the pre-press original image. Figure 4 As shown, the multi-channel spectral prediction model trained in 12) is used to predict the umbrella image. The specific steps are as follows:
[0118] 1) Convert the original color digital image of the umbrella image into a halftone image, read the C, M, Y, and K dot area rates in its 8*8 pixel area, and move 4 pixels each time as the model input;
[0119] 2) The HMSSA-BP multi-channel spectral prediction model predicts the spectra of multiple channels after printing, such as Figure 5 As shown;
[0120] 3) The spectral value predicted by the present invention is actually the light intensity, i.e., φ(λ). The light intensity value is normalized and an adjustment factor Q of 150 is introduced. Get F(λ);
[0121] 4) According to The n is 9, the λ values correspond to the predicted illumination wavelengths of the 9 channels, and the adjustment factor Convert multi-channel spectrogram to XYZ color space;
[0122] 5) Based on Convert to RGB color space to get the predicted post-printing color image, such as Figure 6 shown.
[0123] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-channel spectral image prediction method based on HMSSA-BP neural network, characterized in that: The method comprises: utilizing a multi-light source multi-spectral imaging system and adopting a hybrid multi-strategy sparrow search algorithm HMSSA to optimize a BPNN-based prediction model from C, M, Y, and K theoretical dot area rates to a multi-channel spectrum map; the HMSSA algorithm is based on an SSA algorithm and combines Tent mapping, a staged control step size strategy, and a chaotic cosine variation factor; and based on the optimization, an adjustment factor Q is introduced to fuse the predicted multi-channel spectrum map to obtain a predicted post-printing color image.
2. The multi-channel spectral image prediction method based on HMSSA-BP neural network according to claim 1 is characterized in that: The specific steps include: The first step is to use a multi-light source and multi-spectral imaging system to form a multi-channel spectral prediction model based on BPNN, including setting model input and output, model topology, loss function, and evaluation indicators; In the second step, the hybrid multi-strategy sparrow search algorithm HMSSA is used to iteratively optimize the initial weights and thresholds of the BPNN model; The third step is to fuse the multi-channel spectral images after prediction, including, first, introducing the adjustment factor Q to convert the multi-channel spectral values output by the prediction model into the XYZ color space; then converting it to the RGB space to obtain a fused color prediction image.
3. The multi-channel spectral image prediction method based on HMSSA-BP neural network according to claim 1 is characterized in that: The BPNN-based prediction model from the theoretical dot area ratio of C, M, Y, K to the multi-channel spectrum diagram is specifically: the dot area ratio of C, M, Y, K is used as the input variable of the spectrum prediction model, and the multi-channel spectrum diagram obtained by the multi-light source multi-spectral imaging system is used as the output variable of the model, wherein the dot area ratio is the proportion of dots per unit area under the ideal state without ink diffusion.
4. The multi-channel spectral image prediction method based on HMSSA-BP neural network according to claim 3 is characterized in that: The topological structure of the prediction model based on BPNN is as follows: The number of input layer nodes is 4, and the number of output layer nodes is N, that is, the number of channels of the multi-light source multi-spectral imaging system. Then the number of hidden layer nodes is determined: each hidden layer node number within the preset hidden layer node number range is selected for training, and the error component between the expected output after training and the actual output is calculated. The number of hidden layer nodes with the smallest second norm of the error component is taken as the optimal number of hidden layer nodes. The model uses mean square error as the loss function for model training, that is, the average of the sum of squares of the predicted data values deviating from the measured data values.
5. The multi-channel spectral image prediction method based on HMSSA-BP neural network according to claim 3 is characterized in that: The mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), and mean absolute percentage error (MAPE) between the standard output value of the test set and the training output value are used to measure the prediction performance of the prediction model as a direct standard for judging the prediction accuracy of the model; the NY model, Ham model, and LMS-MI model are used as the evaluation index of model metamerism to evaluate the degree of model metamerism: Assume that one spectral curve is R1 and the other spectral curve is R2. R1(λ) and R2(λ) are the spectral information of R1 and R2 at wavelength λ respectively. S(λ) is the relative spectral energy corresponding to wavelength λ. x(λ), y(λ), and z(λ) are the three standard observer matching functions. The NY model is Among them, M y 、M z They are the results of weighting the spectral differences according to the standard observer matching functions x(λ), y(λ), and z(λ); The Ham model is Where S(λ) is the normalized spectral power distribution under a given illumination D65 light source, and n is the number of samples; The LMS-MI model is where x lms (λ), y lms (λ), z lms (λ) are the three standard observer matching functions x(λ), y(λ), and z(λ), respectively, through Thus, a metamerism index containing three-dimensional information is calculated 6. The multi-channel spectral image prediction method based on HMSSA-BP neural network according to claim 1 is characterized in that: The hybrid multi-strategy sparrow search algorithm (HMSSA) is used to iteratively optimize the initial weights and thresholds of the BPNN model; the specific steps include: 2.1) Based on the sparrow search algorithm SSA, introduce Tent mapping: Generate a chaotic sequence to optimize the initial position of the sparrow population in SSA, where x n is the value of the current iteration, belonging to the interval [0,1], x n+1 is the value of the next iteration, mu∈(0,2] is the chaos parameter, which is proportional to the chaos; 2.2) In the discoverer position of the SSA algorithm, a phased step size control strategy is introduced, and a nonlinear attenuation factor μ is added, which is: l=(a-1)·rand+1 Where ST′∈[0.8,1] represents the security value, rand is a random number in [0,1], and ω is a constant; represents the j-th dimension value of the i-th sparrow in the t-th iteration; represents the global best position in the tth iteration; iter max represents the maximum number of iterations; R2 represents the alarm value, and the range of R2 is [0,1]; V represents a random number that obeys the normal distribution, L represents a 1×d matrix whose elements are all 1, d is the dimension of the variable to be optimized, and a is the intermediate variable; 2.3) In the update of the joiner position in the SSA algorithm, the chaotic cosine change factor and the inertia weight η that changes with the number of iterations are introduced; in: δ is a constant, k is a random number between 0 and 1 generated by Circle mapping, and cos(2πk) is the chaotic cosine variation factor introduced. represents the global worst position in the t-th iteration, represents the best position of the global finder in the t+1th iteration; A is a 1×d matrix with each element randomly set to -1 or 1, A + =A T (AA T ) -1 , n represents the population size, and α represents a uniform random number in the range of (0,1].
7. The multi-channel spectral image prediction method based on HMSSA-BP neural network according to claim 1 is characterized in that: The multi-channel spectrogram output by the prediction model is fused, specifically including the following: Based on the principle of XYZ three stimulus values: Where: S(λ) is the relative spectral power distribution of the illumination source, R(λ) represents the spectral reflectance information, λ represents the visible light wavelength in the range of a1 to b1 nm, It represents the visual matching function of the human eye. The values of X, Y, and Z are the CIE three stimulus values. K is the adjustment factor, which is calculated when Y is 100. The multi-channel spectral value output by the prediction model is light intensity, and φ(λ)=R(λ)S(λ), where φ(λ) is the light intensity value. In the actual multi-channel fusion process, normalization is performed and an adjustment factor Q is introduced. The processed light intensity, i.e., the multi-channel spectral value, is: Then convert the multi-channel spectral value to XYZ color space: Here, the adjustment factor λ i is the illumination wavelength corresponding to the predicted i channel; Finally, convert from XYZ color space to RGB color space: Thus, the N-channel spectrogram predicted by the prediction model is fused into a color image to obtain a predicted post-printing color image.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the multi-channel spectral image prediction method based on the HMSSA-BP neural network as described in any one of claims 1 to 7 is implemented.
9. An electronic device, characterized in that: The device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-channel spectral image prediction method based on the HMSSA-BP neural network as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Spectral reflectivity reconstruction method based on improved BP neural network
CN115249217A
Contact resistance prediction method for optimizing BP neural network based on improved sparrow algorithm
CN116542314A