Image shooting method and device, electronic equipment and storage medium

By adjusting the exposure parameters of the image frame to be exposed in the queue to be processed, the problem of low image shooting efficiency in the prior art is solved, and more efficient image shooting is achieved.

CN119233077AActive Publication Date: 2024-12-31BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310789700.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2024-12-31
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

In the prior art, when shooting images, the image shooting instructions cannot be exposed in time because they need to wait for the image frames that have been generated in the pending queue to be exposed, which reduces the shooting efficiency.

Method used

When receiving the image capture instruction, priority is given to determining the image frame to be exposed in the queue to be processed, and its exposure parameters are adjusted based on the exposure information, so that the adjusted image frame to be exposed as the image frame to be collected, and in the queue order Make exposure.

Benefits of technology

The execution efficiency of image capture instructions is improved, the time to wait for the exposure of the generated image frame to be exposed is reduced, and the efficiency of image capture is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233077A_ABST
    Figure CN119233077A_ABST
Patent Text Reader

Abstract

The invention relates to an image shooting method and device, electronic equipment and a storage medium. The method comprises the following steps: receiving an image shooting instruction; the image shooting instruction comprises exposure information of an image frame to be collected; determining a to-be-exposed image frame generated in a to-be-processed queue, and adjusting an exposure parameter of the to-be-exposed image frame based on the exposure information, so as to take the to-be-exposed image frame after the exposure parameter is adjusted as the to-be-collected image frame; and exposing the to-be-collected image frames according to the sequence in the to-be-processed queue, so as to obtain a target image indicated to be shot by the image shooting instruction based on the exposed image frames under the condition that the exposure of the to-be-collected image frames is completed.
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 image capturing method and device, an electronic device, and a storage medium. Background Art

[0002] When performing image acquisition, the related technology needs to first generate the corresponding image frames to be exposed in the queue to be processed, and then expose them in sequence to obtain the image frames to be acquired. This method makes it necessary to wait for the image frames to be exposed that have been generated in the queue to be processed to be exposed before exposing the image frames to be acquired by the shooting instruction.

[0003] Due to the existence of this mechanism, the image frames collected by the image shooting instruction cannot be exposed in time, which reduces the shooting efficiency. Summary of the invention

[0004] The present disclosure provides an image capturing method and device, an electronic device, and a storage medium, which can improve image capturing efficiency when it is necessary to capture fusion images such as HDR.

[0005] According to a first aspect of the present disclosure, there is provided an image capturing method, comprising:

[0006] An image capturing instruction is received; the image capturing instruction includes exposure information of an image frame to be captured;

[0007] Determine the image frames to be exposed that have been generated in the queue to be processed, and adjust the exposure parameters of the image frames to be exposed based on the exposure information, so as to use the image frames to be exposed after the exposure parameters are adjusted as the image frames to be collected;

[0008] Exposing the image frames to be captured according to the order in the queue to be processed;

[0009] When the exposure of the image frame to be captured is completed, the target image captured by the image capturing instruction is acquired based on the image frame obtained by exposure.

[0010] According to a second aspect of the present disclosure, there is provided an image capturing device, comprising:

[0011] A receiving unit receives an image capturing instruction, wherein the image capturing instruction includes exposure information of an image frame to be captured;

[0012] a determination unit, which determines the image frames to be exposed that have been generated in the queue to be processed, and adjusts the exposure parameters of the image frames to be exposed based on the exposure information, so as to use the image frames to be exposed after the exposure parameters are adjusted as the image frames to be collected;

[0013] An exposure unit, exposing the image frames to be collected according to the order in the queue to be processed;

[0014] The acquisition unit acquires the target image captured by the image capturing instruction based on the image frame obtained by exposure when the exposure of the image frame to be captured is completed.

[0015] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0016] processor;

[0017] a memory for storing processor-executable instructions;

[0018] The processor implements the method as described in the first aspect by running the executable instructions.

[0019] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0020] In the technical solution disclosed in the present invention, when an image shooting instruction for obtaining an image frame to be collected is received, the image frame to be exposed that has been generated in the queue to be processed will be determined first, and the exposure parameters of the determined image frame to be exposed will be adjusted based on the exposure information of the image shooting instruction, so that the adjusted image frame to be exposed will be used as the image frame to be collected. On this basis, after the exposure of the image frame to be collected is completed, the target image captured by the image shooting instruction can be obtained based on the image frame obtained by exposure.

[0021] It should be understood that in the related art, if there are generated image frames to be exposed in the queue to be processed, it is necessary to wait until the image frames to be exposed are completely exposed before exposing the image frames to be collected. In the present disclosure, since the exposure parameters of the image frames to be exposed are adjusted directly based on the exposure information of the image frames to be collected, the image frames to be exposed can also be used as the image frames to be collected after the exposure is completed. Obviously, compared with the shooting method in the related art, the present disclosure can shoot images more efficiently. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 is a flow chart of an image capturing method shown in an exemplary embodiment of the present disclosure;

[0024] Figure 2 is a flow chart of an HDR image shooting method shown in an exemplary embodiment of the present disclosure;

[0025] Figure 3 is a schematic diagram of inter-thread communication shown in an exemplary embodiment of the present disclosure;

