Image processing method, device and equipment based on lens shadow correction

By obtaining the brightness mean value and preset calibration point relationship of the calibration image, determining the correction coefficient group and correcting the image, solving the problem of uneven brightness caused by lens optical design, achieving a more natural image transition and a more accurate correction effect.

CN119295363AActive Publication Date: 2025-01-10JIANGSU MUTENGGUANG PRECISION OPTICAL INSTR CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411815607.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-01-10
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

When correcting the problem of uneven image brightness caused by lens optical design, new inhomogeneity or artifacts may be introduced, and the correction effect is not obvious enough and the transition is unnatural.

Method used

By acquiring the image brightness mean value of multiple calibration images and the relationship between preset calibration points and pixels, a correction coefficient set for the image to be corrected is determined, and these correction coefficients are used to correct the image to be corrected, eliminating the edges caused by lens optical design. Light attenuation and color inhomogeneity.

Benefits of technology

It achieves a more natural image transition and more accurate brightness correction, which is suitable for image correction of different brightness, avoids the introduction of new inhomogeneities and improves the significance of the correction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295363A_ABST
    Figure CN119295363A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method, device and equipment based on lens shadow correction, and is applied to the technical field of image processing, and the method comprises the steps: obtaining a plurality of calibration images corresponding to a to-be-corrected image and an image brightness mean value of each calibration image; the image brightness of different calibration images is different; based on each first pixel in each calibration image, each image brightness mean value, and a preset relationship between a preset calibration point in each calibration image and the corresponding first pixel, determining a correction coefficient group for the to-be-corrected image; according to the embodiment of the invention, each second pixel in the to-be-corrected image is corrected through each correction coefficient in the correction coefficient group, the corrected target image is obtained, and the phenomenon of non-uniform image brightness caused by the optical design problem of the current lens can be corrected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, device and equipment based on lens shading correction. Background Art

[0002] Due to the optical design of the lens, the light entering the lens will pass through different paths when reaching the image sensor, resulting in light attenuation at the edges. This uneven light distribution will lead to uneven image brightness. This phenomenon is usually manifested as brighter center of the image and darker edge, or inconsistent color between the center of the image and the surrounding areas.

[0003] At present, the commonly used image processing methods include grid method, concentric circle method and polynomial method. The grid method divides the entire image into multiple grids, and then calculates the correction gain for the grid vertices, and the gain of other points is calculated by interpolation. In the case of discontinuous grid correction parameters, artificial traces or artifacts may appear in the image, making the corrected image look unnatural and the transition is not smooth. The concentric circle method uses the radius as a variable to calculate the gain required for pixels of different radii, but in this process, not all pixel radii can be calculated, so the gain of the characteristic radius is extracted by sampling method, and the gain corresponding to other radii is calculated by interpolation during correction. The polynomial fitting method uses the radius as the sampling point, and then fits these sampling points into a high-order curve by high-order fitting, stores the parameters of the high-order curve, and when used, the radius is substituted into the formula to calculate the corresponding gain value to obtain the corrected image. In actual situations, the phenomenon of uneven shadows or brightness is not completely symmetrical. Obtaining gain by radius may result in unclear correction effect and inability to eliminate unevenness, and may introduce new unevenness. Summary of the invention

[0004] The purpose of the present application is to provide an image processing method, device and equipment based on lens shading correction, which are used to correct the phenomenon of uneven image brightness caused by optical design problems of current lenses.

[0005] In a first aspect, an embodiment of the present application provides an image processing method based on lens shading correction, the method comprising: obtaining a plurality of calibration images corresponding to the image to be corrected and the image brightness mean of each calibration image. The image brightness of different calibration images is different. Based on each first pixel in each calibration image, each image brightness mean, and a preset relationship between a preset calibration point in each calibration image and the corresponding first pixel, a correction coefficient group for the image to be corrected is determined. Each second pixel in the image to be corrected is corrected by each correction coefficient in the correction coefficient group to obtain a corrected target image.

[0006] The image processing method based on lens shading correction provided in the embodiment of the present application can obtain a more accurate correction coefficient suitable for the current lens by fitting the data of multiple calibration images, using the brightness average of the multiple calibration images, as well as the first pixel and the preset calibration point in the calibration image. The lens can use the correction coefficient to correct the images of different brightness taken, and can correct the light attenuation at the edge caused by the light entering the lens passing through different paths when reaching the image sensor due to the optical design problem of the current lens, thereby causing uneven brightness and color of the image captured by the lens, so as to make the transition of the image captured by the lens more natural.

[0007] A possible implementation method is to determine a correction coefficient group for the image to be corrected based on each first pixel in each calibration image, the average brightness of each image, and a preset relationship between a preset calibration point in each calibration image and the corresponding first pixel, including: For each calibration image, determine the first coordinate position of the first pixel in the calibration image in the calibration coordinate system and the second coordinate position of the preset calibration point in the calibration coordinate system. The calibration coordinate system is obtained by converting the device coordinate system of the acquisition device that acquires the image to be corrected. According to the preset relationship between the preset calibration point and the corresponding first pixel in each calibration image, determine at least one deviation influencing factor between the preset calibration point and the corresponding first pixel, and the correction coefficient for the deviation influencing factor. The deviation influencing factor includes one or more of the horizontal brightness deviation factor, the vertical brightness deviation factor, the pixel factor, the horizontal deviation factor, the vertical deviation factor, and the deviation compensation factor. Use at least one deviation influencing factor and the correction coefficient for each deviation influencing factor to construct a deviation compensation equation for the pixel for the image. Based on the first coordinate position of each first pixel in each calibration image, the mean brightness of each image, the second coordinate position of the preset calibration point and the deviation compensation equation, solve to obtain each correction coefficient, and obtain a correction coefficient group for the image to be corrected, and the correction coefficient group includes the solved multiple correction coefficients.

[0008] A possible implementation method is to determine a correction coefficient group for an image to be corrected based on each first pixel in each calibration image, each image brightness mean, and a preset relationship between a preset calibration point in each calibration image and a corresponding first pixel, including: for each calibration image, dividing the calibration image into a plurality of sub-calibration images according to a preset method. Among them, the plurality of sub-calibration images of the first calibration image and the plurality of sub-calibration images of the second calibration image are in a one-to-one correspondence. The first calibration image and the second calibration image are any two images in the plurality of calibration images. According to the correspondence between the plurality of sub-calibration images, the plurality of sub-calibration images are aggregated to obtain a plurality of image sets, the image set including the plurality of sub-calibration images, and the plurality of sub-calibration images in the image set are images with a corresponding relationship. For each image set, based on the plurality of image brightness mean, each first pixel of each sub-calibration image in the image set, and a preset relationship between a preset calibration point of each calibration image and a corresponding first pixel, a regional correction coefficient group corresponding to each image set is determined. According to each regional correction coefficient group, a correction coefficient group for the image to be corrected is determined. The correction coefficient group of the image to be corrected includes each regional correction coefficient group and the regional relationship corresponding to each regional correction coefficient group.

[0009] A possible implementation method is to determine the regional correction coefficient group corresponding to each image set based on the brightness mean of each image, each first pixel of each calibration image, the brightness mean of each image, and the preset relationship between the preset calibration point in each calibration image and the corresponding first pixel, including: for each sub-calibration image in each image set, determine the third coordinate position of the first pixel in the sub-calibration image in the sub-calibration coordinate system and the fourth coordinate position of the preset calibration point in the sub-calibration coordinate system. The sub-calibration coordinate system is obtained by converting the device coordinate system of the acquisition device that acquires the image to be corrected. According to the preset relationship between the preset calibration point in each calibration image and the corresponding first pixel, determine at least one regional deviation influencing factor between the preset calibration point and the corresponding first pixel, and the regional correction coefficient for the regional deviation influencing factor. The regional deviation influencing factor includes one or more of a horizontal brightness deviation factor, a vertical brightness deviation factor, a regional pixel factor, a horizontal deviation factor, a vertical deviation factor, and a deviation compensation factor. Use at least one regional deviation influencing factor and the regional correction coefficient for each regional deviation influencing factor to construct a regional deviation compensation equation for the first pixel for the image. Based on the third coordinate position of each first pixel in each sub-calibration image, the mean brightness of each image, the fourth coordinate position of the preset calibration point and the regional deviation compensation equation, each regional correction coefficient is solved to obtain a regional correction coefficient group corresponding to each image set, and the regional correction coefficient group includes multiple solved regional correction coefficients.

[0010] A possible implementation method is to use the deviation influencing factor and the regional deviation influencing factor as the target influencing factor, the regional correction coefficient and the correction coefficient as the target coefficient, the first coordinate position and the third coordinate position as the first target coordinate position, and the second coordinate position and the fourth coordinate position as the second target coordinate position. By using the preset relationship between the preset calibration point and the corresponding first pixel in each calibration image, at least one target influencing factor of the preset calibration point and the corresponding first pixel, and the target coefficient for the target influencing factor are determined, including: when the target influencing factor includes a target horizontal brightness deviation factor, the target horizontal brightness deviation factor and the first target correction coefficient for the target horizontal brightness deviation factor are determined using the first target horizontal coordinate of the first target coordinate position, the second target horizontal coordinate of the second target coordinate position and the pixel value of the first pixel. When the target influencing factor includes a target longitudinal brightness deviation factor, the target longitudinal brightness deviation factor and the second target correction coefficient for the target longitudinal brightness deviation factor are determined using the first target longitudinal coordinate of the first target coordinate position, the second target longitudinal coordinate of the second target coordinate position and the pixel value of the first pixel. In the case where the target influencing factors include the target pixel factor, the pixel value of the first pixel is used to determine the target pixel factor and the third target correction coefficient for the target pixel factor. In the case where the target influencing factors include the target lateral deviation factor, the first target horizontal coordinate and the second target horizontal coordinate are used to determine the target lateral deviation factor and the fourth target correction coefficient for the target lateral brightness deviation factor. In the case where the target influencing factors include the target longitudinal deviation factor, the first target longitudinal coordinate and the second target longitudinal coordinate are used to determine the target longitudinal deviation factor and the fifth target correction coefficient for the target longitudinal brightness deviation factor.

