Image processing method and device, equipment, program product and storage medium

Through the pre-configured target data set and the target shadow correction data determined according to different anti-shake positions, the camera module is subjected to lens shadow correction processing, which solves the dynamic shading problem and improves the imaging quality.

CN120201314APending Publication Date: 2025-06-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510402624.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

There is a dynamic shading problem in the camera module, which leads to uneven image brightness and affects the imaging quality. It is difficult for the prior art to solve this problem quickly and effectively.

Method used

By preconfiguring the target data set, the shadow correction data containing multiple reference positions of the lens is determined from the target data set according to the different anti-shake positions of the lens in the current frame, and the lens shadow correction processing is performed on the current frame.

Benefits of technology

It improves the accuracy of lens shadow correction, effectively solves the dynamic shading problem of the camera module, and ensures that the image brightness distribution is more uniform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201314A_ABST
    Figure CN120201314A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and device, equipment, a program product and a storage medium. The method comprises the following steps: determining a pre-configured target data set corresponding to a lens in a camera module; wherein the target data set comprises shadow correction data respectively corresponding to a plurality of reference positions of the lens; acquiring different anti-shake positions of the lens in the exposure period of the current frame; determining target shadow correction data from the target data set according to the different anti-shake positions; according to the target shadow correction data, performing shot shadow correction processing on the current frame, and determining a preview image; and displaying the preview image on a shooting preview interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to electronic technologies, including but not limited to image processing methods, devices, equipment, program products, and storage media. Background Art

[0002] During the imaging process of a camera module, the shading phenomenon (i.e., lens shadow) is a common optical problem. It is manifested as a gradual decrease in image brightness from the center to the edge, resulting in uneven image brightness and affecting the imaging quality. Summary of the Invention

[0003] In a first aspect, an embodiment of this application provides an image processing method, which includes: determining a pre-configured target data set corresponding to a lens in a camera module; where the target data set includes shadow correction data corresponding to multiple reference positions of the lens; obtaining different anti-shake positions of the lens during the exposure of the current frame; determining target shadow correction data from the target data set according to the different anti-shake positions; performing lens shadow correction processing on the current frame according to the target shadow correction data to determine a preview image; and displaying the preview image on a shooting preview interface.

[0004] It can be understood that in the embodiment of this application, the target data set is pre-configured, and the target data set includes shadow correction data corresponding to multiple reference positions of the lens, that is, shadow correction prior information (i.e., shadow correction data) is pre-configured for these reference positions; in this way, when the lens makes multiple movements during the exposure of the current frame (i.e., the lens has multiple different anti-shake positions due to multiple OIS movements), the current frame can be subjected to lens shadow correction processing according to this shadow correction prior information, thereby helping to solve the dynamic shading problem of the camera module and improving the accuracy of lens shadow correction.

[0005] In a second aspect, an embodiment of this application provides an image processing device, which includes: a first determination unit configured to determine a pre-configured target data set corresponding to a lens in a camera module; where the target data set includes shadow correction data corresponding to multiple reference positions of the lens; an acquisition unit configured to obtain different anti-shake positions of the lens during the exposure of the current frame; a second determination unit configured to determine target shadow correction data from the target data set according to the different anti-shake positions; a correction unit configured to perform lens shadow correction processing on the current frame according to the target shadow correction data to determine a preview image; and a display unit configured to display the preview image on a shooting preview interface.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor executes the program, the method described in the first aspect is implemented.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor or an electronic device, the method described in the first aspect is implemented.

[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program or instruction. When the computer program or instruction is executed by a processor or an electronic device, the method described in the first aspect of the present application is implemented.

[0009] In a sixth aspect, an embodiment of the present application provides a computer program, and the computer program causes a processor or an electronic device to execute the method as described in the first aspect.

[0010] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings herein are incorporated into the specification and form a part of the specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to explain the technical solutions of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0012] The flowcharts shown in the drawings are only exemplary illustrations, not necessarily including all contents and operations / steps, nor necessarily executed in the described order. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined. Therefore, the actual execution order may change according to the actual situation.

[0013] Figure 1 It is a schematic diagram of the relative position between the lens and the image sensor;

[0014] Figure 2 It is a schematic implementation flow of the image processing method provided by the embodiment of the present application Figure 1 ;

[0015] Figure 3 It is a further schematic implementation flow diagram of step 201 provided by the embodiment of the present application;

[0016] Figure 4 It is a further schematic implementation flow diagram of step 301 provided by the embodiment of the present application;

[0017] Figure 5 It is an example diagram of the edge region and the central region of the image provided by the embodiment of the present application;

[0018] Figure 6 It is an example diagram of the IR curve provided by the embodiment of the present application;

[0019] Figure 7 It is an example diagram of the shading compensation curve provided by the embodiment of the present application;

[0020] Figure 8 It is a schematic implementation process diagram of the image processing method provided by the embodiment of the present application Figure 2 ;

[0021] Figure 9 It is a schematic structural diagram of the image processing device provided by the embodiment of the present application;

[0022] Figure 10 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will further describe the specific technical solutions of the present application in detail with reference to the accompanying drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0025] In the following descriptions, references to "some embodiments", "this embodiment", "embodiments of the present application", and examples, etc., describe subsets of all possible embodiments. However, it can be understood that "some embodiments" can be the same subsets or different subsets of all possible embodiments and can be combined with each other without conflict.

[0026] The descriptions such as "first, second, third", etc. that appear in the embodiments of the present application do not have specific meanings (such as no order, nor does it represent a special limitation on the number of devices in the embodiments of the present application), and are only for the convenience of clearly describing the embodiments of the present application and cannot constitute any limitation to the embodiments of the present application.

[0027] Before further elaborating on the embodiments of the present application, the nouns and terms that may be involved in the embodiments of the present application are described first. The nouns and terms involved in the embodiments of the present application are applicable to the following explanations.

[0028] Shading: In a camera module, shading generally refers to the phenomenon where the brightness of the image edge is inconsistent with that of the center, manifested as dark edges, vignetting at the image edge, and shadows formed due to the brightness difference between the image edge and the central area. Shading is one of the important optical performance indicators of a camera module.

[0029] LSC: Lens Shading Calibrate.