[0026] Figure 4 is another schematic diagram of inter-thread communication shown in an exemplary embodiment of the present disclosure;

[0027] Figure 5 is a block diagram of an image capturing device shown in an exemplary embodiment of the present disclosure;

[0028] Figure 6 is a block diagram of another image capturing device according to an exemplary embodiment of the present disclosure;

[0029] Figure 7 It is a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] 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 disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0031] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0032] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0033] When taking images, terminals such as smartphones and tablets need to start the image capture application first and create a corresponding queue to be processed. On this basis, if image acquisition is required, it is necessary to generate the corresponding image frames to be exposed in the queue to be processed first, and then expose them in the order of the image frames to be exposed in the queue to be processed, so as to obtain the image frames to be acquired.

[0034] It is worth noting that the image frames to be exposed generated in the queue to be processed do not refer to the image data obtained by exposure, or the image containing the picture content, but refer to the parameters set for the image frames to be exposed, such as the numbers of each image frame, exposure parameters, etc.

[0035] In the field of image processing, the rule of sequential exposure is followed in the order of the image frames in the queue to be processed. Due to the existence of this mechanism, if an image capture instruction is received when there are image frames to be exposed in the queue to be processed, the exposure operation of the image frames to be exposed must be completed first before the exposure operation of the image frames indicated by the image capture instruction can be executed, which seriously reduces the execution efficiency of the image capture instruction.

[0036] For example, when a smartphone starts an image capture application, it needs to capture an image as a preview screen. In this case, a certain number of preview frames to be exposed can be generated in the queue to be processed in advance. For example, preview frames numbered 52 to 56 can be generated. On this basis, the exposure operations of the preview frames numbered 52, 53, 54, 55, and 56 can be performed in sequence.

[0037] Assuming that, when executing the exposure operation of the preview frame numbered 54, an image capture instruction for instructing to capture a single-frame image is received, the relevant technology will further generate an image frame numbered 57 (corresponding to the above-mentioned single-frame image) to be exposed after detecting the information that the preview frame to be exposed that has been generated in the queue to be processed is numbered 56, and will execute the exposure operation of the image frame numbered 57 after waiting for the exposure of the preview frames numbered 55 and 56 to be completed.

[0038] Assume again that when performing the exposure operation of the preview frame numbered 54, a shooting instruction for instructing to shoot an HDR image is received, and the HDR image is obtained by fusing 6 frames with different exposure levels. In the related art, after detecting that the preview frame numbered 56 that has been generated and to be exposed in the queue to be processed is generated, image frames numbered 57 to 62 to be exposed are further generated, and after waiting for the exposure of the preview frames numbered 55 and 56 to be completed, the exposure operations of the image frames numbered 57 to 62 are sequentially performed.

[0039] It can be seen that the related technology needs to follow the rule of executing exposure operations in sequence according to the order in the queue to be processed, which makes it impossible for the related technology to perform exposure operations on the image frames to be collected in time when receiving the image shooting instructions, thereby reducing the execution efficiency of the image shooting instructions.

[0040] In view of this, the present disclosure proposes an image shooting method. In this method, when an image shooting instruction is obtained, the image frames to be exposed that have been generated in the queue to be processed can be preferentially determined, and based on the exposure information of the image frames to be collected contained in the instruction, the parameters of the determined image frames to be exposed are adjusted, and then the image frames to be exposed after the exposure parameters are adjusted are used as the image frames to be collected to be obtained by the image shooting instruction. On this basis, it is only necessary to expose the image frames to be collected in the order in the queue to be processed, and the target image instructed to be captured by the image shooting instruction can be directly obtained based on the image frames obtained by exposure.

[0041] It should be understood that the present disclosure adjusts the exposure parameters of the image frames to be exposed that have been generated in the queue to be processed, so that the image frames to be exposed that have been generated can be used as the image frames to be acquired by the image shooting instruction, without the need to create additional image frames to be exposed that correspond to the image frames to be acquired after the image frames to be exposed that have been generated. This is equivalent to achieving a "queue jumping" effect in the queue to be processed by adjusting the exposure parameters, shortening the time required to wait for the exposure of the image frames to be generated to be exposed to be completed, and greatly improving the execution efficiency of the image shooting instruction.

[0042] The following is an introduction to each step of the technical solution disclosed herein.

[0043] Figure 1 FIG. 1 is a flow chart of an image capturing method according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the method may include the following steps:

[0044] Step 102: receiving an image capturing instruction; the image capturing instruction includes exposure information of an image frame to be captured.

[0045] In the present disclosure, as described above, the queue to be processed refers to a queue for recording "parameters of image frames to be exposed that have not yet been exposed", which can usually be recorded in the form of numbers. For example, in a mobile terminal such as the smartphone or tablet computer described above, since a system architecture dedicated to the mobile terminal is used, the queue to be processed can be a producer queue (producerList) created for an image capture application. Of course, this is only an example of a mobile terminal, and the naming of the queue to be processed can be determined by those skilled in the art according to actual conditions, and the present disclosure does not limit this.