[0011] A possible implementation method is to use the first coordinate position and the third coordinate position as the first target coordinate position, the second coordinate position and the fourth coordinate position as the second target coordinate position, the deviation compensation equation and the regional deviation compensation equation as the target compensation equation, the correction coefficient and the regional correction coefficient as the target correction coefficient, and the correction coefficient group and the regional correction coefficient group as the target correction coefficient group. Based on the first target coordinate position of each first pixel in each calibration image, the average brightness of each image, the second target coordinate position of the preset calibration point and the target compensation equation, each target correction coefficient is solved to obtain a target correction coefficient group for the image to be corrected, including: substituting the first target coordinate position, the average brightness of each image and the second target coordinate position into the target compensation equation for solving to obtain the target correction coefficient.

[0012] The target compensation equation includes: .

[0013] Among them, the is the image brightness mean of the nth target image; The first target coordinate position in the nth target image is The pixel value of the mth first pixel, is the second target coordinate position of the preset calibration point; k1 is the first target correction coefficient in the target correction coefficient group; k2 is the second target correction coefficient in the target correction coefficient group; k3 is the third target correction coefficient in the target correction coefficient group; k4 is the fourth target correction coefficient in the target correction coefficient group; k5 is the fifth target correction coefficient in the target correction coefficient group; k6 is the sixth target correction coefficient in the target correction coefficient group.

[0014] A possible implementation method is to correct each second pixel in the image to be corrected by each correction coefficient in the correction coefficient group to obtain a corrected target image, including: obtaining each deviation influencing factor to be corrected of the preset calibration point corresponding to each correction coefficient and the corresponding second pixel. The deviation influencing factor to be corrected includes one or more of the horizontal brightness deviation factor to be corrected, the vertical brightness deviation factor to be corrected, the pixel factor to be corrected, the horizontal deviation factor to be corrected, the vertical deviation factor to be corrected, and the deviation compensation factor to be corrected. Through each correction coefficient and each deviation influencing factor to be corrected, a correction equation for compensating the second pixel is obtained. The fifth coordinate position of each second pixel in each image to be corrected in the correction coordinate system, the sixth coordinate position of the preset calibration point in the correction coordinate system and the correction equation are used for calculation to obtain the corrected pixel value of each second pixel in the calibration image. According to the obtained corrected pixel values, the corrected target image is generated.

[0015] A possible implementation method is to correct each second pixel in the image to be corrected by each correction coefficient in the correction coefficient group to obtain a corrected target image, including: dividing the image to be corrected into a plurality of sub-images to be corrected in a preset manner. For each sub-image to be corrected, obtaining each regional deviation influencing factor of the preset calibration point corresponding to each regional correction coefficient and the corresponding second pixel. The regional deviation influencing factor to be corrected includes one or more of the lateral brightness deviation factor of the region to be corrected, the longitudinal brightness deviation factor of the region to be corrected, the pixel factor of the region to be corrected, the lateral deviation factor of the region to be corrected, the longitudinal deviation factor of the region to be corrected, and the regional deviation compensation factor to be corrected. A regional correction equation for compensation of the second pixel is obtained by each regional correction coefficient and each regional deviation influencing factor to be corrected. The seventh coordinate position of each second pixel in each sub-image to be corrected in the sub-correction coordinate system, the eighth coordinate position of the preset calibration point in the sub-correction coordinate system and the regional correction equation are used for calculation to obtain the regional correction pixel value of each second pixel in the sub-image to be corrected. A plurality of corrected target sub-images are generated according to the regional corrected pixel value of each second pixel, and a corrected target image is composed of the plurality of target sub-images in a preset manner.

[0016] A possible implementation method is to use the image to be corrected and the sub-image to be corrected as the target image, the fifth coordinate position and the seventh coordinate position as the third target coordinate position, the sixth coordinate position and the eighth coordinate position as the fourth target coordinate position, the deviation influencing factor to be corrected and the regional deviation influencing factor to be corrected as the target influencing factor to be corrected, the correction coefficient and the regional correction coefficient as the target correction coefficient, and the correction equation and the regional correction equation as the target correction equation. Through each target correction coefficient and each target influencing factor to be corrected, a target correction equation for compensation of the second pixel is obtained, including: using each target correction coefficient and each target influencing factor to be corrected, constructing the following target correction equation: ; in, a is the corrected pixel value of the ath second pixel in the target image, The coordinate position of the third target in the target is The pixel value of the a-th second pixel, is the fourth target coordinate position of the preset calibration point, k1 is the first target correction coefficient in the target correction coefficient group. k2 is the second target correction coefficient in the target correction coefficient group. k3 is the third target correction coefficient in the target correction coefficient group. k4 is the fourth target correction coefficient in the target correction coefficient group. k5 is the fifth target correction coefficient in the target correction coefficient group. k6 is the sixth target correction coefficient in the target correction coefficient group.

[0017] In a second aspect, an embodiment of the present application provides an image processing device based on lens shading correction, the device comprising: an acquisition module, a determination module and a correction module.

[0018] Wherein, the acquisition module is used for obtaining a plurality of calibration images corresponding to the image to be corrected and the image brightness mean of each of the calibration images; the image brightness of different calibration images is different.

[0019] A determination module is used to determine a correction coefficient group for the image to be corrected based on each first pixel in each calibration image, each image brightness mean value, and a preset relationship between a preset calibration point in each calibration image and the corresponding first pixel.

[0020] The correction module is used to correct each second pixel in the image to be corrected by using each correction coefficient in the correction coefficient group to obtain a corrected target image.

[0021] In a third aspect, the present application provides an image processing device, which has the function of implementing the image processing method based on lens shading correction of the first aspect or any possible implementation method. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0022] In a fourth aspect, a computer-readable storage medium is provided, in which instructions are stored, and when the computer-readable storage medium is run on a computer, the computer can execute the image processing method based on lens shading correction of the above-mentioned first aspect or any possible implementation method.

[0023] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the image processing method based on lens shading correction according to the first aspect or any possible implementation manner.

[0024] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different possible implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Figure 1 A structural schematic diagram of an image processing device provided in an embodiment of the present application; Figure 2 A flowchart of an image processing method based on lens shading correction provided in an embodiment of the present application; Figure 3 A structural schematic diagram of an image processing device based on lens shading correction provided in an embodiment of the present application; Figure 4 A structural schematic diagram of an image processing system based on lens shading correction provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0028] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0029] At present, the commonly used lens shading correction methods include the grid method, the concentric circle method and the polynomial method. The grid method divides the entire image into multiple grids, and then calculates the correction gain for the grid vertices, and the gain of other points is calculated by interpolation. In the case of discontinuous grid correction parameters, artificial traces or artifacts may appear in the image, making the corrected image look unnatural and the transition is not smooth. The concentric circle method uses the radius as a variable to calculate the gain required for pixels of different radii, but it is impossible to calculate all pixel radii, so the gain of the characteristic radius is extracted by sampling method, and the gain corresponding to other radii is calculated by interpolation during correction. The polynomial fitting method is to use the radius as the sampling point, and then fit these sampling points into a high-order curve by high-order fitting, store the parameters of the high-order curve, and when using it, the radius is substituted into the formula to calculate the corresponding gain value to obtain the corrected image. In actual situations, the phenomenon of uneven shadows or brightness is not completely symmetrical. Obtaining gain by radius may result in unclear correction effect and failure to eliminate unevenness, and may introduce new unevenness.

[0030] Based on this, an embodiment of the present application provides an image processing method based on lens shading correction, the method comprising: obtaining a plurality of calibration images corresponding to the image to be corrected and the image brightness mean of each of the calibration images. The image brightness of different calibration images is different. Based on each first pixel in each of the calibration images, each image brightness mean, and a preset relationship between a preset calibration point in each of the calibration images and the corresponding first pixel, a correction coefficient group for the image to be corrected is determined. Each second pixel in the image to be corrected is corrected by each correction coefficient in the correction coefficient group to obtain a corrected target image.

[0031] The method can obtain a more accurate correction coefficient suitable for the current lens by fitting the data of multiple calibration images, using the brightness mean of the multiple calibration images, the first pixel in the calibration image and the preset calibration point. The lens can use the correction coefficient to correct the images with different brightness taken. It can correct the light attenuation at the edge caused by the light entering the lens passing through different paths when reaching the image sensor due to the optical design problem of the current lens, thereby causing the image captured by the lens to have uneven brightness and color, so as to make the transition of the image captured by the lens more natural.

[0032] On the one hand, an image processing method based on lens shading correction provided in an embodiment of the present application can be executed by an image processing device. Figure 1 As shown, the image processing device 100 may include: a processor 101 , a memory 102 , and an image sensor 103 . The memory 102 may be a memory in the processor 101 .

[0033] The processor 101 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0034] Specifically, the processor 101 is used to receive the image to be corrected captured by the image sensor 103, and then correct the image to be corrected by using the image processing method based on lens shading correction provided in the embodiment of the present application to generate a target image.

[0035] The memory 102 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM) and direct rambus RAM (DR RAM) or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but not limited thereto. The memory can be independent and connected to the processor 101 via a communication line. The memory 102 can also be integrated with the processor 101.

[0036] The memory 102 stores computer executable instructions for implementing the solution of the present application, and is controlled and executed by the processor 101. The processor 101 is used to execute the computer executable instructions stored in the memory 102, so as to implement the image processing method based on lens shading correction provided in the following embodiments of the present application.

[0037] Image sensor 103, which may be a camera, may be used to capture images and send the images to processor 101 or memory 102. The images may include calibration images and images to be corrected.

[0038] On the one hand, the embodiment of the present application discloses an image processing method based on lens shading correction, which can be deployed Figure 1 The image processing device 100 shown in FIG. Figure 2 As shown, the method may include the following steps.

[0039] S201, obtaining a plurality of calibration images corresponding to the image to be corrected and an image brightness mean value of each calibration image.

[0040] Among them, different calibration images have different image brightness. The different calibration images are images captured by the same lens.

[0041] For example, obtain n calibration images of different brightness. The n calibration images have different image brightness, but the other features are exactly the same. Then, by using Pillow library or OpenCV library or NumPy direct calculation method, obtain the image brightness mean of each calibration image, and get mean0, mean1, ..., mean n .

