Photographing method and device and storage medium

By selecting the target cache frame based on the aperture value of the cache frame in the camera application of the smart terminal and generating a photo picture, the problem of inconsistency between films and preview caused by aperture changes is solved, and the user experience is improved.

CN119545170AActive Publication Date: 2025-02-28BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311118622.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-28
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

When the smart terminal captures images, the aperture changes in a short time, resulting in different light inflows, resulting in inconsistent films and previews, reducing the user's experience.

Method used

A method of taking a photo is provided, in response to receiving a photo instruction when the camera application of the terminal is in a preset shooting mode, to determine a cache frame of the preview image stored in the cache area. If the buffer frame has an aperture value, the target buffer frame is selected based on the aperture value and a photo picture is generated.

Benefits of technology

By selecting the target cache frame based on the aperture value of the cache frame, the problem of inconsistency between the film and preview caused by the change of the aperture value is solved, and the user's experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119545170A_ABST
    Figure CN119545170A_ABST
Patent Text Reader

Abstract

The invention relates to a photographing method and device and a storage medium. The photographing method comprises the following steps: in response to a photographing instruction received when a camera application of a terminal is in a preset photographing mode, determining a cache frame of a preview image stored in a cache region; and if the aperture value corresponding to the cache frame is determined, selecting a target cache frame based on the aperture value of the cache frame, and generating a photographed picture based on the target cache frame. According to the method and the device, the problem of deviation between the generated photographed picture and the preview image is avoided.
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 technology, and in particular to a photographing method, device and storage medium. Background Art

[0002] With the development of software and hardware, the camera technology of smart terminals is constantly improving. However, while smart terminals bring convenience to people's daily image processing, people's requirements for the quality of the images they take are also getting higher and higher.

[0003] In the related art, when a smart terminal is shooting an image, when the aperture changes in a short period of time, it will cause different amounts of light entering, resulting in inconsistencies between the finished image and the preview, which reduces the user experience. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a photographing method, device and storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a photographing method is provided, the method comprising: in response to receiving a photographing instruction when a camera application of a terminal is in a preset shooting mode, determining a cache frame of a preview image stored in a cache area; if it is determined that an aperture value exists corresponding to the cache frame, selecting a target cache frame based on the aperture value of the cache frame, and generating a photographed picture based on the target cache frame.

[0006] In one embodiment, the selecting a target cache frame based on the aperture value of the cache frame includes: locking the cache frames in the cache area according to a locked frame number, where the locked frame number is the number of target cache frames to be selected; determining the aperture value of the i-th cache frame currently locked and selected in the cache area, where i is a positive integer greater than or equal to 1; and selecting the target cache frame based on the locked frame number and the aperture value of the i-th cache frame.

[0007] In one embodiment, the selecting the target cache frame based on the locked frame number and the aperture value of the i-th frame cache frame includes: determining a standard frame in the cache frames corresponding to the locked frame number based on the locked frame number and the aperture value of the i-th frame cache frame, the standard frame being a cache frame in which the aperture value difference between the aperture value of the i-th frame cache frame and the standard aperture value is less than a difference threshold; if the frame number of the determined standard frame is the same as the locked frame number, selecting the target cache frame from the cache frames cached before receiving the photo-taking instruction; if the frame number of the determined standard frame is different from the locked frame number, selecting the target cache frame from the cache frames cached after receiving the photo-taking instruction.

[0008] In one embodiment, the method of determining a standard frame in a cache frame corresponding to the locked frame number based on the locked frame number and the aperture value of the i-th frame cache frame includes: performing a difference comparison between the aperture value of the i-th frame cache frame and the standard aperture value to obtain the aperture value difference of the i-th frame cache frame; if the aperture value difference is less than a difference threshold, taking the i-th frame cache frame as the standard frame, and accumulating the number of frames of the determined standard frame; if the aperture value difference is greater than or equal to the difference threshold, setting the number of frames of the standard frame accumulated before the i-th frame cache frame to 1, re-accumulating the number of frames of the standard frame that meets the aperture value difference less than the difference threshold, and taking the aperture value of the i-th frame cache as the standard aperture value; repeating the above process until i reaches the locked frame number.

[0009] In one embodiment, before selecting the target cache frame based on the aperture value of the cache frame, the method further includes: based on the frame number continuity and sensitivity of the cache frame, determining that the frame numbers of the cache frames locked according to the locked frame number are continuous and the sensitivity frame-by-frame difference ratio is less than a threshold; wherein the sensitivity is used to characterize the richness of dynamic information in the image, and the sensitivity frame-by-frame difference ratio is the difference in dynamic information in the image between two adjacent frames.

[0010] In one embodiment, if there is no aperture value corresponding to the cache frame, the target cache frame is selected from the cache frames cached before receiving the photo-taking instruction, and / or the target cache frame is selected from the cache frames cached after receiving the photo-taking instruction.

[0011] In one embodiment, determining that the cached frame corresponds to an aperture value includes: determining that the current shooting scene is a high dynamic range super-resolution shooting HDSR scene; determining that the current camera application shooting angle is wide-angle shooting; and determining that the current camera shooting lens is a telephoto lens.

[0012] According to a second aspect of an embodiment of the present disclosure, a photographing device is provided, comprising: a determination unit, for determining a cache frame of a preview image stored in a cache area in response to receiving a photographing instruction when a camera application of a terminal is in a preset shooting mode; an execution unit, for selecting a target cache frame based on the aperture value of the cache frame if it is determined that an aperture value corresponds to the cache frame, and generating a photographed picture based on the target cache frame.

[0013] In one embodiment, the execution unit selects the target cache frame based on the aperture value of the cache frame in the following manner: the cache frames are locked in the cache area according to the locked frame number, and the locked frame number is the number of target cache frames to be selected; the aperture value of the i-th cache frame currently locked and selected in the cache area is determined, where i is a positive integer greater than or equal to 1; based on the locked frame number and the aperture value of the i-th cache frame, the target cache frame is selected.

