Image shooting method and device, electronic equipment, and storage medium
Patent Information
- Application Number
- CN202310789700.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-06-29
AI Technical Summary
[0003]由于该机制的存在,使得图像拍摄指令指示采集的图像帧无法及时曝光,降低了拍摄效率
[0020] In the technical solution disclosed herein, upon receiving an image capture command instructing the acquisition of an image frame to be captured, the system first identifies the image frames already generated in the processing queue that are to be exposed. Based on the exposure information in the image capture command, the exposure parameters of the identified image frames to be exposed are adjusted, so that the adjusted image frames to be exposed are used as the image frames to be captured. Therefore, after the exposure of the image frames to be captured is completed, the target image instructed by the image capture command can be acquired based on the exposed image frames.
Smart Images

Figure CN119233077B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing, and more particularly to an image capturing method and apparatus, electronic device, and storage medium. Background Technology
[0002] When acquiring images, related technologies first generate corresponding image frames to be exposed in the processing queue, and then expose them sequentially to obtain the image frames to be acquired. This method requires waiting for the image frames already generated in the processing queue to be exposed before exposing the image frame to be acquired by the shooting command when generating a new image shooting command.
[0003] Because of this mechanism, the image frames captured by the image capture command cannot be exposed in time, reducing shooting efficiency. Summary of the Invention
[0004] This disclosure provides an image capturing method, apparatus, electronic device, and storage medium that can improve image capturing efficiency when it is necessary to capture fused images such as HDR.
[0005] According to a first aspect of this disclosure, an image capturing method is provided, comprising:
[0006] An image capture command is received; the image capture command contains exposure information for the image frame to be captured.
[0007] The generated image frames to be exposed in the queue to be processed are identified, and the exposure parameters of the image frames to be exposed are adjusted based on the exposure information, so that the image frames to be exposed after adjusting the exposure parameters are used as the image frames to be acquired.
[0008] The image frames to be acquired are exposed in the order they are in the queue to be processed.
[0009] Once the exposure of the image frame to be acquired is complete, the target image to be captured as instructed by the image capture command is obtained based on the image frame obtained from the exposure.
[0010] According to a second aspect of this disclosure, an image capturing device is provided, comprising:
[0011] The receiving unit receives an image capture command; the image capture command includes exposure information of the image frame to be captured.
[0012] The determining unit determines the generated image frames to be exposed in the processing queue, 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 adjusting the exposure parameters as the image frames to be acquired.
[0013] The exposure unit exposes the image frames to be acquired in the order of the processing queue;
[0014] The acquisition unit, after the exposure of the image frame to be acquired is completed, acquires the target image to be captured as instructed by the image capture command based on the image frame obtained by the exposure.
[0015] According to a third aspect of this disclosure, an electronic device is provided, comprising:
[0016] processor;
[0017] Memory used to store 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 this disclosure, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first aspect.
[0020] In the technical solution disclosed herein, upon receiving an image capture command instructing the acquisition of an image frame to be captured, the system first identifies the image frames already generated in the processing queue that are to be exposed. Based on the exposure information in the image capture command, the exposure parameters of the identified image frames to be exposed are adjusted, so that the adjusted image frames to be exposed are used as the image frames to be captured. Therefore, after the exposure of the image frames to be captured is completed, the target image instructed by the image capture command can be acquired based on the exposed image frames.
[0021] It should be understood that in related technologies, if there are already generated image frames to be exposed in the processing queue, the exposure of the image frame to be captured must be completed before the image frame to be captured is exposed. However, in this disclosure, since the exposure parameters of the image frame to be exposed are adjusted directly based on the exposure information of the image frame to be captured, the image frame to be exposed can also be used as an image frame to be captured after exposure. Obviously, compared with the shooting methods in related technologies, this disclosure can capture images more efficiently. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0023] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present disclosure of an image capturing method;
[0024] Figure 2 This is a flowchart illustrating an exemplary embodiment of the present disclosure of an HDR image capture method;
[0025] Figure 3 This is a schematic diagram illustrating inter-thread communication in an exemplary embodiment of this disclosure;
[0026] Figure 4 This is a schematic diagram illustrating another inter-thread communication method according to an exemplary embodiment of this disclosure;
[0027] Figure 5 This is a block diagram illustrating an image capturing device according to an exemplary embodiment of the present disclosure;
[0028] Figure 6 This is a block diagram illustrating another image capturing device according to an exemplary embodiment of the present disclosure;
[0029] Figure 7 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0031] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0032] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0033] When taking pictures, devices such as smartphones and tablets first need to launch the image capture application and create a corresponding processing queue. Then, if image acquisition is required, the corresponding image frames to be exposed must first be generated in the processing queue. Finally, the images are exposed sequentially according to their order in the queue to obtain the desired image frame.
[0034] It is worth noting that the image frames to be exposed generated in the processing queue do not refer to the image data obtained from exposure, or the image containing the scene content, but rather to the parameters set for the image frames that are about to be exposed, such as the number of each image frame and the exposure parameters.
[0035] In the field of image processing, the rule is to expose images sequentially according to the order in the processing queue. Due to this mechanism, if an image capture command is received while there are image frames to be exposed in the processing queue, the exposure operation of the image frames to be exposed must be completed first before the exposure operation of the image frame indicated by the image capture command can be executed, which seriously reduces the execution efficiency of the image capture command.
[0036] For example, when a smartphone launches an image capture application and needs to capture an image as a preview screen, it can pre-generate a certain number of preview frames to be exposed in the processing queue. For example, preview frames numbered 52 to 56 can be generated. Based on this, the exposure operations of preview frames numbered 52, 53, 54, 55, and 56 can be executed sequentially.
[0037] Suppose that when the exposure operation of the preview frame numbered 54 is executed, an image capture command for instructing the capture of a single frame image is received. Then, after detecting that the number of the preview frame to be exposed generated in the processing queue is 56, the related technology will further generate an image frame to be exposed with the number 57 (corresponding to the above single frame image), and after waiting for the exposure of the preview frames numbered 55 and 56 to be completed, the exposure operation of the image frame numbered 57 will be executed.
[0038] Furthermore, suppose that during the exposure operation of preview frame number 54, a shooting instruction is received instructing the capture of an HDR image, and this HDR image is obtained by fusing six image frames with different exposure levels. In related technologies, after detecting that the number of the preview frame to be exposed in the processing queue is 56, image frames numbered 57 to 62 to be exposed are further generated. After waiting for the exposure of preview frames numbered 55 and 56 to be completed, the exposure operations of image frames numbered 57 to 62 are then executed sequentially.
[0039] It is evident that, because the relevant technologies need to follow the rule of executing exposure operations sequentially according to the order in the processing queue, they cannot perform the exposure operation of the image frame to be acquired in a timely manner when they receive the image capture command, thus reducing the execution efficiency of the image capture command.
[0040] In view of this, the present disclosure proposes an image capturing method. In this method, upon receiving an image capturing instruction, the pre-generated image frames to be exposed in the processing queue can be preferentially identified. Based on the exposure information of the image frames to be captured contained in the instruction, the parameters of the identified image frames to be exposed are adjusted. The image frames with adjusted exposure parameters are then used as the image frames to be captured by the image capturing instruction. Based on this, by simply exposing the image frames to be captured in the order of the processing queue, the target image instructed by the image capturing instruction can be directly obtained from the exposed image frames.
[0041] It should be understood that this disclosure adjusts the exposure parameters of the already generated image frames to be exposed in the processing queue, so that the already generated image frames to be exposed can be used as the image frames to be acquired by the image capturing command, without having to create additional image frames to be exposed after the already generated image frames to be exposed. This is equivalent to achieving a "queue-jumping" effect in the processing queue by adjusting the exposure parameters, shortening the time required to wait for the exposure of the already generated image frames to be exposed to finish, and greatly improving the execution efficiency of the image capturing command.
[0042] The following describes each step of the technical solution disclosed herein.
[0043] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present disclosure of an image capturing method. Figure 1 As shown, the method may include the following steps:
[0044] Step 102: Receive an image capture command; the image capture command contains exposure information of the image frame to be captured.
[0045] In this disclosure, as described above, the pending queue refers to a queue used to record the parameters of image frames that have not yet been exposed, typically recorded by number. For example, in mobile devices such as smartphones and tablets described above, due to the adoption of a system architecture specifically designed for mobile devices, this pending queue can be a producer queue (producerList) created for image capture applications. Of course, this is only an example of a mobile device, and the naming of the pending queue can be determined by those skilled in the art based on the actual situation; this disclosure does not impose any limitations on this.
[0046] In this disclosure, upon receiving an image capture command, the image information of already generated image frames in the processing queue can be read first to determine whether there is an unexposed image frame to be exposed in the processing queue. If it exists, the parameters of the image frame to be exposed are adjusted based on the exposure information of the image frame to be captured contained in the image capture command, so that the adjusted image to be exposed is used as the image frame to be captured. If it does not exist, an image frame to be exposed corresponding to the image frame to be captured can be generated in the processing queue based on the exposure information in the image capture command. On this basis, the generated image frame to be exposed can be exposed, and the target image to be captured as instructed by the image capture command can be obtained based on the exposed image frame.
[0047] In this disclosure, it can be determined in various ways whether there are any unexposed images in the processing queue. For example, since the image frames in the processing queue follow a sequential exposure rule, it can be determined by reading the image information whether the last image frame in the processing queue is being exposed. If so, it proves that there are no unexposed image frames in the processing queue. Another example is that an exposure completion tag can be added to the image frames in the processing queue that have already been exposed. Therefore, when the read image information indicates that all image frames in the processing queue have been tagged with exposure completion, it proves that there are no unexposed image frames in the processing queue. Of course, the above examples are merely illustrative. How to specifically determine whether there are any unexposed image frames in the processing queue can be determined by those skilled in the art according to actual needs, and this disclosure does not impose any limitations on this.
[0048] Step 104: Determine the generated image frames to be exposed in the processing queue, 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 adjusting the exposure parameters as the image frames to be acquired.
[0049] In this disclosure, once the generated image frames to be exposed in the processing queue are determined, the exposure parameters of the image frames to be exposed can be adjusted based on the exposure information contained in the image capture command. This disclosure can perform this adjustment operation in various ways.
[0050] In one embodiment, when automatic exposure is used, the exposure operation is actually performed by the automatic exposure module. Therefore, the exposure information contained in the image capture command can be sent to the automatic exposure module, which then adjusts the exposure parameters of the determined image frame to be exposed based on the received exposure information. Based on this, the automatic exposure module can expose the image frame to be exposed according to the adjusted exposure parameters, and then use the exposed image frame as the image frame to be captured by the image capture command.
[0051] In this embodiment, the image capture application and the automatic exposure module can run in different threads, thus allowing the transmission of exposure information via an inter-thread communication protocol. In other words, the image capture thread running the image capture application can determine the generated image frames to be exposed from the processing queue, and then send the exposure information to the automatic exposure module via the inter-thread communication protocol.
[0052] It should be understood that since the inter-thread communication protocol is a fast communication protocol, using 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 time, resulting in the image frame to be exposed starting to be exposed before the exposure parameters are adjusted.
[0053] Step 106: Expose the image frames to be acquired in the order of the queue to be processed.
[0054] Step 108: After the exposure of the image frame to be acquired is completed, the target image to be captured as instructed by the image capture command is obtained based on the image frame obtained by the exposure.
[0055] In this disclosure, after adjusting the parameters of the image frame to be exposed, the exposure operation can be performed in the order of the processing queue. Specifically, after the image frame to be acquired has been exposed, the target image to be captured, as instructed by the image capture command, can be obtained based on the exposed image frame.
[0056] In this disclosure, the image capture instruction indicates that the target image to be captured may be related to the user's shooting needs.
[0057] In one embodiment, the image capture command indicates that the target image to be captured can be a single-frame image. In this case, only the parameters of one image frame to be exposed already generated in the processing queue need to be adjusted, and after the exposure of the image frame to be exposed is completed, the exposed image frame can be directly used as the target image.
[0058] In another embodiment, the image capture command indicates that the target image to be captured can be a composite image obtained by fusing multiple image frames using image compositing technology. In other words, the image capture command is used to instruct the acquisition of a preset number of image frames to be composited in order to synthesize the target image. In this case, after determining the image frames to be exposed that have been generated in the processing queue, the exposure parameters of the image frames to be exposed can be adjusted based on the exposure information in the image capture command, so that the image frames to be exposed with adjusted exposure parameters are used as at least a part of the preset number of image frames to be composited. On this basis, the preset number of image frames to be composited can be exposed frame by frame in the order in the processing queue, so that when the preset number of image frames to be composited have been exposed, the multiple exposed image frames to be composited are image-composited to obtain the target image.
[0059] In this embodiment, it should be understood that the process of capturing the target image is inherently time-consuming due to the need to acquire multiple image frames and the reliance on image compositing technology. Furthermore, related technologies further increase the waiting time for other image frames to be exposed, resulting in particularly low efficiency in executing image capture commands. This is primarily manifested in the user needing to wait a considerable amount of time before triggering the image capture control again to execute the next image capture operation. Therefore, this disclosure improves the efficiency of image capture commands by adjusting exposure parameters, thereby reducing the waiting time for other image frames to be exposed. This is mainly reflected in the reduced time interval between user capture operations (i.e., a shorter waiting time for the user to trigger the image capture control again).
[0060] In this embodiment, the image capture command instructs the captured composite image to be determined according to user needs. For example, the image capture command may instruct the capture of an HDR (High Dynamic Range Imaging) image. In this case, the exposure information included in the image capture command can be the exposure level of each image frame to be composited, wherein the exposure level of each image frame to be composited is different. Another example is that the image capture command may instruct the capture of a background-blurred image. In this case, the image capture command may instruct the capture of multiple image frames with different depths of field to composite the background-blurred image. Of course, the above examples are merely illustrative. The specific composite image to be captured by the image capture command can be determined by those skilled in the art according to actual needs, and this disclosure does not impose any limitations on this.
[0061] In this embodiment, when the image capture command indicates that the target image to be captured is an HDR image, after determining the generated image frames to be exposed in the processing queue, the exposure level consistent with the number of image frames to be exposed can be determined from the exposure information contained in the image capture command. The determined exposure level is then parsed to obtain the corresponding target exposure parameters. Based on this, 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 capture command contains six different exposure levels, and there are two image frames to be exposed, two exposure levels can be determined from the exposure information. These two exposure levels are then parsed to obtain two sets of target exposure parameters, and the exposure parameters of the image frames to be exposed are adjusted based on these two sets of target exposure parameters.
[0062] In this embodiment, there may be an exposure order among the preset number of image frames to be synthesized. Under this premise, after determining the image frames to be exposed, a target image frame to be synthesized, matching 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 order. Based on the exposure information of the determined target image frame to be synthesized, the exposure parameters of the determined image frame to be exposed are adjusted. In this case, the target image frame to be synthesized can be determined according to preset rules. For example, if the number of image frames to be exposed is called the target number, then the first image frame to be synthesized in the preset number of image frames to be synthesized, ordered according to the exposure order, that matches the target number, can be determined as the target image frame to be synthesized. Alternatively, the last image frame to be synthesized in the exposure order, ordered according to the exposure order, that matches the target number, can be determined as the target image frame to be synthesized. Of course, this example is merely illustrative; how to specifically determine the target image frame to be synthesized can be determined by those skilled in the art according to actual needs, and this disclosure does not impose any limitations on this.
[0063] In this embodiment, since the generated image frames to be exposed in the processing queue are used as at least a portion of a preset number of image frames to be synthesized, there may be a situation where the preset number is greater than the determined number of image frames to be exposed. In this case, in addition to adjusting the exposure parameters of the image frames to be exposed, it is also necessary to generate other image frames to be synthesized in the processing queue that are different from the aforementioned at least a portion of the image frames to be synthesized, so that the final number of image frames obtained from exposure reaches the preset number. Based on this, the image frames to be exposed can be exposed frame by frame according to 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 can continue to be exposed frame by frame.
[0064] Of course, if the number of image frames to be exposed determined in this embodiment is greater than or equal to the preset number, the preset number of image frames to be synthesized can be directly synthesized after the exposure operation of the image frames to be exposed, which are used as image frames to be synthesized, is completed, so as to obtain the target image.
[0065] It is worth noting that, in this disclosure, the image frame to be exposed determined from the processing queue can be of different types. For example, as mentioned above, an image capture application needs to display a preview image. The image capture application can continuously generate preview frames in the processing queue to obtain a preview image through exposure. Therefore, the image frame to be exposed determined from the processing queue in this disclosure can be a preview frame. As another example, an image capture application may have the function of interrupting the shooting operation. In this case, under the current image capture command, the image frame to be exposed determined from the processing queue can be "an image frame generated in the processing queue based on the previous image capture command." Of course, this example is merely illustrative. The specific type of image frame to be exposed determined from the processing queue can be determined by those skilled in the art according to actual needs, and this disclosure does not impose any limitations on this.
[0066] It should also be noted that the implementing entity of the technical solution disclosed herein can be any type of electronic device. For example, the electronic device can be a mobile terminal such as a smartphone or tablet computer, or a fixed terminal such as a smart TV or PC (personal computer). It should be understood that any electronic device with image capturing capabilities can be used as the electronic device in this disclosure. The specific type of electronic device used as the implementing entity of the technical solution disclosed herein can be determined by those skilled in the art based on actual needs, and this disclosure does not impose any restrictions on this.
[0067] As can be seen from the above technical solution, upon receiving an image capture command, this disclosure can prioritize identifying the generated image frames to be exposed in the processing queue, and adjust the exposure parameters of the image frames to be exposed based on the exposure information contained in the command, so that the image frames to be exposed after adjusting the exposure parameters are used as the image frames to be acquired by the image capture command. Based on this, after completing the exposure operation of the image frames to be exposed according to the processing queue, the target image instructed by the image capture command can be acquired based on the exposed image frames.
[0068] It should be understood that the reason why related technologies require the exposure of the image frames to be captured by the image capture command to be completed only after the exposure of the image frames to be exposed in the waiting queue has finished is twofold. Firstly, it requires following the mechanism of "exposing image frames sequentially according to the order in the waiting queue." Secondly, it is because the image frames already generated in the waiting queue usually do not meet the exposure requirements of the received image capture command. In view of this, this disclosure adjusts the parameters of the generated image frames to be exposed according to the exposure information in the image capture command, making the generated image frames to be exposed conform to the exposure requirements of the image capture command. This allows the generated image frames to be used as the image frames to be captured by the image capture command, achieving a "queue-jumping" effect in the waiting queue. This avoids the problem in related technologies where the exposure of the generated image frames to be exposed must be completed before the image frame to be captured by the image capture command can be exposed, thus improving the execution efficiency of the image capture command.
[0069] The following section uses "smartphone shooting HDR images" as an example to introduce the technical solution of this disclosure.
[0070] It is important to emphasize that smartphones and other mobile devices typically employ system architectures specifically designed for mobile devices, such as Android and iOS. In these mobile system architectures, the queue of parameters to be processed, used to record the images to be exposed, is called the producer queue, while the exposed image frames are cached in the consumer queue (consumerList). Therefore, it should be understood that the producer queue in the embodiments shown below is the same as the queue of parameters to be processed mentioned above.
[0071] Figure 2 This is a flowchart illustrating an exemplary embodiment of the present disclosure of an HDR image capture method. Figure 2 As shown, the method may include the following steps:
[0072] Step 201: Launch the camera app.
[0073] In this embodiment, the smartphone can have a camera application, i.e., a camera APP, installed in advance as the image capturing application mentioned above.
[0074] In this embodiment, the user can launch the camera app by triggering the camera icon on their smartphone. After launch, the camera app can continuously capture preview images and display them in the preview window, allowing the user to adjust shooting parameters using these 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 launched, it runs based on the image capture thread corresponding to the camera app, and a producer queue is created in the image capture thread. To obtain a preview image, the corresponding preview frame needs to be generated in the producer queue first. Based on this, each preview frame can be exposed sequentially according to the order in the producer queue to obtain several preview images.
[0077] Step 203: The preview frames in the producer queue are sequentially sent to the AE (Automatic Exposure) execution module via the inter-thread communication protocol.
[0078] In this embodiment, after a 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 typically runs on an exposure thread) so that the AE execution module can actually perform the exposure operation. Since both the camera app and the AE execution module run on threads, data transmission can be performed using an inter-thread communication protocol to improve transmission speed. For example, this AE execution module is located on the image sensor of an electronic device.
[0079] To make it easier to understand, let's take an example. After the camera app is launched, it can be like this: 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 can perform the exposure operation in the order in the producer queue. After the exposure is completed, the exposed image frame is transmitted to the consumer queue so that the preview image is displayed in the preview box in the order in the consumer queue.
[0080] It is not difficult to see that Figure 3 The scenario depicts the following: Preview frames numbered 52-56 have been generated in the producer queue; the AE execution module is performing the exposure operation on preview frame number 54 (i.e., the image frame with dotted fill in the image); preview frames numbered 48-53 have been fully exposed; and preview frames numbered 48-51 have been transferred to the consumer queue and will soon be displayed as preview images in the preview frame. If the preview state is maintained without issuing a shooting command, more frames will be generated. Figure 3 The preview frames shown are numbered 57, 58, and 59, and are continuously sent to the AE execution module for exposure.
[0081] Step 204: The AE execution module performs exposure operations on the preview frames sequentially.
[0082] Step 205: Display the preview image obtained by the AE execution module exposure.
[0083] Step 206: Receive HDR image capture command.
[0084] In this embodiment, during the preview image display, the user can operate the camera app to perform image capture operations. The camera app in this embodiment supports HDR image capture. Therefore, the user can select the HDR function in the camera app to capture HDR images by default during subsequent shooting. For example, after enabling the HDR function, the user can trigger the shooting control to initiate an HDR image capture command.
[0085] Step 207: Identify the preview frames to be exposed in the producer queue.
[0086] In this embodiment, upon receiving an HDR shooting command, the preview frames to be exposed in the producer queue can be identified, i.e., preview frames that have been generated but not yet exposed. For example, when a user initiates an image shooting command by triggering the image shooting control in the camera app, the preview frames to be exposed can be determined based on the time when the image shooting command is initiated. For instance, preview frames that have been generated in the producer queue but have not yet been exposed before the time when the image shooting command is initiated can be identified as preview frames to be exposed.
[0087] Continuing with the example above, suppose it is precisely in the period Figure 3 The scenario shown illustrates receiving an HDR image capture command. Since the AE execution module is currently performing the exposure operation on preview frame number 54, it can be determined that the preview frames to be exposed are "image frames numbered 55 and 56," i.e. Figure 4 The two image frames shown are filled with vertical lines.
[0088] Step 208: Determine the exposure level that matches the number of preview frames to be exposed from the HDR image capture command.
[0089] In this embodiment, the camera app can limit the exposure effect of the image frames to be synthesized by the HDR image capture command by setting the exposure level. Under this premise, after determining the preview frames to be exposed, the exposure level that matches the number of preview frames to be exposed can be determined from the command for parameter adjustment of the preview frames to be exposed.
[0090] Continuing with the example above, suppose the HDR image capture command instructs the capture of 6 image frames to be synthesized into an HDR image, and the exposure levels of these 6 image frames in the HDR image capture command are: "E v -12", E v -6”, E v -3”, E v 0", "E" v 3”, “E” v 6". Among them, E v0 represents standard luminance, 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 determined image frames to be exposed are numbered 55 and 56, two exposure levels can be determined from the HDR image capture command, such as determining "E" in sequence. v -12", E v -6” are the two exposure levels.
[0092] Step 209: Adjust the exposure parameters of the preview frame to be exposed based on the determined exposure level.
[0093] Continuing with the above examples, we can base our work on "E" v -12", E v The exposure levels "-6" are used to adjust the exposure parameters of preview frames 55 and 56. It should be understood that since preview frames 55 and 56 have been transmitted to the AE execution module, the "E" setting needs to be adjusted via inter-thread communication protocol. v -12", E v The two exposure levels, -6", are transmitted to the AE execution module, which then sets the "E" value to 6. v -12", E v The exposure levels "-6" are interpreted as exposure parameters, and the image frames numbered 55 and 56 are exposed based on these interpreted 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 capture 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 command.
[0096] Following the examples above, it is also necessary to base it on "E" v -3”, E v 0", "E" v 3”, “E” v Using the four exposure levels of 6", image frames numbered 57, 58, 59, and 60 are generated to be synthesized.
[0097] Step 211: Perform the exposure operations sequentially according to the order in the producer queue.
[0098] Continuing with the example above, the exposure operations can be performed sequentially from 55 to 60 to obtain six image frames with different exposure levels to be composited. It is worth noting that while there are still image frames to be exposed in the producer queue, the AE execution module continues to perform exposure operations. In other words, although the numbering of the above steps is sequential, in practice they may be executed asynchronously. For example, the operations of "exposing image frames numbered 55 and 56" and "generating image frames numbered 57 to 60 in the producer queue" may be performed simultaneously.
[0099] Step 212: When the exposure of the image frame to be synthesized is completed as instructed by the HDR image capture command, the multiple exposed image frames are fused to obtain an HDR image.
[0100] In this embodiment, after obtaining 6 image frames (55-60) to be synthesized through exposure, the exposed image frames can be synthesized into an HDR image using image synthesis technology.
[0101] As can be seen from the above technical solutions, if the method in the relevant technology is adopted, it is necessary to wait for the already generated preview frame to be exposed to be exposed before the HDR image shooting command can be executed to instruct the acquisition of image frames. The shooting process takes a long time. For example, in the example above, it is necessary to wait for the preview frames numbered 55 and 56 to be exposed to be exposed before the exposure operation of 6 image frames can be executed to obtain the HDR image.
[0102] By adopting the technical solution disclosed herein, the exposure parameters of the preview frames can be adjusted to make the generated preview frames meet the exposure requirements of HDR images, thereby achieving a "queue-jumping" effect without having to wait for the preview frames to finish exposure. For example, in the example above, preview frames numbered 55 and 56 can be changed into image frames to be synthesized. Thus, after completing the exposure operation of image frames numbered 55 and 56, only the exposure operation of 4 more image frames needs to be performed to obtain an HDR image, which greatly reduces the shooting time and improves the efficiency of image shooting.
[0103] Figure 5 This is a block diagram illustrating an image capturing apparatus according to an exemplary embodiment of this disclosure. (Refer to...) Figure 5 The device includes a receiving unit 501, a determining unit 502, an exposure unit 503, and an acquisition unit 504.
[0104] The receiving unit 501 receives an image capture command; the image capture command includes exposure information of the image frame to be captured.
[0105] The determining unit 502 determines the generated image frames to be exposed in the processing queue, 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 adjusting the exposure parameters as the image frames to be acquired.
[0106] Exposure unit 503 exposes the image frames to be acquired according to the order in the processing queue;
[0107] The acquisition unit 504, when the exposure of the image frame to be acquired is completed, acquires the target image to be captured as instructed by the image capture command based on the image frame obtained by the exposure.
[0108] Optionally, the image capture command is used to instruct the acquisition of a preset number of image frames to be synthesized, so as to synthesize the target image;
[0109] The determining unit 502 is further configured to: adjust 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 adjusting the exposure parameters as at least a portion of a preset number of image frames to be synthesized;
[0110] The exposure unit 503 is further used to expose a preset number of image frames to be synthesized frame by frame in the order of the queue to be processed.
[0111] The acquisition unit 504 is further used to: when a preset number of image frames to be synthesized have been fully exposed, perform image synthesis on the multiple image frames to be synthesized obtained from the exposure to obtain the target image.
[0112] Optionally, the exposure information is the exposure level of each image frame to be synthesized; wherein the exposure level of each image frame to be synthesized is different, so that the target image is a high dynamic range image.
[0113] Optionally, the determining unit 502 is further used for:
[0114] The exposure level is determined from the exposure information to match the number of image frames to be exposed, and the determined exposure level is parsed to obtain the corresponding target exposure parameters;
[0115] The exposure parameters of the determined image frame to be exposed are adjusted to the target exposure parameters.
[0116] Optionally, the preset number of image frames to be synthesized have an exposure order; the determining unit 502 is further used to:
[0117] According to the exposure order, a target image frame to be synthesized is determined from the preset number of image frames to be synthesized, which is consistent with the number of image frames to be exposed;
[0118] Based on the exposure information of the determined 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 used for:
[0120] The exposure information is sent to the automatic exposure module, which then adjusts the exposure parameters of the determined image frame to be exposed based on the received exposure information.
[0121] Optionally, the determining unit 502 is further used for:
[0122] The image capture thread, which runs the image capture application, determines the generated image frames to be exposed from the processing queue;
[0123] The exposure information is sent to the automatic exposure module by the image capture thread through an inter-thread communication protocol.
[0124] like Figure 6 As shown, Figure 6 This is a block diagram illustrating another image capturing device according to an exemplary embodiment of the present disclosure, which is described above. Figure 5 Based on the embodiment shown, it also includes: a generation unit 505.
[0125] Optional, also includes:
[0126] The generation unit 505 generates other image frames to be synthesized that are different from the at least part of the image frames to be synthesized in the processing queue;
[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 composite image frame that is different from the image frame to be exposed frame by frame.
[0128] Optionally, the generation unit 505 is also used for:
[0129] Upon receiving the image capture instruction, the image information of the generated image frames in the processing queue is read; and if the image information indicates that there are no unexposed image frames to be exposed in the processing queue, an image frame to be exposed corresponding to the image frame to be captured is generated in the processing queue based on the exposure information.
[0130] The exposure unit 503 is also used to: expose the image frames to be exposed generated in the processing queue, and obtain the target image to be captured by the image capture command based on the exposed image frames.
[0131] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0132] Accordingly, this disclosure also provides an image capturing device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement 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 containing exposure information of an image frame to be captured; determining an image frame to be exposed that has been generated in a processing queue, and 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 adjusting the exposure parameters as the image frame to be captured; exposing the image frame to be captured in the order in the processing queue; and, when the exposure of the image frame to be captured is completed, acquiring the target image to be captured as indicated by the image capturing instruction based on the exposed image frame.
[0133] Accordingly, this disclosure also provides an electronic device, which includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors. 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 an image frame to be exposed that has been generated in a processing queue, and 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 adjusting the exposure parameters as the image frame to be captured; exposing the image frame to be captured in the order in the processing queue; and, when the exposure of the image frame to be captured is completed, acquiring the target image to be captured as indicated by the image capturing instruction based on the exposed image frame.
[0134] Figure 7 This is a block diagram illustrating an apparatus 700 for implementing an image capturing method according to an exemplary embodiment. For example, apparatus 700 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, 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 supply 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] Processing component 702 typically controls the overall operation of device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
[0137] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, etc. 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 storage, flash memory, magnetic disk, or optical disk.
[0138] Power supply assembly 706 provides power to various components of device 700. Power supply assembly 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 700.
[0139] 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0140] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, 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, home buttons, volume buttons, power buttons, and lock buttons.
[0142] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of device 700. For example, sensor assembly 714 may detect the on / off state of device 700, the relative positioning of components such as the display and keypad of device 700, changes in the position of device 700 or a component of device 700, the presence or absence of user contact with device 700, the orientation or acceleration / deceleration of device 700, and temperature changes of device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0143] Communication component 716 is configured to facilitate wired or wireless communication between device 700 and other devices. Device 700 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio), or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may 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 methods described above.
[0145] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of the device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0146] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0147] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
[0148] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. An image capturing method, characterized in that, include: An image capture command is received; the image capture command contains exposure information for the image frame to be captured. The generated image frames to be exposed in the queue to be processed are identified, and the exposure parameters of the image frames to be exposed are adjusted based on the exposure information, so that the image frames to be exposed after adjusting the exposure parameters are used as the image frames to be acquired. The image frames to be exposed stored in the queue to be processed are image frame objects that have been generated but have not yet been exposed; The image frames to be acquired are exposed in the order they are in the queue to be processed. Once the exposure of the image frame to be acquired is complete, the target image to be captured as instructed by the image capture command is obtained based on the image frame obtained from the exposure.
2. The method according to claim 1, characterized in that, The image capture command is used to instruct the acquisition of a preset number of image frames to be synthesized, so as 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 adjusting the exposure parameters as the image frame to be acquired, includes: 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 adjusting the exposure parameters as at least a portion of a preset number of image frames to be synthesized; The step of exposing the image frames to be acquired according to the order in the queue to be processed includes: exposing a preset number of image frames to be synthesized frame by frame according to the order in the queue to be processed. The step of obtaining the target image indicated by the image shooting command based on the exposed image frame after the exposure of the image frame to be acquired includes: when a preset number of image frames to be synthesized are all exposed, performing image synthesis on the multiple exposed image frames to be synthesized to obtain the target image.
3. The method according to claim 2, characterized in that, The exposure information refers to the exposure level of each image frame to be synthesized; wherein the exposure level of each image frame to be synthesized is different, so that the target image is a high dynamic range image.
4. The method according to claim 3, characterized in that, The step of adjusting the exposure parameters of the image frame to be exposed based on the exposure information includes: The exposure level is determined from the exposure information to match the number of image frames to be exposed, and the determined exposure level is parsed to obtain the corresponding target exposure parameters; The exposure parameters of the determined image frame to be exposed are adjusted to the target exposure parameters.
5. The method according to claim 2, characterized in that, The preset number of image frames to be synthesized have an exposure order; adjusting the exposure parameters of the image frames to be exposed based on the exposure information includes: According to the exposure order, a target image frame to be synthesized is determined from the preset number of image frames to be synthesized, which is consistent with the number of image frames to be exposed; Based on the exposure information of the determined 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: Generate other image frames to be synthesized that are different from the at least part of the image frames to be synthesized in the queue to be processed; The step of sequentially exposing a preset number of image frames to be synthesized in the order of 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: Upon receiving the image capture instruction, the image information of the generated image frames in the processing queue is read; If the image information indicates that there is no unexposed image frame to be exposed in the queue to be processed, an image frame to be exposed corresponding to the image frame to be acquired is generated in the queue to be processed based on the exposure information. Expose the image frames to be exposed generated in the queue, and obtain the target image to be captured as instructed by the image capture command based on the exposed image frames.
8. The method according to claim 1, characterized in that, The step of 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, which then adjusts the exposure parameters of the determined 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 generated image frames to be exposed in the queue to be processed includes: the image capture thread used to run the image capture application determines the generated image frames to be exposed from the queue to be processed; The step of sending the exposure information to the automatic exposure module includes: the image capturing 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: The receiving unit receives the image capture command; The image capture command includes the exposure information of the image frame to be captured; The determining unit determines the generated image frames to be exposed in the processing queue, 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 adjusting the exposure parameters as the image frames to be acquired. The image frames to be exposed stored in the queue to be processed are image frame objects that have been generated but have not yet been exposed; The exposure unit exposes the image frames to be acquired in the order of the processing queue; The acquisition unit, after the exposure of the image frame to be acquired is completed, acquires the target image to be captured as instructed by the image capture command based on the image frame obtained by the exposure.
11. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1-9 by executing the executable instructions.
12. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Photographing method and electronic equipment
CN116055857A