[0042] The process of using the Pillow library to obtain the image brightness mean of each calibration image may be to convert the calibration image into a grayscale image, convert the grayscale image into a NumPy array, and then use the NumPy array to directly calculate the image brightness mean of the calibration image. The process of using the OpenCV library to obtain the image brightness mean of each calibration image may be to convert the calibration image into a grayscale image, and use the grayscale image to calculate the image brightness mean of the calibration image. The process of using NumPy to directly calculate the image brightness mean of each calibration image may be to obtain the NumPy array of the calibration image, and use the NumPy array to directly calculate the brightness mean of the calibration image.

[0043] S202, determining a correction coefficient group for the image to be corrected based on each first pixel in each calibration image, the average brightness value of each image, and a preset relationship between a preset calibration point in each calibration image and the corresponding first pixel.

[0044] Exemplarily, the preset calibration point may be the center point of the calibration image. It should be noted that the preset calibration point may also be any point in the calibration image, which is not limited in the present application.

[0045] In a possible implementation, for each calibration image, a first coordinate position of a first pixel in the calibration image in the calibration coordinate system and a second coordinate position of a preset calibration point in the calibration coordinate system are determined.

[0046] The calibration coordinate system may be obtained by converting the device coordinate system of the acquisition device that acquires the image to be corrected. For example, the device coordinate system may be constructed by parameters such as the intrinsic parameter matrix, distortion coefficient, rotation matrix, and translation vector of the acquisition device of the image to be corrected. The calibration coordinate system may be constructed in each calibration image and directly converted through the device coordinate system, or converted from the device coordinate system using a transformation matrix.

[0047] Then, at least one deviation influencing factor between the preset calibration point and the corresponding first pixel and a correction coefficient for the deviation influencing factor are determined according to a preset relationship between the preset calibration point and the corresponding first pixel in each calibration image.

[0048] The deviation influencing factors may include one or more of a lateral brightness deviation factor, a longitudinal brightness deviation factor, a pixel factor, a lateral deviation factor, a longitudinal deviation factor, and a deviation compensation factor.

[0049] A pixel-to-image deviation compensation equation is constructed using at least one deviation influencing factor and a correction coefficient for each deviation influencing factor.

[0050] Specifically, at least one deviation influencing factor is used to determine a deviation matrix corresponding to the deviation influencing factor, and then a deviation compensation equation of a pixel for an image is constructed by using correction coefficients for each deviation influencing factor and the deviation matrix corresponding to each deviation influencing factor.

[0051] Based on the first coordinate position of each first pixel in each calibration image, the mean brightness of each image, the second coordinate position of the preset calibration point and the deviation compensation equation, each correction coefficient is solved to obtain a correction coefficient group for the image to be corrected, and the correction coefficient group includes multiple calculated correction coefficients.

[0052] In another possible implementation, for each calibration image, the calibration image is divided into a plurality of sub-calibration images according to a preset method. The plurality of sub-calibration images of the first calibration image and the plurality of sub-calibration images of the second calibration image are in a one-to-one correspondence. The first calibration image and the second calibration image are any two images of the plurality of calibration images.

[0053] Exemplarily, for each calibration image, each calibration image is divided into 16*16 regions p according to a preset method, and the region p includes region 0, region 1, ..., region 255, wherein the sizes of region 0, region 1, ..., region 255 may be the same or different. Obtain the pixel value of each pixel point (i, j) in region p, wherein, is the first coordinate position of the first pixel in region p, .

[0054] Then, according to the correspondence between each sub-calibration image, the obtained multiple sub-calibration images are aggregated to obtain multiple image sets, wherein the image set includes multiple sub-calibration images, and the multiple sub-calibration images in the image set are images with a corresponding relationship.

[0055] For example, the calibration image may include calibration image a, calibration image b, and calibration image c. The calibration image a may be divided into sub-calibration image a1, sub-calibration image a2, and sub-calibration image a3 according to a preset method, the calibration image b may be divided into sub-calibration image b1, sub-calibration image b2, and sub-calibration image b3 according to a preset method, and the calibration image c may be divided into sub-calibration image c1, sub-calibration image c2, and sub-calibration image c3 according to a preset method. Among them, sub-calibration image a1, sub-calibration image b1, and sub-calibration image c1 have a corresponding relationship, sub-calibration image a2, sub-calibration image b2, and sub-calibration image c2 have a corresponding relationship, and sub-calibration image a3, sub-calibration image b3, and sub-calibration image c3 have a corresponding relationship. Sub-calibration image a1, sub-calibration image b1 and sub-calibration image c1 are aggregated to obtain image set 1, sub-calibration image a2, sub-calibration image b2 and sub-calibration image c2 are aggregated to obtain image set 2, and sub-calibration image a3, sub-calibration image b3 and sub-calibration image c3 are aggregated to obtain image set 3.

[0056] It should be noted that the above-mentioned calibration images may include calibration image a, calibration image b and calibration image c, and the division method of calibration image a, calibration image b and calibration image c is only an example, and the present application does not limit the specific number of calibration images and the specific division method of calibration images.

[0057] For each image set, the regional correction coefficient group corresponding to each image set is determined based on the brightness mean of each image, each first pixel of each sub-calibrated image in the image set, the brightness mean of each image, and the preset relationship between the preset calibration points in each calibration image and the corresponding first pixel.

[0058] Specifically, for each sub-calibration image in each image set, a third coordinate position of a first pixel in the sub-calibration image in the sub-calibration coordinate system and a fourth coordinate position of a preset calibration point in the sub-calibration coordinate system are determined.

[0059] The sub-calibration coordinate system may be converted by the calibration coordinate system of the calibration image to which the sub-calibration image belongs, the third coordinate position of the first pixel in the sub-calibration coordinate system may be converted by the first coordinate position of the first pixel in the calibration coordinate system, and the fourth coordinate position of the preset calibration point of the sub-calibration coordinate system may be converted by the second coordinate position of the preset calibration point of the calibration coordinate system. The sub-calibration coordinate system may also be directly the calibration coordinate system of the calibration image, and the fourth coordinate position of the preset calibration point of the sub-calibration coordinate system is the same as the second coordinate position of the preset calibration point of the calibration coordinate system.

[0060] Then, at least one regional deviation influencing factor between the preset calibration points and the corresponding first pixels in each calibration image and a regional correction coefficient for the regional deviation influencing factor are determined, wherein the regional deviation influencing factor includes one or more of a horizontal brightness deviation factor, a vertical brightness deviation factor, a regional pixel factor, a horizontal deviation factor, a vertical deviation factor, and a deviation compensation factor.

[0061] At least one regional deviation influencing factor and a regional correction coefficient for each regional deviation influencing factor are used to construct a regional deviation compensation equation for the first pixel with respect to the image.

[0062] Specifically, at least one regional deviation influencing factor is used to determine a regional deviation matrix corresponding to the regional deviation influencing factor, and then a regional deviation compensation equation for pixels of the image is constructed by using regional correction coefficients for each regional deviation influencing factor and the regional deviation matrix corresponding to each regional deviation influencing factor.

[0063] Based on the third coordinate position of each first pixel in each sub-calibration image, the average brightness of each image, the fourth coordinate position of the preset calibration point and the regional deviation compensation equation, each regional correction coefficient is solved to obtain a regional correction coefficient group corresponding to each image set, and the regional correction coefficient group includes the solved multiple regional correction coefficients. Then, according to each regional correction coefficient group, a correction coefficient group for the image to be corrected is determined, and the correction coefficient group of the image to be corrected includes each regional correction coefficient group and the regional relationship corresponding to each regional correction coefficient group.

[0064] Further, the calibration image and the sub-calibration image are taken as images, the deviation influencing factor and the regional deviation influencing factor are taken as target influencing factors, the regional correction coefficient and the correction coefficient are taken as target coefficients, the first coordinate position and the third coordinate position are taken as first target coordinate positions, and the second coordinate position and the fourth coordinate position are taken as second target coordinate positions. At least one target influencing factor of the preset calibration point and the corresponding first pixel, as well as the target coefficient for the target influencing factor, can be determined by the preset relationship between the preset calibration point and the corresponding first pixel in each target image. Among them, the target coefficient may include a first target correction coefficient, a second target correction coefficient, a third target correction coefficient, a fourth target correction coefficient, and a fifth target correction coefficient.

[0065] Specifically, when the target influencing factors include a target lateral brightness deviation factor, the target lateral brightness deviation factor and the first target correction coefficient for the target lateral brightness deviation factor are determined using the first target horizontal coordinate of the first target coordinate position, the second target horizontal coordinate of the second target coordinate position, and the pixel value of the first pixel.

[0066] When the target influencing factors include a target longitudinal brightness deviation factor, the target longitudinal brightness deviation factor and the second target correction coefficient for the target longitudinal brightness deviation factor are determined using the first target longitudinal coordinate of the first target coordinate position, the second target longitudinal coordinate of the second target coordinate position and the pixel value of the first pixel.

[0067] In the case where the target influencing factor includes a target pixel factor, the target pixel factor and a third target correction coefficient for the target pixel factor are determined using the pixel value of the first pixel.

[0068] In the case where the target influencing factor includes a target lateral deviation factor, the target lateral deviation factor and a fourth target correction coefficient for the target lateral brightness deviation factor are determined using the first target lateral coordinate and the second target lateral coordinate.

[0069] In the case where the target influencing factors include a target longitudinal deviation factor, the target longitudinal deviation factor and a fifth target correction coefficient for the target longitudinal brightness deviation factor are determined using the first target longitudinal coordinate and the second target longitudinal coordinate.

[0070] In a possible implementation, when the target image is a calibration image, the target influencing factor is a deviation influencing factor, the target coefficient is a correction coefficient, the first target coordinate position is a first coordinate position, and the second target coordinate position is a second coordinate position, the specific process of determining at least one deviation influencing factor between a preset calibration point and a corresponding first pixel and a correction coefficient for the deviation influencing factor is as follows through a preset relationship between a preset calibration point and a corresponding first pixel in each calibration image. The correction coefficient may include a first correction coefficient, a second correction coefficient, a third correction coefficient, a fourth correction coefficient, and a fifth correction coefficient.

[0071] When the deviation influencing factors include a lateral brightness deviation factor, the lateral brightness deviation factor and a first correction coefficient for the lateral brightness deviation factor are determined using the first horizontal coordinate of the first coordinate position, the second horizontal coordinate of the second coordinate position and the pixel value of the first pixel.