[0014] In one embodiment, the execution unit selects the target cache frame based on the locked frame number and the aperture value of the i-th frame cache frame in the following manner: based on the locked frame number and the aperture value of the i-th frame cache frame, a standard frame is determined in the cache frames corresponding to the locked frame number, and the standard frame is a cache frame in which the aperture value difference between the aperture value of the i-th frame cache frame and the standard aperture value is less than a difference threshold; if the frame number of the determined standard frame is the same as the locked frame number, the target cache frame is selected from the cache frames cached before receiving the photo-taking instruction; if the frame number of the determined standard frame is different from the locked frame number, the target cache frame is selected from the cache frames cached after receiving the photo-taking instruction.

[0015] In one embodiment, the execution unit determines the standard frame in the cache frame corresponding to the locked frame number based on the locked frame number and the aperture value of the i-th frame cache frame in the following manner: performing a difference comparison between the aperture value of the i-th frame cache frame and the standard aperture value to obtain the aperture value difference of the i-th frame cache frame; if the aperture value difference is less than a difference threshold, taking the i-th frame cache frame as the standard frame, and accumulating the number of frames of the determined standard frame; if the aperture value difference is greater than or equal to the difference threshold, setting the number of standard frames accumulated before the i-th frame cache frame to 1, re-accumulating the number of standard frames that satisfy the aperture value difference less than the difference threshold, and taking the aperture value of the i-th frame cache frame as the standard aperture value; repeating the above process until i reaches the locked frame number.

[0016] In one embodiment, the determination unit is also used to: based on the frame number continuity and sensitivity of the cached frame, determine that the frame number of the cached frame locked according to the locked frame number is continuous, and the sensitivity frame difference ratio is less than a threshold; wherein the sensitivity is used to characterize the richness of dynamic information in the image, and the sensitivity frame difference ratio is the difference degree of dynamic information in the image between two adjacent frames.

[0017] In one embodiment, if there is no aperture value corresponding to the cache frame, the target cache frame is selected from the cache frames cached before receiving the photo-taking instruction, and / or the target cache frame is selected from the cache frames cached after receiving the photo-taking instruction.

[0018] In one embodiment, the execution unit determines the aperture value corresponding to the cache frame in the following manner: determining that the current shooting scene is a high dynamic range super-resolution shooting HDSR scene; determining that the current camera application shooting angle is wide-angle shooting; determining that the current camera shooting lens is a telephoto lens.

[0019] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: execute the photographing method described in the first aspect or any one of the embodiments of the first aspect.

[0020] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the photographing method described in the first aspect or any one of the embodiments of the first aspect.

[0021] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: during the preview of an image, the present disclosure changes the light intensity, takes a photo instantly, determines a cache frame stored in a cache area, and when the cache frame has an aperture value, selects a target cache frame based on the aperture value of the cache frame, and generates a photographed image based on the target cache frame. That is, when generating a photographed image, the problem of inconsistency between the final image and the preview due to the change of the aperture value is solved, thereby improving the user experience.

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

[0023] 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.

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

[0025] Figure 2 The present invention is a flowchart showing a method of selecting a target cache frame based on an aperture value of a cache frame according to an exemplary embodiment.

[0026] Figure 3The present invention is a flowchart showing a method of selecting a target cache frame based on a locked frame number and an aperture value of an i-th cache frame according to an exemplary embodiment.

[0027] Figure 4 The present invention is a flowchart showing a method of determining a standard frame in a cache frame corresponding to a locked frame number based on a locked frame number and an aperture value of an i-th cache frame according to an exemplary embodiment.

[0028] Figure 5 The figure is a flow chart of a photographing method according to an exemplary embodiment.

[0029] Figure 6 The invention is a block diagram of a photographing device according to an exemplary embodiment.

[0030] Figure 7 The invention is a block diagram of a photographing device according to an exemplary embodiment.

[0031] Figure 8 The invention is a block diagram of a photographing device according to an exemplary embodiment. DETAILED DESCRIPTION

[0032] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.

[0033] The present disclosure relates to the technical field of image processing, and is applied to a scene in which a camera with a variable aperture is used to take photos.

[0034] At present, cameras with variable apertures are used in super resolution (SR) scenes. When the light level changes and the photo-taking action is completed instantly, the logic of dynamic frame taking is crucial. Of course, the solution disclosed in this disclosure can also be used in various photo modes such as portrait, night scene, street photography, etc.

[0035] In the current related technologies, most scenarios that support dynamic frame acquisition tend to complete the frame acquisition operation at one time without limiting the selected frames. However, in SR scenarios, specific synthesis standards must be followed, which require that the resolution and sensitivity between frames should meet the standards. Therefore, the two judgment indicators of frame number and sensitivity are used in related technologies to adapt the dynamic frame acquisition logic. The dynamic frame acquisition behavior of terminal cameras is divided into two modes: front acquisition and back acquisition, which are independent of each other and cannot coexist.

[0036] Therefore, the dynamic frame-taking logic in the related technology, under extreme conditions where the light level changes in a short period of time, does not take into account the problem of inconsistent light entering the aperture, resulting in a deviation between the cache frame selected by the pre-frame taking behavior for dynamic photography and the preview screen. The inconsistency is visible to the user's naked eye, and there will be a visual jump when opening the album.

[0037] In view of this, an embodiment of the present disclosure provides a photographing method, in which, based on an SR scenario of a camera application with a variable aperture, the brightness level is changed, and an instantaneous photographing method is adopted. By adding a variable aperture value judgment standard, the problem of inconsistency between the preview image and the formed film in the album is effectively avoided, and the synthesis resolution in the SR scenario is improved.

[0038] Figure 1 is a flow chart of a photographing method according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.

[0039] In step S101 , in response to receiving a photographing instruction when a camera application of a terminal is in a preset photographing mode, a cache frame of a preview image stored in a cache area is determined.

[0040] In the embodiment of the present disclosure, the cache frame is a preview image frame that is output and stored in the cache area during the process of providing a preview picture for a camera application with a variable aperture in the terminal, changing the brightness and receiving a photo-taking instruction.

[0041] In the embodiment of the present disclosure, being in the preset shooting mode means that the camera application is in the variable aperture shooting mode.