[0046] In the present disclosure, when an image shooting instruction is received, the image information of the image frame generated in the queue to be processed can be read preferentially to determine whether there is an image frame to be exposed that has not been exposed in the queue to be processed. If there is, based on the exposure information of the image frame to be collected contained in the image shooting instruction, the parameters of the image frame to be exposed are adjusted to use the adjusted image to be exposed as the image frame to be collected. If there is no image frame to be exposed, based on the exposure information in the image shooting instruction, an image frame to be exposed corresponding to the image frame to be collected can be generated in the queue to be processed. On this basis, the generated image frame to be exposed can be exposed, and based on the image frame obtained by exposure, the target image instructed to be captured by the image shooting instruction is obtained.

[0047] In the present disclosure, it is possible to determine whether there are unexposed images in the queue to be processed in a variety of ways. For example, since the image frames in the queue to be processed follow the rule of sequential exposure, it is possible to determine whether the last image frame in the queue to be processed is being exposed by the read image information. If so, it proves that there are no unexposed image frames in the queue to be processed; for another example, an exposure completion label can be added to the image frames in the queue to be processed that have completed exposure. Therefore, when the read image information indicates that all image frames in the queue to be processed have been added with an exposure completion label, it proves that there are no unexposed image frames in the queue to be processed. Of course, the above examples are only illustrative, and how to determine whether there are unexposed image frames in the queue to be processed can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0048] Step 104 , determining the image frames to be exposed that have been generated in the queue to be processed, and adjusting the exposure parameters of the image frames to be exposed based on the exposure information, so as to use the image frames to be exposed after the exposure parameters are adjusted as the image frames to be collected.

[0049] In the present disclosure, when it is determined that the image frames to be exposed have been generated in the queue to be processed, the exposure parameters of the image frames to be exposed can be adjusted based on the exposure information contained in the image shooting instruction. The present disclosure can perform the adjustment operation in a variety of ways.

[0050] In one embodiment, when the automatic exposure method is used for exposure, the exposure operation is actually performed by the automatic exposure module, so the exposure information contained in the image shooting instruction can be sent to the automatic exposure module, so that the automatic exposure module adjusts the exposure parameters of the image frame to be exposed based on the received exposure information. On this basis, the automatic exposure module can expose the image frame to be exposed according to the adjusted exposure parameters, and then use the image frame obtained by exposure as the image frame to be collected by the image shooting instruction.

[0051] In this embodiment, the image capture application and the automatic exposure module can be run in different threads, so the exposure information can be transmitted through the inter-thread communication protocol. In other words, the image capture thread for running the image capture application can determine the generated image frames to be exposed from the queue to be processed, and the image capture thread can send the exposure information to the automatic exposure module through the inter-thread communication protocol.

[0052] It should be understood that since the inter-thread communication protocol is a fast communication protocol, the use of the inter-thread communication protocol to send exposure information can ensure that the exposure information is sent to the automatic exposure module in a timely manner, thereby avoiding the situation where the exposure information is not transmitted in a timely manner, resulting in the exposure of the image frame to be exposed before the exposure parameters are adjusted.

[0053] Step 106: Expose the image frames to be captured according to the order in the queue to be processed.

[0054] Step 108 , when the exposure of the image frame to be captured is completed, acquiring the target image captured by the image capturing instruction based on the image frame obtained by exposure.

[0055] In the present disclosure, after adjusting the parameters of the image frame to be exposed, the exposure operation can be performed in the order in the queue to be processed. After the image frame to be captured is exposed, the target image indicated by the image shooting instruction can be obtained based on the image frame obtained by exposure.

[0056] In the present disclosure, the target image to be captured indicated by the image capturing instruction may be related to the user's capturing requirement.

[0057] In one embodiment, the target image to be captured indicated by the image capture instruction may be a single-frame image. In this case, it is only necessary to adjust the parameters of an image frame to be exposed that has been generated in the processing queue, and after the exposure of the image frame to be exposed is completed, the image frame obtained by exposure can be directly used as the target image.

[0058] In another embodiment, the target image to be captured as indicated by the image capture instruction may be: a composite image obtained by fusing multiple image frames through image synthesis technology. In other words, the image capture instruction is used to instruct the acquisition of a preset number of image frames to be synthesized to synthesize the target image. In this case, after determining the image frames to be exposed that have been generated in the queue to be processed, the exposure parameters of the image frames to be exposed may be adjusted based on the exposure information in the image capture instruction, so that the image frames to be exposed after the exposure parameters are adjusted are used as at least a part of the preset number of image frames to be synthesized. On this basis, the preset number of image frames to be synthesized may be exposed frame by frame in sequence according to the order in the queue to be processed, so that when the preset number of image frames to be synthesized are all exposed, the multiple image frames to be synthesized obtained by exposure are synthesized to obtain the target image.

[0059] In this embodiment, it should be understood that, since it is necessary to collect multiple image frames and use image synthesis technology, the process of capturing the target image originally takes a long time, and the related technology further increases the time to wait for other image frames to be exposed, resulting in the execution efficiency of the image capture instruction being particularly low, which is mainly reflected in: the user needs to wait for a long time before being able to trigger the image capture control again to perform the next image capture operation. Therefore, since the present disclosure reduces the time to wait for other image frames to be exposed by adjusting the exposure parameters, the execution efficiency of the image capture instruction is improved, which is mainly reflected in: the time interval for the user to perform the capture operation is reduced (that is, the waiting time for the user to trigger the image capture control again is reduced)