[0030] Color shading: That is, the color deviation between the center and the surrounding of the image (Color deviation between the center and the surrounding of the image).

[0031] OIS: Optical Image Stabilization.

[0032] AF: Auto Focus.

[0033] OC: Optical center.

[0034] AA: Active Alignment.

[0035] ISP: Image Signal Processor.

[0036] FOV: Field of View.

[0037] Color shading: The color deviation between the center and the surrounding of the image.

[0038] DNP: That is, the standard light source used for testing the image sensor (sensor).

[0039] To facilitate the understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies or terms of the embodiments of the present application. The following related technologies or related terms can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all fall within the protection scope of the embodiments of the present application.

[0040] Due to the special prism structure of some telephoto lenses, a part of the high - light stray light problem will be introduced. Therefore, it is necessary to block the middle part of the prism to block the stray light path. One way of blocking is to use a grooving method to block the stray light path, which is equivalent to having two light - shielding positions between the lens and the image sensor (sensor), thus introducing a new shading problem.

[0041] Since the position of the equivalent aperture relative to the lens is different, the degree of vignetting of the positive and negative fields of view is different. When reflected on the Relative Illumination (RI) curve, it is the different rates of brightness drop, resulting in brightness differences on both sides.

[0042] Due to the existence of assembly tolerances in the camera module, there will be a certain OC offset. When the offset reaches a certain degree, shading problems will be introduced.

[0043] During the actuation process of the OIS module, it is equivalent to changing the position of the optical center, which is equivalent to an OC offset.

[0044] In view of the fact that when the OIS module is working, as Figure 1 shown, the OC position of the lens 101 relative to the image sensor 102 is constantly changing dynamically, so the shading phenomenon is also constantly changing dynamically. For example, when the lens 101 actuates in the X-axis direction (such as X = 4095 code), the upper part of the picture becomes darker and the lower part becomes brighter; when the lens 101 runs downward in the X-axis (X = 0 code), the upper part of the picture becomes brighter and the lower part becomes darker. It can be seen that shading changes with the change of the lens position.

[0045] For the above problems, in the related technical solutions, static shading within a certain gradient range is compensated software-wise. The mobile platform solution integrates a mature LSC algorithm in the ISP module; or, conventional OIS modules avoid the generation of shading by leaving enough margin in the hardware design. However, there is currently no completely fast and effective method for the dynamic shading problems introduced by certain forms of OIS modules.

[0046] The inventors of the present application found the following problems through research and analysis of some related technical solutions:

[0047] 1. For some camera modules with special prism forms, when ensuring the minimum shading value for automatic alignment during the assembly of the camera module, since the center of the picture is not the brightest value at this time, new problems will be introduced, resulting in OC offset, and this method can only ensure the minimum shading in one OIS serve on state (locked center), that is, the minimum shading in the static state, and cannot guarantee whether the shading state is okay during the actuation of the OIS.

[0048] 2. For the solution of adjusting the slot depth, the deeper the slot depth, the faster the brightness drop rate at both ends of the picture compared to the area closer to the center of the picture, forming dark bands. Making the slot depth shallower can optimize the shading problem to a certain extent, but the degree of blocking of high-brightness stray light will become weaker, introducing new high-brightness stray light problems;

[0049] 3. For the solution of LSC compensation by software, most of the relevant LSC compensation solutions are for compensating problem scenarios where the LSC change of the picture is small under static or dynamic conditions. Currently, there is no fast and effective real-time compensation method for shading with large dynamic changes.

[0050] Based on the research and analysis of the above-related technical solutions, the embodiments of the present application provide the following image processing methods, devices, equipment, etc.

[0051] Figure 2 Schematic diagram of the implementation process of the image processing method provided by the embodiments of the present application Figure 1 . As Figure 2 shown, the method includes the following steps 201 to 205:

[0052] Step 201, determine a pre-configured target data set corresponding to the lens in the camera module; wherein, the target data set includes shading correction data corresponding to multiple reference positions of the lens.

[0053] Step 202, obtain different anti-shake positions where the lens is located during the exposure of the current frame.

[0054] Step 203, determine target shading correction data from the target data set according to the different anti-shake positions.

[0055] Step 204, perform lens shading correction processing on the current frame according to the target shading correction data to determine a preview image.

[0056] Step 205, display the preview image on the shooting preview interface.

[0057] It can be understood that in the embodiments of the present application, a target data set is pre-configured, and the target data set includes shading correction data corresponding to multiple reference positions of the lens, that is, shading correction prior information (i.e., shading correction data) is pre-configured for these reference positions; in this way, when the lens makes multiple actuations during the exposure of the current frame (that is, there are multiple different anti-shake positions due to multiple OIS actuations of the lens), the current frame can be processed for lens shading correction according to this shading correction prior information, which is beneficial to solving the dynamic shading problem of the camera module and improving the accuracy of lens shading correction.

[0058] The following further describes optional implementation manners of the above steps and related terms, etc.

[0059] Step 201, determine a pre-configured target data set corresponding to the lens in the camera module; wherein, the target data set includes shading correction data corresponding to multiple reference positions of the lens respectively.

[0060] Considering that in the actual application process of the camera, in addition to OIS actuation, variable factors such as exposure, AF, light source difference, and incident light source angle will be introduced. The inventors of the present application respectively experimentally demonstrated the influence of the above variable factors on shading during the research and analysis process, and the conclusion is that the influence of OIS in the X direction on shading is relatively large, while the influence of exposure time, AF actuation, light source brightness, color temperature incident angle (uniform light source) on shading is relatively small or has no influence.

[0061] In view of this, further, in some embodiments, the multiple reference positions of the lens include multiple positions of the lens on the X-axis; the different anti-shake positions include different positions of the lens on the X-axis. In this way, when this embodiment is combined into the overall solution, since the lens shading correction is carried out specifically, that is, the problem that the shading phenomenon changes dynamically due to the dynamic change of the position of the lens on the X-axis is mainly solved, it not only saves the computing power overhead, but also can obtain a better shading correction effect.

[0062] In a possible implementation manner, as Figure 1 shown, the X-axis is parallel to the short side of the image sensor (sensor) in the camera module.