[0042] In step S102, if it is determined that an aperture value exists corresponding to the cache frame, a target cache frame is selected based on the aperture value of the cache frame, and a photographed picture is generated based on the target cache frame.

[0043] In the disclosed embodiment, if it is determined that an aperture value exists corresponding to the cache frame, a target cache frame is selected based on the aperture value of the cache frame, wherein the target cache frame is a preview image frame used to generate a photographed image.

[0044] In the disclosed embodiment, by adding aperture value discrimination criteria for multiple frames, the aperture value relationship of the selected frames in the buffer area is calculated in the camera application with a variable aperture. This effectively avoids the problem of inconsistency between the preview image and the finished image due to different aperture values ​​of the buffered frames during the preview process, and effectively improves the user experience.

[0045] The following embodiments will describe in detail how to select a target cache frame.

[0046] Figure 2FIG. 1 is a flowchart showing a method of selecting a target cache frame based on an aperture value of a cache frame according to an exemplary embodiment. Figure 2 As shown, the method includes the following steps.

[0047] In step S201, the buffered frames are locked in the buffer area according to the locked frame number.

[0048] In the disclosed embodiment, the locked frame number is the number of target cache frames that need to be selected.

[0049] Exemplarily, 8 frames are selected in the buffer area, and the sampling rate is increased by calculating a slight offset between the 8 frames of data, and the resolution is improved by fusing multiple frames of low-resolution images, and finally a high-resolution image is output for user use.

[0050] To further explain, the frame downloading action is completed by packaging 8 frame requests in the form of a group and sending them to the bottom layer. When the first frame request among the 8 frames reaches the bottom layer, the dynamic frame fetching work begins.

[0051] In the photographing method provided by the present invention, there are two ways to select the desired target cache frame from the preview image frame in the cache area, that is, the dynamic frame acquisition method includes: selecting the cache frame cached before receiving the photographing instruction or selecting the cache frame cached after receiving the photographing instruction.

[0052] In the context of the present disclosure, the behavior of selecting the cached frames cached before receiving the shooting instruction can be called the front frame fetching behavior, and the behavior of selecting the cached frames cached after receiving the shooting instruction can be called the back frame fetching behavior. In the present disclosure, the target cached frames are selected to give priority to the cached frames cached before receiving the shooting instruction, so as to complete the selection and locking of the required number of frames.

[0053] In step S202, the aperture value of the i-th buffer frame currently locked and selected in the buffer area is determined.

[0054] In the embodiment of the present disclosure, i is a positive integer greater than or equal to 1.

[0055] Exemplarily, open the terminal's camera application with a variable aperture to enter the super-high resolution (SR) scene, preview the image, switch the camera's aperture value so that the preview image displayed on the camera interface meets user needs, change the brightness, and instantly issue a photo-taking command.

[0056] In the process of changing the brightness, the sensor outputs the corresponding aperture value preview image to the cache area according to multiple different aperture value preview requests during the aperture change process, and then determines the aperture value corresponding to the target cache frame to be selected in the cache area.

[0057] In step S203, a target cache frame is selected based on the locked frame number and the aperture value of the i-th cache frame.

[0058] In the disclosed embodiment, a preview image frame for generating a photographed picture is selected based on the number of target cache frames to be selected and the aperture value of the i-th cache frame.

[0059] In the disclosed embodiment, the behavior determination of the preceding frame is performed preferentially, and by adding a judgment criterion for the aperture value of the target cache frame, it is determined whether the target cache frame selected by the preceding frame meets the behavior requirement of the preceding frame.

[0060] If the behavior judgment of the front-fetch frame is not satisfied, the cache frame cached after receiving the photo command, i.e., the back-fetch frame, is selected, so as to select the target cache frame for generating the photo based on the number of target cache frames to be selected and the aperture value of the cache frame.

[0061] Through the above embodiments, in the extreme case of changing the brightness and completing the photo-taking work instantaneously, the dynamic frame judgment standard can be effectively enhanced, making the dynamic frame logic more rigorous, and accurately performing dynamic post-frame capture when the pre-frame capture cannot be met, effectively avoiding the problem of inconsistency between the preview image and the finished film due to different aperture values ​​of the cached frames during the preview image process, and effectively improving the user experience.

[0062] The following embodiments will describe in detail how to select a target cache frame.

[0063] Figure 3 FIG. 1 is a flowchart showing a method of selecting a target cache frame based on an aperture value of a cache frame according to an exemplary embodiment. Figure 3 As shown, the method includes the following steps.

[0064] In step S301, based on the locked frame number and the aperture value of the i-th buffered frame, a standard frame is determined in the buffered frames corresponding to the locked frame number.

[0065] In the embodiment of the present disclosure, the standard frame is a cached frame in which the aperture value difference between the aperture value of the i-th cached frame and the standard aperture value is less than the difference threshold.

[0066] In the disclosed embodiment, before selecting the target cache frame based on the aperture value of the cache frame, it is necessary to determine, based on the frame number continuity and sensitivity of the cache frame, that the frame numbers of the cache frames locked according to the locked frame number are continuous and the sensitivity frame-by-frame difference ratio is less than a threshold.

[0067] Among them, sensitivity is used to characterize the richness of dynamic information in the image, and the sensitivity frame-by-frame difference ratio is the difference degree of dynamic information in the image between two adjacent frames.

[0068] Among them, the continuity of the cached frame number refers to ensuring that each frame of image data after the camera application is triggered to preview is output to the cache area. If the frame numbers of the selected cached frames are continuous, it helps to improve the synthesis resolution in ultra-high resolution scenarios.

[0069] Among them, sensitivity refers to the sensitivity of the photosensitive element, also known as the ISO (sensitivity) value. The higher the ISO value, if the difference ratio of the sensitivity between adjacent cached frames is less than the threshold, it means that in the same scene, the sensitivity between adjacent cached frames is not much different, which helps to improve the synthesis effect of multiple cached frames. That is, sensitivity itself is a measure of the ability of the camera's photosensitive element (such as CMOS or CCD) to capture images under specific lighting conditions. In photography, sensitivity is usually expressed in ISO values. A higher ISO value means that the camera is more sensitive to light and can be used to shoot in darker environments; a lower ISO value means that the camera is less sensitive to light and is suitable for brighter environments.

