A method and device for obtaining directional gain parameters

By acquiring images under static and vibration conditions in the OIS camera module, processing noise values ​​to directly select the best directional gain parameters, it solves the problems of long test time and low accuracy in the existing technology, and improves the acquisition of directional gain parameters. Accuracy.

CN113612987BActive Publication Date: 2024-10-01KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110803549.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-15
Publication Date
2024-10-01
Estimated Expiration
2041-07-15

AI Technical Summary

Technical Problem

When existing OIS camera modules obtain directional gain parameters, the test time is long and the calculation data accuracy is lost, making it difficult to improve accuracy.

Method used

By obtaining the table image of the camera module when it is stationary, setting different preset direction gain parameters, shooting multiple images under vibration conditions, and processing them to obtain the noise value, directly selecting the parameter with the largest noise value as the best direction gain parameter .

Benefits of technology

It improves the acquisition accuracy of directional gain parameters, reduces the steps of fitting multiple image results, and shortens the test time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113612987B_ABST
    Figure CN113612987B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of camera modules, and in particular to a method and device for acquiring directional gain parameters, the method comprising: acquiring a first image of a table diagram taken by a camera module when it is stationary, wherein the table diagram includes a preset graph; sequentially setting different preset directional gain parameters for the camera module to obtain N second images of the table diagram taken by the camera module in vibration when corresponding to different preset directional gain parameters; processing the N second images respectively to obtain corresponding N third images; based on the first image, the N second images and the N third images, obtaining noise values ​​of the camera module corresponding to different preset directional gain parameters; based on the noise values, obtaining the directional gain parameters of the camera module, thereby improving the acquisition accuracy of the directional gain parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of camera modules, and in particular to a method and device for acquiring directional gain parameters. Background Art

[0002] Currently, OIS camera modules need to undergo an OIS effect test before leaving the factory. A dot chart is used to capture the motion trajectory of the dots on the chart, which is then fitted to obtain the optimal directional gain parameters.

[0003] First, this method requires multiple image acquisitions, which takes a long time to test. Second, since a fitting algorithm is used, the accuracy of the calculated data is also lost.

[0004] Therefore, how to improve the accuracy of the acquired directional gain parameters is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the above problems, the present invention is proposed to provide a method and device for obtaining directional gain parameters that overcome the above problems or at least partially solve the above problems.

[0006] In a first aspect, the present invention provides a method for obtaining a gain parameter, which is applied to a camera module, comprising:

[0007] Acquire a first image of a table diagram taken by a camera module when the camera module is stationary, wherein the table diagram includes a preset graphic;

[0008] Sequentially setting different preset directional gain parameters for the camera module, and obtaining N second images of the table image taken by the camera module during vibration corresponding to the different preset directional gain parameters;

[0009] Processing the N second images respectively to obtain corresponding N third images;

[0010] Based on the first image, the N second images, and the N third images, obtaining noise values ​​of the camera module corresponding to different preset direction gain parameters;

[0011] Based on the noise value, a directional gain parameter of the camera module is obtained.

[0012] Further, the camera module is sequentially set with different preset directional gain parameters, and when obtaining the N second images corresponding to the different preset directional gain parameters, the camera module takes the N second images of the table image while vibrating, including:

[0013] Setting an exposure time for the camera module, wherein the exposure time and the vibration frequency of the camera module satisfy a preset relationship;

[0014] Different preset directional gain parameters are sequentially set for the camera module to respectively obtain N second images of the table image taken by the camera module during vibration within the exposure time.

[0015] Furthermore, the preset image in the N second images has a shadow, and the shadow is formed based on the exposure time.

[0016] Further, the processing the N second images respectively to obtain corresponding N third images includes:

[0017] Performing binarization processing on the N second images respectively to obtain N binary images;

[0018] Performing noise removal processing on the N binary images respectively to obtain N clear images;

[0019] The N clear images are respectively subjected to contour selection processing to obtain N third images.

[0020] Further, obtaining the noise value of the camera module corresponding to different preset direction gain parameters based on the first image, the N second images and the N third images includes:

[0021] Acquire a first area of ​​the preset image in the first image, a second area of ​​the preset image in each of the N second images, and a third area of ​​the preset image in each of the N third images;