[0072] When the deviation influencing factors include a longitudinal brightness deviation factor, the longitudinal brightness deviation factor and a second correction coefficient for the longitudinal brightness deviation factor are determined using the first longitudinal coordinate of the first coordinate position, the second longitudinal coordinate of the second coordinate position and the pixel value of the first pixel.

[0073] In the case where the deviation influencing factor includes a pixel factor, the pixel factor and a third correction coefficient for the pixel factor are determined using the pixel value of the first pixel.

[0074] In the case where the deviation influencing factor includes a lateral deviation factor, the lateral deviation factor and a fourth correction coefficient for the lateral brightness deviation factor are determined using the first abscissa and the second abscissa.

[0075] In the case where the deviation influencing factors include a longitudinal deviation factor, the longitudinal deviation factor and a fifth correction coefficient for the longitudinal brightness deviation factor are determined using the first longitudinal coordinate and the second longitudinal coordinate.

[0076] In another possible implementation, when the target image is a sub-calibration image, the target influencing factor is a regional deviation influencing factor, the target coefficient is a regional correction coefficient, the first target coordinate position is the third coordinate position, and the fourth target coordinate position is the fourth coordinate position, the specific process of determining at least one regional deviation influencing factor between the preset calibration point and the corresponding first pixel and the regional correction coefficient for the regional deviation influencing factor is as follows through the preset relationship between the preset calibration point and the corresponding first pixel in each calibration image. The regional correction coefficient may include a first regional correction coefficient, a second regional correction coefficient, a third regional correction coefficient, a fourth regional correction coefficient, and a fifth regional correction coefficient.

[0077] When the regional deviation influencing factors include the regional lateral brightness deviation factor, the regional lateral brightness deviation factor and the first regional correction coefficient for the regional lateral brightness deviation factor are determined using the third horizontal coordinate of the first zone coordinate position, the fourth horizontal coordinate of the fourth coordinate position and the pixel value of the first pixel.

[0078] When the regional deviation influencing factors include the regional longitudinal brightness deviation factor, the regional longitudinal brightness deviation factor and the second regional correction coefficient for the regional longitudinal brightness deviation factor are determined using the third longitudinal coordinate of the third coordinate position, the fourth longitudinal coordinate of the fourth coordinate position and the pixel value of the first pixel.

[0079] In the case where the regional deviation influencing factors include regional pixel factors, the regional pixel factors and a third regional correction coefficient for the regional pixel factors are determined using the pixel value of the first pixel.

[0080] In the case where the regional deviation influencing factor includes a regional lateral deviation factor, the regional lateral deviation factor and a fourth regional correction coefficient for the regional lateral brightness deviation factor are determined using the third horizontal coordinate and the fourth horizontal coordinate.

[0081] In the case where the regional deviation influencing factor includes a regional longitudinal deviation factor, the regional longitudinal deviation factor and a fifth regional correction coefficient for the regional longitudinal brightness deviation factor are determined using the third longitudinal coordinate and the fourth longitudinal coordinate.

[0082] Furthermore, the calibration image and the sub-calibration image are used as target images, the first coordinate position and the third coordinate position are used as first target coordinate positions, the second coordinate position and the fourth coordinate position are used as second target coordinate positions, the deviation compensation equation and the regional deviation compensation equation are used as target compensation equations, the correction coefficient and the regional correction coefficient are used as target correction coefficients, and the correction coefficient group and the regional correction coefficient group are used as target correction coefficient groups.

[0083] Based on the first target coordinate position of each first pixel in each target image, the average brightness of each image, the second target coordinate position of a preset calibration point and a target compensation equation, each target correction coefficient is obtained by solving. The process of obtaining a target correction coefficient group for the image to be corrected can be to substitute the first target coordinate position, the average brightness of each image and the second target coordinate position into the target compensation equation for solving to obtain the target correction coefficient.

[0084] Among them, the target compensation equation may include: .

[0085] in, is the mean image brightness of the nth target image. The coordinate position of the first target in the nth target image is The pixel value of the mth first pixel, is the second target coordinate position of the preset calibration point, k1 is the first target correction coefficient in the target correction coefficient group. k2 is the second target correction coefficient in the target correction coefficient group. k3 is the third target correction coefficient in the target correction coefficient group. k4 is the fourth target correction coefficient in the target correction coefficient group. k5 is the fifth target correction coefficient in the target correction coefficient group. k6 is the sixth target correction coefficient in the target correction coefficient group.

[0086] is a first target deviation matrix, which is generated by a lateral brightness target deviation factor corresponding to a first target correction coefficient.

[0087] is a second target deviation matrix, which is generated by a longitudinal brightness target deviation factor corresponding to a second target correction coefficient.

[0088] is a third target deviation matrix, which is generated by pixel factors corresponding to the third correction coefficient.

[0089] is a fourth target deviation matrix, which is generated by a lateral deviation factor corresponding to a fourth correction coefficient.

[0090] is the fifth target deviation matrix, which is generated by the longitudinal target deviation factor corresponding to the fifth correction coefficient.

[0091] In this process, by performing data fitting on multiple calibration images, each accurate correction coefficient group can be obtained to improve the accuracy of image correction.

[0092] In a possible implementation, when the target image is a calibration image, the first target coordinate position is the first coordinate position, the second target coordinate position is the second coordinate position, the target compensation equation is the deviation compensation equation, the target correction coefficient is the correction coefficient, and the target correction coefficient group is the correction coefficient group.

[0093] Based on the first target coordinate position of each first pixel in each calibration image, the mean brightness of each image, the second coordinate position of the preset calibration point and the deviation compensation equation, each correction coefficient is solved. The process of obtaining the correction coefficient group for the image to be corrected can be to substitute the first coordinate position, the mean brightness of each image and the second coordinate position into the deviation compensation equation for solving it to obtain the correction coefficient.

[0094] The deviation compensation equation may include: .

[0095] in, is the mean image brightness of the nth calibration image. The first coordinate position in the nth calibration image is The pixel value of the mth first pixel, is the first coordinate position of the first pixel, is the second coordinate position of the preset calibration point, k1 is the first correction coefficient in the correction coefficient group, k2 is the second correction coefficient in the correction coefficient group, k3 is the third correction coefficient in the correction coefficient group, k4 is the fourth correction coefficient in the correction coefficient group, k5 is the fifth correction coefficient in the correction coefficient group, and k6 is the sixth correction coefficient in the correction coefficient group.

[0096] is the deviation matrix generated by the lateral brightness deviation factor.

[0097] is the deviation matrix generated by the vertical brightness deviation factor.

[0098] is the deviation matrix generated by pixel factors.

[0099] is the deviation matrix generated by the lateral deviation factor.

[0100] is the deviation matrix generated by the longitudinal deviation factors.

[0101] In another possible implementation, when the target image is a sub-calibration image, the first target coordinate position is the third coordinate position, the second target coordinate position is the fourth coordinate position, the target compensation equation is the regional deviation compensation equation, the target correction coefficient is the regional correction coefficient, and the target correction coefficient group is the regional correction coefficient group, based on the third target coordinate position of each first pixel in each sub-calibration image, the mean brightness of each image, the fourth coordinate position of the preset calibration point and the regional deviation compensation equation, each regional correction coefficient is solved to obtain the correction coefficient group for the image to be corrected. The process can be to substitute the third coordinate position, the mean brightness of each image and the fourth coordinate position into the regional deviation compensation equation for solving it to obtain the regional correction coefficient.

[0102] Among them, the regional deviation compensation equation may include: .

[0103] in, is the image brightness mean of the nth sub-calibration image. The third coordinate position in the nth sub-calibration image is The pixel value of the mth first pixel, is the fourth coordinate position of the preset calibration point, k1 is the first regional correction coefficient in the regional correction coefficient group. k2 is the second regional correction coefficient in the regional correction coefficient group. k3 is the third regional correction coefficient in the regional correction coefficient group. k4 is the fourth regional correction coefficient in the regional correction coefficient group. k5 is the fifth regional correction coefficient in the regional correction coefficient group. k6 is the sixth regional correction coefficient in the regional correction coefficient group.

[0104] is the deviation matrix generated by the regional lateral brightness deviation factor.

[0105] It is the deviation matrix generated by the regional longitudinal brightness deviation factor.

[0106] is the deviation matrix generated by the regional pixel factors.

[0107] is the deviation matrix generated by the regional lateral deviation factors.

[0108] is the deviation matrix generated by the regional longitudinal deviation factors.

[0109] In this process, by dividing multiple calibration images into multiple sub-calibration images according to a preset method, and performing data fitting on multiple sub-calibration images corresponding to the spatial position in each calibration image, an accurate correction coefficient group for each sub-area can be obtained, thereby improving the accuracy of image correction.

[0110] Furthermore, the target transverse brightness deviation factor may also include a target transverse brightness square deviation factor. The target longitudinal brightness deviation factor may also include a target longitudinal brightness square deviation factor. The target coefficient may also include a sixth target correction coefficient and a seventh target correction coefficient.

[0111] Specifically, the process of determining at least one target influencing factor of a preset calibration point and a corresponding first pixel through a preset relationship between the preset calibration point and the corresponding first pixel in each target image, and a target coefficient for the target influencing factor may also include the following contents.

[0112] When the target influencing factors include the target lateral brightness square deviation factor, the lateral brightness square deviation factor and the sixth target correction coefficient for the lateral brightness square deviation factor are determined using the first target lateral coordinate of the first target coordinate position, the second target lateral coordinate of the second target coordinate position and the pixel value of the first pixel.

[0113] When the target influencing factors include the target longitudinal brightness square deviation factor, the longitudinal brightness square deviation factor and the seventh target correction coefficient for the longitudinal brightness square deviation factor are determined using the first target longitudinal coordinate of the first target coordinate position, the second target longitudinal coordinate of the second target coordinate position and the pixel value of the first pixel.

[0114] In a possible implementation manner, the target image is a calibration image, the target influencing factor is a deviation influencing factor, the target coefficient is a correction coefficient, the first target coordinate position is a first coordinate position, and the second target coordinate position is a second coordinate position.