[0070] In the disclosed embodiment, the frame-by-frame difference ratio is used to measure the light change between two adjacent frames, and the frame-by-frame difference ratio of the sensitivity of two adjacent cache frames is less than a threshold, for example, the threshold may be 10%.

[0071] Furthermore, in the disclosed embodiments, the sensitivity frame-by-frame difference ratio is an image processing technology commonly used in computer vision and video analysis. Moreover, the sensitivity frame-by-frame difference ratio is usually used to measure the degree of difference between adjacent frames in a video sequence. The sensitivity reflects the changes in the image and the richness of dynamic information.

[0072] In camera photography technology, the sensitivity ratio refers to the sensitivity of the camera to light changes during continuous shooting. This concept is related to the camera's photosensitive element, photosensitivity and signal-to-noise ratio. The frame-by-frame ratio is used to measure the light changes between two adjacent frames.

[0073] The frame-by-frame difference ratio is a concept related to dynamic range, signal-to-noise ratio and image stability. A larger frame-by-frame difference ratio means that the camera reacts faster to light changes during continuous shooting, thereby capturing more details. A smaller frame-by-frame difference ratio may cause some details to be lost during continuous shooting. In actual applications, the frame-by-frame difference ratio is usually optimized for specific scenes and needs to obtain the best shooting effect.

[0074] In the disclosed embodiment, the generated preview image is cached in the consumer and producer queues in the form of 9+5, totaling 14 frames. After the photo request is issued, the locked frame number of the cache frame required for executing the front frame fetch is obtained from the consumer and producer queues in the cache area. The frame numbers of the selected cache frames must be continuous, and the sensitivity difference must be within the set range. If it meets the requirements, the front frame fetch behavior is performed, otherwise the back frame fetch behavior is performed.

[0075] In step S302, if the determined frame number of the standard frame is the same as the locked frame number, a target cache frame is selected from the cache frames cached before receiving the photo taking instruction.

[0076] In the disclosed embodiment, if the number of standard frames accumulated is the same as the number of locked frames after the difference comparison of the cached frames with the locked frame number is completed, the accumulated number of frames satisfies the judgment of the frame-taking behavior before taking the photo, and the accumulated number of standard frames can be synthesized into a high-resolution picture. The target cached frame is selected from the cached frames cached before receiving the photo instruction, that is, the front frame is executed, and the preview image frame obtained based on the front frame method is used to generate the photo picture.

[0077] In step S303, if the determined frame number of the standard frame is different from the locked frame number, a target cache frame is selected from the cache frames cached after receiving the photo taking instruction.

[0078] In the disclosed embodiment, if the number of accumulated standard frames is different from the locked frame number until the difference comparison of the cached frames with the locked frame number is completed, the accumulated frame number cannot satisfy the judgment of the frame-taking behavior before the current photo is taken, and the accumulated number of standard frames cannot synthesize a high-resolution picture. Then, after receiving the photo instruction, the target cached frame is selected from the cached cache frames, that is, the post-frame taking is executed, and the photo picture is generated based on the preview image frame obtained by the post-frame taking method.

[0079] Through the above embodiments, dynamic post-frame fetching can be accurately performed when the pre-frame fetching requirement cannot be met, thereby effectively avoiding the problem of inconsistency between the preview image and the finished image due to inconsistent aperture values ​​of the cached frames during the preview image process, and efficiently improving the user experience.

[0080] Figure 4 is a flowchart showing a method of determining a standard frame in a cache frame corresponding to a locked frame number based on a locked frame number and an aperture value of an i-th cache frame according to an exemplary embodiment of the present disclosure, such as Figure 4 As shown, the method includes the following steps.

[0081] In step S401, a difference comparison is performed between the aperture value of the i-th frame buffer and the standard aperture value to obtain the aperture value difference of the i-th frame buffer.

[0082] The difference between the aperture value of the i-th frame buffer and the standard aperture value is determined to obtain the aperture value difference of the i-th frame buffer.

[0083] It should be noted that when the i-th cache frame is the first frame of the cache frame required to perform the front frame fetching, it is assumed to meet the difference comparison algorithm. The default standard aperture value is 0, and the aperture value difference between the aperture value of the first frame and the standard aperture value 0 is obtained to obtain the aperture value difference.

[0084] In step S402, if the aperture value difference is less than the difference threshold, the i-th cache frame is used as a standard frame, and the number of standard frames determined is accumulated.

[0085] In the disclosed embodiment, if the comparison result of the aperture value difference between the aperture value of the current cached frame and the standard aperture value and the difference threshold is that the difference is smaller than the difference threshold, the current cached frame is determined to be a standard frame.

[0086] When the difference between the aperture value of the i-th frame buffer and the standard aperture value is less than the difference threshold, the i-th frame buffer is determined to be a standard frame for pre-fetching, that is, the i-th frame buffer meets the condition for pre-fetching.

[0087] Furthermore, the difference between the aperture value of the (i+1)th cached frame and the standard aperture value is obtained, and the difference comparison process is repeated until the difference comparison of the cached frames with the locked frame number is completed, and the number of standard frames that meet the difference comparison is accumulated.

[0088] In step S403, if the aperture value difference is greater than or equal to the difference threshold, the number of standard frames accumulated before the i-th frame cache is set to 1, the number of standard frames satisfying the aperture value difference less than the difference threshold is accumulated again, and the i-th frame cache is used as the standard frame.

[0089] In the embodiment of the present disclosure, when the aperture value difference between the i-th frame cache frame and the standard aperture value is greater than or equal to the difference threshold, it is necessary to set the number of standard frames accumulated before the current cache frame to 1, that is, to re-accumulate the number of standard frames, and use the aperture value of the i-th frame cache frame as the standard aperture value.

[0090] In step S404, the above process is repeated until i reaches the locked frame number.