[0063] In the embodiments of the present application, the target data set includes shading correction data corresponding to multiple reference positions of the lens respectively. There is no limitation on which positions the multiple reference positions include. The multiple reference positions may include multiple positions that the lens may reach during operation. Any position among the multiple anti-shake positions of the lens during actual exposure is either equal to one of the multiple reference positions or between two adjacent reference positions.

[0064] Exemplarily, in some embodiments, the multiple reference positions of the lens include the minimum position of the lens on the X-axis, the maximum position of the lens on the X-axis, and multiple positions between the minimum position and the maximum position. In this way, since the shading correction data in the target data set covers the shading correction data corresponding to the minimum position, the maximum position that the lens can reach, and multiple positions between the minimum position and the maximum position, it can cope with the dynamic change of the lens position during OIS in actual application, thus having generalization, and ensuring that a better lens shading correction effect can still be obtained based on the target data set in more cases of lens position change.

[0065] In the embodiments of the present application, the target data set includes shadow correction data corresponding to multiple reference positions of the lens. Among them, these reference positions can be understood as different positions of the lens, for example, different positions of the lens on the X-axis.

[0066] In addition, these reference positions can be evenly distributed or non-uniformly distributed. For the case of even distribution, it can be understood that the step distance between any two adjacent reference positions is a preset first step distance. The first step distance can be designed according to actual requirements. Exemplarily, the shadow correction data in the target data set may include shadow correction data corresponding to these reference positions (i.e., lens positions) such as 0code, 32code, 64code,... 2048code,... 4064code, and 4096code respectively; among them, the first step distance is equal to 32code. The reason for designing it as 32code is an empirical value. If the step distance is too large, the span of lens positions within the interval will be too large, and a group of shadow correction data will be shared by lens positions with a large span, which will reduce the accuracy of lens shadow correction. If the layout is too small, the data volume will increase, and the matching time will also increase. Here, the matching time refers to the time cost of finding the corresponding interval from the target data set based on the different anti-shake positions or the position mean of the different anti-shake positions. Therefore, 32code is to balance the accuracy of lens shadow correction and the time cost. Of course, in the embodiments of the present application, the first step distance can also be other values, and the present application does not limit this. In short, it is sufficient that the target data set includes shadow correction data corresponding to multiple evenly distributed reference positions. Of course, in the embodiments of the present application, the multiple reference positions in the target data set may also not be evenly distributed, and the present application does not limit this.

[0067] It should be noted that the lens in the camera module described in step 201 refers to the lens in the on state. The shadow correction data refers to the data that can correct the shadow in the image data collected by the camera module when it is used, so that the brightness distribution of the preview image is relatively uniform. In some embodiments, the shadow correction data includes multiple pixel positions (Pixel positions) or multiple pixel regions (RIO) and their respective corresponding compensation coefficients. Further, in some embodiments, the shadow correction data includes multiple pixel positions (Pixel positions) on the X-axis or multiple pixel regions (RIO) on the X-axis and their respective corresponding compensation coefficients.

[0068] As mentioned above, in step 201, a pre-configured target data set corresponding to the lens in the camera module is determined; among them, the target data set includes shadow correction data corresponding to multiple reference positions of the lens.

[0069] It can be understood that the shadow distribution characteristics of different lenses, that is, the shading characteristics or the brightness distribution characteristics, may be different. In the embodiments of the present application, for lenses with different shadow distribution characteristics, the corresponding shadow correction data is different, that is, the shadow correction data is matched with the lens, which is beneficial to improving the lens shadow correction effect.

[0070] In some embodiments, as Figure 3 shown, step 201 includes the following steps 301 and 302:

[0071] Step 301, determining the shadow distribution characteristics of the lens.

[0072] It should be noted that the shadow distribution characteristics of the lens can also be understood as a performance parameter of the lens. For step 301, in one possible implementation, the pre-configured shadow distribution characteristics of the lens can be read from the memory. In another possible implementation, the pre-configured edge brightness information of the lens can also be read from the memory, and based on this, the shadow distribution characteristics of the lens can be calculated. Exemplarily, the memory storing the shadow distribution characteristics or the edge brightness information can be a one-time programmable memory (OTP), and these data can be burned into the OTP in advance.

[0073] As mentioned above, for step 301, in some embodiments, as Figure 4 shown, it may further include the following steps 401 and 402:

[0074] Step 401, obtaining the pre-configured edge brightness information; the edge brightness information is related to the first image captured by the lens.

[0075] In the embodiments of the present application, the first image may be an image captured before the edge brightness information is configured. The image captured by the lens can also be understood as the image captured by the camera module through the lens.

[0076] Step 402, determining the shadow distribution characteristics of the lens according to the edge brightness information.

[0077] It can be understood that in the embodiments of the present application, the shadow distribution characteristics of the lens are determined according to the actual edge brightness information of the lens; on the one hand, for devices that do not pre-configure the shadow distribution characteristics of the lens, the dynamic shading problem of the lens can still be solved through the pre-configured edge brightness information, thereby improving the accuracy of lens shadow correction; on the other hand, the shadow distribution characteristics determined based on the brightness edge information are more consistent with the actual performance of the lens, which is beneficial to matching a more consistent target data set, and thus beneficial to improving the accuracy of lens shadow correction.

[0078] In the embodiments of the present application, there is no limitation on the types of information included in the edge brightness information. In short, the edge brightness information is at least related to the brightness of some or all edges of the first image.

[0079] In some embodiments, step 402 includes: determining the shadow distribution characteristics of the lens according to the brightness difference information in the edge brightness information; wherein, the brightness difference information includes the brightness differences between one or more edge regions of the first image and the central region of the first image.

[0080] It can be understood that in the embodiments of the present application, the shadow distribution characteristics of the lens are determined according to the brightness difference information between the edge region and the central region; in this way, it is beneficial to improve the accuracy of the shadow distribution characteristics, so that the edge brightness of the image after lens shadow correction is closer to the brightness of the central region.

[0081] In the embodiments of the present application, there is no limitation on the brightness difference information, which can be the ratio or difference between the brightness statistical value of the edge region and the brightness statistical value of the central region, etc.