[0022] Based on the first area, the second area and the third area, the noise value of the camera module corresponding to different preset direction gain parameters is obtained according to the following formula:

[0023]

[0024] S3 is the third area, S1 is the first area, S2 is the second area, and dB is the noise value of the camera module corresponding to different preset direction gain parameters.

[0025] Further, based on the noise value, a directional gain parameter is obtained, including:

[0026] Based on the noise value, obtaining a maximum noise value;

[0027] Based on the maximum noise value, a target preset directional gain parameter corresponding to the maximum noise value is obtained as the directional gain parameter of the camera module.

[0028] Furthermore, the preset graphic is any one of the following:

[0029] Circle, cross.

[0030] In a second aspect, the present invention further provides a device for obtaining a directional gain parameter, comprising:

[0031] A first image acquisition module, used for acquiring a first image of a table diagram taken by a camera module when the table diagram is stationary, wherein the table diagram includes a preset graphic;

[0032] A second image acquisition module, used for sequentially setting different preset directional gain parameters for the camera module, and obtaining N second images of the table image taken by the camera module during vibration corresponding to different preset directional gain parameters;

[0033] A third image acquisition module, used to process the N second images respectively to obtain corresponding N third images;

[0034] A noise value obtaining module, used for obtaining the noise values ​​of the camera module corresponding to different preset direction gain parameters based on the first image, the N second images and the N third images;

[0035] The directional gain parameter obtaining module is used to obtain the directional gain parameter of the camera module based on the noise value.

[0036] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method steps when executing the program.

[0037] In a fourth aspect, a computer-readable storage medium stores a computer program thereon, wherein the program implements the above-mentioned method steps when executed by a processor.

[0038] One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:

[0039] A method for obtaining directional gain parameters provided by the present invention is applied to a camera module, comprising: obtaining a first image taken by the camera module of a table diagram when it is stationary, the table diagram including preset graphics, sequentially setting different preset directional gain parameters for the camera module, when obtaining N second images corresponding to different preset directional gain parameters, the camera module takes N second images in vibration along with the table diagram, respectively processes the N second images to obtain corresponding N third images, based on the first image, the N second images and the N third images, obtains noise values ​​of the camera module corresponding to different preset directional gain parameters; based on the noise value, obtains the directional gain parameter of the camera module, therefore, there is no need to fit the results of multiple images, therefore, finally selects the directional gain parameter corresponding to one image as the optimal directional gain parameter, thereby improving the acquisition accuracy of the directional gain parameter. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Also, throughout the accompanying drawings, the same reference figures are used to represent the same components. In the drawings:

[0041] Figure 1 A schematic diagram of the steps of a method for obtaining directional gain parameters in an embodiment of the present invention is shown;

[0042] Figure 2 A schematic diagram of a first image in an embodiment of the present invention is shown;

[0043] Figure 3 A schematic diagram of a second image in an embodiment of the present invention is shown;

[0044] Figure 4 A schematic diagram of a binarized image in an embodiment of the present invention is shown;

[0045] Figure 5 A schematic diagram showing a clear image in an embodiment of the present invention is shown;

[0046] Figure 6 A schematic diagram showing a third image in an embodiment of the present invention is shown;

[0047] Figure 7 A schematic diagram showing the structure of a device for acquiring directional gain parameters in an embodiment of the present invention is shown;

[0048] Figure 8 A schematic structural diagram of an electronic device for implementing a method for acquiring directional gain parameters in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0049] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0050] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0051] Embodiment 1

[0052] The embodiment of the present invention provides a method for obtaining a directional gain parameter, which is applied to a camera module, specifically an OIS camera module, such as Figure 1 As shown, including:

[0053] S101, obtaining a first image of a table diagram taken by a camera module when the table diagram is stationary, wherein the table diagram includes a preset graphic.

[0054] S102, sequentially setting different preset directional gain parameters for the camera module, and obtaining N second images of the table image taken by the camera module during vibration corresponding to the different preset directional gain parameters.

[0055] S103: Process the N second images respectively to obtain corresponding N third images.

[0056] S104, based on the first image, N second images and N third images, obtaining noise values ​​of the camera module corresponding to gain parameters in different preset directions.

[0057] S105: Obtain a directional gain parameter of the camera module based on the noise value.