[0091] It can be seen from the above embodiments that in the process of sequentially executing the difference comparison between the aperture value of the current cached frame and the standard aperture value, it is necessary to determine the specific implementation process of the current cached frame based on the comparison relationship between the difference between the aperture value of the current cached frame and the standard aperture value and the difference threshold.

[0092] If, until the difference comparison of the cached frames with the locked frame number is completed, the difference between the aperture value of the current cached frame and the standard aperture value is less than the difference threshold, the standard frame for the forward frame is determined, and multiple low-resolution standard frames can be combined into an ultra-high-resolution frame.

[0093] If during the process of performing the difference comparison between the aperture value of the current cached frame and the standard aperture value, the difference is greater than or equal to the threshold, it is necessary to clear the standard frame determined before the current cached frame, in other words, set the number of standard frames accumulated before the current cached frame to 1; and re-determine the standard frame whose difference is less than the difference threshold from the current cached frame, and re-accumulate the number of standard frames; and determine whether the number of re-accumulated standard frames can meet the number of frames required to synthesize a high-resolution image.

[0094] Through the above embodiment, not only the continuity of the cache frames to be selected is taken into consideration, but also the similarity of adjacent cache frame images is determined based on the difference comparison between the aperture value of the current cache frame and the standard aperture value. This can more accurately judge whether the behavior of taking frames before taking the photo is correct, improve the synthesis resolution of the previous frames, and effectively avoid the situation where the generated photo is inconsistent with the preview image, thereby improving the user experience.

[0095] In the disclosed embodiment, if there is no aperture value corresponding to the cache frame, the target cache frame is selected from the cache frames cached before receiving the photo command, and / or the target cache frame is selected from the cache frames cached after receiving the photo command, to ensure that the number of cache frames required to generate the photo image is met.

[0096] In the disclosed embodiment, if there is no aperture value corresponding to the cache frame, the target cache frame is selected from the cache frames cached before receiving the photo command. When the number of cache frames does not meet the number of cache frames for generating the photo image, the target cache frame continues to be selected from the cache frames cached after receiving the photo command to ensure that the number of cache frames for generating the photo image is met.

[0097] In the disclosed embodiment, if there is no aperture value corresponding to the cache frame, when the target cache frame number selected from the cache frames cached before receiving the photo command meets the cache frame number for generating the photo image, the selection will not continue.

[0098] In an embodiment of the present disclosure, if there is no aperture value corresponding to the cache frame, when the target cache frame is not selected from the cache frames cached before receiving the photo command, the target cache frame is selected from the cache frames cached after receiving the photo command to ensure that the number of cache frames required to generate the photo image is met.

[0099] In an embodiment of the present disclosure, if it is determined that the current shooting scene is a high dynamic range super-resolution shooting HDSR scene or the current camera application shooting angle is wide-angle shooting or the current camera shooting lens is a telephoto lens, then the aperture value corresponding to the cached frame can be obtained by default, that is, the aperture value corresponding to the cached frame exists.

[0100] In the disclosed embodiment, the number of cached frames locked in a high dynamic range super resolution (HDSR) shooting scene should be greater than the number of cached frames locked in an SR scene.

[0101] For example, in the SR scenario, it is necessary to lock 8 cache frames in advance for dynamic frame acquisition. In the HDSR scenario, it is necessary to lock 10 cache frames for dynamic frame acquisition, that is, on the basis of locking 8 cache frames in advance, lock and select 2 cache frames from the cache frames after receiving the photo command. Among them, when the photo command is issued, the sensor has not yet output the preview image frame to the cache area, so the meta value is set to empty in advance, and the 2 cache frames of the default post-frame behavior correspond to the aperture value, so 10 cache frames can be locked. After the sensor outputs the preview image frame to the cache area, 2 cache frames are selected from the cache frames after receiving the photo command to fill it in, so as to meet the need of locking 10 cache frames in the HDSR scenario. Among them, the meta value is empty, which means that two target cache frames are successfully selected by default from the cache frames cached after receiving the photo command.

[0102] In one embodiment of the photographing method provided by the present disclosure, in response to the terminal being equipped with a variable aperture camera application providing a preview picture in an ultra-high resolution scenario, the brightness level is changed and the photographing operation is completed instantly, the photographing method involved in the above embodiments of the present disclosure is used to take pictures, so as to effectively perform dynamic framing, avoid the problem of inconsistency between the preview image and the formed picture in the album, and improve the synthetic resolution in the SR scenario.

[0103] In the disclosed embodiment, the time threshold for determining that the photo-taking operation is completed instantaneously may be an empirical value, which mainly indicates that the user completes issuing the photo-taking instruction in a very short time.

[0104] The present disclosure provides a preview screen display in an ultra-high resolution scenario of a camera application with a variable aperture, changes the brightness level and instantly completes the photo taking. Through the dynamic frame taking method involved in the above-mentioned embodiments, a series of low-resolution images are synthesized to obtain a high-resolution image, effectively avoiding the problem of inconsistency between the preview image and the finished image due to different aperture values ​​of the cached frames during the preview image process, and improving the synthesis resolution in the ultra-high resolution scenario.

[0105] In the disclosed embodiment, a multi-frame aperture value fast difference comparison algorithm is added to the dynamic frame acquisition logic. Figure 5 is a flowchart of a photographing method according to an exemplary embodiment of the present disclosure. Figure 5 shown.

[0106] In step S501, a camera with an additional variable aperture is turned on.

[0107] In step S502, enter the ultra-high resolution scene, preview the data output and cache it.

[0108] The preview data may be data such as frame number, sensitivity and aperture value, which are saved in a cache area.

[0109] In step S503, the light level is changed and the photo-taking action is completed instantly.

[0110] In the process of changing the light level and taking pictures instantly, the amount of light entering the aperture is constantly changing as the light level changes.

[0111] In step S504, the frame is instantaneously taken and dynamic frame determination is performed.

[0112] In step S505, a pre-selected frame locking operation is performed to determine whether the frame numbers are continuous and whether the sensitivity is consistent.

[0113] Furthermore, a burst method is used to select target cache frames from the cache area. For example, m frames are selected from the cache area, where m is a positive integer greater than or equal to 1, and the m frame requests are packaged in the form of a group and sent to the bottom layer to complete the frame download action. When the first frame request arrives at the bottom layer, dynamic frame fetching begins, and the priority is given to the front-end fetching to complete the selection and locking of the required number of frames.

