Imaging method, device, electronic device and storage medium

By dividing the basic image into multiple blocks, adaptively calculate the exposure value and perform HDR fusion, the existing HDR algorithms have solved the problem of complexity and limited coverage when setting exposure value, and achieved a more intelligent and efficient imaging effect.

CN114422721BActive Publication Date: 2025-04-18SHANGHAI WINGTECH ELECTRONICS TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210088608.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2025-04-18
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

The existing HDR algorithms are complex when setting exposure values, the EV value is fixed, the scenes and brightness covered are limited, and they are not smart enough, resulting in the final HDR effect being unsatisfactory and requires repeated debugging.

Method used

By dividing the basic image into multiple blocks, the first exposure value and the second exposure value are adaptively calculated based on the brightness of the first area (the block with the largest brightness) and the second area (the block with the lowest brightness), the corresponding first image and the second image are obtained, and they are aligned and synthesized through the HDR fusion algorithm to finally obtain the optimal imaging effect.

Benefits of technology

The exposure value is adaptively calculated according to the brightness of different regions in different scenarios, which improves the imaging effect of the final output image and avoids the repeated debugging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114422721B_ABST
    Figure CN114422721B_ABST
Patent Text Reader

Abstract

The present disclosure is about an imaging method, device, electronic device and storage medium, including: in response to an imaging request, obtaining a basic image based on a default exposure value, wherein the basic image includes N blocks; obtaining a first exposure value and a second exposure value based on the brightness of a first area and a second area in the N blocks, wherein the first area includes M blocks with the largest brightness, and the second area includes M blocks with the smallest brightness, and the M is less than the N; obtaining a corresponding first image and a second image based on the first exposure value and the second exposure value; fusing the basic image, the first image and the second image to obtain a final image. The present application can adaptively calculate a suitable exposure value for different scenes, and improve the imaging effect of the final output image by fusing the corresponding exposure image and the basic image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to an imaging method, device, electronic device and storage medium. Background Art

[0002] Most of the existing HDR algorithms in related technologies first determine whether it is an HDR scene by analyzing the histogram of the scene. If it is an HDR scene, different EV exposures are set according to whether there is a face, the ambient brightness, and different scenes. Then, EV0, EV+, and EV- are aligned and synthesized to output the final HDR effect. This HDR algorithm sets different EV information according to information such as brightness and scene to obtain HDR input images of EV+ and EV-, and then fuses them. The algorithm is complex, the EV value is fixed, the covered scenes and brightness are limited, and it is not smart enough. The final HDR effect is often unsatisfactory and needs to be debugged repeatedly. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an imaging method, an apparatus, an electronic device and a storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an imaging method, comprising:

[0005] In response to the imaging request, a basic image is acquired based on a default exposure value, wherein the basic image includes N blocks;

[0006] Based on the brightness of a first area and the brightness of a second area in the N blocks, obtaining a first exposure value and a second exposure value, wherein the first area includes M blocks with the largest brightness, the second area includes M blocks with the smallest brightness, and M is less than N;

[0007] Based on the first exposure value and the second exposure value, obtaining a corresponding first image and a second image;

[0008] The basic image, the first image and the second image are fused to obtain a final image.

[0009] In some embodiments, obtaining the first exposure value and the second exposure value based on the brightness of the first area and the brightness of the second area in the N blocks includes:

[0010] Obtaining a first brightness average value of M blocks with the largest brightness in the first area, and obtaining the first exposure value according to the first brightness average value;

[0011] A second average brightness value of M blocks with the smallest brightness in the second area is obtained, and the second exposure value is obtained according to the second average brightness value.

[0012] Furthermore, the determination method of M is as follows:

[0013] The number of blocks in the first area and the number of blocks in the second area are adjusted until a brightness difference between the brightness of the first area and the brightness of the second area is less than or equal to a preset threshold, thereby obtaining M.

[0014] Further, the adjusting the number of blocks in the first area and the number of blocks in the second area until the brightness difference between the brightness of the first area and the brightness of the second area is less than or equal to a preset threshold, to obtain M, includes:

[0015] S1: Obtain the brightness values ​​of X blocks with the largest brightness and the brightness values ​​of X blocks with the smallest brightness, wherein X is less than N and the initial value of X is 1;

[0016] S2: Determine whether a brightness difference between the brightness values ​​of the X blocks with the largest brightness and the brightness values ​​of the X blocks with the smallest brightness is greater than a preset threshold;

[0017] S3: If yes, set X=X+1 and go to S1;

[0018] S4: If no, then take X as M.