[0060] In this embodiment, the composite image captured by the image capture instruction can be determined according to user needs. For example, the image capture instruction can instruct to capture an HDR (High Dynamic Range Imaging) image. In this case, the exposure information contained in the image capture instruction can be the exposure level of each image frame to be synthesized, wherein the exposure level of each image frame to be synthesized is different. For another example, the image capture instruction can instruct to capture a background blurred image. In this case, the image capture instruction can instruct to capture multiple image frames with different depths of field to synthesize a background blurred image. Of course, the above examples are only exemplary. The specific use of the image capture instruction to indicate what kind of composite image to capture can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0061] In this embodiment, when the image shooting instruction indicates that the target image to be shot is an HDR image, after determining the image frames to be exposed that have been generated in the queue to be processed, the exposure level consistent with the number of image frames to be exposed can be determined from the exposure information contained in the image shooting instruction, and the determined exposure level can be analyzed by parameters to obtain the corresponding target exposure parameters, on which basis, the exposure parameters of the determined image frames to be exposed can be adjusted to the target exposure parameters. For example, if the exposure information in the image shooting instruction includes 6 different exposure levels, and the determined image frames to be exposed are 2, then 2 exposure levels can be determined from the exposure information, and the parameters of the 2 exposure levels can be analyzed to obtain 2 sets of target exposure parameters, and then the exposure parameters of the image frames to be exposed can be adjusted based on the 2 sets of target exposure parameters.

[0062] In this embodiment, there may be an exposure sequence between the preset number of image frames to be synthesized. Under this premise, after the image frames to be exposed are determined, the target image frames to be synthesized that are consistent with the number of image frames to be exposed can be determined from the preset number of image frames to be synthesized according to the exposure sequence, and the exposure parameters of the determined image frames to be exposed can be adjusted based on the exposure information of the determined target image to be synthesized. In this case, the target image frames to be synthesized can be determined according to a preset rule. For example, if the number of determined image frames to be exposed is referred to as the target number, the image frames to be synthesized that are the frontmost and the target number after being sorted in the exposure sequence among the preset number of image frames to be synthesized can be determined as the target image frames to be synthesized, and the image frames to be synthesized that are the backmost and the target number after being sorted in the exposure sequence can also be determined as the target image frames to be synthesized. Of course, the examples here are only for illustration, and how to determine the target image frames to be synthesized can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0063] In this embodiment, since the image frames to be exposed that have been generated in the queue to be processed are used as at least a part of the preset number of image frames to be synthesized, there is a situation where the preset number is greater than the number of image frames to be exposed that are determined. In this case, in addition to adjusting the exposure parameters of the image frames to be exposed, other image frames to be synthesized that are different from the at least a part of the image frames to be synthesized need to be generated in the queue to be processed, so that the number of image frames finally exposed reaches the preset number. On this basis, the image frames to be exposed can be exposed frame by frame based on the adjusted exposure parameters, and after the exposure operation of the image frames to be exposed is completed, the image frames to be synthesized that are different from the determined image frames to be exposed continue to be exposed frame by frame.

[0064] Of course, when the number of image frames to be exposed determined in the present embodiment is greater than or equal to the preset number, it is only necessary to directly perform image synthesis on the preset number of image frames to be synthesized after completing the exposure operation of the image frames to be exposed that are to be synthesized, so as to obtain the target image.

[0065] It is worth noting that in the present disclosure, the image frames to be exposed determined from the queue to be processed may be image frames of different types. For example, as mentioned above, the image shooting application has a need to display a preview screen, and the image shooting application may continuously generate preview frames in the queue to be processed to expose and obtain preview images. Therefore, the image frames to be exposed determined from the queue to be processed in the present disclosure may be preview frames; for another example, the image shooting application may have the function of interrupting the shooting operation, then, under the instruction of the current image shooting instruction, the image frames to be exposed determined from the queue to be processed may be "image frames generated in the queue to be processed based on the previous image shooting instruction". Of course, this example is only illustrative, and the specific image frames to be exposed determined from the queue to be processed may be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0066] It should also be noted that the execution subject of the technical solution of the present disclosure can be any type of electronic device, for example, the electronic device can be a mobile terminal such as a smart phone, a tablet computer, or a fixed terminal such as a smart TV, a PC (personal computer). It should be understood that any electronic device with an image capture function can be used as the electronic device in the present disclosure, and which type of electronic device is used as the execution subject of the technical solution of the present disclosure can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0067] It can be seen from the above technical solution that, when receiving an image shooting instruction, the present disclosure can preferentially determine the image frames to be exposed that have been generated in the queue to be processed, and adjust the exposure parameters of the image frames to be exposed based on the exposure information contained in the instruction, so as to use the image frames to be exposed after the exposure parameters are adjusted as the image frames to be acquired by the image shooting instruction. On this basis, after the exposure operation of the image frames to be exposed is completed according to the queue to be processed, the target image instructed to be captured by the image shooting instruction can be acquired based on the image frames obtained by exposure.