[0114] Furthermore, the frame number and sensitivity are determined based on the selected frame, and if the conditions are met, the aperture value of the selected frame is obtained. Among them, this aperture value refers to the aperture of the cached frame, which is different from the aperture value sent by the camera application with a variable aperture when taking a photo. It can be understood that the aperture value of the selected frame is the aperture value of a cached frame in the output preview image, and the aperture value sent by the camera application with a variable aperture when taking a photo is the data of the current frame after the sensor receives a photo command at a certain frame.

[0115] In step S506, the aperture value of the Nth frame of the selected cache frame is obtained.

[0116] Wherein, N is a positive integer greater than or equal to 1. When the wide-angle frame is a long focal length, the aperture is set by default, and the aperture value can be obtained.

[0117] In step S507, if the acquisition fails, a frame lock operation is performed to lock the aperture values ​​of the first 8 frames and the last 4 frames to correspond to the subsequent frame acquisition operation.

[0118] Currently, aperture settings are only added for main camera and wide-angle scenes. For other scenes, the aperture value acquisition will fail. If the original aperture value does not exist, the aperture lock operation is performed to lock the aperture data of the first 8 frames and the aperture data of the last 4 frames to ensure that the aperture value does not change significantly, so as to ensure that super-resolution scenes or post-frame operations can be fully realized based on high dynamic range fusion.

[0119] In step S508, a difference comparison is performed with the aperture value of the previous frame (N is 1 by default).

[0120] Among them, if the current frame is the first cached frame of the selected cached frame, that is, N=1, its corresponding previous frame is 0, and the difference between the first cached frame and 0 is less than the difference threshold, it is assumed that the first cached frame satisfies the difference comparison algorithm.

[0121] In step S509, the current frame number is removed, the accumulated frame number is set to 1, and the aperture value of the current frame is used as the standard aperture value, N++.

[0122] "N++" means that the value of variable N is automatically increased by 1, and the difference comparison algorithm of the next adjacent cache frame is performed. After the difference comparison algorithm of the current Nth cache frame is completed, N++ is executed, the value of variable N is automatically increased by 1, and the difference comparison algorithm of the N+1th cache frame is performed.

[0123] If the difference between the aperture value of the selected cache frame and the aperture value of the previous frame does not satisfy the difference threshold, step S509 is executed, and step S505 is continued.

[0124] In step S510, the number of frames ++ is accumulated and this aperture is saved as a standard frame, N++.

[0125] The symbol "++" can be understood as an increment operator in programming languages. "Number of frames++" means that when it is determined that the current cached frame satisfies the frame required for synthesizing the previous frame to take a photo, the accumulated number of frames is automatically increased by 1.

[0126] If the difference between the aperture value of the selected cache frame and the aperture value of the previous frame satisfies the difference threshold, step S510 is executed.

[0127] In step S511, the accumulated number of frames meets the previous frame fetching behavior requirement.

[0128] That is, on the basis of satisfying the continuity of cached frame numbers and sensitivity differences of dynamic frame acquisition, a multi-frame aperture difference comparison algorithm is added to judge the front frame behavior, and the number of cached frames that meet the requirements of the front frame behavior is calculated on this basis.

[0129] In step S512, frames are dynamically forward-fetched.

[0130] When all cached frames are compared and the cumulative forward-fetched frames meet the SR scene synthesis standard, the dynamic frame-fetching behavior is set to dynamic forward-fetching, that is, zero shutter lag (ZSL) is set to 1.

[0131] In step S513, if it is not satisfied, the frame is dynamically taken later.

[0132] When all cached frames are compared, if the accumulated front-fetched frames do not meet the SR scene synthesis standard, dynamic back-fetching is performed by default, that is, ZSL is set to 0.

[0133] Further, according to the above steps S506 to S513, by performing a fast difference algorithm comparison between the aperture value of the acquired cache frame and the aperture value of the standard frame, the following situations can be classified:

[0134] 1. The selected frame is the first frame in the cache (ie, N is 1), which satisfies the fast difference comparison algorithm by default, and the aperture value of the first frame is updated to the standard aperture value, stored in the fast difference comparison algorithm, and the operation continues at step S505. The preset difference threshold may be 1e-6.

[0135] 2. Calculate the difference between the aperture value of the current frame and the standard aperture value to determine whether the difference is less than a preset difference threshold. If so, the cumulative number of the previous frame is increased by 1, and N of the Nth frame cache is also increased by 1 to obtain the N+1th frame cache, and proceed to step S505;

[0136] 3. Calculate the difference between the aperture value data of the current frame and the standard aperture value to determine whether the value is less than the preset difference threshold. If not, set the accumulated value of the previous frame to 1, and update the aperture value of the current frame to the standard aperture value, and continue with step S505.

[0137] In step S514, the processed photos are saved in an album.

[0138] Furthermore, the selected image data is processed step by step, the generated image is saved in an album, and after a time interval of one photo shooting, steps S503 to S514 are repeated.

[0139] In step S515, the camera is turned off.

[0140] The present invention, based on the continuity of cached frame numbers and the difference in sensitivity, adds a fast difference comparison algorithm of multiple frame aperture values ​​to the previous frame-taking behavior for judgment, which can more accurately judge the dynamic frame-taking behavior, improve the synthesis resolution from the perspective of continuity and image similarity, and effectively avoid the situation where the generated photo image has deviations and inconsistencies with the preview image, resulting in poor user experience.

[0141] Through the method disclosed in the present invention, in the extreme case of changing the brightness and completing the photo-taking work instantaneously, the dynamic frame-taking judgment standard can be effectively enhanced, making the dynamic frame-taking logic more rigorous, and accurately performing dynamic post-taking behavior when the pre-taking cannot be met, and the serious jump problem of the generated photo image being inconsistent with the preview image will no longer occur.