[0019] In some embodiments, after acquiring a basic image based on a default exposure value in response to an imaging request, the method further includes: dividing the basic image into a plurality of blocks of the same size based on a set block size.

[0020] In some embodiments, the default exposure value is determined based on the current scene.

[0021] In some embodiments, fusing the base image, the first image, and the second image to obtain a final image specifically includes:

[0022] Based on the HDR fusion algorithm, the three frames of the basic image, the first image and the second image are aligned and synthesized to obtain the final image.

[0023] According to a second aspect of an embodiment of the present disclosure, there is provided an imaging device, including:

[0024] An image acquisition module, configured to respond to an imaging request, acquire a basic image based on a default exposure value, wherein the basic image includes N blocks, and acquire a corresponding first image and a second image based on a first exposure value and a second exposure value;

[0025] an exposure value determination module, configured to obtain the first exposure value and the second exposure value based on the brightness of a first area and the brightness of a second area in the N blocks, wherein the first area includes M blocks with the largest brightness, the second area includes M blocks with the smallest brightness, and M is less than N;

[0026] The fusion module is used to fuse the basic image, the first image and the second image to obtain a final image.

[0027] An embodiment of the third aspect of the present application provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the instruction, the program, the code set or the instruction set is loaded and executed by the processor to implement the steps of an imaging method provided by the embodiment of the first aspect of the present application.

[0028] An embodiment of the fourth aspect of the present application provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal is able to execute the steps of an imaging method provided by the embodiment of the first aspect of the present application.

[0029] The embodiment of the fifth aspect of the present application provides a computer program product. When the instructions in the computer program product are executed by the processor of the mobile terminal, the mobile terminal is enabled to execute the steps of an imaging method provided by the embodiment of the first aspect of the present application.

[0030] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: according to the brightness conditions of different areas (different positions) in the basic image frames taken in different scenes, the appropriate exposure value (EV+, EV-) can be adaptively calculated, so as to obtain the corresponding first image and second image according to (EV+, EV-), and finally the first image, the second image and the basic image are aligned and fused to improve the imaging effect of the final output image.

[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0033] Figure 1 The figure is a flow chart of an imaging method according to an exemplary embodiment.

[0034] Figure 2is a basic image brightness block distribution diagram according to an exemplary embodiment.

[0035] Figure 3 is a block diagram of an imaging device according to an exemplary embodiment.

[0036] Figure 4 is an internal structure diagram according to an exemplary embodiment. DETAILED DESCRIPTION

[0037] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0038] An imaging method, device, electronic device and storage medium according to an embodiment of the present invention are described below with reference to the accompanying drawings.

[0039] Figure 1 is a flow chart of an imaging method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:

[0040] Step S101: in response to an imaging request, a basic image is acquired based on a default exposure value, wherein the basic image includes N blocks.

[0041] Specifically, when the user operates the mobile phone to click to take a photo, a basic image of the current scene is obtained based on a default exposure value in response to the user's imaging request, and the basic image includes a plurality of blocks. In some embodiments, the default exposure value is determined based on the current scene. In other words, the default exposure value of the current scene is determined by the current scene, and the basic image of the current scene is obtained by the exposure value of the current scene.

[0042] In some embodiments, after acquiring a basic image based on a default exposure value in response to an imaging request, the method further includes: dividing the basic image into a plurality of blocks of the same size based on a set block size.

[0043] Specifically, the user can set the size of the divided blocks according to their own needs. The smaller the size of the divided blocks, the finer the final image obtained.

[0044] Step S102: Based on the brightness of the first area and the brightness of the second area in the N blocks, obtain a first exposure value and a second exposure value, wherein the first area includes M blocks with the largest brightness, the second area includes M blocks with the smallest brightness, and M is less than N.

[0045] Specifically, the first exposure value and the second exposure value are determined by obtaining the brightness of the first area and the brightness of the second area in the N blocks of the basic image. That is, the brightness of the first exposure value is taken as ev+, and the second exposure value is taken as ev-, and the first area contains several blocks with the highest brightness, and the second area contains several blocks with the lowest brightness.

[0046] In some embodiments, obtaining the first exposure value and the second exposure value based on the brightness of the first area and the brightness of the second area in the N blocks includes:

[0047] Obtaining a first brightness average value of M blocks with the largest brightness in the first area, and obtaining the first exposure value according to the first brightness average value;

[0048] A second average brightness value of M blocks with the smallest brightness in the second area is obtained, and the second exposure value is obtained according to the second average brightness value.

[0049] Specifically, the first brightness average value of the M blocks with the largest brightness is calculated as the first exposure value, and the second brightness average value of the M blocks with the smallest brightness is calculated as the second exposure value.