[0115] The horizontal brightness deviation factor may also include a horizontal brightness square deviation factor. The vertical brightness deviation factor may also include a vertical brightness square deviation factor. The coefficient may also include a sixth correction coefficient and a seventh correction coefficient.

[0116] Specifically, the process of determining at least one influencing factor between the preset calibration points and the corresponding first pixels and the coefficient of the influencing factor through the preset relationship between the preset calibration points and the corresponding first pixels in each image may also include the following contents.

[0117] When the influencing factors include the lateral brightness square deviation factor, the lateral brightness square deviation factor and the sixth correction coefficient for the lateral brightness square deviation factor are determined using the first horizontal coordinate of the first coordinate position, the second horizontal coordinate of the second coordinate position and the pixel value of the first pixel.

[0118] When the influencing factors include the longitudinal squared brightness deviation factor, the longitudinal squared brightness deviation factor and the seventh correction coefficient for the longitudinal squared brightness deviation factor are determined using the first longitudinal coordinate of the first coordinate position, the second longitudinal coordinate of the second coordinate position and the pixel value of the first pixel.

[0119] The specific process of determining at least one deviation influencing factor between the preset calibration points and the corresponding first pixels and the correction coefficient for the deviation influencing factor through the preset relationship between the preset calibration points and the corresponding first pixels in each calibration image also includes the following steps.

[0120] When the influencing factors include the lateral brightness square deviation factor, the lateral brightness square deviation factor and the sixth correction coefficient for the lateral brightness square deviation factor are determined using the first horizontal coordinate of the first coordinate position, the second horizontal coordinate of the second coordinate position and the pixel value of the first pixel.

[0121] When the influencing factors include the longitudinal squared brightness deviation factor, the longitudinal squared brightness deviation factor and the seventh correction coefficient for the longitudinal squared brightness deviation factor are determined using the first longitudinal coordinate of the first coordinate position, the second longitudinal coordinate of the second coordinate position and the pixel value of the first pixel.

[0122] At this time, the deviation compensation equation can include: .

[0123] Wherein, k7 is the seventh correction coefficient in the correction coefficient group, and k8 is the eighth correction coefficient in the correction coefficient group.

[0124] is the deviation matrix generated by the lateral brightness square deviation factor.

[0125] is the deviation matrix generated by the vertical brightness square deviation factor.

[0126] In another possible implementation, when the target image is a sub-calibration image, the target influencing factor is a regional deviation influencing factor, the target coefficient is a regional correction coefficient, and the first target coordinate position is the third coordinate position and the second target coordinate position is the fourth coordinate position, the target horizontal brightness deviation factor may also include a regional horizontal brightness square deviation factor. The target vertical brightness deviation factor may also include a regional vertical brightness square deviation factor. The target coefficient may also include a sixth regional correction coefficient and a seventh regional correction coefficient.

[0127] Specifically, the process of determining at least one regional influencing factor between the preset calibration points and the corresponding first pixels and the regional coefficient of the regional influencing factor through the preset relationship between the preset calibration points and the corresponding first pixels in each target image may also include the following contents.

[0128] When the regional influencing factors include the regional horizontal brightness square deviation factor, the regional horizontal brightness square deviation factor and the sixth regional correction coefficient for the regional horizontal brightness square deviation factor are determined using the third horizontal coordinate of the third coordinate position, the fourth horizontal coordinate of the fourth coordinate position and the pixel value of the first pixel.

[0129] When the regional influencing factors include the regional longitudinal square brightness deviation factor, the regional longitudinal square brightness deviation factor and the seventh regional correction coefficient for the regional longitudinal square brightness deviation factor are determined using the third longitudinal coordinate of the third coordinate position, the fourth longitudinal coordinate of the fourth coordinate position and the pixel value of the first pixel.

[0130] The specific process of determining at least one regional deviation influencing factor between the preset calibration points and the corresponding first pixels through the preset relationship between the preset calibration points in each calibration image and the corresponding first pixels, and the regional correction coefficient for the regional deviation influencing factor also includes the following steps.

[0131] When the regional influencing factors include the regional horizontal brightness square deviation factor, the regional horizontal brightness square deviation factor and the sixth regional correction coefficient for the regional horizontal brightness square deviation factor are determined using the third horizontal coordinate of the third coordinate position, the fourth horizontal coordinate of the fourth coordinate position and the pixel value of the first pixel.

[0132] When the regional influencing factors include the regional longitudinal square brightness deviation factor, the regional longitudinal square brightness deviation factor and the seventh regional correction coefficient for the regional longitudinal square brightness deviation factor are determined using the third longitudinal coordinate of the third coordinate position, the fourth longitudinal coordinate of the fourth coordinate position and the pixel value of the first pixel.

[0133] At this time, the deviation compensation equation can include:

[0134] Among them, k7 is the seventh region correction coefficient in the correction coefficient group, and k8 is the eighth region correction coefficient in the correction coefficient group.

[0135] is the regional deviation matrix generated by the regional lateral brightness square deviation factor.

[0136] is the regional deviation matrix generated by the regional longitudinal brightness square deviation factor.

[0137] S203, correcting each second pixel in the image to be corrected by using each correction coefficient in the correction coefficient group to obtain a corrected target image.

[0138] The image to be corrected is an image captured by the same lens as the calibration image.

[0139] A possible implementation manner is to obtain the preset calibration points corresponding to the respective correction coefficients and the respective deviation influencing factors to be corrected of the corresponding second pixels.

[0140] Among them, the deviation influencing factors to be corrected include one or more of the horizontal brightness deviation factor to be corrected, the vertical brightness deviation factor to be corrected, the pixel factor to be corrected, the horizontal deviation factor to be corrected, the vertical deviation factor to be corrected, and the deviation compensation factor to be corrected.

[0141] Through each correction coefficient and each deviation influencing factor to be corrected, a correction equation for compensating the second pixel is obtained. The fifth coordinate position of each second pixel in each image to be corrected in the correction coordinate system, the sixth coordinate position of the preset calibration point in the correction coordinate system and the correction equation are used for calculation to obtain the corrected pixel value of each second pixel in the calibration image.

[0142] The correction coordinate system may be obtained by converting the device coordinate system of the acquisition device that acquires the image to be corrected. The correction coordinate system may have the same spatial position correspondence relationship as the calibration coordinate system.

[0143] According to the obtained corrected pixel values, a corrected target image is generated, which can correct the uneven brightness and color of the image caused by the optical design problems of the current lens, make the transition of the corrected image more natural, and use different brightness means to make the correction coefficient suitable for the correction of images with different brightness.

[0144] Another possible implementation manner is to divide the image to be corrected into a plurality of sub-images to be corrected according to a preset manner.

[0145] For each sub-image to be corrected, the deviation influencing factors of each area to be corrected between the preset calibration points corresponding to each area correction coefficient and the corresponding second pixel are obtained.

[0146] Among them, the factors affecting the deviation of the area to be corrected include one or more of the lateral brightness deviation factor of the area to be corrected, the longitudinal brightness deviation factor of the area to be corrected, the pixel factor of the area to be corrected, the lateral deviation factor of the area to be corrected, the longitudinal deviation factor of the area to be corrected, and the deviation compensation factor of the area to be corrected.

[0147] A regional correction equation for compensating the second pixel is obtained through each regional correction coefficient and each deviation influencing factor of the region to be corrected.

[0148] The regional correction pixel value of each second pixel in each sub-image to be corrected is obtained by using the seventh coordinate position of each second pixel in the sub-correction coordinate system, the eighth coordinate position of the preset calibration point in the sub-correction coordinate system and the regional correction equation.

[0149] The sub-correction coordinate system may be obtained by converting the device coordinate system of the acquisition device that acquires the image to be corrected. The sub-image to be corrected in the image to be corrected may be in a one-to-one correspondence with the multiple sub-calibration images in the calibration image. The sub-correction coordinate system of the sub-image to be corrected may have the same spatial position correspondence with the sub-calibration coordinate system of the sub-calibration image that is in a one-to-one correspondence with the sub-image to be corrected.

[0150] A plurality of corrected target sub-images are generated according to the regional corrected pixel value of each second pixel, and a corrected target image is composed of the plurality of target sub-images in a preset manner.

[0151] In this process, the image to be corrected is divided into sub-images to be corrected, and then each second pixel in the sub-image to be corrected is corrected using each regional correction coefficient in the correction regional coefficient group corresponding to each sub-image to be corrected, so as to obtain a corrected sub-image, and then the sub-images are combined into a target image. This can correct the uneven brightness and color of the image caused by the optical design problem of the current lens, make the transition of the corrected image more natural, and use different brightness means to make the correction coefficient suitable for the correction of images with different brightness.

[0152] Exemplarily, the image to be corrected is divided into 16*16 regions p according to a preset method, and the region p includes region 0, region 1, ..., region 255. Obtain the pixel value of region p , and the correction coefficient group corresponding to the region p, the region p is corrected. Based on the correction coefficient group, the second pixel with the coordinate position (i, j) in the region p and the coordinate position of the preset calibration point in the corrected image, the corrected pixel value of each second pixel in the sub-image to be corrected is determined. Finally, according to the corrected pixel value of each second pixel, a plurality of corrected sub-images are determined, and the corrected target image is composed of the plurality of corrected sub-images in a preset manner.

[0153] Specifically, the image to be corrected and the sub-image to be corrected can be used as target images, the fifth coordinate position and the seventh coordinate position can be used as the third target coordinate position, the sixth coordinate position and the eighth coordinate position can be used as the fourth target coordinate position, the deviation influencing factors to be corrected and the regional deviation influencing factors to be corrected can be used as target influencing factors to be corrected, the correction coefficient and the regional correction coefficient can be used as target correction coefficients, and the correction equation and the regional correction equation can be used as target correction equations.

[0154] A target correction equation for compensating the second pixel is obtained by using each of the target correction coefficients and each of the target influencing factors to be corrected, including: Using each of the target correction coefficients and each of the target influencing factors to be corrected, the following target correction equation is constructed: .

[0155] in, a is the target corrected pixel value of the a-th second pixel in the target image, The third target coordinate position in the target image is The pixel value of the a-th second pixel, is the fourth target coordinate position of the preset calibration point, k1 is the first target correction coefficient in the target correction coefficient group. k2 is the second target correction coefficient in the target correction coefficient group. k3 is the third target correction coefficient in the target correction coefficient group. k4 is the fourth target correction coefficient in the target correction coefficient group. k5 is the fifth target correction coefficient in the target correction coefficient group. k6 is the sixth target correction coefficient in the target correction coefficient group.