[0068] It should be understood that the reason why the related technology needs to wait until the exposure of the image frames to be exposed in the queue to be processed is completed before the image frames to be collected to be obtained by the image shooting instruction can be exposed. On the one hand, it is because it needs to follow the mechanism of "exposing the image frames in sequence according to the order in the queue to be processed"; on the other hand, it is because the image frames to be exposed that have been generated in the queue to be processed usually do not meet the exposure requirements of the received image shooting instruction. In view of this, the present disclosure adjusts the parameters of the generated image frames to be exposed according to the exposure information in the image shooting instruction, so that the generated image frames to be exposed meet the exposure requirements of the image shooting instruction, and then the generated image frames to be exposed can be used as the image frames to be collected by the image shooting instruction, achieving the effect of "jumping the queue" in the queue to be processed, avoiding the problem in the related technology that it is necessary to wait for the exposure of the generated image frames to be exposed to be completed before exposing the image frames to be collected by the image shooting instruction, and improving the execution efficiency of the image shooting instruction.

[0069] Below, taking “shooting HDR images with a smartphone” as an example, the technical solution of the present disclosure is introduced.

[0070] It should be emphasized that in mobile terminals such as smart phones, system architectures dedicated to mobile terminals such as Android and IOS are usually used. In such mobile terminal system architectures, the queue to be processed generated for recording the parameters of the image frames to be exposed is called a producer queue, and the image frames that have been exposed are cached in a consumer queue (consumerList). Based on this, it should be understood that the producer queue in the embodiments shown below is the queue to be processed described above.

[0071] Figure 2 FIG. 1 is a flow chart of an HDR image shooting method according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method may include the following steps:

[0072] Step 201, start the camera APP.

[0073] In this embodiment, the smartphone may be pre-installed with a camera application, namely, a camera APP, to serve as the above-mentioned image shooting application.

[0074] In this embodiment, the user can start the camera APP by triggering the camera logo on the smart phone. After starting, the camera APP can continuously collect preview images to display them in the preview box, so that the user can perform adjustment operations on shooting parameters through the preview images.

[0075] Step 202, continuously generate preview frames in the producer queue corresponding to the camera APP.

[0076] In this embodiment, after the camera APP is started, it runs based on the image capture thread corresponding to the camera APP, and a producer queue is created in the image capture thread. If you want to obtain a preview image, you need to first generate a corresponding preview frame in the producer queue. On this basis, you can expose each preview frame in sequence according to the order in the producer queue to obtain a number of preview images.

[0077] Step 203: The preview frames in the producer queue are sent to the AE (Automatic Exposure) execution module in sequence through the inter-thread communication protocol.

[0078] In this embodiment, after the preview frame is generated in the producer queue, the preview frame is transmitted to the AE execution module (i.e., the automatic exposure module, which is usually run based on the exposure thread) so that the AE execution module actually performs the exposure operation. Among them, since the camera APP and the AE execution module are both based on thread operation, data transmission can be performed through the inter-thread communication protocol to increase the transmission speed. For example, the AE execution module is set on the image sensor (sensor) of the electronic device.

[0079] For ease of understanding, let's take an example. After the camera app is started, you can Figure 3 As shown, a producer queue and a consumer queue corresponding to the camera APP are created, and a preview frame to be exposed is created in the producer queue, so that the AE execution module performs the exposure operation in the order in the producer queue, wherein, after the exposure is completed, the image frame obtained by exposure is transmitted to the consumer queue, so as to display the preview image in the preview box in the order in the consumer queue.

[0080] It is not difficult to see that Figure 3 The situation shown is: preview frames numbered 52 to 56 have been generated in the producer queue, the AE execution module is performing the exposure operation of preview frame numbered 54 (i.e., the image frame filled with dots in the image), while preview frames numbered 48 to 53 have been exposed, and preview frames numbered 48 to 51 have been transmitted to the consumer queue and will be displayed as preview images in the preview box. If the preview state is maintained without issuing a shooting command, it will continue to generate Figure 3 The preview frames numbered 57, 58, and 59 are shown and are continuously sent to the AE execution module for exposure.

[0081] Step 204: The AE execution module sequentially performs exposure operations on the preview frames.

[0082] Step 205, displaying the preview image obtained by the exposure of the AE execution module.

[0083] Step 206: Receive an HDR image capturing instruction.

[0084] In this embodiment, during the display of the preview image, the user can operate the camera APP to perform an image capture operation. Among them, the camera APP in this embodiment supports the capture operation of HDR images. Therefore, the user can select the HDR function in the camera APP to capture HDR images by default in subsequent capture processes. For example, after turning on the HDR function, the user can trigger the capture control to initiate an HDR image capture instruction.

[0085] Step 207, determining the preview frames to be exposed in the producer queue.

[0086] In this embodiment, after receiving the HDR shooting instruction, the preview frames to be exposed in the producer queue, that is, the preview frames that have been generated but not yet exposed, can be determined. For example, when the user triggers the image shooting control in the camera APP and then initiates the image shooting instruction, the preview frames to be exposed can be determined according to the initiation time of the image shooting instruction. For example, the preview frames that have been generated in the producer queue before the initiation time of the image shooting instruction but have not been exposed can be determined as the preview frames to be exposed.