[0082] Exemplarily, in some embodiments, the determining the shadow distribution characteristics of the lens according to the brightness difference information in the edge brightness information includes: determining the shadow distribution characteristics of the lens according to the first brightness ratio, the second brightness ratio, the third brightness ratio, and the fourth brightness ratio in the brightness difference information; wherein,

[0083] The first brightness ratio refers to the ratio of the brightness statistical value of the upper left edge region of the first image to the brightness statistical value of the central region of the first image;

[0084] The second brightness ratio refers to the ratio of the brightness statistical value of the upper right edge region of the first image to the brightness statistical value of the central region of the first image;

[0085] The third brightness ratio refers to the ratio of the brightness statistical value of the lower left edge region of the first image to the brightness statistical value of the central region of the first image;

[0086] The fourth brightness ratio refers to the ratio of the brightness statistical value of the lower right edge region of the first image to the brightness statistical value of the central region of the first image.

[0087] It can be understood that in the embodiments of the present application, according to the brightness difference information in the edge brightness information, the shadow distribution characteristics of the lens are determined; wherein, the brightness difference information used to determine the shadow distribution characteristics of the lens includes the above-mentioned first brightness ratio to the fourth brightness ratio, and these brightness ratios are the ratios of the brightness statistical values of the upper left, upper right, lower left, and lower right edge regions of the first image to the central region respectively. Therefore, based on this information, the shadow distribution characteristics of the lens are determined, so that the execution entity of the image processing method can not only obtain the distribution state of shading in the entire image, but also quantitatively reflect the size of shading.

[0088] In the embodiments of the present application, there is no limitation on the brightness statistical value, which can be the brightness mean, variance, standard deviation, range, mode, or median, etc.

[0089] Exemplarily, as Figure 5 shown, the upper left edge region of the first image is region 501, the upper right edge region of the first image is region 502, the lower left edge region of the first image is region 503, the lower right edge region of the first image is region 504, and the central region of the first image is region 505; these 5 regions are referred to as regions of interest (ROI) in this article. In the embodiments of the present application, there is no limitation on the size of these ROIs. For example, the long side of the ROI is 10% of the long side length of the first image.

[0090] As mentioned above, in step 402, according to the edge brightness information, the shadow distribution characteristics of the lens are determined.

[0091] Further, in some embodiments, the shadow distribution characteristics of the lens are equal to the maximum value of the first brightness value to the fourth brightness value minus the minimum value of the first brightness value to the fourth brightness value.

[0092] Further, in some embodiments, the determining the shadow distribution characteristics of the lens according to the first brightness ratio, the second brightness ratio, the third brightness ratio, and the fourth brightness ratio in the brightness difference information includes: determining a first accumulation value of the first brightness ratio and the second brightness ratio; determining a second accumulation value of the third brightness ratio and the fourth brightness ratio; and determining the shadow distribution characteristics of the lens according to the first accumulation value and the second accumulation value.

[0093] In the embodiments of the present application, the shadow distribution characteristics of the lens can be determined according to the difference or ratio of the first accumulation value and the second accumulation value, etc.

[0094] Exemplarily, in some embodiments, determining the shadow distribution characteristic of the lens according to the first accumulated value and the second accumulated value includes: when the first accumulated value is greater than the second accumulated value, the shadow distribution characteristic of the lens is equal to the maximum value of the first brightness ratio and the second brightness ratio minus the minimum value of the third brightness ratio and the fourth brightness ratio.

[0095] It can be understood that when the upper edge of the first image is brighter than the lower edge, the first accumulated value is greater than the second accumulated value.

[0096] Exemplarily, in some other embodiments, determining the shadow distribution characteristic of the lens according to the first accumulated value and the second accumulated value includes: when the first accumulated value is less than the second accumulated value, the shadow distribution characteristic of the lens is equal to the minimum value of the first brightness ratio and the second brightness ratio minus the maximum value of the third brightness ratio and the fourth brightness ratio.

[0097] It can be understood that when the upper edge of the first image is darker than the lower edge, the first accumulated value is less than the second accumulated value.

[0098] Step 302: Determine a corresponding pre-configured target data set according to the shadow distribution characteristic of the lens.

[0099] Further, in some embodiments, step 302 may include: determining, from the data sets respectively corresponding to multiple pre-configured shadow distribution characteristic intervals, a target data set that matches the shadow distribution characteristic of the lens.

[0100] Exemplarily, in some embodiments, determining, from the data sets respectively corresponding to multiple pre-configured shadow distribution characteristic intervals, a target data set that matches the shadow distribution characteristic of the lens includes: determining, from the multiple pre-configured shadow distribution characteristic intervals, a target shadow distribution characteristic interval to which the shadow distribution characteristic of the lens belongs; using the data set corresponding to the target shadow distribution characteristic interval as the target data set.

[0101] It can be understood that in the embodiments of the present application, data sets respectively corresponding to multiple shadow distribution characteristic intervals are pre-configured. These data sets are like the target data set, which includes shadow correction data corresponding to multiple reference positions. However, the shadow correction data corresponding to different shadow distribution characteristics may be different. For the shadow correction data corresponding to multiple reference positions included in the data set, the multiple reference positions can be understood with reference to the description and definition of the multiple reference positions above.

[0102] As mentioned above, different shadow distribution characteristics actually correspond to lenses with different characteristics. In an embodiment of the image processing method provided in the embodiments of the present application, datasets corresponding to multiple shadow distribution characteristic intervals are pre-configured, that is, datasets corresponding to multiple lenses with different characteristics are pre-configured. The main consideration for such a design is that for the computer program executing the image processing method, it may not know which shadow distribution characteristic the currently enabled lens is. Therefore, it is necessary to find the target dataset that matches the lens described in step 201 from the datasets corresponding to multiple pre-configured shadow distribution characteristic intervals, that is, a more accurate target dataset, and perform lens shadow correction based on this, which is beneficial to improving the accuracy of lens shadow correction.

[0103] It should also be noted that in the embodiments of the present application, the determination method of the datasets corresponding to multiple shadow distribution characteristic intervals is not limited. These datasets can be understood as prior information. A possible way to obtain the datasets corresponding to multiple pre-configured shadow distribution characteristic intervals is described as follows.