[0156] In a possible implementation, when the target image is the image to be corrected, the third target coordinate position is the fifth coordinate position, the fourth target coordinate position is the sixth coordinate position, the target influencing factor to be corrected is the deviation influencing factor to be corrected, the target correction coefficient is the correction coefficient, and the target correction equation is the correction equation.

[0157] Through each correction coefficient and each deviation influencing factor to be corrected, a correction equation for compensating the second pixel is obtained, including: Using each correction coefficient and each deviation influencing factor to be corrected, the following correction equation is constructed: .

[0158] in, a is the corrected pixel value of the ath second pixel in the image to be corrected, The coordinate position of the fifth target in the image to be corrected is The pixel value of the a-th second pixel, is the sixth coordinate position of the preset calibration point, k1 is the first correction coefficient in the correction coefficient group, k2 is the second correction coefficient in the correction coefficient group, k3 is the third correction coefficient in the correction coefficient group, k4 is the fourth correction coefficient in the correction coefficient group, k5 is the fifth correction coefficient in the correction coefficient group, and k6 is the sixth correction coefficient in the correction coefficient group.

[0159] It should be noted that when the correction coordinate system has the same spatial position correspondence relationship as the calibration coordinate system, the correction coefficient in the equation may correspond to the correction coefficient generated when the target image is the calibration image in the above step S202.

[0160] Another possible implementation method is that when the target image is a sub-image to be corrected, the third target coordinate position is the seventh coordinate position, the fourth target coordinate position is the eighth coordinate position, the target influencing factor to be corrected is the influencing factor of the regional deviation to be corrected, and the target correction coefficient is the regional correction coefficient.

[0161] The regional correction equation for compensating the second pixel is obtained by using the correction coefficients of each region and the influencing factors of the deviation to be corrected in each region, including: Using the correction coefficients of each region and the influencing factors of the deviation to be corrected in each region, the following regional correction equation is constructed: .

[0162] in, a is the regional correction pixel value of the ath second pixel in the sub-image to be corrected, The sixth target coordinate position in the sub-image to be corrected is The pixel value of the a-th second pixel, is the eighth coordinate position of the preset calibration point, k1 is the first regional correction coefficient in the regional correction coefficient group. k2 is the second regional correction coefficient in the regional correction coefficient group. k3 is the third regional correction coefficient in the regional correction coefficient group. k4 is the fourth regional correction coefficient in the regional correction coefficient group. k5 is the fifth regional correction coefficient in the regional correction coefficient group. k6 is the sixth regional correction coefficient in the regional correction coefficient group.

[0163] Furthermore, the deviation influencing factors to be corrected may also include a factor for correcting the square deviation of the horizontal brightness and a factor for correcting the square deviation of the vertical brightness.

[0164] Specifically, obtaining a target correction equation for compensating the second pixel through each of the target correction coefficients and each of the target influencing factors to be corrected may further include: Using each of the target correction coefficients and each of the target influencing factors to be corrected, the following target correction equation is constructed: .

[0165] Wherein, k7 is the seventh target correction coefficient in the target correction coefficient group, and k8 is the eighth target correction coefficient in the target correction coefficient group.

[0166] In a possible implementation, when the target image is the image to be corrected, the third target coordinate position is the fifth coordinate position, the fourth target coordinate position is the sixth coordinate position, the target influencing factor to be corrected is the deviation influencing factor to be corrected, the target correction coefficient is the correction coefficient, and the target correction equation is the correction equation.

[0167] Through each correction coefficient and each deviation influencing factor to be corrected, a correction equation for compensating the second pixel is obtained, including: Using each correction coefficient and each deviation influencing factor to be corrected, the following correction equation is constructed: .

[0168] Wherein, k7 is the seventh correction coefficient in the correction coefficient group, and k8 is the eighth correction coefficient in the correction coefficient group.

[0169] Another possible implementation method is that when the target image is a sub-image to be corrected, the third target coordinate position is the seventh coordinate position, the fourth target coordinate position is the eighth coordinate position, the target influencing factor to be corrected is the influencing factor of the regional deviation to be corrected, the target correction coefficient is the regional correction coefficient, and the target correction equation is the regional correction equation.

[0170] Through each regional correction coefficient and each deviation influencing factor of the region to be corrected, a regional correction equation for compensating the second pixel is obtained, including: Using the correction coefficients of each region and the influencing factors of the deviation of each region to be corrected, the following regional correction equation is constructed: .

[0171] Wherein, k7 is the seventh regional correction coefficient in the regional correction coefficient group, and k8 is the eighth regional correction coefficient in the regional correction coefficient group.

[0172] It should be noted that when the sub-correction coordinate system of the sub-image to be corrected has the same spatial position correspondence as the sub-calibration coordinate system of the sub-calibration image that is in a one-to-one correspondence with the sub-image to be corrected, the regional correction coefficient in the equation may correspond to the regional correction coefficient generated when the target image is the sub-calibration image in the above step S202.

[0173] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the working principle of the device. It is understandable that in order to realize the above functions, the image processing device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0174] The embodiment of the present application can divide the functional modules of the image processing device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or software functional module.

[0175] It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. Figure 3 FIG. 2 shows a possible schematic diagram of the composition of the image processing device based on lens shading correction involved in the above and embodiments. Figure 3 As shown, the image processing device 300 based on lens shading correction may include: an acquisition module 301 , a determination module 302 , and a correction module 303 .

[0176] The acquisition module 301 is used to support the image processing device 300 based on lens shading correction to execute Figure 2 S201 in the image processing method based on lens shading correction shown.

[0177] The determining module 302 is used to support the image processing device 300 based on lens shading correction to perform Figure 2 S202 in the image processing method based on lens shading correction shown.

[0178] Correction module 303, used to support the image processing device 300 to perform based on lens shading correction Figure 2 S203 in the image processing method based on lens shading correction shown.

[0179] In a possible implementation, the above device can also be used to determine, for each calibration image, the first coordinate position of the first pixel in the calibration image in the calibration coordinate system and the second coordinate position of the preset calibration point in the calibration coordinate system. The calibration coordinate system is obtained by converting the device coordinate system of the acquisition device that acquires the image to be corrected. According to the preset relationship between the preset calibration point and the corresponding first pixel in each calibration image, at least one deviation influencing factor between the preset calibration point and the corresponding first pixel and the correction coefficient for the deviation influencing factor are determined. The deviation influencing factor includes one or more of the lateral brightness deviation factor, the longitudinal brightness deviation factor, the pixel factor, the lateral deviation factor, the longitudinal deviation factor, and the deviation compensation factor. Using at least one deviation influencing factor and the correction coefficient for each deviation influencing factor, a deviation compensation equation for the pixel for the image is constructed. Based on the first coordinate position of each first pixel in each calibration image, the mean brightness of each image, the second coordinate position of the preset calibration point and the deviation compensation equation, each correction coefficient is solved to obtain a correction coefficient group for the image to be corrected, and the correction coefficient group includes a plurality of correction coefficients solved In a possible implementation, the above device can also be used to divide the calibration image into multiple sub-calibration images according to a preset method for each calibration image. Among them, the multiple sub-calibration images of the first calibration image and the multiple sub-calibration images of the second calibration image are in a one-to-one correspondence. The first calibration image and the second calibration image are any two images of the multiple calibration images. According to the correspondence between the sub-calibration images, the obtained multiple sub-calibration images are aggregated to obtain multiple image sets, and the image set includes multiple sub-calibration images, and the multiple sub-calibration images in the image set are images with a corresponding relationship. For each image set, based on the mean brightness of each image, each first pixel of each sub-calibration image in the image set, and the preset relationship between the preset calibration point of each calibration image and the corresponding first pixel, the regional correction coefficient group corresponding to each image set is determined. According to each regional correction coefficient group, the correction coefficient group for the image to be corrected is determined. The correction coefficient group of the image to be corrected includes each regional correction coefficient group and the regional relationship corresponding to each regional correction coefficient group.

[0180] In a possible implementation, the above-mentioned device can be used to determine, for each sub-calibration image in each image set, the third coordinate position of the first pixel in the sub-calibration image in the sub-calibration coordinate system and the fourth coordinate position of the preset calibration point in the sub-calibration coordinate system. The sub-calibration coordinate system is obtained by converting the device coordinate system of the acquisition device that acquires the image to be corrected. Through the preset relationship between the preset calibration point and the corresponding first pixel in each calibration image, at least one regional deviation influencing factor between the preset calibration point and the corresponding first pixel, and the regional correction coefficient for the regional deviation influencing factor are determined. The regional deviation influencing factor includes one or more of a horizontal brightness deviation factor, a vertical brightness deviation factor, a regional pixel factor, a horizontal deviation factor, a vertical deviation factor, and a deviation compensation factor. Using at least one regional deviation influencing factor and the regional correction coefficient for each regional deviation influencing factor, a regional deviation compensation equation for the first pixel for the image is constructed. Based on the third coordinate position of each first pixel in each sub-calibration image, the mean brightness of each image, the fourth coordinate position of the preset calibration point and the regional deviation compensation equation, each regional correction coefficient is solved to obtain a regional correction coefficient group corresponding to each image set, and the regional correction coefficient group includes multiple solved regional correction coefficients.

