Image illumination correction method, device, computer equipment and storage medium
By using the support vector regression model and diagonal mapping technology in the illumination correction method, the problem of color information loss during color conversion is solved, and the accuracy of illumination correction and the reliability of the results are improved.
Patent Information
- Application Number
- CN202410821384.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-24
AI Technical Summary
Existing illumination correction methods suffer from loss of color information during the color conversion process, resulting in low correction accuracy.
By obtaining the image to be corrected and inputting it into a well-trained prediction model to predict chromaticity information, the prediction model is trained using a combination of penalty factors and kernel parameters of support vector regression, and combined with the diagonal mapping model to perform linear scale changes in the RGB color space. Avoid loss of color information.
It improves the accuracy of lighting correction and ensures the integrity of color information and the reliability of correction results.
Smart Images

Figure CN118396911B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing and computer vision technology, and in particular to an image illumination correction method, device, computer equipment and storage medium. Background Art
[0002] With the continuous deepening of digital construction, the demand for smart transportation, smart security inspection, smart logistics and autonomous driving is getting stronger and stronger, and the requirements for image quality are also getting higher and higher. In the field of computer vision, the color of the light source has an important influence on the color of the object image in the scene. The same object surface will produce different reflection spectra under different light sources and present different colors, which will have a direct impact on the acquisition, recognition and tracking and positioning of the image target. Therefore, it is necessary to perform illumination correction on the image. The main purpose of illumination correction is to eliminate the influence of changes in light source type on the color of the target object, so as to obtain the true color characteristics of the object surface. The quality of the processing directly affects the performance of subsequent processing tasks.
[0003] The current scheme for illumination correction is as follows: first, after measuring the RGB tristimulus values of the color sample under ordinary light sources and obtaining the XYZ standard value of the sample color in the CIEXYZ color space under standard lighting conditions, a color correction model is established and the RGB theoretical value of the sample color is calculated according to the independent variable correction matrix M; then, the adjusted XYZ standard value of the sample color is obtained by adjusting the brightness coefficient, and the RGB theoretical value of the sample color is converted to the CIEXYZ color space to obtain the XYZ value, and the average color difference between this XYZ value and the XYZ standard value of the sample color after adjusting the brightness is calculated. Then, the color difference average value is used as the objective function, and the correction matrix M corresponding to the optimal solution of the objective function is obtained by the simulated annealing algorithm. Finally, the RGB theoretical value of the sample color is recalculated according to the correction matrix M obtained by the simulated annealing algorithm, and the correction matrix M is continuously calculated by adjusting the brightness adjustment coefficient so that the calculated theoretical value and the sample color measurement value meet the brightness constraint condition, and the illumination correction is completed. The disadvantage of this scheme is that the scheme needs to perform color space transformation when correcting the color image, and there is a loss of color information during the color transformation process, resulting in a low correction accuracy.
[0004] With regard to the problem in the related art that color information is lost during the color conversion process, resulting in low correction accuracy, no effective solution has been proposed so far. Summary of the invention
[0005] In this embodiment, a method, apparatus, computer device and storage medium for image illumination correction are provided to solve the problem in the related art that color information is lost during the color conversion process, resulting in low correction accuracy.
[0006] In a first aspect, in this embodiment, a method for correcting illumination of an image is provided, comprising:
[0007] Acquire an image to be corrected, and input the image to be corrected into a well-trained prediction model to predict chromaticity information in a color space to obtain chromaticity information;
[0008] The training process of the prediction model is as follows:
[0009] Extract a training set in color space from a standard dataset;
[0010] Based on the training set, obtaining a target combination of a penalty factor and a kernel parameter for support vector regression;
[0011] Training the prediction model according to the target combination and the training set to obtain the fully trained prediction model;
[0012] The chromaticity information is input into a well-trained correction model to perform illumination correction on the image to obtain a target image.
[0013] In some of the embodiments, extracting a training set in a color space from a standard data set includes:
[0014] Get standard data sets;
[0015] Based on color matrices of different orders, indoor images in the standard data set are preprocessed to obtain feature vectors in RGB color space;
[0016] The feature vector is divided to obtain a training set.
[0017] In some embodiments, the indoor images in the standard data set are preprocessed based on color matrices of different orders to obtain feature vectors in the RGB color space, including:
[0018] Based on color matrices of different orders, feature extraction is performed on the indoor images in the standard data set to obtain multi-dimensional features of the indoor images;
[0019] The multidimensional features corresponding to each of the indoor images are mapped into a normalized RGB color space to obtain a feature vector.
[0020] In some embodiments, the standard data set is at least 321 indoor images collected under 11 different light sources and 30 different scenes.
[0021] In some of the embodiments, obtaining a target combination of a penalty factor and a kernel parameter for support vector regression based on the training set includes:
[0022] Initializing the parameters of the Hippocampus algorithm based on the training set;
[0023] Using a chaotic mapping strategy, an initial population of a hippocampus group and an initial position of the initial population are generated;
[0024] Determine a first fitness value of each hippocampus individual in the initial population; determine an elite individual and a corresponding first position based on the first fitness value;
[0025] In the motion phase, based on a dynamic switching probability strategy, the first position is updated to obtain a second position;
[0026] In the predation stage, the second position is updated to obtain a third position; the boundary variables in the hippocampus algorithm parameters are processed and corrected to determine the second fitness values of all the hippocampus individuals; the second fitness values are sorted to obtain a sorting result;
[0027] In the reproduction stage, based on the sorting result, the initial population is divided into a female population and a male population; offspring individuals are generated according to the female population and the male population; and the second fitness values of all the offspring individuals are determined;
[0028] Selecting a second-generation population that meets the fitness value requirements from the offspring individuals, the female population, and the male population;
[0029] Iteration is performed according to the second generation population and the maximum number of iterations in the hippocampus algorithm parameters until a termination condition is met, thereby obtaining a target combination of a penalty factor and a kernel parameter for support vector regression.
[0030] In some embodiments, in the motion phase, based on a dynamic switching probability strategy, updating the first position to obtain the second position includes:
[0031] In the motion phase, the global search mode and the local search mode are switched based on a dynamic switching probability strategy;
[0032] When the dynamic switching factor is greater than the standard normal distribution value, a global search mode is adopted to update the first position to obtain a second position;
[0033] When the dynamic switching factor is less than or equal to the standard normal distribution value, a local search mode is adopted to update the first position to obtain a second position.
[0034] In some embodiments, in the predation phase, updating the second position to obtain a third position includes:
[0035] In the predation stage, the second position is updated based on a preset dynamic step size to obtain a third position; the dynamic step size is related to the number of iterations.
[0036] In some of the embodiments, during the breeding stage, generating offspring individuals according to the female population and the male population comprises:
[0037] During the reproduction stage, under a dynamic disturbance mechanism, offspring individuals are generated based on the female population and the male population.
[0038] In some of the embodiments, the method for image illumination correction further comprises:
[0039] Extract a test set in color space from the standard dataset;
[0040] The root mean square error and the fitting determination coefficient are used as measurement indicators to measure the prediction effect of the prediction model based on the test set.
[0041] In a second aspect, in this embodiment, a device for correcting illumination of an image is provided, comprising:
[0042] The first processing module is used to obtain an image to be corrected, input the image to be corrected into a well-trained prediction model to perform chromaticity information prediction in a color space, and obtain chromaticity information;
[0043] A training module is used to train the prediction model; wherein the training process of the prediction model is:
[0044] Extract a training set in color space from a standard dataset;
[0045] Based on the training set, obtaining a target combination of a penalty factor and a kernel parameter for support vector regression;
[0046] Training the prediction model according to the target combination and the training set to obtain the fully trained prediction model;
[0047] The second processing module is used to input the chromaticity information into a well-trained correction model to perform illumination correction on the image to obtain a target image.
[0048] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for image illumination correction described in the first aspect is implemented.
[0049] In a fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for correcting the illumination of an image described in the first aspect is implemented.
[0050] Compared with the related art, the illumination correction method, device, computer equipment and storage medium of the image provided in the present embodiment obtain the image to be corrected, input the image to be corrected into a well-trained prediction model to predict the chromaticity information in the color space, and obtain the chromaticity information; wherein, the training process of the prediction model is: extracting a training set in the color space from the standard data set; based on the training set, obtaining the target combination of the penalty factor and the kernel parameter of the support vector regression; training the prediction model according to the target combination and the training set to obtain the well-trained prediction model; inputting the chromaticity information into the well-trained correction model to perform illumination correction of the image to obtain the target image, which solves the problem of color information loss in the color conversion process in the related art, resulting in low correction accuracy, and utilizes the characteristics of the well-trained prediction model that can predict chromaticity information in the color space to avoid the occurrence of color information loss, and then combines with the well-trained correction model to ensure the accuracy of illumination correction.
[0051] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0053] Figure 1 It is a hardware structure block diagram of a terminal device of an image illumination correction method provided by an embodiment of the present application;
[0054] Figure 2 is a flow chart of a method for image illumination correction provided by an embodiment of the present application;
[0055] Figure 3 This is a flowchart of obtaining a training set provided by an embodiment of the present application;
[0056] Figure 4 is a flow chart of obtaining a target combination provided by an embodiment of the present application;
[0057] Figure 5 yes Figure 4 Flow chart of step S440;
[0058] Figure 6 It is a schematic diagram of the r chromaticity prediction of the SVR prediction model;
[0059] Figure 7 It is a schematic diagram of the r chromaticity prediction of the DE-SVR prediction model;
[0060] Figure 8 It is a schematic diagram of the r chromaticity prediction of the WOA-SVR prediction model;
[0061] Fig. 9 It is a schematic diagram of the r chromaticity prediction of the SA-SVR prediction model;
[0062] Fig.10 It is a schematic diagram of the r chromaticity prediction of the ISHO-SVR prediction model;
[0063] Fig.11 It is a flowchart of the training process of the ISHO-SVR prediction model provided in a preferred embodiment of the present application;
[0064] Fig.12 It is a structural block diagram of an image illumination correction device provided in one embodiment of the present application.
[0065] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 210, first processing module; 220, training module; 230, second processing module. DETAILED DESCRIPTION
[0066] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0067] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not indicate a specific order of the objects.
[0068] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the method for correcting the illumination of an image in this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0069] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the illumination correction method of the image in the present embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0070] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0071] In this embodiment, a method for correcting the illumination of an image is provided. Figure 2 is a flow chart of the method for correcting the illumination of an image in this embodiment. Figure 2 As shown, the process includes the following steps:
[0072] Step S210, obtaining an image to be corrected, inputting the image to be corrected into a well-trained prediction model to perform chromaticity information prediction in a color space, and obtaining chromaticity information;
[0073] Among them, the training process of the prediction model is:
[0074] Extract a training set in color space from a standard dataset;
[0075] Based on the training set, obtain the target combination of penalty factor and kernel parameter of support vector regression;
[0076] According to the target combination and the training set, the prediction model is trained to obtain a fully trained prediction model;
[0077] Step S220, inputting the chromaticity information into a well-trained correction model to perform illumination correction on the image to obtain a target image.
[0078] Specifically, the prediction model and the correction model are obtained by pre-training through relevant training methods, that is, the image to be corrected collected by the imaging device is input into the well-trained prediction model to predict the chromaticity information in the color space to obtain the chromaticity information; the chromaticity information output by the prediction model is then input into the well-trained correction model to perform image illumination correction, and the target image can be obtained. Among them, the prediction model focuses on the prediction of chromaticity information in the color space (RGB color space), and does not need to perform color space transformation, so there will be no problem of color information loss during the color transformation process. Among them, the correction model can realize linear scale changes in the RGB color space, thereby reducing the influence of illumination and obtaining the color of the object itself in the scene of the image to be corrected. In other embodiments, the color space can also be CIE Lab color space, Luv color space, LCh color space, etc., which is not limited.
[0079] Among them, the prediction model can be an ISHO-SVR prediction model (a prediction model based on the Improved Sea-horse Optimizer (ISHO) and Support vector regression (SVR)). Among them, ISHO is an improved seahorse optimization algorithm. On the basis of the seahorse optimization algorithm, improvements are made in terms of the training set screening requirements (under color information) and the parameter acquisition process of the prediction model. Among them, SVR realizes modeling of the regression process by finding an optimal hyperplane in two-dimensional space. Since this optimal hyperplane only takes into account the points on the edge around the training set, the model effectively avoids the overfitting phenomenon of the data points. At the same time, the flexibility of the regression model can be well adjusted according to the complexity control parameter of the reprojection error as the penalty term. First, the optimal combination of the penalty factor and kernel parameter of the support vector regression is obtained based on the training set as the target combination; the target combination is used as the input of the SVR prediction model. In other embodiments, the prediction model can also be a SA-SVR prediction model, etc., which is not limited.
[0080] The correction model can be a diagonal mapping model. The diagonal mapping model is fully trained through its related training methods. The diagonal mapping model can achieve linear scale changes in the RGB color space through a diagonal matrix D, thereby reducing the influence of illumination and obtaining the color of the object itself in the scene of the image to be corrected. The image below and unknown light sources The image below The conversion relationship between them can be expressed as: ;
[0081] in, Indicates standard light source Colors in three color channels; Indicates unknown light source Colors in three color channels.
[0082] Among them, the diagonal matrix D is a transformation coefficient matrix, which can be transformed into the following form:
[0083] ;
[0084] In the formula, , as well as They respectively represent the colors of the three color channels in the target image, that is, the colors of the three color channels after correction by the correction model. , as well as They respectively represent the chromaticity information output by the prediction model.
[0085] By using the diagonal mapping model, a linear scale change in the RGB color space can be achieved, thereby reducing the influence of illumination to ensure the accuracy of illumination correction. In other embodiments, the correction model can be in other forms, which are not limited thereto.
[0086] Through the above steps, the image to be corrected is obtained, and the image to be corrected is input into a well-trained prediction model to predict the chromaticity information in the color space to obtain the chromaticity information; wherein, the training process of the prediction model is: extracting a training set in the color space from a standard data set; based on the training set, obtaining a target combination of a penalty factor and a kernel parameter of support vector regression; training the prediction model according to the target combination and the training set, and quickly training to obtain the best prediction model; inputting the chromaticity information into a well-trained correction model to perform illumination correction of the image to obtain a target image; the problem of color information loss in the color conversion process in the related art, resulting in low correction accuracy, is solved, and the occurrence of color information loss is avoided by using the characteristics of the well-trained prediction model that can predict chromaticity information in the color space, and then combined with the well-trained correction model, a linear scale change in the RGB color space is realized, thereby reducing the influence of illumination to ensure the accuracy of illumination correction.
[0087] The above process is described in detail below:
[0088] In some of the embodiments, Figure 3 As shown, extracting a training set in color space from a standard data set includes the following steps:
[0089] Step S310, obtaining a standard data set;
[0090] Step S320, preprocessing the indoor images in the standard data set based on color matrices of different orders to obtain feature vectors in the RGB color space;
[0091] Step S330, dividing the feature vector to obtain a training set.
[0092] Specifically, the standard data set can be a standard data set provided by SFU as a standard. For example, the standard data set is at least 321 indoor images collected under 11 different light sources and 30 different scenes. Such a standard data set can cover the illumination RGB information corresponding to each light source; compared with conventional deep learning methods, this embodiment can obtain good training results and improve the illumination correction speed of the image while greatly reducing the data samples.
[0093] The preprocessing includes but is not limited to filtering, feature extraction, mapping, etc. In this embodiment, for each indoor image, feature extraction and mapping are performed based on color matrices of different orders to obtain a feature vector in the RGB color space.
[0094] It should be noted that dividing the feature vector can not only obtain a training set, but also a test set. The test set is used to test the effect of the prediction model. The training set and the test set are obtained by dividing the feature vector according to six-fold cross-validation. Among them, six-fold cross-validation is used to estimate the performance and generalization ability of the model. The feature vector set is divided into six subsets (or folds) of equal size, five of which are used to train the model, and the remaining subset is used to test the model. This process is repeated six times, and each time a different subset is selected as the test set, and the rest are used as the training set. In other embodiments, other methods can also be used to divide the feature vector to obtain a training set, which is not limited to this.
[0095] Through this embodiment, the training effect of the prediction model can be guaranteed even when the number of samples is small, and the generalization ability of the prediction model can be improved.
[0096] In some embodiments, the step S320 pre-processes the indoor images in the standard data set based on the color matrices of different orders to obtain the feature vectors in the RGB color space, including the following steps:
[0097] Step S321, extracting features of indoor images in the standard data set using color matrices of different orders to obtain multi-dimensional features of the indoor images;
[0098] Step S322, mapping the multi-dimensional features corresponding to each indoor image into a normalized RGB color space to obtain a feature vector.
[0099] Specifically, the feature vector is the chromaticity information of different color channels obtained by mapping the multidimensional features corresponding to each indoor image to the normalized RGB color space; it can be r chromaticity information and g chromaticity information. For example: the indoor image is divided into 3 areas, 6 areas, 9 areas, etc.
[0100] For example: for an indoor image divided into three areas, the first-order and second-order color matrices of the three color channels are extracted from each area. In this way, each indoor image can obtain a 6-dimensional feature (each dimensional feature includes illumination RGB information). The entire indoor image can extract an 18-dimensional feature as an input vector, which is mapped to the normalized RGB color space to obtain a feature vector.
[0101] For example: for an indoor image divided into 9 areas, the first-order, second-order and third-order color matrices of the three color channels are extracted from each area, so that each indoor image can obtain 9-dimensional features (each dimensional feature includes illumination RGB information), and the entire indoor image can extract 81-dimensional features as input vectors, mapped to the normalized RGB color space, and obtain feature vectors. Then it can be considered that the training set is obtained by dividing the feature vectors, which contains at least two chromaticity information (r and g chromaticity information).
[0102] Among them, the multi-dimensional features corresponding to the indoor image can be mapped to the normalized RGB color space according to the normalization formula to obtain the feature vector; the expression of the normalization formula is:
[0103] ;
[0104] In the formula, r, g, b represent the chromaticity information of the three color channels of the feature vector in the RGB color space after normalization; r, g, b can only be calculated for two, and the other one can be obtained from the two calculated, for example: only r and g are calculated; b is calculated by 1-rg; this simplifies the calculation. R, G, B represent the chromaticity information of the three color channels in the indoor image in the RGB color space.
[0105] Through this embodiment, an indoor image can be differentiated into a multi-dimensional feature vector to further ensure the training effect of the prediction model and improve the accuracy of image color correction.
[0106] In some of the embodiments, Figure 4 As shown, based on the training set, obtaining the target combination of the penalty factor and kernel parameter of support vector regression includes the following steps:
[0107] Step S410, initializing the parameters of the hippocampus algorithm based on the training set;
[0108] Step S420, using a chaotic mapping strategy to generate an initial population of the hippocampus group and an initial position of the initial population;
[0109] Step S430, determining a first fitness value of each hippocampus individual in the initial population; determining an elite individual and a corresponding first position based on the first fitness value;
[0110] Step S440, in the motion phase, based on the dynamic switching probability strategy, the first position is updated to obtain the second position;
[0111] Step S450, in the predation stage, updating the second position to obtain a third position; processing and modifying the boundary variables in the hippocampus algorithm parameters to determine the second fitness values of all hippocampus individuals; sorting the second fitness values to obtain a sorting result;
[0112] Step S460, in the reproduction stage, based on the sorting result, the initial population is divided into a female population and a male population; offspring individuals are generated according to the female population and the male population; and the second fitness values of all offspring individuals are determined;
[0113] Step S470, selecting the second generation population that meets the fitness value requirement from the offspring individuals, the female population and the male population;
[0114] Step S480, iterating according to the maximum number of iterations in the second generation population and the hippocampus algorithm parameters until the termination condition is met, and obtaining the target combination of the penalty factor and the kernel parameter of the support vector regression.
[0115] Specifically, the detailed implementation process of the above steps S410 to S480 is as follows:
[0116] The training set is input into the improved Hippocampus optimization algorithm to initialize the parameters of the Hippocampus algorithm. The parameters of the Hippocampus algorithm include but are not limited to the population size, maximum number of iterations, population dimension, and upper and lower bounds of the search space. The initialization method is the same as that of most intelligent optimization algorithms, so it will not be repeated here.
[0117] In this embodiment, a chaotic mapping strategy is used to generate the initial population of the hippocampus group and the initial position of the initial population. Chaotic mapping strategies include but are not limited to Iterative chaotic mapping strategies, Piecewise mapping strategies, Singer mapping strategies, etc. For example: an Iterative chaotic mapping strategy is used to replace the randomization strategy in the original hippocampus algorithm to initialize the hippocampus population group (hippocampus algorithm population size and population dimension), so that the hippocampus individuals are more evenly distributed in space, thereby improving the algorithm prediction performance. Among them, the expression of the Iterative chaotic mapping strategy is as follows:
[0118] ;
[0119] In the formula, Represents the position information after chaotic mapping; represents the position information of individual hippocampi within the spatial range; b represents a control parameter, a dynamic switching factor between 0 and 1, preferably, b can be 0.5 to obtain a good mashup sequence.
[0120] Map the Iterative chaos to the search space to get the initial position of the initial population ;
[0121] ;
[0122] In the formula, ub represents the upper bound parameter of the search space; lb represents the lower bound parameter of the search space. Represents the chaotic sequence generated by the iterative chaotic mapping strategy.
[0123] The initial population of the original hippocampus optimization algorithm is generated by randomization, which will cause the hippocampus population to be unevenly distributed in space, causing the algorithm to fall into a local optimal solution. In this embodiment, an iterative chaotic mapping strategy is used to initialize the hippocampus population to ensure a more uniform population distribution and expand the diversity of the population, thereby generating a high-quality population for the hippocampus optimization algorithm and improving the accuracy of image illumination correction.
[0124] Among them, the first fitness value, the second fitness value, and the third fitness value represent the fitness calculated for different seahorse individuals. For example: the first fitness value is the fitness of each seahorse individual in the initial population. The second fitness value includes the fitness value of the seahorse individual in the predation stage and the fitness value of the offspring individual in the reproduction stage. Among them, the seahorse individual corresponding to the best first fitness value in the first fitness value is taken as the elite individual; and the first position of the elite individual can be calculated; the first position is the position of the elite individual.
[0125] In the original Hippocampus algorithm, in the movement phase, the global search and local development are controlled by a constant of 0, which cannot balance the contradiction between local development and global exploration. Therefore, in this embodiment, based on the dynamic switching probability strategy, the first position is updated to obtain the second position, thereby expanding the search range of the global space and enhancing the local mining capacity, so as to balance the contradiction between local development and global exploration and achieve a better optimization strategy. Among them, the dynamic switching probability strategy is determined by the dynamic switching factor and the standard normal distribution value.
[0126] During the predation phase, the seahorse population updates the second position according to the following formula to obtain the third position;
[0127] ;
[0128] In the formula, represents the second position of the hippocampus individual after t iterations; r2 represents a random number of state distribution between 0 and 1; α represents the moving step length, which can be a fixed step length; represents the third position of the hippocampus individual after t iterations; Indicates the first position of the elite individual; rand indicates a random number with a standard normal distribution value between 0 and 1.
[0129] There are two possible results of the predation behavior of the seahorse individual. In the first case, when the seahorse individual preys successfully, the seahorse individual moves to the first position of the elite individual, (the best individual of the current population). Under the control of the parameter α, as the number of iterations increases, the algorithm will gradually converge to the global optimal individual. In the second case, when the seahorse individual cannot prey successfully. A global search is performed because the prey cannot be captured. The parameter (1-α) is applied to the vector between the current individual and the elite individual, and α acts on the currently updated individual. This is to allow the seahorse to perform a global search in the early iterations and avoid over-exploitation in the later iterations.
[0130] The boundary variables in the modified hippocampal algorithm parameters are processed to determine the second fitness values of all hippocampal individuals; the second fitness values are sorted in ascending (or descending) order to obtain a sorting result.
[0131] During the seahorse breeding stage, the initial population is divided into female and male populations according to the following formula:
[0132] ;
[0133] In the formula, Indicates all Arrange in ascending order according to the fitness value, which is the sorting result; fathers represents the male population; mothers represents the female population; pop represents the population size.
[0134] According to the female population and the male population, the offspring individuals are generated; the second fitness value of each offspring individual is calculated; and then the second generation population that meets the fitness value requirements is selected from the offspring individuals, the fathers and mothers corresponding to the offspring individuals. The N seahorse individuals that meet the fitness value requirements are the ones with the best second fitness values.
[0135] Compare the second fitness value corresponding to the hippocampus individual in the second generation population with the first fitness value of the elite individual. If the second fitness value is better than the first fitness value, update the first position of the elite individual and replace the first position of the elite individual with the second position corresponding to the second fitness value of the hippocampus individual in the second generation population. If the second fitness value is worse than the first fitness value, do not update the first position of the elite individual.
[0136] Compare the current number of iterations with the maximum number of iterations to determine whether the termination condition is reached; if the current number of iterations reaches the maximum number of iterations, the termination condition is reached, and the best population (best fitness value and first position) in the iterative optimization process is recorded and arranged to obtain the penalty factor and kernel parameter of support vector regression. If the current number of iterations does not reach the maximum number of iterations, the termination condition is not reached and returns to the motion stage.
[0137] In this embodiment, an iterative chaotic mapping strategy is used to optimize the generation of the Hippocampus algorithm population, thereby improving the solution quality and speed during operation; the optimal penalty factor and kernel parameter of support vector regression can be quickly and accurately obtained as the target combination to improve the training effect of the prediction model.
[0138] In some of the embodiments, Figure 5 As shown, step S440, in the motion phase, based on the dynamic switching probability strategy, updates the first position to obtain the second position, including the following steps:
[0139] Step S441, in the motion phase, switching between the global search mode and the local search mode based on a dynamic switching probability strategy;
[0140] Step S442, when the dynamic switching factor is greater than the standard normal distribution value, adopting a global search mode, updating the first position, and obtaining a second position;
[0141] Step S443, when the dynamic switching factor is less than or equal to the standard normal distribution value, a local search mode is adopted to update the first position to obtain a second position.
[0142] Specifically, the global search mode and the local search mode are switched based on the dynamic switching probability strategy; the expression of the dynamic switching probability strategy is:
[0143] ;
[0144] Wherein, t represents the current number of iterations; T represents the maximum number of iterations; λ and μ are empirical parameters, whose values can be set according to requirements, and the preferred values are 3 and 2 respectively; ρ represents the dynamic switching factor.
[0145] When ρ>rand, the global search phase is adopted. At this time, the first position is updated according to the following formula to obtain the second position;
[0146] ;
[0147] In the formula, ι represents an empirical parameter, and its value can be set according to demand, and the preferred value is 0.05; represents the first position of the elite individual after t iterations; Represents the second position of the individual hippocampus in the hippocampal population after t iterations. is a random walk coefficient that obeys a standard normal distribution, and its expression is as follows: ;
[0148] When ρ≤rand, the local search phase is adopted. At this time, the first position is updated according to the following formula to obtain the second position;
[0149] ;
[0150] In the formula, , , , respectively represent the three-dimensional components of the coordinates; ,u, υ, the preferred value is 0.05; θ represents the dynamic switching factor between 0 and 2π; represents the Levy flight distribution function, which is expressed as:
[0151] ;
[0152] In the formula, s represents a constant factor; λ represents a random number between 0 and 2, preferably 1.5; ω and κ represent random numbers between 0 and 1. The expression of σ is:
[0153] ;
[0154] In other embodiments, in order to improve the solution performance, the constant factor s can be adaptively adjusted, and its expression is:
[0155] ;
[0156] In the formula, t represents the current number of iterations; T represents the maximum number of iterations;
[0157] Through this embodiment, a dynamic switching probability strategy is introduced to switch the Hippocampus algorithm into a global exploration mode or a local exploration mode, so as to balance the contradiction between global exploration and local optimization and further improve the prediction accuracy and stability.
[0158] In some embodiments, in step S450, in the predation phase, updating the second position to obtain the third position includes the following steps:
[0159] In the predation phase, the second position is updated based on a preset dynamic step size to obtain a third position; the dynamic step size is related to the number of iterations.
[0160] Specifically, the moving step length may be a dynamic step length, which is related to the number of iterations and decreases linearly with the number of iterations to adjust the moving step length of the hippocampus predation stage; wherein the expression of the moving step length is:
[0161] .
[0162] In some embodiments, in step S460, generating offspring individuals according to the female population and the male population during the breeding stage includes the following steps:
[0163] During the reproduction stage, offspring individuals are generated based on the female population and the male population under a dynamic disturbance mechanism.
[0164] Specifically, the offspring of the original hippocampus algorithm are generated based on male and female individuals, which will cause the offspring to be heavily dependent on the parent and easily fall into the local optimal solution. In order to further improve the global convergence accuracy and avoid falling into the local extreme value; in this embodiment, under the dynamic perturbation mechanism, the offspring individuals are generated based on the female population and the male population;
[0165] Among them, the expression for generating offspring individuals is:
[0166] ;
[0167] In the formula, r3 represents a random number between 0 and 1; represents an individual randomly selected from the male population; represents an individual randomly selected from the female population; Represents an offspring individual.
[0168] Through this embodiment, a dynamic disturbance mechanism is introduced to avoid falling into a local optimal value and improve the prediction performance of the algorithm.
[0169] In some of the embodiments, the method for correcting the illumination of an image further includes the following steps:
[0170] Extract a test set in color space from the standard dataset;
[0171] The root mean square error and fitting determination coefficient are used as measurement indicators to measure the prediction effect of the prediction model based on the test set.
[0172] Specifically, the method for obtaining the test set can refer to the method for obtaining the training set, which will not be repeated here. The test set is used as a standard for measuring the prediction model to measure the prediction effect of the prediction model.
[0173] In this embodiment, the ISHO-SVR prediction model is compared with the SVR prediction model, the DE-SVR prediction model, the WOA-SVR prediction model and the SA-SVR prediction model, and the root mean square error and the fitting determination coefficient are used as measurement indicators to measure the prediction effect of the prediction model.
[0174] Among them, the expression of root mean square error RMSE is:
[0175] ;
[0176] Among them, the fitting determination coefficient The expression is:
[0177] ;
[0178] Where Y i and X i Represent the true value and the predicted value respectively. The smaller the RMSE value is, the smaller the gap between the predicted data and the actual data is, and the better the prediction performance is; conversely, the worse the prediction performance is. 2 It shows the degree of fit of the prediction model to the data characteristics. When the value of the fitting determination coefficient is closer to 1, the prediction model has a stronger ability to fit the data characteristics and the better the prediction effect. When the value of the fitting determination coefficient is closer to 0, the prediction model has a worse ability to fit the data characteristics and the worse the prediction effect.
[0179] In this embodiment, Figure 6 , Figure 7 , Figure 8 , Fig. 9 as well as Fig.10 As shown, Figure 6 Schematic diagram of r chromaticity prediction of SVR prediction model; Figure 7 Schematic diagram of r chromaticity prediction of DE-SVR prediction model; Figure 8 Schematic diagram of r chromaticity prediction of WOA-SVR prediction model; Fig. 9 Schematic diagram of r chromaticity prediction of SA-SVR prediction model; Fig.10 It is a schematic diagram of the r chromaticity prediction of the ISHO-SVR prediction model; in the figure, the horizontal axis is the number of samples (Sample number) in the test set; the vertical axis is the r component of the illumination chromaticity (Lllumination chromaticity); the line with a circle is the real value (Real); the line with an asterisk is the predicted value (Predicted). The performance comparison results are shown in Table 1. As can be seen from Table 1, compared with the SVR prediction model, the DE-SVR prediction model, the WOA-SVR prediction model and the SA-SVR prediction model, the ISHO-SVR prediction model has the best root mean square error and fitting determination coefficient, indicating that the illumination correction of the image is the most accurate. This also intuitively reflects that the ISHO-SVR prediction model of this embodiment has a high prediction accuracy and good robustness.
[0180] Table 1
[0181]
[0182] The following is a description and explanation through preferred embodiments.
[0183] Fig.11 : is a flow chart of the training process of the ISHO-SVR prediction model of this preferred embodiment. The training process is as follows:
[0184] Obtain a standard data set, which is the SFU data set; based on color matrices of different orders, extract features from indoor images in the standard data set and normalize them to the RGB color space to obtain feature vectors in the RGB color space; divide the feature vectors by six-fold cross validation to obtain training sets and test sets. The test set is input into the ISHO-SVR prediction model to measure the prediction effect of the ISHO-SVR prediction model.
[0185] Among them, the training set is used to obtain the target combination of penalty factor and kernel parameters of support vector regression. The process is: based on the training set, the hippocampus algorithm parameters are initialized; the iterative chaotic mapping strategy is adopted to generate the initial population of the hippocampus group and the initial position of the initial population; the first fitness value of each hippocampus individual in the initial population is determined; the elite individual and the corresponding first position are determined based on the first fitness value; in the movement stage, based on the dynamic switching probability strategy, the first position is updated to obtain the second position; specifically, in the movement stage, based on the dynamic switching probability strategy, the global search mode and the local search mode are switched; when the dynamic switching factor is greater than the standard normal distribution value, the global search mode is adopted to update the first position to obtain the second position; when the dynamic switching factor is less than or equal to the standard normal distribution value, the local search mode is adopted to update the first position to obtain the second position.
[0186] In the predation stage, the second position is updated to obtain the third position; the boundary variables in the modified seahorse algorithm parameters are processed to determine the second fitness values of all seahorse individuals; the second fitness values are sorted to obtain the sorting results; in the reproduction stage, based on the sorting results, the initial population is divided into female populations and male populations; offspring individuals are generated according to the female population and the male population; the second fitness values of all offspring individuals are determined; the second generation population that meets the fitness value requirements is selected from the offspring individuals, the female population and the male population; it is decided whether to update the first position of the elite individual; the current number of iterations is compared with the maximum number of iterations to determine whether the termination condition is met; if the current number of iterations reaches the maximum number of iterations, the termination condition is met, and the best population (the best fitness value and the first position) in the iterative optimization process is recorded and arranged to obtain the penalty factor and kernel parameter of the support vector regression. If the current number of iterations does not reach the maximum number of iterations, the termination condition is not met and it returns to the movement stage. According to the target combination and the training set, the prediction model is trained to obtain a fully trained ISHO-SVR prediction model.
[0187] Through this embodiment, the conversion between CIEXYZ and RGB color spaces is avoided, the color information is not lost, and the accuracy of image color correction is improved; the iterative chaotic mapping strategy is used to initialize the hippocampus population, so as to ensure a more uniform population distribution and expand the diversity of the population, thereby generating a high-quality population and improving the accuracy of image color correction; a dynamic switching probability strategy is introduced to switch the algorithm into a global exploration mode or a local exploration mode to achieve a better optimization strategy; the convergence speed of training can be accelerated, and the generalization ability and prediction accuracy of the ISHO-SVR prediction model can be improved.
[0188] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0189] In this embodiment, an image illumination correction device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0190] Fig.12 is a structural block diagram of the image illumination correction device of this embodiment, such as Fig.12 As shown, the device comprises:
[0191] The first processing module 210 is used to obtain the image to be corrected, input the image to be corrected into a well-trained prediction model to predict the chromaticity information in the color space, and obtain the chromaticity information;
[0192] The training module 220 is used to train the prediction model; wherein the training process of the prediction model is:
[0193] Extract a training set in color space from a standard dataset;
[0194] Based on the training set, obtain the target combination of penalty factor and kernel parameter of support vector regression;
[0195] According to the target combination and the training set, the prediction model is trained to obtain a fully trained prediction model;
[0196] The second processing module 230 is used to input the chromaticity information into a well-trained correction model to perform illumination correction on the image to obtain a target image.
[0197] Through the above-mentioned device, the problem of color information loss in the color conversion process in the related technology, resulting in low correction accuracy, is solved. The characteristic of the well-trained prediction model that can predict chromaticity information in the color space is used to avoid the occurrence of color information loss, and then combined with the well-trained correction model, the accuracy of lighting correction is guaranteed.
[0198] In some of the embodiments, the training module 220 is also used to obtain a standard data set;
[0199] Based on the color matrices of different orders, the indoor images in the standard data set are preprocessed to obtain the feature vectors in the RGB color space;
[0200] The feature vector is divided to obtain the training set.
[0201] In some of the embodiments, the training module 220 is further used to extract features of indoor images in the standard data set based on color matrices of different orders to obtain multi-dimensional features of the indoor images;
[0202] The multidimensional features corresponding to each indoor image are mapped into the normalized RGB color space to obtain the feature vector.
[0203] In some of the embodiments, the standard dataset is at least 321 indoor images collected under 11 different light sources and 30 different scenes.
[0204] In some of the embodiments, the training module 220 is further used to initialize the parameters of the hippocampal algorithm based on the training set;
[0205] A chaotic mapping strategy is used to generate the initial population of the hippocampus and the initial position of the initial population;
[0206] Determine a first fitness value of each hippocampus individual in the initial population; determine an elite individual and a corresponding first position based on the first fitness value;
[0207] In the motion phase, based on the dynamic switching probability strategy, the first position is updated to obtain the second position;
[0208] In the predation stage, the second position is updated to obtain the third position; the boundary variables in the modified seahorse algorithm parameters are processed to determine the second fitness values of all seahorse individuals; the second fitness values are sorted to obtain the sorting results;
[0209] In the reproduction stage, based on the sorting results, the initial population is divided into a female population and a male population; offspring individuals are generated according to the female population and the male population; and the second fitness values of all offspring individuals are determined;
[0210] Select the second generation population that meets the fitness value requirements from the offspring individuals, female populations and male populations;
[0211] Iterate according to the maximum number of iterations in the second-generation population and the hippocampus algorithm parameters until the termination condition is met, and obtain the target combination of the penalty factor and kernel parameter of the support vector regression.
[0212] In some embodiments, the training module 220 is further configured to update the first position to obtain the second position based on the dynamic switching probability strategy during the motion phase, including:
[0213] In the motion phase, the global search mode and the local search mode are switched based on a dynamic switching probability strategy;
[0214] When the dynamic switching factor is greater than the standard normal distribution value, a global search mode is adopted to update the first position and obtain the second position;
[0215] When the dynamic switching factor is less than or equal to the standard normal distribution value, a local search mode is adopted to update the first position to obtain the second position.
[0216] In some embodiments, the training module 220 is further used to update the second position to obtain the third position during the predation phase, including:
[0217] In the predation phase, the second position is updated based on a preset dynamic step size to obtain a third position; the dynamic step size is related to the number of iterations.
[0218] In some embodiments, the training module 220 is further used to generate offspring individuals according to the female population and the male population during the breeding stage, including:
[0219] During the reproduction stage, offspring individuals are generated based on the female population and the male population under a dynamic disturbance mechanism.
[0220] In some of the embodiments, the image illumination correction device further includes a comparison module;
[0221] A comparison module is used to extract a test set in a color space from a standard data set;
[0222] The root mean square error and fitting determination coefficient are used as measurement indicators to measure the prediction effect of the prediction model based on the test set.
[0223] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0224] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0225] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0226] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0227] S1, obtaining an image to be corrected, inputting the image to be corrected into a well-trained prediction model to predict chromaticity information in a color space, and obtaining chromaticity information;
[0228] Among them, the training process of the prediction model is:
[0229] Extract a training set in color space from a standard dataset;
[0230] Based on the training set, obtain the target combination of penalty factor and kernel parameter of support vector regression;
[0231] According to the target combination and the training set, the prediction model is trained to obtain a fully trained prediction model;
[0232] S2, input the chromaticity information into the fully trained correction model to perform image illumination correction to obtain the target image.
[0233] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0234] In addition, in combination with the illumination correction method for an image provided in the above embodiments, a storage medium may be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any illumination correction method for an image in the above embodiments is implemented.
[0235] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0236] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0237] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0238] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A method for image illumination correction, characterized in that: include: Acquire an image to be corrected, and input the image to be corrected into a well-trained prediction model to predict chromaticity information in a color space to obtain chromaticity information; The training process of the prediction model is as follows: Extract a training set in color space from a standard dataset; Based on the training set, obtaining a target combination of a penalty factor and a kernel parameter for support vector regression; Training the prediction model according to the target combination and the training set to obtain the fully trained prediction model; Inputting the chromaticity information into a well-trained correction model to perform illumination correction on the image to obtain a target image; Wherein, based on the training set, obtaining a target combination of a penalty factor and a kernel parameter of support vector regression includes: Initializing the parameters of the Hippocampus algorithm based on the training set; Using a chaotic mapping strategy, an initial population of a hippocampus group and an initial position of the initial population are generated; Determine a first fitness value of each hippocampus individual in the initial population; determine an elite individual and a corresponding first position based on the first fitness value; In the motion phase, based on a dynamic switching probability strategy, the first position is updated to obtain a second position; In the predation stage, the second position is updated to obtain a third position; the boundary variables in the hippocampus algorithm parameters are processed and corrected to determine the second fitness values of all the hippocampus individuals; the second fitness values are sorted to obtain a sorting result; In the reproduction stage, based on the sorting result, the initial population is divided into a female population and a male population; offspring individuals are generated according to the female population and the male population; and the second fitness values of all the offspring individuals are determined; Selecting a second-generation population that meets the fitness value requirements from the offspring individuals, the female population, and the male population; Iteration is performed according to the second generation population and the maximum number of iterations in the hippocampus algorithm parameters until a termination condition is met, thereby obtaining a target combination of a penalty factor and a kernel parameter for support vector regression.
2. The method for image illumination correction according to claim 1, characterized in that: Extract training sets in color space from standard datasets, including: Get standard data sets; Based on color matrices of different orders, indoor images in the standard data set are preprocessed to obtain feature vectors in RGB color space; The feature vector is divided to obtain a training set.
3. The method for image illumination correction according to claim 2, characterized in that: Based on color matrices of different orders, the indoor images in the standard data set are preprocessed to obtain feature vectors in the RGB color space, including: Based on color matrices of different orders, feature extraction is performed on the indoor images in the standard data set to obtain multi-dimensional features of the indoor images; The multidimensional features corresponding to each of the indoor images are mapped into a normalized RGB color space to obtain a feature vector.
4. The method for image illumination correction according to claim 2, characterized in that: The standard dataset consists of at least 321 indoor images collected under 11 different light sources and 30 different scenes.
5. The method for image illumination correction according to claim 1, characterized in that: In the motion phase, based on a dynamic switching probability strategy, the first position is updated to obtain a second position, including: In the motion phase, the global search mode and the local search mode are switched based on a dynamic switching probability strategy; When the dynamic switching factor is greater than the standard normal distribution value, a global search mode is adopted to update the first position to obtain a second position; When the dynamic switching factor is less than or equal to the standard normal distribution value, a local search mode is adopted to update the first position to obtain a second position.
6. The method for image illumination correction according to claim 1, characterized in that: In the predation phase, the second position is updated to obtain the third position, including: In the predation stage, the second position is updated based on a preset dynamic step size to obtain a third position; the dynamic step size is related to the number of iterations.
7. The method for image illumination correction according to claim 1, characterized in that: In the reproduction stage, offspring individuals are generated according to the female population and the male population, including: During the reproduction stage, under a dynamic disturbance mechanism, offspring individuals are generated based on the female population and the male population.
8. The method for image illumination correction according to claim 1, characterized in that: The method further comprises: Extract a test set in color space from the standard dataset; The root mean square error and the fitting determination coefficient are used as measurement indicators to measure the prediction effect of the prediction model based on the test set.
9. An image illumination correction device, characterized in that: include: The first processing module is used to obtain an image to be corrected, input the image to be corrected into a well-trained prediction model to perform chromaticity information prediction in a color space, and obtain chromaticity information; A training module is used to train the prediction model; wherein the training process of the prediction model is: Extract a training set in color space from a standard dataset; Based on the training set, obtaining a target combination of a penalty factor and a kernel parameter for support vector regression; Training the prediction model according to the target combination and the training set to obtain the fully trained prediction model; Wherein, based on the training set, obtaining a target combination of a penalty factor and a kernel parameter of support vector regression includes: Initializing the parameters of the Hippocampus algorithm based on the training set; Using a chaotic mapping strategy, an initial population of a hippocampus group and an initial position of the initial population are generated; Determine a first fitness value of each hippocampus individual in the initial population; determine an elite individual and a corresponding first position based on the first fitness value; In the motion phase, based on a dynamic switching probability strategy, the first position is updated to obtain a second position; In the predation stage, the second position is updated to obtain a third position; the boundary variables in the hippocampus algorithm parameters are processed and corrected to determine the second fitness values of all the hippocampus individuals; the second fitness values are sorted to obtain a sorting result; In the reproduction stage, based on the sorting result, the initial population is divided into a female population and a male population; offspring individuals are generated according to the female population and the male population; and the second fitness values of all the offspring individuals are determined; Selecting a second-generation population that meets the fitness value requirements from the offspring individuals, the female population, and the male population; Iterate according to the maximum number of iterations in the second-generation population and the hippocampus algorithm parameters until a termination condition is met, thereby obtaining a target combination of a penalty factor and a kernel parameter for support vector regression; The second processing module is used to input the chromaticity information into a well-trained correction model to perform illumination correction on the image to obtain a target image.
10. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps of the image illumination correction method according to any one of claims 1 to 7.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for correcting illumination of an image according to any one of claims 1 to 7 are implemented.