[0104] In one implementation, with a gradient of 3 percentage points, it expands to -13% to -11%, -10% to -8%, …… 8% to 10%, 11% to 13% (where the range from -13% to 13% covers the shading control standard of a single camera module. For example, the control standard is from -12% to 12%). There are a total of 9 gradient intervals, that is, 9 shading distribution characteristic intervals. Each gradient interval corresponds to at least two camera modules, and the shading distribution characteristics of the lenses of these camera modules belong to the corresponding gradient interval. Taking 32 codes as the step size on the X-axis of OIS, in the DNP (standard light source) shooting scenario, the RAW images obtained by shooting at 0 code, 32 code, 64 code, … 2048 code, … 4064 code, 4096 code on the X-axis of the lens are respectively tested. That is, the RAW image is the image data collected by the image sensor under the DNP standard light source. Above, a total of 9 * 2 * 128 groups of RAW images are obtained. Based on one frame of RAW image, the corresponding Illumination Response (IR) curve can be determined. Based on the IR curves corresponding to at least two camera modules in the same gradient interval / shading distribution characteristic interval at the same lens position, through brightness curve fitting, the shading compensation curve (that is, the brightness compensation curve or shading correction data) corresponding to this lens position is obtained. Thus, finally, 9 shading gradient matrices corresponding to 9 gradient intervals are obtained, denoted as idx (that is, an example of the data set). Each matrix consists of 128 one-dimensional arrays, and each array corresponds to the shading compensation curve (that is, the brightness compensation curve or shading correction data) of each lens position (that is, the code position) in this shading gradient interval, denoted as idc.

[0105] It should be noted that the abscissa of the IR curve can be the pixel coordinates in the short side direction of the image, that is, the X-axis. In one implementation, as Figure 6 shown, in the IR curve, the pixel coordinates are represented in the form of image blocks. For example, taking 10 pixels as a group, 3072 pixels are simplified to 310 image blocks; the ordinate of the IR curve can be brightness (such as 0 to 255); among them, in Figure 6 , different colors represent different IR curves.

[0106] It should be noted that the abscissa of the shading compensation curve can also be the pixel coordinates in the short side direction of the image, that is, the X-axis. In one implementation, as Figure 7As shown, in the shading compensation curve, the pixel coordinates are characterized in the form of image blocks. For example, taking 10 pixels as a group, 3072 pixels are simplified into 310 image blocks. The ordinate of the shading compensation curve can be the brightness compensation coefficient, which has no unit and can be understood as the scaling coefficient of the brightness value. Among them, in Figure 6 different colors represent the shading compensation curves corresponding to different code positions.

[0107] It can be understood that in the datasets corresponding to multiple preconfigured shadow distribution characteristic intervals respectively, one shadow distribution characteristic interval corresponds to one dataset (such as idx), and one dataset includes shadow correction data corresponding to multiple lens positions (such as 0code, 32code, 64code,... 2048code,... 4064code, 4096code) respectively.

[0108] Step 202: Obtain different anti-shake positions where the lens is located during the exposure of the current frame.

[0109] In some embodiments, step 202 further includes: obtaining different anti-shake positions of the lens on the X-axis during the exposure.

[0110] In some embodiments, the target dataset includes shadow correction data corresponding to multiple reference positions of the lens respectively, and these reference positions cover the possible anti-shake positions of the lens, that is, the anti-shake positions in step 202 are equal to the reference positions in the target dataset, and / or, the anti-shake positions are between two adjacent reference positions in the target dataset.

[0111] It can be understood that in view of the fact that when the OIS module is working, the OC position of the lens relative to the image sensor is constantly changing dynamically, so the shading phenomenon is also constantly changing dynamically. For example, when the lens moves upward on the X-axis (such as X = 4095code), the upper part of the picture becomes darker and the lower part becomes brighter; when the lens moves downward on the X-axis (X = 0code), the upper part of the picture becomes brighter and the lower part becomes darker. It can be seen that the lens may move to multiple different positions during the exposure period. In this article, these multiple different positions are called different anti-shake positions. In practical applications, the anti-shake positions of the lens are variable and uncertain. Therefore, one or more anti-shake positions where the lens is located in the exposure interval of the current frame may be equal to the multiple reference positions respectively, or one or more anti-shake positions may be different from the multiple reference positions, but each of these anti-shake positions is between two adjacent reference positions; thus, based on these anti-shake positions, more accurate shadow correction data can be matched from the shadow correction data corresponding to multiple reference positions respectively, which is beneficial to improving the accuracy of lens shadow correction.

[0112] It should be noted that the two adjacent reference positions mean that there is no other reference position between these two reference positions.

[0113] Step 203: Determine target shadow correction data from the target dataset according to the different anti-shake positions.

[0114] In the embodiments of the present application, the further implementation manner of step 203 is not limited. In a possible implementation manner, step 203 may further include: determining the position mean of the different anti-shake positions; determining the first reference position in the target dataset with the smallest distance from the position mean; and obtaining the target shadow correction data corresponding to the first reference position from the target dataset.

[0115] In this way, since the position mean of the different anti-shake positions is first determined, and then the target shadow correction data matching the position mean is determined from the target dataset based on this position mean, and the lens shadow correction process is performed based on this; compared with the scheme of performing lens shadow correction processing on the current frame image respectively based on the shadow correction data corresponding to the different anti-shake positions and then fusing these multiple processed images, it can save the computing power overhead and power consumption caused by performing the lens shadow correction process, so as to improve the efficiency of lens shadow correction while meeting the special dynamic shading compensation requirements during OIS actuation.

[0116] It can be understood that the first reference position in the target dataset with the smallest distance from the position mean, that is: this first reference position may be equal to the position mean, or this first reference position may not be equal to the position mean but the first reference position is the reference position in the target dataset with the smallest difference or distance from the position mean.

[0117] In another possible implementation manner, step 203 may further include: determining the second reference position in the target dataset with the smallest distance from the anti-shake position; obtaining the shadow correction data of the second reference position from the target dataset; and fusing the shadow correction data of the second reference positions corresponding to the different anti-shake positions respectively to determine the target shadow correction data.