[0058] The camera module can use a vibration table to simulate optical shaking. Therefore, before starting the vibration table, a first image of a table diagram taken by the camera module when it is stationary is obtained, and the table diagram includes a preset graph.

[0059] The preset shape may be a circle or a cross, which is not limited here.

[0060] Taking the preset graphic as a circle as an example, the first image obtained is as follows Figure 2 As shown, since the vibration platform is not turned on, the circle in the first image captured by the camera module is the initial shape.

[0061] In an optional implementation, N preset directional gain parameters within a preset range are acquired, where N is a positive integer greater than 1.

[0062] The N preset directional gain parameters are pre-set, specifically, these preset directional gain parameters are stored in the register of the image sensor of the camera module, and are represented by hexadecimal numbers, which is not limited here.

[0063] After obtaining N preset directional gain parameters in a preset range, S102 is executed to sequentially set different preset directional gain parameters for the camera module, and when obtaining N second images corresponding to different preset directional gain parameters, the camera module takes N second images of the table while vibrating.

[0064] In an optional embodiment, the optical vibration is simulated by turning on a vibration table, and an exposure time is set for the camera module. The exposure time satisfies a preset relationship with the vibration frequency of the camera module. Specifically, the exposure time is selected to be 1 / 4 of the vibration frequency of the vibration table.

[0065] Different preset directional gain parameters are set for the camera module in turn, so as to obtain N second images of the table image taken by the camera module during vibration within the exposure time.

[0066] That is, a preset directional gain parameter is set for the camera module. Correspondingly, by turning on the vibration table, the camera module shoots the table image according to the set exposure time to obtain a second image. In the second image thus obtained, there is a shadow in the preset image, and the shadow is formed based on the exposure time, and the exposure time is a long exposure.

[0067] Specifically, the preset pattern: a circle, under long exposure, forms a shadow in the vibration direction, so that the circle becomes an ellipse, specifically as follows Figure 3 shown.

[0068] The above is for a case of a preset directional gain parameter. Of course, for each preset directional gain parameter, a corresponding second image is obtained, which will not be described in detail here.

[0069] After the N second images are obtained, S103 is executed to process the N second images respectively to obtain corresponding N third images.

[0070] In an optional implementation, first, the N second images are binarized respectively to obtain N binary images. Specifically, by setting a preset pixel value, the pixel value on each of the N second images is compared with the preset pixel value, and the points greater than the preset pixel value are represented by "1", and the points less than the preset pixel value are represented by "0", thereby obtaining the N binary images, which are the areas with shadow parts in the first image deleted, and only the overlapping areas are retained, such as Figure 4 shown.

[0071] Next, the N binary images are subjected to noise removal processing to obtain N clear images. Specifically, the binary images are subjected to open-loop and closed-loop operations to remove the noise around the overlapping area, thereby obtaining a clear image. Figure 5 shown.

[0072] Then, contour selection processing is performed on the N clear images respectively to obtain N third images. Specifically, the boundary of each clear image in the N clear images is obtained to obtain the contour of each clear image, thereby obtaining the N third images, such as Figure 6 shown.

[0073] The N third images finally obtained are overlapping images with clear outlines and no noise.

[0074] After obtaining the above-mentioned first image, N second images, and N third images, executing S104, based on the first image, the N second images, and the N third images, obtaining the noise value of the camera module corresponding to the gain parameters of different preset directions, including:

[0075] A first area of ​​a preset image in the first image, a second area of ​​a preset image in each of the N second images, and a third area of ​​a preset image in each of the N third images are respectively acquired.

[0076] Specifically, the areas of the first image, the second image, and the third image may be acquired based on an existing software system, such as openCV software.

[0077] Then, based on the first area, the second area, and the third area, the noise value of the camera module corresponding to the gain parameters in different preset directions is obtained according to the following formula:

[0078]

[0079] Among them, S3 is the third area, S1 is the first area, S2 is the second area, and dB is the noise value of the camera module corresponding to different preset direction gain parameters.

[0080] Thus, the noise values ​​of the camera module corresponding to the N preset directional gain parameters are obtained. Finally, S105 is executed to obtain the directional gain parameters of the camera module based on the noise values.

[0081] Specifically, based on the noise value, a maximum noise value is obtained; based on the maximum noise value, a target preset directional gain parameter corresponding to the maximum noise value is obtained as the directional gain parameter of the camera module.

