Image correction methods and systems applicable to zoom cameras
By using distortion correction and adaptive color correction methods for zoom cameras, the problems of distortion and color distortion in zoom cameras have been solved, achieving more accurate image correction effects, especially in outdoor scenes, improving the color naturalness and detail fidelity of images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-10
AI Technical Summary
Zoom cameras suffer from distortion and color distortion during shooting due to limitations in their optical systems, especially in wide-angle and telephoto lenses where image distortion and color correction are inaccurate, and white balance color cast issues caused by large areas of monochromatic color in outdoor scenes.
The original image is obtained through distortion correction processing. The saturation and gradient features of each pixel are analyzed. The weighted average is combined with local feature indicators to obtain adaptive gain for color correction, including distortion correction, saturation weight, edge determination coefficient and confidence analysis.
It improves the naturalness and realism of image colors, avoids color distortion caused by lighting and complex environments, ensures the accuracy of image details and edge processing, and enhances the precision of color correction.
Smart Images

Figure CN121213435B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to an image correction method and system suitable for a zoom camera. BACKGROUND
[0002] With the development of social economy, zoom cameras have become a common tool for people to record daily life. Whether it is a multi-camera module behind a mobile phone or a portable card camera, users can seamlessly switch between wide-angle and long-focus views without physical movement, quickly responding to diverse shooting scenes from vast landscapes to distant close-ups. Compared with fixed-focus lenses, zoom lenses greatly simplify the operation process, especially suitable for travel, family gatherings and other non-professional daily records. In daily shooting, zoom cameras often need to be corrected for distortion and color due to physical limitations of the optical system. Specifically, when shooting buildings or groups at the wide-angle end, the straight lines at the edge of the image will be barrel-shaped distorted, causing the object to curve outward; while at the long-focus end, pincushion distortion may occur, causing straight lines to sag inward, affecting geometric accuracy. At the same time, as the focal length changes, the chromatic aberration problem of the lens will cause high-contrast edges to appear purple or green pseudo-color, and the focusing difference of different wavelengths of light will cause color drift and saturation loss. Therefore, after using a zoom camera to take pictures, image correction operations usually need to be performed in combination with distortion correction algorithms and color correction algorithms.
[0003] When performing color correction operations, considering that large-area monochromatic scenes (such as seawater, blue sky, etc.) often appear in outdoor scene images, the overall average color of the image tends to be the dominant color in these scenes, and the conventional white balance algorithm may mistakenly consider the dominant color channel to be redundant, further enhancing the remaining color channels. At the same time, under the irradiation of strong warm-toned light sources (such as incandescent lamps, candlelight) or cold-toned light sources, the entire scene has a strong color temperature tendency, which will cause the image to appear color cast after white balance operation. Therefore, further optimization of the white balance operation is needed when performing color correction on the image. SUMMARY
[0004] In view of the above, it is necessary to provide an image correction method and system suitable for a zoom camera to solve the above problems.
[0005] The first aspect of the present application provides an image correction method suitable for a zoom camera, the method comprising:
[0006] performing distortion correction processing on the image data of the zoom camera to obtain an original image;
[0007] analyze a difference feature of saturation distribution between each pixel point and all pixel points in the original image, and determine a saturation weight of each pixel point in combination with an overall distribution feature of saturation difference in a neighborhood range of each pixel point;
[0008] perform threshold segmentation on gradient amplitudes of all pixel points in the original image, analyze segmentation of the gradient amplitudes of each pixel point and in a preset window of each pixel point, and determine an edge determination coefficient of each pixel point in combination with the gradient amplitude of each pixel point; determine a credibility of each pixel point based on the overall distribution feature of each pixel point and the saturation of each pixel point, and determine a local feature index of each pixel point in combination with the edge determination coefficient;
[0009] multiply the saturation weight of each pixel point and the local feature index to obtain a comprehensive influence weight of each pixel point, and perform weighted average on channel values of the original image to obtain adaptive gains of the channels, and obtain an image after color correction.
[0010] The saturation weight of each pixel point is determined in particular as follows:
[0011] The saturation deviation degree of each pixel point is determined based on the difference feature.
[0012] The local saturation difference of each pixel point is determined based on the overall distribution feature.
[0013] The negative correlation mapping result of the saturation deviation degree of each pixel point is positively fused with the local saturation difference to obtain the saturation weight of each pixel point.
[0014] The saturation deviation degree is denoted as and the negative correlation mapping result is determined through a formula , wherein is an exponential function with a natural constant as a base number; and the positive fusion between variables adopts a multiplication calculation mode.
[0015] The saturation deviation degree of each pixel point is determined in particular as follows:
[0016] Obtain a saturation mean value of all pixel points in the original image, denote the saturation of each pixel point as S, and denote the saturation mean value as , and calculate the saturation deviation degree through a formula , wherein represents a preset parameter.
[0017] The local saturation difference of each pixel point is determined in particular as follows:
[0018] Calculate the absolute value of the difference in saturation between each pixel and each pixel in its eight neighborhoods, and take the mean of all such absolute values as the local saturation difference.
[0019] The step of determining the edge determination coefficient for each pixel is as follows:
[0020] For each pixel's preset window, the difference between the number of pixels with gradient magnitude greater than or equal to the segmentation threshold and the number of pixels with gradient magnitude less than the segmentation threshold within the window is calculated and recorded as the local gradient change value.
[0021] The gradient difference is obtained by subtracting the segmentation threshold from the gradient magnitude of each pixel; the product of the local gradient change value and the gradient difference of each pixel is normalized to obtain the edge determination coefficient of each pixel.
[0022] The confidence level of each pixel is determined by the formula. To determine, among which, This represents the local saturation difference of each pixel. This indicates the preset parameter value.
[0023] The local feature index of each pixel is obtained by multiplying the confidence level of each pixel by the edge determination coefficient.
[0024] The process of weighted averaging of the values of each channel in the original image is as follows:
[0025] Calculate the proportion of the local feature index of each pixel to the total local feature index of all pixels, and use it as the weight of each channel value of the corresponding pixel. Then, sum the weighted values of each channel of all pixels to obtain the weighted average value of each channel.
[0026] Specifically, obtaining the adaptive gain of each channel involves:
[0027] The weighted average of all channels for each pixel is averaged, and the average is divided by the weighted average of each channel to obtain the adaptive gain of each channel.
[0028] Secondly, embodiments of this application also provide an image correction system suitable for zoom cameras, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described above.
[0029] This application has at least the following beneficial effects:
[0030] This application first acquires the original image through distortion correction processing, performing preliminary geometric distortion correction to eliminate distortion caused by the camera lens. This ensures that subsequent color correction algorithms can be performed on a more accurate geometric basis, avoiding errors caused by image deformation. By analyzing the saturation differences between each pixel and other pixels in the original image, a better understanding of the color distribution in different regions of the image can be achieved. Especially in the presence of monochromatic or dominant color regions (such as the sky or sea), the characteristics of the dominant color can be identified, providing a basis for subsequent processing. This difference analysis helps determine the saturation weight of each pixel, ensuring that neutral colors (which are particularly important for white balance processing) are properly weighted in subsequent operations. Reasonable weighting; furthermore, considering saturation differences within the neighborhood can improve the perception of local image features, especially in smooth or uniformly colored areas, preventing erroneous color correction due to local anomalies and ensuring the smoothness and naturalness of color correction; thresholding the gradient magnitude of all pixels in the original image and analyzing the gradient magnitude segmentation helps identify image edge features, especially in areas rich in image detail. Edge regions usually require more attention because color changes in these areas are more sensitive, and erroneous color correction may lead to distortion; determining the edge coefficient of each pixel based on the gradient magnitude helps enhance edge region processing. Edge regions usually require more refined processing to avoid blurring or color cast. By identifying edges and details in the image, it ensures that color correction is not distorted in areas rich in detail, avoiding affecting the overall sharpness and contrast of the image; by combining saturation differences, gradient magnitudes, and edge determination coefficients, the credibility of each pixel can be more accurately evaluated, providing accurate weights for the final weighted average, allowing the algorithm to focus more on adjusting credible regions and avoid the influence of low-credibility regions. Local feature metrics help preserve the true details of an image during color correction, especially at image edges or in areas with complex textures. Combining saturation weights with a weighted average of local feature metrics allows for adaptive gain adjustment for each pixel. This approach allows for more precise adjustments based on the importance of each pixel, avoiding the coarseness of a globally uniform gain method. This weighted averaging makes color correction more aligned with the needs of real-world images, especially in environments with complex lighting and color variations, improving the accuracy of color correction. Ultimately, the resulting image will show significantly improved color naturalness and realism; the weighted gain adjustment better adapts to the color characteristics of different scenes, avoiding color distortion caused by over-emphasizing dominant colors, thereby improving the overall color balance of the image. Attached Figure Description
[0031] Figure 1 A flowchart illustrating the steps of an image correction method for a zoom camera provided in one embodiment of this application;
[0032] Figure 2 A flowchart illustrating the process of obtaining the comprehensive influence weights in one embodiment of this application. Detailed Implementation
[0033] In the description of the embodiments in this application, the words "exemplary," "or," and "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary," "or," and "for example" is intended to present the relevant concepts in a specific manner.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0035] It should also be noted that the terms "first" and "second" in this application and its accompanying drawings are used to distinguish similar objects, rather than to describe a specific order or sequence. The methods disclosed in the embodiments of this application or the methods shown in the flowcharts include one or more steps for implementing the method. Without departing from the scope of protection of this application, the execution order of multiple steps can be interchanged, and some steps can also be deleted.
[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0037] The following description, in conjunction with the accompanying drawings, details the specific scheme of the image correction method and system applicable to zoom cameras provided in this application.
[0038] Please see Figure 1 This document illustrates a flowchart of an image correction method for a zoom camera according to an embodiment of this application. The method includes the following steps:
[0039] The first step: Perform distortion correction processing on the image data from the zoom camera to obtain the original image.
[0040] When using a zoom camera to acquire images and perform image correction, it is first necessary to use the zoom camera to capture raw RAW image data in an outdoor environment. At the same time, a focus-locked camera is used to capture images of the high-precision checkerboard calibration board from multiple angles to obtain the corresponding image data. In the focus-locking operation of this application, images are captured once every 1% zoom from the lowest focal length to the highest focal length. Ten high-precision checkerboard calibration board raw RAW images with different positions and postures are acquired at different focal lengths. Each set of raw RAW images and the camera intrinsic parameters corresponding to each raw RAW image are used as training data for the distortion correction model.
[0041] Image correction is performed on outdoor scene image data acquired by the zoom camera: First, distortion correction is performed using the ISP image signal processor. In this embodiment, Zhang Zhengyou calibration method is used for image processing. Data acquired at each focal length is processed separately. The original RAW image data of the checkerboard calibration board acquired at a single focal length, the physical size of each square of the checkerboard, the number of corner points of the checkerboard, and the camera intrinsic and extrinsic parameters corresponding to each image data are used as inputs. The Zhang Zhengyou calibration method is used for calculation and processing, and the intrinsic parameter matrix, extrinsic parameter matrix, distortion coefficients, and reprojection error corresponding to the image at that focal length are output. The Zhang Zhengyou calibration method is a well-known technique, and the specific operation steps will not be described in detail. The above operation is repeated for each focal length to obtain the intrinsic parameter matrix, extrinsic parameter matrix, distortion coefficients, and reprojection error for all focal lengths, and a calibration parameter lookup table is constructed.
[0042] By using a lookup table (LUT) method, the focal length corresponding to the acquired distortion-corrected image data is matched against the calibration parameter lookup table constructed above. Based on the intrinsic parameter matrix, extrinsic parameter matrix, distortion coefficients, and reprojection error of the corresponding focal length, a remapping table is generated for the original RAW image. The principle of the remapping table is to pre-calculate each pixel in the corrected image. This corresponds to the position on the original image. Next, remapping and interpolation operations are performed on the original image. Since the source coordinates found through the remapping table are often floating-point numbers, interpolation is needed on the remapped original image to obtain a smooth, corrected image. In this embodiment, bilinear interpolation is used to interpolate the remapped original image. Because the image edges usually become distorted and black invalid areas appear after distortion correction, the maximum inscribed matrix is obtained from the smoothed corrected image. The image is then cropped according to the maximum inscribed matrix to obtain a regular RAW rectangular image after distortion correction, which will be referred to as the original image for ease of subsequent description.
[0043] The second step is to analyze the saturation distribution of each pixel in the original image and all pixels, and combine the saturation distribution of each pixel with its neighborhood to determine the saturation weight of each pixel.
[0044] When performing color correction on the original image after distortion correction, it is important to consider that images acquired using a zoom camera in outdoor scenes may contain large areas of monochromatic color. When these background scenes appear, the overall average color of the image will be biased towards the color corresponding to the dominant color. During white balance operation, the dominant color may be mistakenly identified as the color cast that needs to be corrected.
[0045] To address this issue, considering that pixels in monochromatic regions (such as seawater or blue sky) tend to have higher saturation due to their pure color bias, and that neutral colors (white, gray, and black) serve as "anchors" for color constancy, a weighting of neutral colors needs to be increased to avoid color casts during white balance operations. However, pixels in neutral color regions generally have lower saturation. Therefore, an analysis based on pixel saturation in the image is performed: First, the saturation deviation of each pixel is calculated: the average saturation of all pixels in the original image is obtained, the difference between the saturation of each pixel in the original image and the average saturation is calculated, and then positively fused with the negative correlation mapping result of the average saturation to obtain the saturation deviation of each pixel. In this embodiment, the saturation of each pixel is denoted as S, and the average saturation is denoted as... Through formula Calculate the degree of saturation deviation, wherein, This represents the negative correlation mapping result of the mean saturation. This represents a preset parameter, which is set to 0.01 in this embodiment to prevent the denominator from being 0 during calculation.
[0046] It should be understood that when a pixel is located in a solid color monochromatic area, the saturation of that pixel is relatively high, much higher than the overall saturation of the image, and the calculated saturation deviation is relatively large; while when the hue of a pixel is closer to a neutral color, the pixel saturation is lower, usually close to 0, which leads to a smaller saturation deviation, close to -1.
[0047] While pixels within a standard monochromatic color region may exhibit neutral colors, the influence of lighting causes their hue to approach neutral, resulting in lower reliability for neutral-toned pixels within that region. In contrast, analyzing pixels in complex color regions—areas rich in color, complex in texture, and with intersecting edges—in a complex environment filled with various colors, if a small local area displays a neutral color, it is highly likely to be a genuine neutral-colored pixel, thus possessing higher reliability.
[0048] Based on the above analysis, the absolute value of the saturation difference between each pixel and each pixel in its eight neighboring regions is calculated. The mean of all these absolute differences is taken as the local saturation difference, denoted as . When a pixel is located in a monochromatic region, the local pixel area, due to the monochromatic nature, results in each pixel having a very similar saturation to its eight neighbors, thus obtaining... The value is relatively small; however, when a pixel is located in a complex color region, the saturation of the eight neighboring regions of the pixel usually differs significantly, thus obtaining... The value is relatively large. Further, saturation analysis is performed on the pixels, and saturation weights are constructed: the negative correlation mapping result of the saturation deviation of each pixel is positively fused with the local saturation difference to obtain the saturation weight of each pixel. In this embodiment, the saturation deviation is denoted as... The negative correlation mapping result is obtained through the formula To determine, among which It is an exponential function with the natural constant as the base; positive fusion between variables is achieved by multiplication.
[0049] It should be understood that the closer a pixel's hue is to a neutral color, the better the acquired... and The larger the values, the greater the saturation weight obtained in the calculation.
[0050] The third step is to perform threshold segmentation on the gradient magnitude of all pixels in the original image, analyze the segmentation of the gradient magnitude of each pixel and its preset window, and determine the edge determination coefficient of each pixel based on the gradient magnitude of each pixel; determine the confidence level of each pixel based on the overall distribution characteristics of each pixel and the saturation of each pixel, and determine the local feature index of each pixel based on the edge determination coefficient.
[0051] Considering that outdoor scenes often feature large areas of monochromatic color (such as seawater or sky), they usually include pedestrians and objects in the background. These situations often have edge-intersection areas, which typically exhibit stable, neutral colors that are not easily affected. Color abrupt changes at object boundaries better reflect changes in the material itself rather than changes in lighting. Conversely, the colors of smooth, low-texture areas (such as leaves or smooth plastic) are easily affected by light sources, leading to artifacts that appear to be neutral colors. Therefore, a local window is constructed centered on each pixel. In this embodiment, the window size is set to 7×7. When the image cannot satisfy the requirement of a 7×7 area centered on a pixel, pixels within that area are used to reconstruct the local window corresponding to the target pixel. For example, if the target pixel is located at the top left corner of the image, and its corresponding 7×7 area only exists in the lower right 4×4 area of that pixel, then this 4×4 area is set as the local window corresponding to the target pixel, and no further supplementation is made for the missing area. Taking pixel a as an example, the analysis of pixel a and its corresponding local window is as follows:
[0052] First, the texture complexity of the local window corresponding to each pixel is analyzed. Pixels with texture features typically have relatively high gradient magnitudes, while pixels in smooth monotone regions have low (close to 0) gradient magnitudes. Based on this, the Sobel operator is used to calculate the gradient magnitudes of all pixels in the entire image. Then, the Otsu thresholding method is used to calculate the maximum inter-class variance of the gradient magnitudes of all pixels in the image to obtain the optimal threshold T. The local window is divided into high-gradient pixels and low-gradient pixels to distinguish between pixels in smooth monotone regions and pixels with edge intersections. Taking the local window corresponding to pixel a as an example, the number of pixels in the local window with a gradient magnitude greater than or equal to the threshold T is counted. The number of pixels with gradient magnitude less than the threshold T is The local gradient change value is denoted as ,pass and The difference in value is obtained; when the texture is richer in a local area, The larger the value, the better the calculated result. The larger the value, the smoother the texture in a local area; conversely, the smaller the value, the smoother the texture. The larger the value, the better the calculated result. The smaller the value.
[0053] Furthermore, the analysis determines whether a pixel is located in an edge texture region. The gradient difference is obtained by subtracting a threshold T from the pixel's gradient magnitude, denoted as [missing information]. The product of the local gradient change value and the gradient difference of each pixel is normalized to obtain the edge determination coefficient of each pixel. The normalization method uses the sigmoid function.
[0054] It should be understood that when the local window texture corresponding to pixel a is richer and it is located in an edge texture region, the gradient magnitude of the pixel will necessarily be greater than or equal to the threshold T, and The larger the value, the larger the calculated edge determination coefficient; conversely, when pixel a is located in a smooth region, its gradient magnitude approaches 0, and The smaller the value, the smaller the calculated edge determination coefficient.
[0055] Considering the significant difference in saturation between neutral color pixels at normal edge intersections and pixels on either side of the edge, The weighting is relatively large, requiring a higher weight to be assigned to true neutral colors; however, in areas with artifacts caused by lighting effects, where pixels resembling neutral colors appear, the reliability of these neutral colors is low, and they should be given a smaller weight compared to true, stable neutral colors. These pixels are generally affected by lighting, resulting in color gradients, and their saturation does not change abruptly with their eight neighboring pixels. The values are relatively small, therefore, a confidence index is constructed for each pixel based on local saturation differences: the confidence level of each pixel is obtained by multiplying the negative correlation mapping result of its saturation with its local saturation difference. In this embodiment, Where L represents the confidence level of each pixel. This represents the local saturation difference of each pixel. This represents the preset parameter value, which is 0.01, used to prevent the denominator from being 0.
[0056] It should be understood that when a pixel is located in a real edge texture area, When the value is large, the saturation of the target pixel is... When approaching neutral colors, As the value approaches 0, the confidence level increases, and its weight should be increased accordingly; conversely, when a pixel is located at the edge of an artifact region caused by lighting effects, the trust level for such unreliable neutral colors should be reduced, and the weight of the obtained value should be adjusted accordingly. Smaller, when the pixel saturation The closer it gets to a monochromatic situation, The larger the value, the lower the calculated reliability value.
[0057] Based on the above analysis, a local feature index is constructed to characterize the feature transformation within the local window of a target pixel: the confidence level of each pixel is multiplied by the edge determination coefficient to obtain the local feature index of each pixel. The more complex the local texture of the target pixel and the closer it is to a reliable neutral color, the larger the obtained local feature index.
[0058] The fourth step is to multiply the saturation weight of each pixel by the local feature index as the comprehensive influence weight of each pixel, perform a weighted average of the channel values of the original image, obtain the adaptive gain of each channel, and obtain the color-corrected image.
[0059] The product of the saturation weight of each pixel and the local feature index is used as the comprehensive influence weight of each pixel. The flowchart for obtaining the comprehensive influence weight is as follows: Figure 2 As shown.
[0060] Using the aforementioned comprehensive influence weights, the R, G, and B values of all pixels in the distortion-corrected image data are weighted and averaged to obtain the weighted average values for the three channels. , , The specific formula is as follows:
[0061]
[0062] In the formula, N represents the total number of pixels in the image. This represents the overall influence weight of pixel a. , and Let R, G, and B channel values of pixel a be represented respectively. A mean of three weighted averages is calculated to obtain the optimized three-channel mean gain. Then, the adaptive gain for each of the three channels is calculated.
[0063]
[0064] In the formula, , and These represent the adaptive gains for the R, G, and B channels, respectively, thus completing the adaptive gain construction.
[0065] A single-channel RAW image from a Bayer array is used as input, and adaptive interpolation is used to perform a demosaic operation on the image, outputting a three-channel full-color RGB image. Then, the demosaiced full-color RGB image is used as input, and a gray-world algorithm with adaptive gain coefficients is used for white balance operation, outputting a color-corrected (color cast eliminated) RGB image.
[0066] The RGB image after white balance correction is further color-corrected using a Color Correction Matrix (CCM). This converts the camera's proprietary RGB color space to a more accurate RGB color space with better color saturation and hue, closer to human visual perception. The final output is a linear RGB image after CCM correction. Further settings are made for the power function used for gamma correction. Finally, gamma correction is used to calculate and convert the linear RGB image into a non-linear RGB image adapted to the display device, thus completing the image correction operation of the zoom camera.
[0067] Based on the same inventive concept as the above methods, this application also provides an image correction system suitable for zoom cameras, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-described image correction methods suitable for zoom cameras.
[0068] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description; sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0069] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from its essential characteristics. Therefore, the embodiments described above should be considered exemplary and non-limiting in all respects; modifications to the technical solutions described in the foregoing embodiments, or equivalent substitutions of some technical features, without causing the essence of the corresponding technical solutions to deviate from the scope of the technical solutions in the embodiments of this application, should all be included within the protection scope of this application.
Claims
1. An image rectification method suitable for a zoom camera, characterized by, The method comprises the following steps: The image data of the zoom camera is subjected to distortion correction processing to obtain an original image; The difference characteristics of the saturation distribution between each pixel point and all pixel points in the original image are analyzed, the overall distribution characteristics of the saturation difference in the neighborhood range of each pixel point are combined, and the saturation weight of each pixel point is determined; The gradient amplitude of all pixel points of the original image is subjected to threshold segmentation, the segmentation of the gradient amplitude in each pixel point and its preset window is analyzed, the edge determination coefficient of each pixel point is determined in combination with the gradient amplitude of each pixel point, the reliability of each pixel point is determined based on the overall distribution characteristics of each pixel point and the saturation of each pixel point, and the local feature index of each pixel point is determined in combination with the edge determination coefficient. The product of the saturation weight and the local feature index of each pixel point is taken as the comprehensive influence weight of each pixel point, the weighted average of the channel values of the original image is obtained, the adaptive gain of each channel is obtained, and the image after color correction is obtained.
2. The image correction method suitable for a zoom camera according to claim 1, wherein, The saturation weight of each pixel point is determined, specifically as follows: The saturation deviation degree of each pixel point is determined based on the difference characteristics; The local saturation difference of each pixel point is determined based on the overall distribution characteristics; The negative correlation mapping result of the saturation deviation degree of each pixel point is positively fused with the local saturation difference to obtain the saturation weight of each pixel point. The saturation deviation degree is denoted as The negative correlation mapping result is determined by the formula , wherein is an exponential function with a natural constant as the base number; the forward fusion between variables adopts a multiplication calculation mode.
3. The image correction method suitable for a zoom camera according to claim 2, wherein The saturation deviation degree of each pixel point is determined, specifically as follows: An average of saturation of all pixel points in the original image is obtained, saturation of each pixel point is recorded as S, and the average of saturation is recorded as The saturation deviation degree is calculated by formula , wherein represents a preset parameter.
4. The image correction method suitable for a zoom camera according to claim 2, wherein The process of determining the local saturation difference of each pixel point is as follows: The absolute value of the difference value of the saturation between each pixel point and each pixel point in its eight-neighborhood is calculated, and the mean value of all the difference values is taken as the local saturation difference.
5. The image correction method suitable for a zoom camera according to claim 1, wherein The edge determination coefficient of each pixel point is determined by the following steps: For the preset window of each pixel point, the difference value between the number of pixel points with gradient amplitude greater than or equal to the segmentation threshold and the number of pixel points with gradient amplitude less than the segmentation threshold in the window is calculated, which is denoted as the local gradient change value; The gradient difference is obtained by subtracting the segmentation threshold from the gradient amplitude of each pixel point; the product of the local gradient change value and the gradient difference of each pixel point is normalized to obtain the edge determination coefficient of each pixel point.
6. The image correction method suitable for a zoom camera according to claim 3, wherein The credibility of each pixel point is determined by the formula wherein, represents the local saturation difference of each pixel point.
7. The image correction method suitable for a zoom camera according to claim 1, wherein The local feature index of each pixel point is obtained by multiplying the reliability and the edge determination coefficient of each pixel point.
8. The image correction method suitable for a zoom camera according to claim 1, wherein, The process of weighted averaging of the channel values of the original image is as follows: The value proportion of the local feature index of each pixel point in the local feature index of all pixel points is calculated and taken as the weight of the channel values of the corresponding pixel point, the weighted sum of the channel values of all pixel points is obtained, and the weighted average value of each channel is obtained.
9. The image correction method suitable for a zoom camera according to claim 8, wherein, The adaptive gain of each channel is obtained, specifically as follows: The weighted average values of all channels of each pixel point are averaged, and the obtained average value is divided by the weighted average value of each channel to obtain the adaptive gain of each channel.
10. Image rectification system suitable for use in a zoom camera, comprising a memory, a processor and a computer program stored in said memory and running on said processor, characterized in that, The processor executes the computer program to realize the steps of the method according to any one of claims 1-9.
Citation Information
Patent Citations
Image fusion method and device, electronic equipment and computer readable storage medium
CN113313661A
Image distortion correction method, electronic equipment, storage medium and chip
CN118247186A