[0142] In the scenario where the light level changes and the photo-taking work is completed instantly, in the related art, due to the single consideration of whether the cached frame is continuous and whether the sensitivity meets the preset ratio of dynamic frame-taking behavior, the aperture value jump is not considered. The inconsistent brightness caused by the different apertures of the cached frames will lead to great differences in depth of field, clarity, etc. between frames, resulting in serious deviations between the generated photo pictures and the preview images. However, the present disclosure selects the required target cache frame whose frame number continuity and sensitivity difference are within the set range, and by adding the judgment standard of the aperture value of the selected cache frame, it is judged whether the cached frame selected in this shooting process meets the previous frame-taking behavior, effectively avoiding the deviation and inconsistency between the generated photo pictures and the preview images.

[0143] Based on the same concept, an embodiment of the present disclosure also provides a photographing device.

[0144] It is understandable that the photographing device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.

[0145] Figure 6 FIG. 1 is a block diagram of a photographing device 100 according to an exemplary embodiment. Figure 6 The device 100 includes a determining unit 101 and an executing unit 102.

[0146] The determining unit 101 is configured to determine a cache frame of a preview image stored in a cache area in response to a camera application of a terminal being in a preset shooting mode and receiving a photo taking instruction.

[0147] The execution unit 102 is used to select a target cache frame based on the aperture value of the cache frame if it is determined that an aperture value exists corresponding to the cache frame, and generate a photographed image based on the target cache frame.

[0148] In one embodiment, the execution unit 102 is used to lock the cache frames in the cache area according to the locked frame number, where the locked frame number is the number of target cache frames to be selected; determine the aperture value of the i-th cache frame currently locked and selected in the cache area, where i is a positive integer greater than or equal to 1; and select the target cache frame based on the locked frame number and the aperture value of the i-th cache frame.

[0149] In one embodiment, the execution unit 102 is used to determine a standard frame in the cache frames corresponding to the locked frame number based on the locked frame number and the aperture value of the i-th cache frame, the standard frame being a cache frame in which the aperture value difference between the aperture value of the i-th cache frame and the standard aperture value is less than a difference threshold; if the frame number of the determined standard frame is the same as the locked frame number, the target cache frame is selected from the cache frames cached before receiving the photo command; if the frame number of the determined standard frame is different from the locked frame number, the target cache frame is selected from the cache frames cached after receiving the photo command.

[0150] In one embodiment, the execution unit 102 is used to compare the aperture value of the i-th frame cache frame with the standard aperture value to obtain the aperture value difference of the i-th frame cache frame; if the aperture value difference is less than the difference threshold, the i-th frame cache frame is used as the standard frame, and the number of standard frames determined is accumulated; if the aperture value difference is greater than or equal to the difference threshold, the number of standard frames accumulated before the i-th frame cache frame is set to 1, the number of standard frames that meet the aperture value difference less than the difference threshold is accumulated again, and the aperture value of the i-th frame cache frame is used as the standard aperture value; the above process is repeated until i reaches the locked frame number.

[0151] In one embodiment, the determination unit 101 is further used to determine, based on the frame number continuity and sensitivity of the cached frames, that the frame numbers of the cached frames locked according to the locked frame number are continuous, and the sensitivity frame-by-frame difference ratio is less than a threshold; wherein the sensitivity is used to characterize the richness of dynamic information in the image, and the sensitivity frame-by-frame difference ratio is the difference degree of dynamic information in the image between two adjacent frames.

[0152] In one implementation, if there is no aperture value corresponding to the cache frame, a target cache frame is selected from the cache frames cached before receiving the photo command, and / or a target cache frame is selected from the cache frames cached after receiving the photo command.

[0153] In one implementation, the execution unit 102 is used to determine that the current photographing scene is a high dynamic range super-resolution photographing HDSR scene; determine that the current camera application shooting angle is wide-angle shooting; and determine that the current camera photographing lens is a telephoto lens.

[0154] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0155] Figure 7 2 is a block diagram of a photographing device 200 according to an exemplary embodiment. For example, the device 200 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.

[0156] Reference Figure 7 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .

[0157] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.

[0158] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 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.

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

[0160] The multimedia component 208 includes a screen that provides an output interface between the device 200 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 208 includes a front camera and / or a rear camera. When the device 200 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.

[0161] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation 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 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.

[0162] I / O interface 212 provides an interface between processing component 202 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.

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

[0164] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 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 216 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.

[0165] In an exemplary embodiment, the apparatus 200 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 method.

[0166] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 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.

[0167] Figure 8 is a block diagram of a photographing device 300 according to an exemplary embodiment. For example, the device 300 may be provided as a server. Figure 8, the apparatus 300 includes a processing component 322, which further includes one or more processors, and a memory resource represented by a memory 332 for storing instructions, such as an application, that can be executed by the processing component 322. The application stored in the memory 332 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 322 is configured to execute the instructions to perform the above method.

[0168] The device 300 may also include a power supply component 326 configured to perform power management of the device 300, a wired or wireless network interface 350 configured to connect the device 300 to a network, and an input / output (I / O) interface 358. The device 300 may operate based on an operating system stored in the memory 332, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

[0169] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 332 including instructions, which can be executed by the processing component 322 of the device 300 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.

[0170] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0171] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0172] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0173] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0174] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0175] It should be understood that the present disclosure is not limited to the precise 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 scope of the appended claims.

Claims

1. A photographing method, characterized in that: The method comprises: In response to receiving a photo taking instruction when a camera application of the terminal is in a preset shooting mode, determining a cache frame of a preview image stored in a cache area; If it is determined that an aperture value exists corresponding to the cache frame, a target cache frame is selected based on the aperture value of the cache frame, and a photographed picture is generated based on the target cache frame.

2. The photographing method according to claim 1, characterized in that: The selecting a target cache frame based on the aperture value of the cache frame includes: Locking cache frames in the cache area according to the locked frame number, where the locked frame number is the number of target cache frames to be selected; Determine the aperture value of the i-th cache frame currently locked and selected in the cache area, where i is a positive integer greater than or equal to 1; The target cache frame is selected based on the locked frame number and the aperture value of the i-th cache frame.