[0082] Since the noise values ​​of the camera modules corresponding to the N preset directional gain parameters obtained above are the largest noise value is selected from the N noise values, the corresponding preset directional gain parameter is the optimal directional gain parameter. The directional gain parameters obtained in this way do not need to be fitted with multiple data, but are directly selected, thereby improving the acquisition accuracy of the directional gain parameters.

[0083] One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:

[0084] A method for obtaining directional gain parameters provided by the present invention is applied to a camera module, comprising: obtaining a first image of a table diagram taken by the camera module when it is stationary, the table diagram including preset graphics, sequentially setting different preset directional gain parameters for the camera module, when obtaining N second images corresponding to different preset directional gain parameters, the camera module takes N second images along with the table diagram in vibration, respectively processes the N second images to obtain corresponding N third images, based on the first image, the N second images and the N third images, obtains noise values ​​of the camera module corresponding to different preset directional gain parameters; based on the noise value, obtains the directional gain parameter of the camera module, therefore, there is no need to fit the results of multiple images, therefore, finally selects the directional gain parameter corresponding to one image as the optimal directional gain parameter, thereby improving the acquisition accuracy of the directional gain.

[0085] Embodiment 2

[0086] Based on the same inventive concept, the present invention also provides a device for obtaining directional gain parameters, such as Figure 7 As shown, including:

[0087] A first image acquisition module 701 is used to acquire a first image of a table diagram taken by a camera module when the table diagram is stationary, wherein the table diagram includes a preset graphic;

[0088] The second image acquisition module 702 is used to sequentially set different preset directional gain parameters for the camera module, and obtain N second images of the table image taken by the camera module during vibration corresponding to different preset directional gain parameters;

[0089] A third image obtaining module 703, configured to process the N second images respectively to obtain corresponding N third images;

[0090] A noise value obtaining module 704 is used to obtain noise values ​​of the camera module corresponding to different preset direction gain parameters based on the first image, the N second images and the N third images;

[0091] The directional gain parameter obtaining module 705 is used to obtain the directional gain parameter of the camera module based on the noise value.

[0092] In an optional implementation, the method further includes: N preset directional gain parameter acquisition modules, which are used to acquire N preset directional gain parameters within a preset range, where N is a positive integer greater than 1.

[0093] In an optional implementation, the second image obtaining module 702 includes:

[0094] An exposure time setting unit, used to set the exposure time for the camera module, wherein the exposure time and the vibration frequency of the camera module satisfy a preset relationship;

[0095] The second image acquisition unit is used to sequentially set different preset directional gain parameters for the camera module, so as to respectively obtain N second images of the table image taken by the camera module during vibration within the exposure time.

[0096] In an optional implementation, the preset image in the N second images has a shadow, and the shadow is formed based on the exposure time.

[0097] In an optional implementation, the third image obtaining module 703 includes:

[0098] A binary image obtaining unit, used for performing binarization processing on the N second images respectively to obtain N binary images;

[0099] A clear image obtaining unit, used for performing noise removal processing on the N binary images respectively to obtain N clear images;

[0100] The third image obtaining unit is used to perform contour selection processing on the N clear images respectively to obtain N third images.

[0101] In an optional implementation, the noise value obtaining module 704 includes:

[0102] an area acquisition unit, configured to acquire a first area of ​​the preset image in the first image, a second area of ​​the preset image in each of the N second images, and a third area of ​​the preset image in each of the N third images;

[0103] The noise value obtaining module is used to obtain the noise value of the camera module corresponding to different preset direction gain parameters according to the following formula based on the first area, the second area and the third area:

[0104]

[0105] S3 is the third area, S1 is the first area, S2 is the second area, and dB is the noise value of the camera module corresponding to different preset direction gain parameters.

[0106] In an optional implementation, the directional gain parameter obtaining module 705 includes:

[0107] A maximum noise value obtaining unit, used for obtaining a maximum noise value based on the noise value;

[0108] The directional gain parameter obtaining unit is used to obtain, based on the maximum noise value, a target preset directional gain parameter corresponding to the maximum noise value as the directional gain parameter of the camera module.

[0109] In an optional implementation, the preset graphic is any one of the following: a circle, a cross.

[0110] Embodiment 3