[0087] Following the above example, suppose that Figure 3 In the case shown, an HDR image shooting instruction is received. Since the AE execution module is executing the exposure operation of the preview frame numbered 54, it can be known that the preview frames to be exposed are "image frames numbered 55 and 56", that is, Figure 4 Two image frames are filled with vertical lines as shown.

[0088] Step 208: Determine an exposure level consistent with the number of preview frames to be exposed from the HDR image capture instruction.

[0089] In this embodiment, the camera APP can set the exposure level to limit the exposure effect of the image frames to be synthesized by the HDR image shooting instruction. Under this premise, after determining the preview frames to be exposed, the exposure level consistent with the number of preview frames to be exposed can be determined from the instruction to adjust the parameters of the preview frames to be exposed.

[0090] Continuing with the above example, assume that the HDR image shooting instruction instructs to shoot 6 to-be-synthesized image frames for synthesizing the HDR image, and the exposure levels of the 6 to-be-synthesized image frames contained in the HDR image shooting instruction are: v -12", "E v -6", "E v -3", "E v 0", "E v 3", "E v 6". Among them, E v0 represents standard brightness, while E v -3 indicates that the brightness of the corresponding image frame is 1 / 3 of the standard brightness, while E v 3 indicates that the brightness of the corresponding image frame is 3 times the standard brightness.

[0091] Under this premise, since the numbers of the image frames to be exposed are determined to be 55 and 56, two exposure levels can be determined from the HDR image shooting instruction, such as “E v -12", "E v -6” for these two exposure levels.

[0092] Step 209: adjusting the exposure parameters of the preview frame to be exposed based on the determined exposure level.

[0093] Following the above example, we can v -12", "E v The two exposure levels of "-6" are used to adjust the exposure parameters of the two preview frames numbered 55 and 56. It should be understood that since the preview frames 55 and 56 have been transmitted to the AE execution module, it is necessary to use the inter-thread communication protocol to transfer the "E v -12", "E v -6" are transmitted to the AE execution module, so that the AE execution module converts "E v -12", "E v -6” are parsed into exposure parameters, and the image frames numbered 55 and 56 are exposed based on the parsed exposure parameters.

[0094] Step 210: Generate other image frames to be synthesized in the producer queue based on other exposure levels in the HDR image shooting instruction.

[0095] In this embodiment, in addition to adjusting the exposure parameters of the preview frame to be exposed, it is also necessary to generate other image frames to be synthesized based on the remaining exposure levels in the HDR image shooting instruction.

[0096] Following the above example, we also need to base on “E v -3", "E v 0", "E v 3", "E v The four exposure levels of 6” generate image frames to be synthesized numbered 57, 58, 59, and 60.

[0097] Step 211, perform exposure operations in sequence according to the order in the producer queue.

[0098] Following the above example, the exposure operation can be performed in sequence from 55 to 60 to obtain 6 image frames to be synthesized with different exposure levels. It is worth noting that when there are still image frames to be exposed in the producer queue, the AE execution module continues to perform the exposure operation. In other words, although the numbering of the above steps is sequential, they may be asynchronously executed in actual situations. For example, the "exposure operation of image frames to be synthesized numbered 55 and 56" and the "generation of image frames to be synthesized numbered 57 to 60 in the producer queue" may be performed at the same time.

[0099] Step 212, when the exposure of the image frame to be synthesized indicated by the HDR image shooting instruction is completed, image fusion is performed on the multiple image frames obtained by exposure to obtain an HDR image.

[0100] In this embodiment, after six image frames 55 to 60 to be synthesized are obtained through exposure, the image frames obtained through exposure can be synthesized into an HDR image through image synthesis technology.

[0101] It can be seen from the above technical solution that if the method in the relevant technology is adopted, it is necessary to wait for the exposure of the generated preview frames to be exposed to be completed before the image frames indicated by the HDR image shooting instruction can be executed. The shooting process is time-consuming. For example, in the above example, it is necessary to wait for the exposure of the preview frames numbered 55 and 56 to be completed, and then perform the exposure operation of 6 image frames to obtain the HDR image.

[0102] After adopting the technical solution of the present invention, the exposure parameters of the preview frames can be adjusted to make the generated preview frames meet the exposure requirements of the HDR image, thereby achieving the effect of "jumping the queue" without the need to wait for the exposure of the preview frames to be completed. For example, in the above example, the preview frames numbered 55 and 56 can be changed to image frames to be synthesized, so that after completing the exposure operation of the image frames numbered 55 and 56, only 4 image frames need to be exposed to obtain the HDR image, which greatly reduces the shooting time and improves the efficiency of image shooting.

[0103] Figure 5 FIG. 1 is a block diagram of an image capturing device according to an exemplary embodiment of the present disclosure. Figure 5 The device includes a receiving unit 501, a determining unit 502, an exposing unit 503 and an acquiring unit 504.

[0104] The receiving unit 501 receives an image capturing instruction, wherein the image capturing instruction includes exposure information of an image frame to be captured;

[0105] The determining unit 502 determines the image frames to be exposed that have been generated in the queue to be processed, and adjusts the exposure parameters of the image frames to be exposed based on the exposure information, so as to use the image frames to be exposed after the exposure parameters are adjusted as the image frames to be collected;