[0181] In a possible implementation, the deviation influencing factor and the regional deviation influencing factor are used as target influencing factors, the regional correction coefficient and the correction coefficient are used as target coefficients, the first coordinate position and the third coordinate position are used as the first target coordinate position, and the second coordinate position and the fourth coordinate position are used as the second target coordinate position. The above-mentioned device can determine at least one target influencing factor of the preset calibration point and the corresponding first pixel, and the target coefficient for the target influencing factor through the preset relationship between the preset calibration point and the corresponding first pixel in each calibration image, including: when the target influencing factor includes a horizontal brightness deviation factor, the horizontal brightness deviation factor and the first target correction coefficient for the horizontal brightness deviation factor are determined by using the first target horizontal coordinate of the first target coordinate position, the second target horizontal coordinate of the second target coordinate position and the pixel value of the first pixel. When the target influencing factor includes a longitudinal brightness deviation factor, the longitudinal brightness deviation factor and the second target correction coefficient for the longitudinal brightness deviation factor are determined by using the first target vertical coordinate of the first target coordinate position, the second target vertical coordinate of the second target coordinate position and the pixel value of the first pixel. When the target influencing factor includes a pixel factor, the pixel factor and the third target correction coefficient for the pixel factor are determined by using the pixel value of the first pixel. In the case where the target influencing factor includes a lateral deviation factor, the lateral deviation factor and the fourth target correction coefficient for the lateral brightness deviation factor are determined using the first target horizontal coordinate and the second target horizontal coordinate. In the case where the target influencing factor includes a longitudinal deviation factor, the longitudinal deviation factor and the fifth target correction coefficient for the longitudinal brightness deviation factor are determined using the first vertical coordinate and the second vertical coordinate.

[0182] In a possible implementation, the above device can also use the first coordinate position and the third coordinate position as the first target coordinate position, the second coordinate position and the fourth coordinate position as the second target coordinate position, the deviation compensation equation and the regional deviation compensation equation as the target compensation equation, the correction coefficient and the regional correction coefficient as the target correction coefficient, and the correction coefficient group and the regional correction coefficient group as the target correction coefficient group. Based on the first target coordinate position of each first pixel in each calibration image, the average brightness of each image, the second target coordinate position of the preset calibration point and the target compensation equation, each target correction coefficient is solved to obtain a target correction coefficient group for the image to be corrected, including: substituting the first target coordinate position, the average brightness of each image and the second target coordinate position into the target compensation equation for solving to obtain the target correction coefficient.

[0183] The target compensation equation includes: .

[0184] in, is the mean image brightness of the nth target image. The coordinate position of the first target in the nth target image is The pixel value of the mth first pixel, is the second target coordinate position of the preset calibration point. k1 is the first target correction coefficient in the target correction coefficient group. k2 is the second target correction coefficient in the target correction coefficient group. k3 is the third target correction coefficient in the target correction coefficient group. k4 is the fourth target correction coefficient in the target correction coefficient group. k5 is the fifth target correction coefficient in the target correction coefficient group. k6 is the sixth target correction coefficient in the target correction coefficient group.

[0185] In a possible implementation, the above-mentioned device can also obtain the preset calibration points corresponding to each correction coefficient and each deviation influencing factor to be corrected of the corresponding second pixel. The deviation influencing factors to be corrected include one or more of the lateral brightness deviation factor to be corrected, the longitudinal brightness deviation factor to be corrected, the pixel factor to be corrected, the lateral deviation factor to be corrected, the longitudinal deviation factor to be corrected, and the deviation compensation factor to be corrected. Through each correction coefficient and each deviation influencing factor to be corrected, a correction equation for compensating the second pixel is obtained. The fifth coordinate position of each second pixel in each image to be corrected in the correction coordinate system, the sixth coordinate position of the preset calibration point in the correction coordinate system and the correction equation are used for calculation to obtain the corrected pixel value of each second pixel in the calibration image. According to the obtained corrected pixel values, a corrected target image is generated.

[0186] In a possible implementation, the above-mentioned device can divide the image to be corrected into multiple sub-images to be corrected in a preset manner. For each sub-image to be corrected, obtain the regional deviation influencing factors of the preset calibration points corresponding to each regional correction coefficient and the corresponding second pixel. The regional deviation influencing factors to be corrected include one or more of the lateral brightness deviation factor of the region to be corrected, the longitudinal brightness deviation factor of the region to be corrected, the pixel factor of the region to be corrected, the lateral deviation factor of the region to be corrected, the longitudinal deviation factor of the region to be corrected, and the regional deviation compensation factor to be corrected. Through each regional correction coefficient and each regional deviation influencing factor to be corrected, a regional correction equation for compensation of the second pixel is obtained. The seventh coordinate position of each second pixel in each sub-image to be corrected in the sub-correction coordinate system, the eighth coordinate position of the preset calibration point in the sub-correction coordinate system and the regional correction equation are used for calculation to obtain the regional correction pixel value of each second pixel in the sub-image to be corrected. According to the regional correction pixel value of each second pixel, a plurality of corrected target sub-images are generated, and the corrected target image is composed of the plurality of target sub-images in a preset manner.

[0187] A possible implementation method is to use the image to be corrected and the sub-image to be corrected as the target image, the fifth coordinate position and the seventh coordinate position as the third target coordinate position, the sixth coordinate position and the eighth coordinate position as the fourth target coordinate position, the deviation influencing factor to be corrected and the regional deviation influencing factor to be corrected as the target influencing factor to be corrected, the correction coefficient and the regional correction coefficient as the target correction coefficient, and the correction equation and the regional correction equation as the target correction equation. The above-mentioned device can obtain the target correction equation for compensation for the second pixel through each target correction coefficient and each target influencing factor to be corrected, including: using each target correction coefficient and each target influencing factor to be corrected to construct the following target correction equation: .

[0188] in, a is the target corrected pixel value of the a-th second pixel in the target image, The third target coordinate position in the target image is The pixel value of the a-th second pixel, is the fourth target coordinate position of the preset calibration point, k1 is the first target correction coefficient in the target correction coefficient group. k2 is the second target correction coefficient in the target correction coefficient group. k3 is the third target correction coefficient in the target correction coefficient group. k4 is the fourth target correction coefficient in the target correction coefficient group. k5 is the fifth target correction coefficient in the target correction coefficient group. k6 is the sixth target correction coefficient in the target correction coefficient group.

[0189] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0190] The image processing device 300 based on lens shading correction provided in the embodiment of the present application is used to perform the above Figure 2 The image processing method based on lens shading correction shown can therefore achieve the same effect as the image processing method based on lens shading correction described above.

[0191] The present application also provides an image processing device, which can be the image processing device described in the above embodiment. Figure 1 The image processing device 100 shown in the figure can execute the image processing method based on lens shading correction and related steps in the above method embodiment.

[0192] An embodiment of the present application also provides a computer-readable storage medium having instructions stored thereon, which, when executed, execute the image processing method based on lens shading correction and related steps in the above method embodiment.

[0193] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the image processing method based on lens shading correction and related steps in the above method embodiment.

[0194] In some embodiments, the methods described herein may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or encoded on other non-transitory media or articles of manufacture.

[0195] The embodiment of the present application also provides an image processing system 400 based on lens shading correction. Figure 4 As shown, the image processing system 400 based on lens shading correction includes at least one second processor 401 and at least one interface circuit 402 .

[0196] As an example, when the image processing system 400 based on lens shading correction includes a processor and an interface circuit, the processor may be Figure 4 The second processor 401 shown in the solid line frame (or the second processor 401 shown in the dotted line frame) may be Figure 4 The interface circuit 402 shown in the solid line frame (or the interface circuit 402 shown in the dotted line frame) is shown in the solid line frame. When the image processing system 400 based on lens shading correction includes two processors and two interface circuits, the two processors include Figure 4 The second processor 401 shown in the solid line frame and the second processor 401 shown in the dotted line frame, the two interface circuits include Figure 4 The interface circuit 402 shown in the solid line frame and the interface circuit 402 shown in the dotted line frame are not limited to this.

[0197] The second processor 401 and the interface circuit 402 can be interconnected via a line. For example, the interface circuit 402 can be used to receive a signal. In another example, the interface circuit 402 can be used to send a signal to another device (such as the second processor 401). For example, the interface circuit 402 can read a computer instruction stored in a memory and send the computer instruction to the second processor 401. The second processor 401 executes the instruction and implements the various steps in the above embodiments in combination with the input and output devices, such as implementing Figure 1 or Figure 2 Of course, the image processing system based on lens shading correction may also include other discrete devices, which are not specifically limited in the embodiments of the present application.

[0198] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0199] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0200] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0202] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0203] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. An image processing method based on lens shading correction, characterized in that: The method comprises: Acquire a plurality of calibration images corresponding to the image to be corrected and an image brightness mean value of each calibration image; different calibration images have different image brightness; Determining a correction coefficient group for the image to be corrected based on each first pixel in each of the calibration images, each image brightness mean value, and a preset relationship between a preset calibration point in each of the calibration images and the corresponding first pixel; Each second pixel in the image to be corrected is corrected by using each correction coefficient in the correction coefficient group to obtain a corrected target image.

2. The method according to claim 1, characterized in that: The step of determining a correction coefficient group for the image to be corrected based on each first pixel in each calibration image, each image brightness mean value, and a preset relationship between a preset calibration point in each calibration image and a corresponding first pixel comprises: For each calibration image, determining a first coordinate position of a first pixel in the calibration image in a calibration coordinate system and a second coordinate position of the preset calibration point in the calibration coordinate system; the calibration coordinate system is obtained by converting a device coordinate system of a capture device that captures the image to be corrected; Determine at least one deviation influencing factor between the preset calibration points and the corresponding first pixels and a correction coefficient for the deviation influencing factor through a preset relationship between the preset calibration points in each of the calibration images and the corresponding first pixels; the deviation influencing factor includes one or more of a horizontal brightness deviation factor, a vertical brightness deviation factor, a pixel factor, a horizontal deviation factor, a vertical deviation factor, and a deviation compensation factor; Using the at least one deviation influencing factor and the correction coefficient for each of the deviation influencing factors, constructing a deviation compensation equation for the pixel with respect to the image; Based on the first coordinate position of each first pixel in each of the calibration images, the mean brightness of each of the images, the second coordinate position of the preset calibration point and the deviation compensation equation, each of the correction coefficients is solved to obtain a correction coefficient group for the image to be corrected, and the correction coefficient group includes the solved multiple correction coefficients.