[0118] Furthermore, in some embodiments, the fusing the shadow correction data of the second reference positions corresponding to the different anti-shake positions respectively to determine the target shadow correction data includes: performing a weighted average operation or an average operation on the compensation coefficients of the same pixel positions or the same pixel regions of the shadow correction data of the second reference positions corresponding to the different anti-shake positions respectively to determine the target shadow correction data.

[0119] It can be understood that the second reference position in the target dataset with the smallest distance from the anti-shake position, that is: this second reference position may be equal to the anti-shake position, or this second reference position may not be equal to the anti-shake position but the second reference position is the reference position in the target dataset with the smallest difference or distance from the anti-shake position. It should be understood that for each anti-shake position, the second reference position with the smallest distance can be found in the target dataset respectively.

[0120] Step 204: Perform lens shadow correction processing on the current frame according to the target shadow correction data to determine the preview image.

[0121] In the possible implementation manners of step 204, the result of performing lens shadow correction processing on the current frame image can be directly used as the preview image, or the result of this lens shadow correction processing can be further processed to obtain the preview image.

[0122] The following is an example to describe the possible implementation solutions of the image processing method described in one or more of the above embodiments.

[0123] Figure 8 Schematic diagram of the implementation process of the image processing method provided by the embodiment of the present application Figure 2 ; As Figure 6 shown, this method includes the following steps 801 to step 805:

[0124] Step 801: Power on and read the OTP data in the camera module to obtain the shadow distribution characteristics of the module;

[0125] Step 802: Match the corresponding target idx according to the shadow distribution characteristics of the module to obtain the corresponding shading parameter matrix; wherein, the shading parameter matrix can also be understood as an example of the target dataset;

[0126] Step 803: Obtain the current frame OIS position and match the shading parameter group of the corresponding idc in the target idx;

[0127] Wherein, the shading parameter group can also be understood as an example of the shadow correction data;

[0128] Step 804: Apply the matched shading parameter to the current frame compensation;

[0129] Step 805: Send the processed current frame to the graphics card for display.

[0130] It should be noted that when testing the shading of the lens module, the obtained edge brightness information is burned into the OTP, and a signed shading gradient value (i.e., the shadow distribution characteristic) is obtained based on the burned edge brightness information; the software matches the gradient value with the integrated data set (the integrated data set includes idx matrices corresponding to multiple shadow distribution characteristic intervals) to obtain the idx matrix of the corresponding index, and at the same time obtains the OIS data of the current frame, maps in the idx matrix to obtain the idc array of the matching code, that is, the final shading compensation parameter, applies the compensation parameter to the current image data stream, and then outputs the image after shading compensation.

[0131] In a possible implementation manner, during the real-time processing of LSC, during each frame exposure, the OIS can actuate multiple times, and the software can obtain multiple OIS position code values, and give them to the platform for use after mathematical statistics. In this method, the average value of the OIS code obtained during exposure is used. Different scenarios can be confirmed through specific experiments on how to use the obtained OIS code data to achieve the best effect.

[0132] It can be understood that the overall data performance of shading is related to three factors: prism silk screen printing, slotting offset position, and the offset of the sensor relative to the prism. In the scheme design, factors such as diffracted stray light, bright spot stray light, the equipment capabilities of the module factory's double AA assembly process, and motor postmark hole welding need to be considered. The dynamic shading software compensation scheme compensates for the defects of the manufacturing process and the scheme design to a certain extent, improves the yield of the module factory, and solves the shading problem that cannot be solved by the hardware technical scheme. The relevant expansion of this technical scheme provides more choices for the matching of the lens and the sensor image plane, can compensate for the dark edge and dark corner problems of the large image plane sensor and the smaller FOV lens to a certain extent, reduce the risk of dark edge and dark corner, and improve the yield.

[0133] It can be understood that in the above scheme, in view of the fact that the relevant LCS compensation schemes are all based on static shading compensation and cannot meet the special dynamic shading compensation requirements during OIS actuation of specific camera modules, a software compensation method based on hardware rules is proposed, which can effectively solve the dynamic shading problem of ship-type modules in real time.

[0134] It should be noted that the above solution is not limited to the shading compensation of a specific type of camera module, and is also applicable to the dynamic vignetting compensation of other camera modules. Especially in the hardware design solution, when there is a risk of vignetting in the matching of the lens and the image plane of the sensor, due to considerations such as yield, manufacturing process, or cost, this dynamic shading software compensation solution can be used. Similarly, this method can also be applied to the compensation of dynamic color shading.

[0135] It should be noted that although the steps of the method in this application are described in a specific order in the drawings, this does not require or imply that these steps must be executed in this specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.; or, the steps in different embodiments may be combined into a new technical solution.

[0136] Based on the foregoing embodiments, an embodiment of this application provides an image processing apparatus. Figure 9 It is a schematic structural diagram of the image processing apparatus provided by the embodiment of this application, as Figure 9 shown. The image processing apparatus 900 includes: a first determination unit 901, an acquisition unit 902, a correction unit 903, and a display unit 904, where:

[0137] The first determination unit 901 is configured to determine a pre-configured target data set corresponding to the lens in the camera module; where the target data set includes shading correction data corresponding to multiple reference positions of the lens.

[0138] The acquisition unit 902 is configured to acquire different anti-shake positions of the lens during the exposure of the current frame.

[0139] The second determination unit 903 is configured to determine target shading correction data from the target data set according to the different anti-shake positions.

[0140] The correction unit 904 is configured to perform lens shading correction processing on the current frame according to the target shading correction data to determine a preview image.

[0141] The display unit 905 is configured to display the preview image on the shooting preview interface.

[0142] In some embodiments, acquiring different anti-shake positions of the lens during the exposure of the current frame includes: acquiring different anti-shake positions of the lens on the X-axis during the exposure.

[0143] In some embodiments, determining the target shadow correction data from the target dataset according to the different anti-shake positions includes: determining the position mean of the different anti-shake positions; determining a first reference position in the target dataset that is closest to the position mean; and obtaining the target shadow correction data corresponding to the first reference position from the target dataset.

[0144] In other embodiments, determining the target shadow correction data from the target dataset according to the different anti-shake positions includes: determining a second reference position in the target dataset that is closest to the anti-shake position; obtaining the shadow correction data of the second reference position from the target dataset; and fusing the shadow correction data of the second reference positions respectively corresponding to the different anti-shake positions to determine the target shadow correction data.