[0106] An exposure unit 503 exposes the image frames to be captured according to the order in the queue to be processed;

[0107] The acquisition unit 504 acquires the target image captured by the image capturing instruction based on the image frame obtained by exposure when the exposure of the image frame to be captured is completed.

[0108] Optionally, the image capturing instruction is used to instruct to collect a preset number of image frames to be synthesized to synthesize the target image;

[0109] The determining unit 502 is further configured to: adjust the exposure parameters of the image frames to be exposed based on the exposure information, so as to use the image frames to be exposed after the exposure parameters are adjusted as at least a part of the preset number of image frames to be synthesized;

[0110] The exposure unit 503 is further used to: sequentially expose a preset number of to-be-synthesized image frames frame by frame according to the order in the queue to be processed;

[0111] The acquisition unit 504 is further configured to: when a preset number of image frames to be synthesized are all exposed, perform image synthesis on the multiple image frames to be synthesized obtained by exposure to obtain a target image.

[0112] Optionally, the exposure information is the exposure level of each image frame to be synthesized; wherein the exposure levels of each image frame to be synthesized are different, so that the target image is a high dynamic range image.

[0113] Optionally, the determining unit 502 is further configured to:

[0114] Determine an exposure degree consistent with the number of image frames to be exposed from the exposure information, and perform parameter analysis on the determined exposure degree to obtain a corresponding target exposure parameter;

[0115] The determined exposure parameter of the image frame to be exposed is adjusted to the target exposure parameter.

[0116] Optionally, the preset number of image frames to be synthesized have an exposure sequence; the determining unit 502 is further configured to:

[0117] Determining, from the preset number of image frames to be synthesized, target image frames to be synthesized that are consistent in number with the image frames to be exposed according to the exposure sequence;

[0118] Based on the determined exposure information of the target image to be synthesized, the exposure parameters of the image frame to be exposed are adjusted.

[0119] Optionally, the determining unit 502 is further configured to:

[0120] The exposure information is sent to the automatic exposure module, so that the automatic exposure module adjusts the exposure parameters of the image frame to be exposed based on the received exposure information.

[0121] Optionally, the determining unit 502 is further configured to:

[0122] An image capturing thread for running an image capturing application determines a generated image frame to be exposed from a queue to be processed;

[0123] The image shooting thread sends the exposure information to the automatic exposure module through an inter-thread communication protocol.

[0124] like Figure 6 As shown, Figure 6 is a block diagram of another image capturing device according to an exemplary embodiment of the present disclosure. Figure 5 Based on the illustrated embodiment, it further includes: a generating unit 505.

[0125] Optionally, also include:

[0126] A generating unit 505 generates other to-be-synthesized image frames in the to-be-processed queue that are different from the at least one portion of the to-be-synthesized image frames;

[0127] The exposure unit 503 is further used to: expose the image frame to be exposed frame by frame based on the adjusted exposure parameters, and after completing the exposure operation of the image frame to be exposed, continue to expose the image frame to be synthesized different from the image frame to be exposed frame by frame.

[0128] Optionally, the generating unit 505 is further used to:

[0129] When the image shooting instruction is received, image information of the image frame generated in the queue to be processed is read; and when the image information indicates that there is no image frame to be exposed that has not been exposed in the queue to be processed, an image frame to be exposed corresponding to the image frame to be collected is generated in the queue to be processed based on the exposure information;

[0130] The exposure unit 503 is further used to: expose the to-be-exposed image frames generated in the to-be-processed queue, and acquire the target image indicated by the image capturing instruction based on the image frames obtained by exposure.

[0131] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0132] Accordingly, the present disclosure also provides an image capturing device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement an image capturing method as described in any one of the above embodiments, for example, the method may include: receiving an image capturing instruction; the image capturing instruction includes exposure information of an image frame to be captured; determining an image frame to be exposed that has been generated in a queue to be processed, and adjusting exposure parameters of the image frame to be exposed based on the exposure information, so as to use the image frame to be exposed after adjusting the exposure parameters as the image frame to be captured; exposing the image frame to be captured in the order in the queue to be processed; and when the exposure of the image frame to be captured is completed, obtaining a target image indicated by the image capturing instruction based on the image frame obtained by exposure.

[0133] Accordingly, the present disclosure also provides an electronic device, which includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for implementing the image capturing method as described in any of the above embodiments, for example, the method may include: receiving an image capturing instruction; the image capturing instruction includes exposure information of an image frame to be captured; determining the image frames to be exposed that have been generated in a queue to be processed, and adjusting the exposure parameters of the image frames to be exposed based on the exposure information, so as to use the image frames to be exposed after the exposure parameters are adjusted as the image frames to be captured; exposing the image frames to be captured in the order in the queue to be processed; and when the exposure of the image frames to be captured is completed, obtaining the target image indicated by the image capturing instruction based on the image frames obtained by exposure.

[0134] Figure 7 7 is a block diagram of a device 700 for implementing an image capturing method according to an exemplary embodiment. For example, the device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0135] Reference Figure 7 , the device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0136] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0137] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0138] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.