3. The method according to claim 1, characterized in that The step of determining a correction coefficient group for the image to be corrected based on each first pixel in each calibration image, each image brightness mean value, and a preset relationship between a preset calibration point in each calibration image and a corresponding first pixel comprises: For each of the calibration images, the calibration image is divided into a plurality of sub-calibration images according to a preset method; wherein the plurality of sub-calibration images of the first calibration image and the plurality of sub-calibration images of the second calibration image are in a one-to-one correspondence; the first calibration image and the second calibration image are any two images of the plurality of calibration images; aggregating the obtained multiple sub-calibration images according to the correspondence between the sub-calibration images to obtain multiple image sets, wherein the image sets include the multiple sub-calibration images, and the multiple sub-calibration images in the image sets are images with a corresponding relationship; For each of the image sets, based on the brightness mean of each of the images, each first pixel of each of the sub-calibrated images in the image set, and a preset relationship between a preset calibration point of each of the calibration images and the corresponding first pixel, determine a regional correction coefficient group corresponding to each of the image sets; According to each of the regional correction coefficient groups, a correction coefficient group for the image to be corrected is determined; the correction coefficient group for the image to be corrected includes each of the regional correction coefficient groups and a regional relationship corresponding to each of the regional correction coefficient groups.

4. The method according to claim 3, characterized in that The determining of the regional correction coefficient group corresponding to each of the image sets based on the brightness mean of each of the images, each first pixel of each of the calibration images, and a preset relationship between a preset calibration point in each of the calibration images and the corresponding first pixel comprises: For each sub-calibration image in each of the image sets, determining a third coordinate position of a first pixel in the sub-calibration image in a sub-calibration coordinate system and a fourth coordinate position of the preset calibration point in the sub-calibration coordinate system; the sub-calibration coordinate system is obtained by converting a device coordinate system of a capture device that captures the image to be corrected; Determine at least one regional deviation influencing factor between the preset calibration points and the corresponding first pixels in each of the calibration images, and a regional correction coefficient for the regional deviation influencing factor; the regional deviation influencing factor includes one or more of a horizontal brightness deviation factor, a vertical brightness deviation factor, a regional pixel factor, a horizontal deviation factor, a vertical deviation factor, and a deviation compensation factor; Using the at least one regional deviation influencing factor and the regional correction coefficient for each of the regional deviation influencing factors, constructing a regional deviation compensation equation for the first pixel with respect to the image; Based on the third coordinate position of each first pixel in each of the sub-calibration images, the mean brightness of each of the images, the fourth coordinate position of the preset calibration point and the regional deviation compensation equation, each of the regional correction coefficients is solved to obtain a regional correction coefficient group corresponding to each of the image sets, and the regional correction coefficient group includes the solved multiple regional correction coefficients.

5. The method according to claim 2 or 4, characterized in that: The calibration image and the sub-calibration image are used as target images, the deviation influencing factor and the regional deviation influencing factor are used as target influencing factors, the regional correction coefficient and the correction coefficient are used as target coefficients, the first coordinate position and the third coordinate position are used as first target coordinate positions, and the second coordinate position and the fourth coordinate position are used as second target coordinate positions; Determining at least one target influencing factor between the preset calibration points and the corresponding first pixels and a target coefficient for the target influencing factor through a preset relationship between the preset calibration points and the corresponding first pixels in each of the target images, including: In the case where the target influencing factor includes a target lateral brightness deviation factor, determining the target lateral brightness deviation factor and a first target correction coefficient for the target lateral brightness deviation factor by using a first target lateral coordinate of the first target coordinate position, a second target lateral coordinate of the second target coordinate position, and a pixel value of the first pixel; In the case where the target influencing factor includes a target longitudinal brightness deviation factor, determining the target longitudinal brightness deviation factor and a second target correction coefficient for the target longitudinal brightness deviation factor by using a first target longitudinal coordinate of the first target coordinate position, a second target longitudinal coordinate of the second target coordinate position, and a pixel value of the first pixel; In a case where the target influencing factor includes a target pixel factor, determining the target pixel factor and a third target correction coefficient for the target pixel factor using the pixel value of the first pixel; In the case where the target influencing factor includes a target lateral deviation factor, using the first target horizontal coordinate and the second target horizontal coordinate to determine the target lateral deviation factor and a fourth target correction coefficient for the target lateral brightness deviation factor; In the case where the target influencing factor includes a target longitudinal deviation factor, the target longitudinal deviation factor and a fifth target correction coefficient for the target longitudinal brightness deviation factor are determined using the first target longitudinal coordinate and the second target longitudinal coordinate.

6. The method according to claim 2 or 4, characterized in that: The calibration image and the sub-calibration image are used as target images, the first coordinate position and the third coordinate position are used as first target coordinate positions, the second coordinate position and the fourth coordinate position are used as second target coordinate positions, the deviation compensation equation and the regional deviation compensation equation are used as target compensation equations, the correction coefficient and the regional correction coefficient are used as target correction coefficients, and the correction coefficient group and the regional correction coefficient group are used as target correction coefficient groups; Based on the first target coordinate position of each first pixel in each of the target images, the average brightness of each of the images, the second target coordinate position of the preset calibration point and the target compensation equation, each of the target correction coefficients is solved to obtain a target correction coefficient group for the image to be corrected, including: Substituting the first target coordinate position, the mean brightness values ​​of each of the images and the second target coordinate position into the target compensation equation for solving, to obtain the target correction coefficient; The target compensation equation includes: ; Among them, the is the image brightness mean of the nth target image; The first target coordinate position in the nth target image is The pixel value of the mth first pixel, is the second target coordinate position of the preset calibration point; k1 is the first target correction coefficient in the target correction coefficient group; k2 is the second target correction coefficient in the target correction coefficient group; k3 is the third target correction coefficient in the target correction coefficient group; k4 is the fourth target correction coefficient in the target correction coefficient group; k5 is the fifth target correction coefficient in the target correction coefficient group; k6 is the sixth target correction coefficient in the target correction coefficient group.

7. The method according to claim 1, characterized in that The method of correcting each second pixel in the image to be corrected by using each correction coefficient in the correction coefficient group to obtain a corrected target image comprises: Obtaining each deviation influencing factor to be corrected of the preset calibration point corresponding to each correction coefficient and the corresponding second pixel; the deviation influencing factor to be corrected includes one or more of a horizontal brightness deviation factor to be corrected, a vertical brightness deviation factor to be corrected, a pixel factor to be corrected, a horizontal deviation factor to be corrected, a vertical deviation factor to be corrected, and a deviation compensation factor to be corrected; Obtaining a correction equation for compensating the second pixel through each correction coefficient and each of the deviation influencing factors to be corrected; Using the fifth coordinate position of each second pixel in each of the images to be corrected in the correction coordinate system, the sixth coordinate position of the preset calibration point in the correction coordinate system and the correction equation to calculate, to obtain a corrected pixel value of each second pixel in the calibration image; The corrected target image is generated according to the obtained corrected pixel values.

8. The method according to claim 1, characterized in that The method of correcting each second pixel in the image to be corrected by using each correction coefficient in the correction coefficient group to obtain a corrected target image comprises: Dividing the image to be corrected into a plurality of sub-images to be corrected according to a preset method; For each of the sub-images to be corrected, obtaining the deviation influencing factors of the area to be corrected between the preset calibration points corresponding to the correction coefficients of the respective areas and the corresponding second pixels; the deviation influencing factors of the area to be corrected include one or more of the lateral brightness deviation factor of the area to be corrected, the longitudinal brightness deviation factor of the area to be corrected, the pixel factor of the area to be corrected, the lateral deviation factor of the area to be corrected, the longitudinal deviation factor of the area to be corrected, and the deviation compensation factor of the area to be corrected; Obtaining a regional correction equation for compensating the second pixel through each regional correction coefficient and each of the deviation influencing factors of the to-be-corrected region; Calculate using the seventh coordinate position of each second pixel in each of the sub-images to be corrected in the sub-correction coordinate system, the eighth coordinate position of the preset calibration point in the sub-correction coordinate system, and the regional correction equation to obtain a regional correction pixel value of each second pixel in the sub-images to be corrected; A plurality of corrected target sub-images are generated according to the regional corrected pixel value of each second pixel, and the corrected target image is composed of the plurality of target sub-images in accordance with the preset manner.

9. The method according to claim 7 or 8, characterized in that: The image to be corrected and the sub-image to be corrected are taken as target images, the fifth coordinate position and the seventh coordinate position are taken as third target coordinate positions, the sixth coordinate position and the eighth coordinate position are taken as fourth target coordinate positions, the deviation influencing factors to be corrected and the regional deviation influencing factors to be corrected are taken as target influencing factors to be corrected, the correction coefficient and the regional correction coefficient are taken as target correction coefficients, and the correction equation and the regional correction equation are taken as target correction equations; A target correction equation for compensating the second pixel is obtained by using each of the target correction coefficients and each of the target influencing factors to be corrected, including: Using each of the target correction coefficients and each of the target influencing factors to be corrected, the following target correction equation is constructed: ; Among them, the a is the target corrected pixel value of the a-th second pixel in the target image, The third target coordinate position in the target image is The pixel value of the a-th second pixel, is the fourth target coordinate position of the preset calibration point, k1 is the first target correction coefficient in the target correction coefficient group; k2 is the second target correction coefficient in the target correction coefficient group; k3 is the third target correction coefficient in the target correction coefficient group; k4 is the fourth target correction coefficient in the target correction coefficient group; k5 is the fifth target correction coefficient in the target correction coefficient group; k6 is the sixth target correction coefficient in the target correction coefficient group.

10. An image processing device based on lens shading correction, characterized in that: The device comprises: An acquisition module, used for obtaining a plurality of calibration images corresponding to the image to be corrected and an image brightness mean value of each calibration image; different calibration images have different image brightness; A determination module, configured to determine a correction coefficient group for the image to be corrected based on each first pixel in each calibration image, each image brightness mean value, and a preset relationship between a preset calibration point in each calibration image and the corresponding first pixel; The correction module is used to correct each second pixel in the image to be corrected by using each correction coefficient in the correction coefficient group to obtain a corrected target image.

11. An image processing device, characterized in that: The image processing device includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the steps of the image processing method based on lens shading correction according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the image processing method based on lens shading correction described in any one of claims 1 to 9 are implemented.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program product / instruction is executed by a processor, the steps of the image processing method based on lens shading correction described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Method for estimating chromaticity, electronic equipment and computer readable storage medium

    CN116152361A

  • Lens shadow correction method and device for endoscope imaging and endoscope system

    CN116681624A

  • Camera module calibration method and system and camera module

    CN118052884A

  • Calibration method for 3D structured light system, and electronic device and storage medium

    WO2022052313A1