[0145] In some embodiments, determining the pre-configured target dataset corresponding to the lens in the camera module includes: determining the shadow distribution characteristic of the lens; and determining the corresponding pre-configured target dataset according to the shadow distribution characteristic of the lens.

[0146] Further, in some embodiments, determining the shadow distribution characteristic of the lens includes: obtaining pre-configured edge brightness information; the edge brightness information is related to a first image captured by the lens; and determining the shadow distribution characteristic of the lens according to the edge brightness information.

[0147] Furthermore, in some embodiments, the edge brightness information includes the brightness difference information between one or more edge regions of the first image and the central region of the first image.

[0148] Exemplarily, in some embodiments, the brightness difference information includes a first brightness ratio, a second brightness ratio, a third brightness ratio, and a fourth brightness ratio; wherein, the first brightness ratio is the ratio of the brightness statistical value of the upper left edge region of the first image to the brightness statistical value of the central region of the first image; the second brightness ratio is the ratio of the brightness statistical value of the upper right edge region of the first image to the brightness statistical value of the central region of the first image; the third brightness ratio is the ratio of the brightness statistical value of the lower left edge region of the first image to the brightness statistical value of the central region of the first image; and the fourth brightness ratio is the ratio of the brightness statistical value of the lower right edge region of the first image to the brightness statistical value of the central region of the first image.

[0149] In some embodiments, determining the shadow distribution characteristics of the lens according to the edge brightness information includes: determining a first cumulative value of the first brightness ratio and the second brightness ratio; determining a second cumulative value of the third brightness ratio and the fourth brightness ratio; and determining the shadow distribution characteristics of the lens according to the first cumulative value and the second cumulative value.

[0150] Further, in some embodiments, determining the shadow distribution characteristics of the lens according to the first cumulative value and the second cumulative value includes: when the first cumulative value is greater than the second cumulative value, the shadow distribution characteristics of the lens are equal to the maximum value of the first brightness ratio and the second brightness ratio minus the minimum value of the third brightness ratio and the fourth brightness ratio.

[0151] Exemplarily, in some embodiments, determining the shadow distribution characteristics of the lens according to the first cumulative value and the second cumulative value includes: when the first cumulative value is less than the second cumulative value, the shadow distribution characteristics of the lens are equal to the minimum value of the first brightness ratio and the second brightness ratio minus the maximum value of the third brightness ratio and the fourth brightness ratio.

[0152] Exemplarily, in some other embodiments, determining the corresponding pre-configured target data set according to the shadow distribution characteristics of the lens includes: determining the target data set that matches the shadow distribution characteristics of the lens from the data sets respectively corresponding to multiple pre-configured shadow distribution characteristic intervals.

[0153] The description of the above device embodiments is similar to the description of the above method embodiments and has similar beneficial effects to the method embodiments. For the technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.

[0154] It should be noted that the division of modules in the embodiments of the present application is illustrative, merely a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, may exist separately physically, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware, or in the form of a software functional unit, or in the form of a combination of software and hardware.

[0155] It should be noted that in the embodiments of the present application, if the above-mentioned method is implemented in the form of software function modules and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application essentially or the part that contributes to the related technology can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing an electronic device to execute all or part of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), magnetic disks, or optical discs that can store program codes. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0156] Embodiments of the present application provide an electronic device. Figure 10 As shown in the structure diagram of the electronic device provided by the embodiments of the present application, Figure 10 as shown, the electronic device 1000 includes a memory 1001 and a processor 1002. The memory 1001 stores a computer program that can run on the processor 1002. When the processor 1002 executes the program, it implements the steps in the method provided in the above embodiments.

[0157] It should be noted that the memory 1001 is configured to store instructions and applications executable by the processor 1002, and can also cache data to be processed or already processed by the processor 1002 and each module in the electronic device 1000 (for example, image data, audio data, voice communication data, and video communication data), and can be implemented by flash memory (FLASH) or random access memory (RAM).

[0158] In the embodiments of the present application, the type of the electronic device is not limited. The electronic device can be various devices with a camera module. For example, the electronic device can be a smart phone, a laptop computer, a tablet computer, a smart home device, a smart watch, an Internet of Things (IoT) device, or a vehicle-mounted device, etc.

[0159] Embodiments of the present application also provide a computer-readable storage medium for storing a computer program.

[0160] Optionally, the computer-readable storage medium can be applied to the electronic device in the embodiments of the present application, and the computer program causes the processor or the electronic device to execute the various methods of the embodiments of the present application. For the sake of brevity, it will not be elaborated here.

[0161] Embodiments of the present application also provide a computer program product, including computer program instructions.

[0162] Optionally, the computer program product can be applied to the electronic device in the embodiments of the present application, and the computer program instructions cause the processor or the electronic device to execute the various methods in the embodiments of the present application. For the sake of brevity, details are not described herein again.

[0163] The embodiments of the present application also provide a computer program.

[0164] Optionally, the computer program can be applied to the electronic device in the embodiments of the present application. When the computer program runs on the processor or the electronic device, it causes the processor or the electronic device to execute the various methods in the embodiments of the present application. For the sake of brevity, details are not described herein again.

[0165] It should be noted here that the descriptions of the above electronic device, storage medium, computer program product and computer program embodiments are similar to the descriptions of the above method embodiments and have similar beneficial effects to those of the method embodiments. For the technical details not disclosed in the embodiments of the electronic device, storage medium, computer program product and computer program of the present application, please refer to the descriptions of the method embodiments of the present application for understanding.

[0166] It should be understood that the term "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" or "in some embodiments" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of the present application, the order numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic and should not constitute any limitation to the implementation process of the embodiments of the present application. The serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments. The above descriptions of the various embodiments tend to emphasize the differences between the embodiments. Their similarities or similarities can be referred to each other. For the sake of brevity, details are not described herein again.

[0167] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.

[0168] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element.

[0169] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there can be other division methods, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. Additionally, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.