[0050] Furthermore, the determination method of M is as follows:

[0051] The number of blocks in the first area and the number of blocks in the second area are adjusted until a brightness difference between the brightness of the first area and the brightness of the second area is less than or equal to a preset threshold, thereby obtaining M.

[0052] Specifically, by setting a preset threshold value for the brightness difference between the first area and the second area, and adjusting the number of blocks in the first area and the number of blocks in the second area, the brightness difference between the first area and the second area is made less than or equal to the preset threshold value, so that the first exposure value and the second exposure value obtained are reliable. If the brightness difference between the first area and the second area is greater than the preset threshold value, it indicates that there may be overexposed or underexposed area blocks in the area blocks, and a high-quality imaging image cannot be obtained.

[0053] Further, the adjusting the number of blocks in the first area and the number of blocks in the second area until the brightness difference between the brightness of the first area and the brightness of the second area is less than or equal to a preset threshold, to obtain M, includes:

[0054] S1: Obtain the brightness values ​​of X blocks with the largest brightness and the brightness values ​​of X blocks with the smallest brightness, wherein X is less than N and the initial value of X is 1;

[0055] S2: Determine whether a brightness difference between the brightness values ​​of the X blocks with the largest brightness and the brightness values ​​of the X blocks with the smallest brightness is greater than a preset threshold;

[0056] S3: If yes, set X=X+1 and go to S1;

[0057] S4: If no, then take X as M.

[0058] Specifically, first obtain the brightness value of the largest block and the brightness value of the smallest block. When the brightness difference between the two is greater than a preset threshold, it indicates that the image is unreliable. Then, add the brightness value of the largest block and the brightness value of the second largest block to obtain the brightness value of the new largest block, and add the brightness value of the smallest block and the brightness value of the second smallest block to obtain the brightness value of the new smallest block, until the difference between the brightness value of the new largest block and the brightness value of the new smallest block is less than or equal to the preset threshold. At this time, the brightness value of the new largest block is used as the brightness of the first area, and the brightness value of the new smallest block is used as the brightness of the second area.

[0059] Step S103: obtaining a corresponding first image and a corresponding second image based on the first exposure value and the second exposure value.

[0060] Specifically, a first image with a first exposure value ev+ and a second image with a second exposure value ev- are obtained based on the AE algorithm.

[0061] Step S104: fusing the basic image, the first image and the second image to obtain a final image.

[0062] Specifically, in some embodiments, according to the HDR fusion algorithm, three frames of the base image, the first image and the second image are aligned and synthesized to obtain the final image.

[0063] In order to further illustrate the technical concept of the present invention, we now combine it with specific application scenarios, such as Figure 2 The basic image brightness block distribution diagram shown is used to illustrate the technical solution of the present invention.

[0064] The first step is to respond to the user's imaging request, obtain the current exposure value based on the current scene, and obtain the basic image through the exposure value.

[0065] The second step is to divide the basic image into regions according to the degree of refinement that the user wants to obtain. In this embodiment, Figure 2 The diagram is divided into 16 blocks.

[0066] In the third step, since each block contains multiple pixels, the average brightness of each block is calculated based on the number and brightness of the pixels. Figure 2 shown.

[0067] Step 4: In this embodiment, the preset threshold is 75. Figure 4 The brightness value of the block with the highest brightness in the block is 98, and the brightness value of the block with the lowest brightness is 10. The difference between the two is 88, which is greater than 75. Then X+1, at this time, the brightness value of the block with the highest brightness is (98+88) / 2, that is, 93, and the brightness value of the block with the lowest brightness is (10+17) / 2, that is, 13.5. The difference is 79.5, which is still greater than 75. Similarly, X+1, at this time, the brightness value of the block with the highest brightness is (98+88+77) / 3, that is, 87.7, and the brightness value of the block with the lowest brightness is (10+17+23) / 3, that is, 16.7. The difference is 71, which is less than the preset threshold value. Therefore, the brightness of the first area is 87.7, and the brightness of the second area is 16.7.

[0068] In the fifth step, the brightness of the first area is 87.7 as the first exposure value ev+, and the brightness of the second area is 16.7 as the first exposure value ev-, and based on the AE algorithm, the corresponding first image and second image are output.

[0069] In the sixth step, according to the HDR fusion algorithm, the three frames of the base image, the first image and the second image are aligned and synthesized to obtain the final image.

