CN-121985227-A - Parameter calibration method, computer device, and storage medium
Abstract
The application provides a parameter calibration method, a computer device and a storage medium, wherein the parameter calibration method comprises the steps of acquiring a plurality of image sets under the same target color temperature, wherein the plurality of image sets are image sets corresponding to a plurality of illumination intensities; the method comprises the steps of determining a first parameter pair corresponding to each image in each image set to obtain a plurality of first sets, determining a second parameter pair in each first set in the plurality of first sets to obtain a plurality of second parameter pairs, wherein the second parameter pairs are first parameter pairs with minimum chromatic aberration in the first sets, screening out target parameter pairs corresponding to target color temperature in the plurality of second parameter pairs, and calibrating camera parameters under the target color temperature based on the target parameter pairs. According to the scheme, the white balance and the color correction parameter selection are optimized by combining multiple illumination intensity image sets under the same target color temperature, and the color consistency and the color accuracy of an image processing link are improved.
Inventors
- PENG YUJIANG
- YANG PENG
- WANG ZHAOMIN
Assignees
- 珠海莫界科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251222
Claims (10)
- 1. A method of calibrating parameters, comprising: acquiring a plurality of image sets under the same target color temperature, wherein the plurality of image sets are corresponding to a plurality of illumination intensities, and each image set comprises a plurality of images shot under the same illumination intensity; Determining a first parameter pair corresponding to each image in each image set to obtain a plurality of first sets, wherein one first set corresponds to one image set, each first set comprises a plurality of first parameter pairs, each first parameter pair comprises a white balance correction parameter and a color correction parameter, and the first parameter pairs enable the color difference of the images subjected to white balance correction and color correction to be minimum; Determining second parameter pairs in each first set to obtain a plurality of second parameter pairs, wherein one second parameter pair is obtained based on one first set, and the second parameter pair is the first parameter pair with the smallest chromatic aberration in the first set; and screening out target parameter pairs corresponding to target color temperatures from the plurality of second parameter pairs, and calibrating camera parameters under the target color temperatures based on the target parameter pairs.
- 2. The method of claim 1, wherein the plurality of image sets includes a target image, the target image being one of the image sets; The determining the first parameter pair corresponding to each image in each image set to obtain a plurality of first sets includes: the method comprises the steps of inputting a target image and a current white balance correction parameter into a first optimizer for optimization solving to obtain an optimal color correction parameter corresponding to the current white balance correction parameter, wherein the first optimizer is used for carrying out white balance correction processing on the target image according to the current white balance correction parameter to obtain a first correction image corresponding to the target image, and solving the optimal color correction parameter based on the first correction image; Determining a color loss value corresponding to the current white balance correction parameter according to the optimal color correction parameter, updating the current white balance correction parameter according to the color loss value, inputting the target image and the updated current white balance correction parameter into a first optimizer for optimization solution to obtain the optimal color correction parameter corresponding to the current white balance correction parameter until a first convergence rule is met, wherein the first convergence rule comprises that the color loss value reaches the minimum; and determining the current white balance correction parameter and the optimal color correction parameter which meet the first convergence rule as a first parameter pair corresponding to the target image.
- 3. The method according to claim 2, wherein the inputting the target image and the current white balance correction parameter into a first optimizer for optimization solution to obtain an optimal color correction parameter corresponding to the current white balance correction parameter includes: performing white balance correction processing on the target image according to the current white balance correction parameters to obtain a first corrected image corresponding to the target image; performing color correction processing on the first correction image according to the current color correction parameters to obtain a current correction image corresponding to the target image; updating the current color correction parameters according to the error between the current correction image and the preset standard image, and performing color correction processing on the first correction image according to the updated current color correction parameters to obtain the current correction image corresponding to the target image until a second convergence rule is met, wherein the second convergence rule comprises that the error is minimum; And determining the current color correction parameter meeting the second convergence rule as the optimal color correction parameter corresponding to the current white balance correction parameter.
- 4. A method according to claim 3, wherein said updating said current color correction parameters based on an error between said current corrected image and said preset standard image comprises: determining a gradient corresponding to the error according to the error; Determining a first search direction according to the gradient; and updating the current color correction parameters according to the first search direction.
- 5. A method according to claim 3, wherein before updating the current color correction parameters according to the error between the current correction image and the preset standard image, further comprising: calculating the difference between each pixel color in the current correction image and the corresponding standard color in the preset standard image to obtain the square error of each pixel color; And accumulating square differences of all pixel colors of the current correction image to obtain an error between the current correction image and the preset standard image.
- 6. The method according to claim 2, wherein determining the color loss value corresponding to the current white balance correction parameter according to the optimal color parameter comprises: Performing color correction on the first correction image according to the optimal color parameters to obtain a second correction image; And determining a color loss value corresponding to the current white balance correction parameter according to the second correction image.
- 7. The method of claim 6, wherein determining a color loss value corresponding to the current white balance correction parameter from the second corrected image comprises: performing color block division on the second correction graph to obtain a plurality of color blocks; Acquiring a color value corresponding to each color block in the plurality of color blocks; calculating the color difference between the color value corresponding to each color block and the corresponding preset standard color value to obtain the color difference of each color block; square calculation is carried out on the chromatic aberration of each color block, and square chromatic aberration of each color block is obtained; and accumulating the square chromatic aberration of all color blocks to obtain the color loss value corresponding to the current white balance correction parameter.
- 8. The method of any one of claims 1-7, wherein the acquiring a plurality of image sets at the same target color temperature comprises: and under the same target color temperature, acquiring a plurality of images with different illumination intensities according to the fixed first calibration parameter and the fixed second calibration parameter to obtain a plurality of image sets under the same target color temperature.
- 9. A computer device comprising a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor, when executing the one or more computer programs, causing the computer device to perform the method of claims 1-8.
- 10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of claims 1-8.
Description
Parameter calibration method, computer device, and storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to a parameter calibration method, a computer device, and a storage medium. Background The traditional camera white balance and color correction calibration are usually carried out under different illumination intensity and color temperature conditions respectively, and an independent white balance correction and color correction matrix calibration method is adopted in many cases. Because of the diversity of illumination intensity and color temperature, it is difficult to effectively uniformly calibrate images under different illumination conditions, resulting in unsatisfactory color difference correction effects. Disclosure of Invention The application provides a parameter calibration method, computer equipment and a storage medium, and aims to solve the technical problems of reduced color correction precision and complex and low-efficiency calibration flow caused by separation and calibration of a traditional white balance module and a color correction module. In a first aspect, a parameter calibration method is provided, including: acquiring a plurality of image sets under the same target color temperature, wherein the plurality of image sets are corresponding to a plurality of illumination intensities, and each image set comprises a plurality of images shot under the same illumination intensity; Determining a first parameter pair corresponding to each image in each image set to obtain a plurality of first sets, wherein one first set corresponds to one image set, each first set comprises a plurality of first parameter pairs, each first parameter pair comprises a white balance correction parameter and a color correction parameter, and the first parameter pairs enable the color difference of the images subjected to white balance correction and color correction to be minimum; Determining second parameter pairs in each first set to obtain a plurality of second parameter pairs, wherein one second parameter pair is obtained based on one first set, and the second parameter pair is the first parameter pair with the smallest chromatic aberration in the first set; and screening out target parameter pairs corresponding to target color temperatures from the plurality of second parameter pairs, and calibrating camera parameters under the target color temperatures based on the target parameter pairs. In a second aspect, there is provided a parameter calibration device comprising: The acquisition module is used for acquiring a plurality of image sets under the same target color temperature, wherein the plurality of image sets are image sets corresponding to a plurality of illumination intensities, and each image set comprises a plurality of images shot under the same illumination intensity; The system comprises a determining module, a first image processing module and a second image processing module, wherein the determining module is used for determining first parameter pairs corresponding to each image in each image set to obtain a plurality of first sets, one first set corresponds to one image set, each first set comprises a plurality of first parameter pairs, each first parameter pair comprises a white balance correction parameter and a color correction parameter, and the first parameter pairs enable color differences of the images subjected to white balance correction processing and color correction processing to be minimum; The determining module is further used for determining second parameter pairs in each first set to obtain a plurality of second parameter pairs, wherein one second parameter pair is obtained based on one first set, and the second parameter pair is the first parameter pair with the smallest chromatic aberration in the first set; And the screening module is used for screening out target parameter pairs corresponding to the target color temperature from the plurality of second parameter pairs, and calibrating camera parameters under the target color temperature based on the target parameter pairs. In a third aspect, a computer device is provided, comprising a memory connected to the processor for executing one or more computer programs stored in the memory, and a processor, which when executing the one or more computer programs, causes the computer device to perform the parameter calibration method of the first aspect described above. In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the parameter calibration method of the first aspect. The application can realize the following technical effects that the application ensures the optimal color correction effect under specific illumination intensity by determining a first parameter pair which m