[0170] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules; they can be located in one place or distributed to multiple network units; some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0171] In addition, in each embodiment of this application, the various functional modules can all be integrated in a processing unit, or each module can be separately a unit by itself, or two or more modules can be integrated in a unit; the above-mentioned integrated modules can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.

[0172] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including the above method embodiments; and the foregoing storage medium includes: various media that can store program codes, such as removable storage devices, read-only memory (ROM), magnetic disks, or optical discs.

[0173] Alternatively, if the above integrated units of the present application are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence or the part that contributes to the related art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing an electronic device to execute all or part of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as removable storage devices, ROMs, magnetic disks, or optical discs that can store program codes.

[0174] The methods disclosed in the several method embodiments provided by the present application can be arbitrarily combined without conflict to obtain new method embodiments.

[0175] The features disclosed in the several product embodiments provided by the present application can be arbitrarily combined without conflict to obtain new product embodiments.

[0176] The features disclosed in the several method or device embodiments provided by the present application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0177] As described above, the above are only the implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An image processing method, characterized in that: The method comprises: Determining a pre-configured target data set corresponding to a lens in a camera module; wherein the target data set includes shading correction data corresponding to a plurality of reference positions of the lens; Acquire different anti-shake positions of the lens during exposure of the current frame; determining target shadow correction data from the target data set according to the different anti-shake positions; According to the target shadow correction data, performing lens shadow correction processing on the current frame to determine a preview image; The preview image is displayed on the shooting preview interface.

2. The method according to claim 1, characterized in that The obtaining of different anti-shake positions of the lens during exposure of the current frame includes: Different anti-shake positions of the lens on the X-axis during the exposure period are obtained.

3. The method according to claim 1 or 2, characterized in that: The determining target shadow correction data from the target data set according to the different anti-shake positions includes: Determining position means of the different anti-shake positions; Determine a first reference position in the target data set having a minimum distance from the position mean; Obtain target shadow correction data corresponding to the first reference position from the target data set.

4. The method according to claim 1 or 2, characterized in that: The determining target shadow correction data from the target data set according to the different anti-shake positions includes: Determine a second reference position in the target data set that has the shortest distance from the anti-shake position; Acquire shadow correction data of the second reference position from the target data set; The shadow correction data of the second reference positions respectively corresponding to the different anti-shake positions are merged to determine the target shadow correction data.

5. The method according to any one of claims 1 to 4, characterized in that The determining of a preconfigured target data set corresponding to a lens in the camera module includes: determining a shadow distribution characteristic of the lens; According to the shadow distribution characteristics of the lens, a corresponding pre-configured target data set is determined.

6. The method according to claim 5, characterized in that The determining of the shadow distribution characteristic of the lens comprises: Acquire pre-configured edge brightness information; the edge brightness information is related to the first image captured by the lens; The shadow distribution characteristic of the lens is determined according to the edge brightness information.

7. The method according to claim 6, characterized in that The determining, according to the edge brightness information, the shadow distribution characteristic of the lens comprises: The shadow distribution characteristic of the lens is determined according to the brightness difference information in the edge brightness information; wherein the brightness difference information includes brightness differences between one or more edge regions of the first image and a central region of the first image.

8. The method according to claim 7, characterized in that The determining the shadow distribution characteristic of the lens according to the brightness difference information in the edge brightness information includes: Determine the shadow distribution characteristics of the lens according to the first brightness ratio, the second brightness ratio, the third brightness ratio and the fourth brightness ratio in the brightness difference information; wherein, The first brightness ratio refers to a ratio of a brightness statistical value of an upper left edge area of ​​the first image to a brightness statistical value of a central area of ​​the first image; The second brightness ratio refers to a ratio of a brightness statistical value of an upper right edge area of ​​the first image to a brightness statistical value of a central area of ​​the first image; The third brightness ratio refers to the ratio of the brightness statistics of the lower left edge area of ​​the first image to the brightness statistics of the central area of ​​the first image; The fourth brightness ratio refers to a ratio of a brightness statistic of a lower right edge region of the first image to a brightness statistic of a central region of the first image.

9. The method according to claim 8, characterized in that The determining the shadow distribution characteristic of the lens according to the first brightness ratio, the second brightness ratio, the third brightness ratio and the fourth brightness ratio in the brightness difference information includes: Determine a first accumulated value of the first brightness ratio and the second brightness ratio; Determine a second accumulated value of the third brightness ratio and the fourth brightness ratio; A shadow distribution characteristic of the lens is determined according to the first accumulated value and the second accumulated value.

10. The method according to claim 9, characterized in that The determining, according to the first accumulated value and the second accumulated value, a shadow distribution characteristic of the lens includes: When the first accumulated value is greater than the second accumulated value, the shadow distribution characteristic of the lens is equal to the maximum value between the first brightness ratio and the second brightness ratio minus the minimum value between the third brightness ratio and the fourth brightness ratio.

11. The method according to claim 9, characterized in that The determining, according to the first accumulated value and the second accumulated value, a shadow distribution characteristic of the lens includes: When the first accumulated value is less than the second accumulated value, the shadow distribution characteristic of the lens is equal to the minimum value between the first brightness ratio and the second brightness ratio minus the maximum value between the third brightness ratio and the fourth brightness ratio.

12. The method according to claim 5, characterized in that The determining, according to the shadow distribution characteristics of the lens, a corresponding pre-configured target data set comprises: A target data set matching the shadow distribution characteristic of the lens is determined from data sets corresponding to a plurality of pre-configured shadow distribution characteristic intervals.

13. An image processing device, characterized in that: The device comprises: A first determining unit is configured to determine a pre-configured target data set corresponding to a lens in a camera module; wherein the target data set includes shading correction data corresponding to a plurality of reference positions of the lens respectively; an acquisition unit, configured to acquire different anti-shake positions of the lens during exposure of a current frame; A second determining unit is configured to determine target shadow correction data from the target data set according to the different anti-shake positions; A correction unit, configured to perform lens shading correction processing on the current frame according to the target shading correction data to determine a preview image; The display unit is configured to display the preview image on the shooting preview interface.

14. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 12 is implemented.

15. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor or an electronic device, the method according to any one of claims 1 to 12 is implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor or an electronic device, the method according to any one of claims 1 to 12 is implemented.