[0070] In summary, the imaging method provided by the present application realizes the adaptive calculation of appropriate exposure values ​​(EV+, EV-) according to the brightness conditions of different areas (different positions) in the basic image frames taken in different scenes, thereby obtaining the corresponding first image and second image according to (EV+, EV-), and finally aligning and merging the first image, the second image, and the basic image to improve the imaging effect of the final output image.

[0071] In one embodiment, Figure 3 As shown, an imaging device is provided, comprising: an image acquisition module 201, an exposure value determination module 202, and a fusion module 203, wherein:

[0072] An image acquisition module 201 is used to respond to an imaging request, acquire a basic image based on a default exposure value, wherein the basic image includes N blocks, and acquire a corresponding first image and a second image based on a first exposure value and a second exposure value;

[0073] an exposure value determination module 202, configured to obtain the first exposure value and the second exposure value based on the brightness of a first area and the brightness of a second area in the N blocks, wherein the first area includes M blocks with the largest brightness, the second area includes M blocks with the smallest brightness, and M is less than N;

[0074] The fusion module 203 is used to fuse the basic image, the first image and the second image to obtain a final image.

[0075] In summary, the imaging device provided by the present application realizes the adaptive calculation of appropriate exposure values ​​(EV+, EV-) according to the brightness conditions of different areas (different positions) in the basic image frames taken in different scenes, thereby obtaining the corresponding first image and second image according to (EV+, EV-), and finally aligning and merging the first image, the second image, and the basic image to improve the imaging effect of the final output image.

[0076] For the specific definition of the imaging device, please refer to the definition of the imaging method above, which will not be repeated here. Each module in the above imaging device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0077] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for denoising an image is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0078] Those skilled in the art will understand that Figure 4The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0079] In one embodiment, the imaging device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 4 The memory of the electronic device may store various program modules constituting the imaging device, for example, Figure 3 The image acquisition module 201, the exposure value determination module 202, and the fusion module 203 are shown. The computer program composed of various program modules enables the processor to execute the steps of an imaging method in various embodiments of the present application described in this specification.

[0080] For example, Figure 4 The electronic device shown can be Figure 3 The image acquisition module 201 in the imaging device shown is used to respond to an imaging request and obtain a basic image based on a default exposure value, wherein the basic image includes N blocks, and based on the first exposure value and the second exposure value, obtain the corresponding first image and the second image; the exposure value determination module 202 is used to obtain the first exposure value and the second exposure value based on the brightness of the first area and the brightness of the second area in the N blocks, wherein the first area includes M blocks with the largest brightness, and the second area includes M blocks with the smallest brightness, and M is less than N; the fusion module 203 is used to fuse the basic image, the first image and the second image to obtain the final imaging.

[0081] The electronic device provided by the present application can open each module in the imaging device through the memory and the processor, and realizes the adaptive calculation of the appropriate exposure value (EV+, EV-) according to the brightness of different areas (different positions) in the basic image frame taken in different scenes, so as to obtain the corresponding first image and second image according to (EV+, EV-), and finally align and fuse the first image, the second image and the basic image to improve the imaging effect of the final output image.

[0082] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: in response to an imaging request, a basic image is obtained based on a default exposure value, wherein the basic image includes N blocks; based on the brightness of a first area and a brightness of a second area in the N blocks, a first exposure value and a second exposure value are obtained, wherein the first area includes M blocks with the largest brightness, and the second area includes M blocks with the smallest brightness, and M is less than N; based on the first exposure value and the second exposure value, a corresponding first image and a second image are obtained; and the basic image, the first image and the second image are fused to obtain a final image.

[0083] The non-temporary computer-readable storage medium provided in the present application can execute an imaging method in the above-mentioned embodiment through the instructions in the storage medium, and realize adaptive calculation of appropriate exposure values ​​(EV+, EV-) according to the brightness conditions of different areas (different positions) in the basic image frames taken in different scenes, so as to obtain the corresponding first image and second image according to (EV+, EV-), and finally align and fuse the first image, the second image, and the basic image to improve the imaging effect of the final output image.

[0084] In one embodiment, a computer program product is provided. When the instructions in the computer program product are executed by a processor of a mobile terminal, the mobile terminal is able to perform the following steps to respond to an imaging request, obtain a basic image based on a default exposure value, wherein the basic image includes N blocks; obtain a first exposure value and a second exposure value based on the brightness of a first area and a brightness of a second area in the N blocks, wherein the first area includes M blocks with the largest brightness, and the second area includes M blocks with the smallest brightness, and M is less than N; obtain a corresponding first image and a second image based on the first exposure value and the second exposure value; and fuse the basic image, the first image, and the second image to obtain a final image.