[0111] Based on the same inventive concept, an embodiment of the present invention provides an electronic device, such as Figure 8 As shown, it includes a memory 804, a processor 802, and a computer program stored in the memory 804 and executable on the processor 802. When the processor 802 executes the program, the steps of the method for obtaining the directional gain parameter are implemented.

[0112] Among them, Figure 8In the embodiment of the present invention, a bus architecture (represented by bus 800) is shown, which may include any number of interconnected buses and bridges, and bus 800 links various circuits including one or more processors represented by processor 802 and memory represented by memory 804. Bus 800 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 806 provides an interface between bus 800 and receiver 801 and transmitter 803. Receiver 801 and transmitter 803 may be the same element, namely a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 802 is responsible for managing bus 800 and general processing, while memory 804 may be used to store data used by processor 802 when performing operations.

[0113] Embodiment 4

[0114] Based on the same inventive concept, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method for obtaining the directional gain parameter are implemented.

[0115] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0116] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0117] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0118] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0119] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0120] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components of the acquisition device, electronic device, or system of the directional gain parameters according to the embodiments of the present invention. The present invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0121] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

Claims

1. A method for obtaining a directional gain parameter, applied to a camera module, characterized in that: include: Acquire a first image of a table diagram taken by a camera module when the camera module is stationary, wherein the table diagram includes a preset graphic; Sequentially setting different preset directional gain parameters for the camera module, and obtaining N second images of the table image taken by the camera module during vibration corresponding to the different preset directional gain parameters; Processing the N second images respectively to obtain corresponding N third images; Based on the first image, the N second images, and the N third images, obtaining noise values ​​of the camera module corresponding to different preset direction gain parameters; Based on the noise value, a directional gain parameter of the camera module is obtained.

2. The method according to claim 1, characterized in that The camera module is sequentially set with different preset direction gain parameters, and when the different preset direction gain parameters are obtained, the camera module takes N second images of the table diagram while vibrating, including: Setting an exposure time for the camera module, wherein the exposure time and the vibration frequency of the camera module satisfy a preset relationship; Different preset directional gain parameters are sequentially set for the camera module to respectively obtain N second images of the table image taken by the camera module during vibration within the exposure time.

3. The method according to claim 2, characterized in that The preset graphics in the N second images have shadows, and the shadows are formed based on the exposure time.

4. The method according to claim 1, characterized in that The processing of the N second images respectively to obtain corresponding N third images includes: Performing binarization processing on the N second images respectively to obtain N binary images; Performing noise removal processing on the N binary images respectively to obtain N clear images; The N clear images are respectively subjected to contour selection processing to obtain N third images.

5. The method according to claim 1, characterized in that The obtaining, based on the first image, the N second images, and the N third images, noise values ​​of the camera module corresponding to gain parameters in different preset directions includes: Acquire a first area of ​​the preset figure in the first image, a second area of ​​the preset figure in each of the N second images, and a third area of ​​the preset figure in each of the N third images; Based on the first area, the second area and the third area, the noise value of the camera module corresponding to different preset direction gain parameters is obtained according to the following formula: S3 is the third area, S1 is the first area, S2 is the second area, and dB is the noise value of the camera module corresponding to different preset direction gain parameters.

6. The method according to claim 1, characterized in that Based on the noise value, a directional gain parameter is obtained, including: Based on the noise value, obtaining a maximum noise value; Based on the maximum noise value, a target preset directional gain parameter corresponding to the maximum noise value is obtained as the directional gain parameter of the camera module.

7. The method according to claim 1, characterized in that The preset graphic is specifically any one of the following: Circle, cross.

8. A device for obtaining directional gain parameters, characterized in that: include: A first image acquisition module, used for acquiring a first image of a table diagram taken by a camera module when the table diagram is stationary, wherein the table diagram includes a preset graphic; A second image acquisition module, used for sequentially setting different preset directional gain parameters for the camera module, and obtaining N second images of the table image taken by the camera module during vibration corresponding to different preset directional gain parameters; A third image acquisition module, used to process the N second images respectively to obtain corresponding N third images; A noise value obtaining module, used for obtaining the noise values ​​of the camera module corresponding to different preset direction gain parameters based on the first image, the N second images and the N third images; The directional gain parameter obtaining module is used to obtain the directional gain parameter of the camera module based on the noise value.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method steps as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.