3. The photographing method according to claim 2, characterized in that: The selecting the target cache frame based on the locked frame number and the aperture value of the i-th cache frame includes: Based on the locked frame number and the aperture value of the i-th cached frame, determining a standard frame in the cached frames corresponding to the locked frame number, the standard frame being a cached frame whose aperture value difference between the aperture value of the i-th cached frame and the standard aperture value is less than a difference threshold; If the determined number of standard frames is the same as the locked number of frames, selecting the target cache frame from the cache frames cached before receiving the photo taking instruction; If the determined frame number of the standard frame is different from the locked frame number, the target cache frame is selected from the cache frames cached after receiving the photo-taking instruction.

4. The photographing method according to claim 3, characterized in that: The determining of a standard frame in the cached frames corresponding to the locked frame number based on the locked frame number and the aperture value of the i-th cached frame includes: Comparing the aperture value of the i-th frame buffer with the standard aperture value to obtain the aperture value difference of the i-th frame buffer; If the aperture value difference is less than the difference threshold, the i-th cache frame is used as the standard frame, and the number of frames of the determined standard frame is accumulated; If the aperture value difference is greater than or equal to the difference threshold, the number of standard frames accumulated before the i-th frame cache is set to 1, the number of standard frames satisfying the aperture value difference less than the difference threshold is accumulated again, and the aperture value of the i-th frame cache is used as the standard aperture value; The above process is repeated until i reaches the locked frame number.

5. The photographing method according to claim 2, characterized in that: Before selecting the target cache frame based on the aperture value of the cache frame, the method further includes: Based on the frame number continuity and sensitivity of the cached frames, determining that the frame numbers of the cached frames locked according to the locked frame number are continuous and the sensitivity frame-by-frame difference ratio is less than a threshold; The sensitivity is used to characterize the richness of dynamic information in an image, and the sensitivity frame-by-frame difference ratio is the difference in dynamic information in an image between two adjacent frames.

6. The photographing method according to claim 1, characterized in that: If there is no aperture value corresponding to the cache frame, the target cache frame is selected from the cache frames cached before receiving the photo-taking instruction, and / or the target cache frame is selected from the cache frames cached after receiving the photo-taking instruction.

7. The photographing method according to claim 1, characterized in that: The determining that the buffered frame corresponds to an aperture value includes: Determine that the current shooting scene is a high dynamic range super-resolution shooting HDSR scene; Determine that the current shooting angle of the camera application is wide-angle shooting; Determine whether the current camera lens is a telephoto lens.

8. A photographing device, characterized in that: The device comprises: a determining unit, configured to determine a cache frame of a preview image stored in a cache area in response to receiving a photo taking instruction when a camera application of the terminal is in a preset shooting mode; The execution unit is used to select a target cache frame based on the aperture value of the cache frame if it is determined that the cache frame corresponds to an aperture value, and generate a photographed picture based on the target cache frame.

9. The photographing device according to claim 8, characterized in that: The execution unit selects a target cache frame based on the aperture value of the cache frame in the following manner: Locking cache frames in the cache area according to the locked frame number, where the locked frame number is the number of target cache frames to be selected; Determine the aperture value of the i-th cache frame currently locked and selected in the cache area, where i is a positive integer greater than or equal to 1; The target cache frame is selected based on the locked frame number and the aperture value of the i-th cache frame.

10. The photographing device according to claim 9, characterized in that: The execution unit selects the target cache frame based on the locked frame number and the aperture value of the i-th cache frame in the following manner: Based on the locked frame number and the aperture value of the i-th cached frame, determining a standard frame in the cached frames corresponding to the locked frame number, the standard frame being a cached frame whose aperture value difference between the aperture value of the i-th cached frame and the standard aperture value is less than a difference threshold; If the determined number of standard frames is the same as the locked number of frames, selecting the target cache frame from the cache frames cached before receiving the photo taking instruction; If the determined frame number of the standard frame is different from the locked frame number, the target cache frame is selected from the cache frames cached after receiving the photo-taking instruction.

11. The photographing device according to claim 9, characterized in that: The execution unit determines the standard frame in the cached frames corresponding to the locked frame number based on the locked frame number and the aperture value of the i-th cached frame in the following manner: Comparing the aperture value of the i-th frame buffer with the standard aperture value to obtain the aperture value difference of the i-th frame buffer; If the aperture value difference is less than the difference threshold, the i-th cache frame is used as the standard frame, and the number of frames of the determined standard frame is accumulated; If the aperture value difference is greater than or equal to the difference threshold, the number of standard frames accumulated before the i-th frame cache is set to 1, the number of standard frames satisfying the aperture value difference less than the difference threshold is accumulated again, and the aperture value of the i-th frame cache is used as the standard aperture value; The above process is repeated until i reaches the locked frame number.

12. The photographing device according to claim 9, characterized in that: The determining unit is further configured to: Based on the frame number continuity and sensitivity of the cached frames, determining that the frame numbers of the cached frames locked according to the locked frame number are continuous and the sensitivity frame-by-frame difference ratio is less than a threshold; The sensitivity is used to characterize the richness of dynamic information in an image, and the sensitivity frame-by-frame difference ratio is the difference in dynamic information in an image between two adjacent frames.

13. The photographing device according to claim 8, characterized in that: If there is no aperture value corresponding to the cache frame, the target cache frame is selected from the cache frames cached before receiving the photo-taking instruction, and / or the target cache frame is selected from the cache frames cached after receiving the photo-taking instruction.

14. The photographing device according to claim 8, characterized in that: The execution unit determines the aperture value corresponding to the cache frame in the following manner: Determine that the current shooting scene is a high dynamic range super-resolution shooting HDSR scene; Determine that the current shooting angle of the camera application is wide-angle shooting; Determine whether the current camera lens is a telephoto lens.

15. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the photographing method described in any one of claims 1-7.

16. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by the processor of the terminal, the terminal is enabled to execute the photographing method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Shooting method and mobile terminal

    CN107222669A

  • Image processing method and device, storage medium and electronic device

    CN110198417A

  • Photographing method and electronic equipment

    CN113382169A

  • Image capture apparatus and method

    US20090244317A1