[0085] The computer program product provided by the present application can enable the mobile terminal to execute the imaging method in the above-mentioned embodiment, and realize adaptive calculation of appropriate exposure values ​​(EV+, EV-) according to the brightness conditions of different areas (different positions) in the basic image frames taken in different scenes, so as to obtain the corresponding first image and second image according to (EV+, EV-), and finally align and fuse the first image, the second image, and the basic image to improve the imaging effect of the final output image.

[0086] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM).

[0087] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0088] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An imaging method, applied to an electronic device, characterized in that: include: In response to the imaging request, a basic image is acquired based on a default exposure value, wherein the basic image includes N blocks; Based on the brightness of a first area and the brightness of a second area in the N blocks, obtaining a first exposure value and a second exposure value, wherein the first area includes M blocks with the largest brightness, the second area includes M blocks with the smallest brightness, and M is less than N; Based on the first exposure value and the second exposure value, obtaining a corresponding first image and a second image; fusing the basic image, the first image and the second image to obtain a final image; The method of determining M is as follows: adjusting the number of blocks in the first area and the number of blocks in the second area until the brightness difference between the brightness of the first area and the brightness of the second area is less than or equal to a preset threshold, thereby obtaining M; The step of adjusting the number of blocks in the first area and the number of blocks in the second area until a brightness difference between the brightness of the first area and the brightness of the second area is less than or equal to a preset threshold to obtain M includes: S1: Obtain the brightness values ​​of X blocks with the largest brightness and the brightness values ​​of X blocks with the smallest brightness, wherein X is less than N and the initial value of X is 1; S2: Determine whether a brightness difference between the brightness values ​​of the X blocks with the largest brightness and the brightness values ​​of the X blocks with the smallest brightness is greater than a preset threshold; S3: If yes, set X=X+1 and go to S1; S4: If no, then take X as M.

2. The imaging method according to claim 1, characterized in that: Obtaining a first exposure value and a second exposure value based on the brightness of a first area and the brightness of a second area in the N blocks, including: Obtaining a first brightness average value of M blocks with the largest brightness in the first area, and obtaining the first exposure value according to the first brightness average value; A second average brightness value of M blocks with the smallest brightness in the second area is obtained, and the second exposure value is obtained according to the second average brightness value.

3. The imaging method according to claim 1, characterized in that: After the basic image is acquired based on the default exposure value in response to the imaging request, the method further includes: dividing the basic image into a plurality of blocks of the same size based on a set block size.

4. The imaging method according to claim 3, characterized in that: The default exposure value is determined based on the current scene.

5. The imaging method according to claim 1, characterized in that: The fusing of the basic image, the first image and the second image to obtain a final image specifically includes: Based on the HDR fusion algorithm, the three frames of the basic image, the first image and the second image are aligned and synthesized to obtain the final image.

6. An imaging device, applied to electronic equipment, characterized in that: include: An image acquisition module, configured to respond to an imaging request, acquire a basic image based on a default exposure value, wherein the basic image includes N blocks, and acquire a corresponding first image and a second image based on a first exposure value and a second exposure value; an exposure value determination module, configured to obtain the first exposure value and the second exposure value based on the brightness of a first area and the brightness of a second area in the N blocks, wherein the first area includes M blocks with the largest brightness, the second area includes M blocks with the smallest brightness, and M is less than N; A fusion module, used for fusing the basic image, the first image and the second image to obtain a final image; The method of determining M is as follows: adjusting the number of blocks in the first area and the number of blocks in the second area until the brightness difference between the brightness of the first area and the brightness of the second area is less than or equal to a preset threshold, thereby obtaining M; The step of adjusting the number of blocks in the first area and the number of blocks in the second area until a brightness difference between the brightness of the first area and the brightness of the second area is less than or equal to a preset threshold to obtain M includes: S1: Obtain the brightness values ​​of X blocks with the largest brightness and the brightness values ​​of X blocks with the smallest brightness, wherein X is less than N and the initial value of X is 1; S2: Determine whether a brightness difference between the brightness values ​​of the X blocks with the largest brightness and the brightness values ​​of the X blocks with the smallest brightness is greater than a preset threshold; S3: If yes, set X=X+1 and go to S1; S4: If no, then take X as M.

7. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the instruction, the program, the code set or the instruction set is loaded and executed by the processor to implement the imaging method according to any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute the imaging method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Dynamic exposure adjusting method and electronic apparatus

    CN104917973A

  • Exposure control method, exposure control device and electronic device

    CN106851123A

  • Method and system of generating high dynamic range image corresponding to specific scene

    US20080094486A1