[0139] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0140] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0141] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0142] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0143] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio) or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0144] In an exemplary embodiment, the apparatus 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

[0145] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0146] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0147] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0148] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.

Claims

1. An image capturing method, characterized in that: include: An image capturing instruction is received; the image capturing instruction includes exposure information of an image frame to be captured; Determine the image frames to be exposed that have been generated in the queue to be processed, and adjust the exposure parameters of the image frames to be exposed based on the exposure information, so as to use the image frames to be exposed after the exposure parameters are adjusted as the image frames to be collected; Exposing the image frames to be captured according to the order in the queue to be processed; When the exposure of the image frame to be captured is completed, the target image captured by the image capturing instruction is acquired based on the image frame obtained by exposure.

2. The method according to claim 1, characterized in that The image capture instruction is used to instruct the acquisition of a preset number of image frames to be synthesized to synthesize the target image; The step of adjusting the exposure parameters of the image frame to be exposed based on the exposure information so as to use the image frame to be exposed after the exposure parameters are adjusted as the image frame to be collected comprises: adjusting the exposure parameters of the image frame to be exposed based on the exposure information so as to use the image frame to be exposed after the exposure parameters are adjusted as at least a part of a preset number of image frames to be synthesized; Exposing the image frames to be captured in the order in the queue to be processed includes: exposing a preset number of image frames to be synthesized frame by frame in sequence in the queue to be processed; When the exposure of the image frame to be captured is completed, the target image indicated by the image shooting instruction is obtained based on the image frame obtained by exposure, including: when a preset number of image frames to be synthesized are all exposed, the multiple image frames to be synthesized obtained by exposure are synthesized to obtain the target image.

3. The method according to claim 2, characterized in that The exposure information is the exposure level of each image frame to be synthesized; wherein the exposure levels of each image frame to be synthesized are different, so that the target image is a high dynamic range image.

4. The method according to claim 3, characterized in that The adjusting the exposure parameters of the image frame to be exposed based on the exposure information includes: Determine an exposure degree consistent with the number of image frames to be exposed from the exposure information, and perform parameter analysis on the determined exposure degree to obtain a corresponding target exposure parameter; The determined exposure parameter of the image frame to be exposed is adjusted to the target exposure parameter.

5. The method according to claim 2, characterized in that: The preset number of image frames to be synthesized have an exposure sequence; and adjusting the exposure parameters of the image frames to be exposed based on the exposure information includes: Determining, from the preset number of image frames to be synthesized, target image frames to be synthesized that are consistent in number with the image frames to be exposed according to the exposure sequence; Based on the determined exposure information of the target image to be synthesized, the exposure parameters of the image frame to be exposed are adjusted.

6. The method according to claim 2, characterized in that Also includes: Generating other to-be-synthesized image frames different from the at least one portion of to-be-synthesized image frames in the to-be-processed queue; The method of exposing a preset number of image frames to be synthesized frame by frame in the order in the queue to be processed includes: exposing the image frames to be exposed frame by frame based on the adjusted exposure parameters, and after completing the exposure operation of the image frames to be exposed, continuing to expose the image frames to be synthesized that are different from the image frames to be exposed frame by frame.

7. The method according to claim 1, characterized in that Also includes: When receiving the image shooting instruction, reading the image information of the image frames generated in the queue to be processed; In a case where the image information indicates that there is no unexposed image frame in the queue to be processed, generating an image frame to be exposed corresponding to the image frame to be collected in the queue to be processed based on the exposure information; The to-be-exposed image frames generated in the queue to be processed are exposed, and the target image indicated by the image shooting instruction is acquired based on the image frames obtained by exposure.

8. The method according to claim 1, characterized in that The adjusting the exposure parameters of the image frame to be exposed based on the exposure information includes: The exposure information is sent to the automatic exposure module, so that the automatic exposure module adjusts the exposure parameters of the image frame to be exposed based on the received exposure information.

9. The method according to claim 8, characterized in that The step of determining the image frames to be exposed that have been generated in the queue to be processed includes: determining the image frames to be exposed that have been generated from the queue to be processed by an image capturing thread for running an image capturing application; The sending the exposure information to the automatic exposure module includes: the image shooting thread sending the exposure information to the automatic exposure module through an inter-thread communication protocol.

10. An image capturing device, characterized in that: include: A receiving unit receives an image capturing instruction; The image capture instruction includes exposure information of the image frame to be captured; a determination unit, which determines the image frames to be exposed that have been generated in the queue to be processed, and adjusts the exposure parameters of the image frames to be exposed based on the exposure information, so as to use the image frames to be exposed after the exposure parameters are adjusted as the image frames to be collected; An exposure unit, exposing the image frames to be captured according to the order in the queue to be processed; The acquisition unit acquires the target image captured by the image capturing instruction based on the image frame obtained by exposure when the exposure of the image frame to be captured is completed.

11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 9 by running the executable instructions.

12. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Imaging shooting method and apparatus

    CN108702452A

  • Video processing method, electronic device and storage medium

    CN111031389A

  • Search sorting method and device, electronic equipment and storage medium

    CN111324634A

  • Image frame storage method, photographing method and electronic equipment

    CN114528422A

  • Photographing method and electronic equipment

    CN116055857A