Photographing method
By automatically identifying and shooting wonderful images in electronic devices, it solves the problem of users having difficulty capturing wonderful moments, improves the shooting experience, and optimizes resource usage by setting upper limits and redundant detection.
Patent Information
- Application Number
- PCT/CN2023/136155
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-27
- Filing Date
- 2023-12-04
- Publication Date
- 2024-09-06
AI Technical Summary
During the shooting process, due to problems such as human reaction delay and transmission delay of electronic devices, it is difficult for users to take wonderful photos of truly wonderful moments, which reduces the user's shooting experience.
A shooting method is provided. The electronic device automatically recognizes the images reported by the camera during the preview process, filters out the wonderful images and saves them without user operation. The method includes displaying a preview interface at time T1, and after detecting a specific operation at time T2, responding and displaying the first image. If the image quality meets the preset conditions and contains a specific action, automatically performs the shooting operation and displays the corresponding logo on the interface. .
It realizes automatic shooting of wonderful photos at wonderful moments, saves user operations, avoids missing wonderful moments, improves user experience, and avoids the generation of redundant photos by setting automatic shooting upper limits and redundancy detection, saving storage resources.
Smart Images

Figure CN2023136155_06092024_PF_FP
Abstract
Description
A shooting method
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on February 27, 2023, with application number 202310212396.5 and application name “A Shooting Method”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminals, and in particular to a shooting method. Background Art
[0003] During the shooting process, due to issues such as human reaction delay and electronic device transmission delay, users often find it difficult to capture wonderful photos of truly wonderful moments, which greatly reduces the user's shooting experience.
[0004] Summary of the Invention
[0005] The present application provides a shooting method. When the shooting method is implemented, the electronic device 100 automatically identifies images reported by the camera during the preview process, selects and saves wonderful images from the images, and does not require user operation.
[0006] In a first aspect, the present application provides a shooting method, which is applied to an electronic device, the electronic device including a camera, the method including: opening a camera application; at time T1, displaying a preview interface, the preview interface including a preview area, a shutter key and a third control, the preview area displaying image frames captured by the camera in real time; keeping the preview interface displayed, and at time T2, displaying a thumbnail of a first image in the third control; wherein the first image is an image automatically taken by the electronic device between time T1 and time T2, in which the object is in a first posture and the image quality meets a first preset condition, the image quality includes the clarity and exposure of the image, the first posture is a posture in a first action, the first action is determined based on multiple image frames captured in real time by the electronic device, and the first action is a preset action; wherein time T1 is before time T2; detecting a first operation on the third control; and displaying the first image in response to the first operation.
[0007] By implementing the method provided in the first aspect, the electronic device can receive images reported by the camera in real time, filter out images that include specific actions and have appropriate image clarity and exposure from the images reported by the camera, and then automatically capture and save them without requiring the user to capture the images. The electronic device can display thumbnails of the captured photos to prompt the user that the electronic device has automatically captured and saved the photos. The user can then browse the images automatically captured by the electronic device by clicking on the thumbnails.
[0008] In combination with the method provided in the first aspect, in some embodiments, the first image also satisfies one or more of the following: includes a first object, the size and position of the first object meet a first preset requirement, includes a human face, the size and position of the human face meet a second preset requirement, the face has eyes open, or the face is smiling.
[0009] The electronic device may further determine an image with more exciting image content from images that include the first action and whose image quality meets the requirements through the next one or more of the above.
[0010] In combination with the method provided in the first aspect, in some embodiments, the method further includes: at time T2, a first identifier is also displayed on the preview interface, and the first identifier is used to mark that the electronic device automatically captures the first image.
[0011] By implementing the method provided in the above embodiment, after executing automatic capture, the electronic device may display a specific identifier when displaying thumbnails of captured photos. Thus, upon seeing the identifier, the user can not only confirm that a photo has been taken, but also that the photo was automatically captured by the electronic device.
[0012] In some embodiments, the electronic device may display the specific identifier in the lower left corner of the review area. In other embodiments, the specific identifier may also be displayed on the thumbnail of the captured photo.
[0013] In combination with the method provided in the first aspect, in some embodiments, the method also includes: displaying a third interface, the third interface displays one or more images stored in the electronic device, the one or more images include a thumbnail of the first image, and a first identifier is displayed on the thumbnail, and the first identifier is used to mark the first image as automatically taken by the electronic device.
[0014] By implementing the method provided in the above embodiment, when an electronic device provides a user with a function for browsing previously taken photos (e.g., a gallery), it can also display thumbnails of automatically captured photos in the interface displaying previously taken photos, and display a specific indicator indicating automatic capture on the thumbnails of automatically captured photos. In this way, when browsing images through the gallery application, the user can quickly identify and browse photos automatically captured by the electronic device.
[0015] In combination with the method provided in the first aspect, in some embodiments, the preview interface also includes a first control, and the method also includes: detecting a user operation acting on the first control, displaying a fourth interface, and the fourth interface including a second control; detecting a user operation acting on the second control, and turning on the automatic shooting function.
[0016] When implementing the method provided in the above embodiment, the electronic device can set a feature switch, such as the aforementioned second control, to control the activation of automatic capture. When a user requests automatic capture, the electronic device can activate automatic capture based on the operation performed on the feature switch, and then perform the subsequent operations of identifying, capturing, and saving outstanding images. This saves power consumption and avoids the generation of a large number of automatically captured photos, which could impact the user experience.
[0017] In combination with the method provided in the first aspect, in some embodiments, after the first image, the image captured by the camera also includes a second image, the second image also includes the first action and the image quality of the second image also meets the first preset condition, the wonderfulness of the second image is lower than the wonderfulness of the first image, and the image taken by the electronic device does not include the second image; the wonderfulness of the image is determined by the completion of the first action in the image and the image quality of the image.
[0018] By implementing the method provided in the above embodiment, the electronic device can further identify the most outstanding images based on their degree of excellence and automatically capture only those outstanding images. This allows the electronic device to limit the number of automatic captures, ensuring that the images ultimately captured are all high-quality, reducing storage resource waste and improving the user experience.
[0019] In combination with the method provided in the first aspect, in some embodiments, the time interval between the second image and the first image is smaller than the first time interval.
[0020] By implementing the method provided in the above embodiment, the electronic device can limit the comparison between candidate wonderful images by the first time interval, that is, limit automatic shooting while avoiding excessive restriction that ultimately only captures one frame of image.
[0021] In combination with the method provided in the first aspect, in some embodiments, after the first image, the image captured by the camera also includes a third image, the third image also includes the first action and the image quality of the second image also meets the first preset condition, and the method also includes: automatically shooting the third image; the similarity between the first image and the third image is less than the first preset value, or the time interval between the first image and the third image is greater than the second time interval.
[0022] By implementing the method provided in the above embodiment, after triggering the capture of a certain image, the electronic device can determine whether the image is redundant by comparing its similarity with an already captured image, thereby avoiding capturing a redundant image again. Alternatively, the electronic device can also set a minimum time interval between two captures, such as the second time interval described above. When the time interval between two captures is greater than the second time interval, the electronic device can determine that the image currently being captured is redundant with the image already captured. In this case, the electronic device can terminate the capture to avoid redundancy.
[0023] In combination with the method provided in the first aspect, in some embodiments, before the electronic device automatically captures a first image including a first action and whose image quality meets a first preset condition, the method also includes: determining that the number of images automatically captured by the electronic device is lower than a third preset value.
[0024] By implementing the method provided in the above embodiment, the electronic device can set a maximum number of captured images using an automatic capture limit. When the number of captured images reaches this automatic capture limit, the electronic device can stop automatically capturing images, avoiding the generation of too many automatically captured images, which would occupy device storage space and affect the user experience.
[0025] In combination with the method provided in the first aspect, in some embodiments, determining that the number of images automatically captured by the electronic device is lower than a third preset value specifically includes: determining that the number of images automatically captured by the electronic device that belong to the same scene as the first image is lower than a fourth preset value.
[0026] By implementing the methods provided in the above embodiments, electronic devices can identify different shooting scenes based on image content and set an upper limit for automatic shooting for each scene. When the number of images already captured for a scene reaches the upper limit for automatic shooting, the electronic device can stop capturing images for that scene to avoid redundancy. When the scene changes, the electronic device can restart capturing images.
[0027] In combination with the method provided in the first aspect, in some embodiments, the first image is an image automatically taken by the electronic device between time T1 and time T2, including the first action and the image quality meeting the first preset condition, specifically including: the first image is obtained by the electronic device automatically taking multiple frames of images including the fourth image, and the fourth image is an image between time T1 and time T2 that includes the first action and the image quality meets the first preset condition.
[0028] By implementing the method provided in the above embodiment, the electronic device can process the wonderful image in combination with other images near the wonderful image (multi-frame fusion) to further improve the quality of the wonderful image, such as color, brightness, saturation, etc.
[0029] In combination with the method provided in the first aspect, in some embodiments, the first image is obtained by the electronic device automatically shooting multiple frames of images including the fourth image, specifically including: in the first shooting mode, the first image is obtained by the electronic device automatically shooting multiple frames of images including the fourth image.
[0030] By implementing the methods provided in the above embodiments, the electronic device can determine whether to perform multi-frame fusion based on the shooting mode. In certain specific shooting modes, the electronic device can significantly improve the quality of the final output photo through multi-frame fusion. In other scenarios, the quality improvement brought by multi-frame fusion is not significant. In this case, the electronic device may not perform multi-frame fusion to save resources and reduce power consumption.
[0031] In combination with the method provided in the first aspect, in some embodiments, the first shooting mode includes a night scene mode.
[0032] By implementing the method provided in the above embodiment, when shooting in night scene mode, the electronic device can perform multi-frame fusion to significantly improve the quality of the final output photo.
[0033] In a second aspect, the present application provides an electronic device comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code comprises computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the method described in the first aspect and any possible implementation of the first aspect.
[0034] In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, which are used to call computer instructions to enable the electronic device to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.
[0036] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.
[0037] It is understandable that the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to perform the methods provided in this application. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figures 1A-1F are a set of user interfaces for enabling the automatic snapshot function provided in an embodiment of the present application;
[0039] Figures 2A-2H are a set of user interfaces for implementing automatic snapshots provided in an embodiment of the present application;
[0040] 3A-3J are a set of user interfaces for implementing automatic snapshot during video recording, provided by an embodiment of the present application;
[0041] 4A-4E are a set of user interfaces for implementing manual snapshots provided in an embodiment of the present application;
[0042] 5A-5E are other user interfaces for enabling the automatic snapshot function provided in embodiments of the present application;
[0043] FIG6A is a schematic diagram of a method for implementing automatic snapshot according to an embodiment of the present application;
[0044] FIG6B is a schematic diagram of a method for determining image brilliance provided by an embodiment of the present application;
[0045] FIG7 is a flowchart of implementing automatic snapshot according to an embodiment of the present application;
[0046] FIG8 is a schematic diagram of the system structure of the electronic device 100 provided in an embodiment of the present application;
[0047] FIG9 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0049] During the shooting process, due to problems such as human reaction delay and transmission delay of electronic devices, users often find it difficult to take wonderful photos of truly wonderful moments.
[0050] A highlight moment refers to a moment within a period of time when the subject's state and / or action is at its best. State and action are specific to still-life and non-life scenes, respectively. In still-life scenes, a highlight moment occurs when the subject is relatively still in physical space, and the camera image of the still object is clear, jitter-free, and noise-free. In non-still-life scenes, a highlight moment occurs when the subject's action in physical space is at its best, and the camera image of the still object is clear, jitter-free, and noise-free.
[0051] For example, when photographing scenic spots and historical sites, a highlight moment is when the camera captures a complete, clear, and noise-free image of the building; when photographing a hurdler, a highlight moment is when the athlete jumps and crosses the hurdle, and the image is clear, without jitter, and noise; when photographing a close-up portrait, a highlight moment is when the person opens their eyes and smiles, and the image is clear, without jitter, and noise. The processed images of these highlight moments are then output as photos.
[0052] In view of this, an embodiment of the present application provides a photographing method. This method can be applied to electronic devices such as smartphones and tablet computers that have cameras and provide photographing and display services. The electronic device is denoted as electronic device 100.
[0053] The electronic device 100 is not limited to smartphones and tablet computers. It can also be a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device 100.
[0054] When implementing the photography method provided in the embodiments of the present application, after turning on the camera, the electronic device 100 can determine whether each image frame is a wonderful image frame based on a preset algorithm and the image frames reported by the camera, that is, determine whether the moment corresponding to each image frame is a wonderful moment. If the image frame reported by the camera is a wonderful image frame, the electronic device 100 can perform a photo shooting operation and output the wonderful image frame as a wonderful photo.
[0055] The above-mentioned shooting method of identifying highlights based on a preset algorithm and outputting the highlights image frames at those highlights as highlights photos can be called automatic capture (or automatic shooting). Automatic capture can automatically identify highlights and capture highlights without the user having to perform a shooting operation, thus saving user operation and preventing missed highlights.
[0056] Furthermore, to enhance the user experience and avoid outputting excessive and redundant photos, the electronic device 100 can identify detailed shooting scenes and set an upper limit for the number of wonderful photos for each scene. When the number of wonderful photos for a scene reaches the upper limit for that scene, the electronic device 100 will no longer automatically capture photos for that scene. Alternatively, the electronic device 100 can set an upper limit for automatic capture, and when the number of photos already captured reaches the upper limit, the electronic device 100 will no longer automatically capture photos for that scene.
[0057] First, in the embodiment of the present application, the electronic device 100 can turn on or off automatic snapshot according to the user's selection.
[0058] FIG1A-FIG1F are a set of user interfaces for enabling the automatic snapshot function provided in an embodiment of the present application.
[0059] FIG1A is a homepage of an electronic device 100 provided in an embodiment of the present application.
[0060] As shown in FIG. 1A , the main interface may include a status bar 111 , a page indicator 112 , and a plurality of application icons.
[0061] The status bar may include one or more signal strength indicators of a mobile communication signal (also referred to as a cellular signal), a wireless fidelity (Wi-Fi) signal strength indicator, a battery status indicator, a time indicator, and the like.
[0062] The page indicator 112 may be used to indicate the positional relationship between the currently displayed page and other pages.
[0063] The multiple application icons may include a settings application icon 113A, an application market application icon 113B, a gallery application icon 113C, a weather application icon 113D, a phone application icon 113E, a browser application icon 113F, a camera application icon 113G, and the like. The main interface may also include other application icons, which are not listed here one by one. The multiple application icons may be distributed across multiple pages. The page indicator 112 may be used to indicate which page the user is currently browsing among the multiple pages hosting multiple applications. The user may use touch operations such as swiping left and right to browse other pages.
[0064] It is understandable that FIG1A and the user interface described subsequently merely illustrate a possible user interface style of the electronic device 100 taking a mobile phone as an example, and should not constitute a limitation on the embodiments of the present application.
[0065] As shown in FIG1A , electronic device 100 may detect a user operation on camera application icon 113G. In response to the operation, electronic device 100 may launch the camera application and display the user interface of the camera application shown in FIG1B . FIG1B is a user interface for the capture and display services provided by the camera application according to an embodiment of the present application, also known as a preview interface.
[0066] As shown in FIG. 1B , the preview interface may include a mode bar 121 , a shooting control 122 , a preview window 123 , and a review control 124 .
[0067] The mode bar 121 may include multiple shooting mode options, such as "Night Scene", "Portrait", "Photo", "Video", etc. Different shooting modes can provide users with shooting services with different effects. Users can select any of the multiple shooting modes to shoot according to different needs. For example, "Photo" may be the default shooting mode for taking photos. "Video" is used to record videos. The "Night Scene" mode is suitable for shooting scenes with dim light, such as at night. The "Portrait" mode is suitable for shooting scenes where the subject is a person. The electronic device 100 can also provide more shooting modes, such as "Large Aperture", "Movie", "Professional", etc., which are not listed here one by one.
[0068] The electronic device 100 can detect user operations on the mode bar 121 and change the currently used shooting mode according to the user operations. The user operations are, for example, left / right swipe operations. For example, when it is detected that the mode bar 121 is dragged and slid to the left (left swipe operation) and the float 125 stops at the "Portrait" option, the electronic device 100 can switch to the "Portrait" mode. By default, the electronic device 100 first uses the "Photograph" mode.
[0069] The capture control 122 is used to trigger a photo. This control is also known as the shutter button. The electronic device 100 can detect whether a user action, such as a click, is applied to the capture control 122. Upon detecting a user action on the capture control 122, the electronic device 100 can generate a capture instruction. Based on the capture instruction, the electronic device 100 can retrieve the image reported by the camera at the corresponding timestamp and save it as a photo.
[0070] The preview window 123 can be used to display the image reported by the camera in real time. The display area corresponding to the preview window 123 is also called the preview area. In different shooting modes, the electronic device 100 can process the image reported by the camera to improve the display effect of the image. For example, in "portrait" mode, the electronic device 100 can blur the background of the image reported by the camera to highlight the portrait. Here, the preview window 123 can display the image processed by the image processing algorithm corresponding to the different shooting modes in real time, so that the user can perceive the shooting effect corresponding to the different shooting modes in real time.
[0071] The review control 124 can be used to browse thumbnails of captured images (photos / videos). The display area corresponding to the review control 124 is also called the review area. The review control 124 is also called the third control. In an embodiment of the present application, after the electronic device 100 recognizes a wonderful image frame and performs an automatic capture operation according to a preset algorithm, it can generate and save the wonderful photos and corresponding thumbnails captured automatically. At this time, the review control 124 can also display thumbnails of the wonderful photos captured automatically. When a user operation acting on the review control 124 is detected, the electronic device 100 can also display the wonderful photos corresponding to the thumbnail.
[0072] The preview interface also includes a quick function area 126. As shown in Figure 1B, quick function area 126 may include controls 126A, 126B, 126C, and 126D. Control 126A can be used to turn off the Smart Shooting (AI Photography) feature. Smart Shooting automatically identifies the subject and applies different processing to different subjects, resulting in better photos or videos. Control 126B can be used to turn on the flash. Control 126C can be used to select a filter. Control 126D can be used to access more functions.
[0073] As shown in Figure 1B, electronic device 100 may detect a user operation on control 126D. In response to the above operation, electronic device 100 may display the user interface shown in Figure 1C. Control 126D may be referred to as a first control.
[0074] This interface can display multiple function option controls, such as "Photo Ratio", "Smart Photo", "Video Resolution", "Video Frame Rate" and other controls, which will not be listed here one by one. The "Photo Ratio" control can be used to set the aspect ratio of the captured photo, such as 4:3, 9:16. The "Smart Photo" control can be used to set special photo taking methods, such as voice-controlled photo taking, gesture-controlled photo taking, and automatic snapshot provided in the embodiments of the present application. The "Video Resolution" control can be used to set the resolution of the video, such as [16:9]1080p. The "Video Frame Rate" control can be used to set the frame rate of the video, such as 30fps.
[0075] As shown in Figure 1C, the electronic device 100 may detect a user operation on the "Smart Photo" control. In response to the above operation, the electronic device 100 may display the user interface shown in Figure 1D. The user interface shown in Figure 1D may be referred to as a fourth interface.
[0076] The interface may display multiple function option controls under the "Smart Photo" directory, such as "Voice Control Photo", "Gesture Photo", "Smile Snapshot", "Auto Snapshot" and other controls. The "Voice Control Photo" control can be used to turn voice control photo shooting on or off, and the "Gesture Photo" control can be used to turn gesture photo shooting on or off. The "Smile Snapshot" control can be used to turn smile snapshot on or off. The "Auto Snapshot" control can be used to turn the automatic snapshot provided by the implementation of this application on or off. Among them, voice control photo shooting, gesture photo shooting, smile snapshot and traditional photo shooting operations by clicking the shooting control 122 are non-automatic snapshots. It can be understood that whether voice control photo shooting, gesture photo shooting, smile snapshot or traditional photo shooting operations by clicking the shooting control 122 are all in response to the user's conscious behavior (for example, knowing that if you smile, the electronic device will take a photo), the electronic device takes the photo. However, this application focuses on the user's unconscious behavior, where the electronic device automatically takes the photo or the user knows that one or more photos of the action, preview or video will be captured, but does not know which one or more photos.
[0077] As shown in FIG1D , electronic device 100 may detect a user operation on button 141. Button 141 may be referred to as a second control. In response to the operation, electronic device 100 may initiate automatic snapshot. Electronic device 100 may display the user interface shown in FIG1E . As shown in FIG1E , button 141 in FIG1D may be replaced with button 142.
[0078] Then, the electronic device 100 may sequentially detect user operations on the control 143 and the control 144. In response to the above operations, the electronic device 100 may redisplay the preview interface, as shown in FIG1F.
[0079] In some embodiments, automatic capture may conflict with other shooting functions. In this case, only one of the conflicting functions can be enabled. For example, automatic capture may conflict with AI photography. In this case, the electronic device 100 does not support simultaneous activation of automatic capture and AI photography. In the scenario where automatic capture is enabled, if a user operation to enable AI photography is detected, the electronic device 100 may enable AI photography and disable automatic capture. Conversely, in the scenario where AI photography is enabled, if a user operation to enable automatic capture is detected, the electronic device 100 may enable automatic capture and disable AI photography.
[0080] As shown in FIG1F , after automatic capture is turned on through the operations shown in FIG1C - FIG1E , the electronic device 100 may display a control 151 to replace the original control 126A, indicating that the AI photography function has been turned off.
[0081] Other shooting functions that do not conflict with manual capture can be turned on or off independently. For example, the user can turn on the flash at any time through control 126B and select a filter through control 126C.
[0082] 1C to 1E , the user can obtain the control 142 for turning off automatic snapshot through the same path, and then turn off automatic snapshot through the control 142 , which will not be described in detail here.
[0083] By implementing the above method, users can turn on / off the automatic snapshot function at any time according to their needs. In this way, when the user needs to automatically capture wonderful photos of wonderful moments, the electronic device 100 can provide the above service; when the user does not need automatic snapshot, the electronic device 100 can turn off automatic snapshot, which saves computing costs, reduces power consumption, and improves the user experience.
[0084] After turning on automatic capture, the electronic device 100 can identify the image reported by the camera in real time during the preview process and determine whether the image is a wonderful image frame. After identifying a wonderful image frame, the electronic device 100 can automatically take a photo of the wonderful image frame and output the wonderful photo.
[0085] 2A-2H are a set of user interfaces for implementing automatic snapshots provided in an embodiment of the present application.
[0086] Electronic device 100 can capture an athlete performing a long jump. Referring to Figures 2A, 2B, 2C, 2D, and 2E, in the preview interface after automatic capture is enabled, preview window 123 sequentially displays the athlete's motion state captured by the camera at different moments during the long jump. Simultaneously, using a pre-configured algorithm for automatic capture, electronic device 100 can identify the series of images and determine whether each frame is engaging.
[0087] Specifically, the electronic device 100 can obtain the shooting object and the motion state of the object contained in each frame of the image according to a preset image content extraction algorithm. When the shooting object is a person, the electronic device 100 can also obtain the face and facial attributes (for example, whether the face is smiling, with eyes closed, etc.) in the image through the above-mentioned image content extraction algorithm. The electronic device 100 is also preset with a clarity algorithm. The electronic device 100 can obtain the clarity of each frame of the image according to the above-mentioned clarity algorithm. In a specific implementation, when the image includes a person, the person is in the best completion state of a preset action, and the image is clear, the electronic device 100 can determine that the frame of the image is a wonderful image frame. In a specific implementation, when the image includes a person, the person is smiling with eyes open, and the image is clear, the electronic device 100 can determine that the frame of the image is a wonderful image frame. The subsequent embodiments will specifically introduce the method by which the electronic device 100 determines a wonderful image frame according to a preset algorithm, which will not be expanded here.
[0088] For example, in a long jump, the flat-flat position of the character after taking off can be considered the optimal long jump completion state, which is the state displayed in preview window 123 in Figure 2C. After recognizing the long jump action using the images from Figures 2A to 2E, electronic device 100 can determine that the clear image frame (referred to as image K) displayed in preview window 123 in Figure 2C is a highlight image frame. Electronic device 100 can then capture this image frame and output a highlight photo (referred to as highlight photo K) and a corresponding thumbnail.
[0089] Referring to Figure 2F, after obtaining a wonderful photo and a corresponding thumbnail, the electronic device 100 may display the thumbnail in the review control 124, thereby prompting the user that the electronic device 100 has automatically captured and generated a photo. Furthermore, the electronic device 100 may display a prompt control, such as control 211, near the thumbnail to prompt the user that the captured photo was automatically captured by the electronic device 100 and not taken by the user. The prompt control may be referred to as a first indicator.
[0090] For example, the above-mentioned prompt control can also be set to be semi-transparent and displayed in an overlay form on the thumbnail of the wonderful photo K. Not limited to the prompt control shown in the control 211, the electronic device 100 can also use other identifiers to indicate that the photo taken at this time is automatically captured by the electronic device 100, and the embodiment of the present application is not limited to this.
[0091] In the shooting process shown in Figures 2A-2F, the athlete's long jump can be referred to as the first action. The figure's flat-footed position after taking off can be referred to as the first posture. Image K containing this first posture can be referred to as the first image. The wonderful photo K obtained based on image K can be referred to as the first photo.
[0092] The electronic device 100 may detect user operations on the review control 124 . In response to the operations, the electronic device 100 may display the user interface shown in FIG. 2G , showing the wonderful photos corresponding to the thumbnails in the review control 124 .
[0093] As shown in FIG2G , the user interface may include area 221. Area 221 may be used to display captured images, such as the automatically captured wonderful photo K. In this case, the user can browse the automatically captured wonderful photos through area 221. The user interface may also include a prompt control, such as control 222 (first identifier). When the user browses the captured photos, the electronic device 100 may use the above control to determine that the currently displayed photo is an automatically captured wonderful photo, rather than a photo taken by the user.
[0094] The electronic device 100 may provide a service for browsing captured images. For example, the electronic device 100 may be pre-installed with a gallery application. Users may browse captured images through the gallery application. Figure 2H is a user interface for displaying captured images through the gallery application on the electronic device 100 provided in an embodiment of the present application. The user interface shown in Figure 2H is also referred to as the third interface. As shown in Figure 2H, the electronic device 100 may display thumbnails of photos automatically captured by the electronic device 100 in the user interface, such as image 224 (thumbnail of the first image). In this interface, the electronic device 100 may also display prompt controls, such as control 223 (first identifier), on the preview images of the automatically captured wonderful photos. In this way, when the user browses the captured images, the user can distinguish between the automatically captured wonderful photos and the photos taken by himself through the above-mentioned prompt controls.
[0095] In some scenarios, the user has opened the preview interface and is ready to shoot, but forgets to click the capture control 122, thus missing the wonderful moment. Or, due to a delay in response, the wonderful moment has already ended when the capture control 122 is clicked, and the wonderful photo cannot be captured. By implementing the above method, after turning on automatic capture, the electronic device 100 can automatically identify the wonderful moments in the preview scene and capture the wonderful photos. In this way, the electronic device 100 can assist the user in shooting, so that the user does not miss the wonderful moments.
[0096] In some embodiments, in the "video recording" mode, the electronic device 100 can automatically capture photos.
[0097] Specifically, in some embodiments, starting from the first frame of switching to the "recording" mode, the electronic device 100 may refer to the operations shown in Figures 2A-2F to obtain wonderful moments and capture wonderful photos until switching to other modes that do not support automatic capture or exiting shooting.
[0098] In other embodiments, after switching to "recording" mode and starting recording, the electronic device 100 can capture wonderful moments and take photos until the recording ends. This means that in "recording" mode, the electronic device 100 does not automatically take photos during the time period before recording begins. Figures 3A-3J illustrate a set of user interfaces for automatically taking photos during recording, provided in embodiments of the present application.
[0099] As shown in Figure 3A, the electronic device 100 can detect a left swipe operation on the mode bar 121. In response to this operation, the electronic device 100 can switch from the "photo" mode to the "recording" mode, as shown in Figure 3B. As shown in Figure 3B, after entering the "recording" mode, the electronic device 100 can switch the preview interface corresponding to the "photo" mode to the preview interface corresponding to the "recording" mode. Specifically, the electronic device 100 can switch the shooting control 122 originally in the "photo" mode to the start recording control 311 in the "recording" mode.
[0100] The electronic device 100 may detect a user operation on the start recording control 311. In response to this operation, the electronic device 100 may begin recording a video. Accordingly, the electronic device 100 may display the recording interface shown in FIG3C . The electronic device 100 may switch the original start recording control 311 to an end recording control 312. Simultaneously, the electronic device 100 may display a timestamp control 313 in the preview window 123 to indicate the elapsed recording duration.
[0101] Figures 3C, 3D, 3E, 3F, and 3G illustrate a set of video recording interfaces displayed by the electronic device 100 during the recording of a long jump athlete. The preview window 123 sequentially displays the athlete's motion state as captured by the camera at different moments during the long jump. The timestamp control 313 can be updated as the recording duration increases. During this process, the electronic device 100 can also utilize a pre-set algorithm for automatic capture. The electronic device 100 can identify the series of images and determine whether each frame is engaging.
[0102] In one implementation, the electronic device 100 can update the review control 124 in real time according to the captured wonderful photos during the video recording process, and display thumbnails of the captured wonderful photos, so as to facilitate the user to understand the captured wonderful photos in real time.
[0103] 3G , after identifying the highlight image frame shown in preview window 123 in FIG. 3E , electronic device 100 may display a thumbnail of the frame in review control 124. At this point, the user may use review control 124 to confirm that electronic device 100 has captured the image. Similarly, a prompt indicating automatic capture may be displayed in the lower right corner of review control 124.
[0104] As shown in FIG3G , electronic device 100 may detect a user operation on the end recording control 312. In response to this operation, electronic device 100 may end video recording and display the user interface shown in FIG3H . As shown in FIG3H , electronic device 100 may exit the recording interface and redisplay the preview interface, including redisplaying the start recording control 311 in place of the end recording control 312. Furthermore, electronic device 100 may display a thumbnail of the newly recorded video in the review control 124.
[0105] The electronic device 100 may detect a user operation on the playback control 124. In response to the operation, the electronic device 100 may display the user interface shown in FIG3I to display the newly recorded video. As shown in FIG3J , the user may click the play button 314 to view the entire content of the newly recorded video.
[0106] The electronic device 100 can also detect a left swipe on the screen. In response to this swipe, the electronic device 100 can immediately display the wonderful photos automatically captured by the electronic device 100 during the video recording process. For example, referring to FIG3J , the electronic device 100 can display the wonderful photos corresponding to the wonderful image frame shown in preview window 123 in FIG3E . It is understood that the left swipe operation can also be a right swipe operation, which is not limited here.
[0107] Referring to FIG2H , in the user interface displaying the captured images, the wonderful photos captured during the video recording process will also carry an automatic capture mark to distinguish them, which will not be described in detail here.
[0108] In some embodiments, after starting recording, the recording interface may not include the review control 124. After automatically capturing a photo, the electronic device 100 will not display thumbnails of the captured photo in the recording interface. After ending the recording, when browsing the captured images, the electronic device 100 may display the photos automatically captured during the recording process.
[0109] Referring to Figure 1B , the preview interface may also include control 127. Control 127 can be used to enable manual capture. Manual capture refers to a shooting method that, based on a user's click to capture, captures images reported by the camera within a period corresponding to the capture action, then extracts the best image frame from these images and outputs it as a photo.
[0110] 4A-4E are a set of user interfaces for implementing manual snapshots provided in an embodiment of the present application.
[0111] Referring to FIG4A , electronic device 100 may detect a user operation on control 127. In response to the operation, electronic device 100 may enable the manual snapshot function. Accordingly, electronic device 100 may display the user interface shown in FIG4B . As shown in FIG4B , electronic device 100 may display control 128 in place of control 127. Control 128 may be used to disable the manual snapshot function.
[0112] Similarly, if there is a function that conflicts with manual capture, after turning on manual capture, the electronic device 100 can automatically turn off the corresponding conflicting function. For example, the electronic device 100 can turn off AI photography after turning on manual capture. As shown in Figure 4B, the electronic device 100 displays the control 151 to replace the original control 126A to indicate to the user that AI photography is turned off. Accordingly, after turning off manual capture, the electronic device 100 can automatically turn on the function that was previously turned off due to the conflict. For example, after turning off manual capture, the electronic device 100 can turn on AI photography again.
[0113] Referring to Figure 4C, at a certain moment, the preview window 123 of the electronic device 100 displays an image (image K) of a person in a flat state after jumping. After seeing image K, the user thinks that this frame of image is very exciting. At this time, the user can click the shooting control 122. When the electronic device 100 detects the above-mentioned click operation of the user, the electronic device 100 has already displayed the image after image K, such as image K+1, image K+2, and so on after image K. For example, referring to Figure 4D, when the electronic device 100 detects the above-mentioned click operation of the user, the preview window 123 has already displayed the image of the landing state (image L), that is, the current frame of the electronic device 100 is updated to image L. At this time, in the prior art, the electronic device 100 will output the photo corresponding to image L.
[0114] In the embodiment of the present application, the electronic device 100 may obtain all images reported by the camera within a period of time before and after the click operation. Then, the electronic device 100 may evaluate all the images according to a preset algorithm, determine the frame with the highest evaluation among all the images, i.e., the best frame, and finally output the photo corresponding to the best frame.
[0115] For example, as shown in FIG4D , after detecting a user operation on the capture control 122, the electronic device 100 may capture all images from before takeoff to after landing, then determine, based on a preset algorithm, that image K shown in the preview window 123 in FIG4C is the optimal frame. The electronic device 100 may then output the photo corresponding to image K. Referring to FIG4E , the electronic device 100 may display a thumbnail corresponding to image K in the review control 124. The user may then browse the captured photos by operating the review control 124.
[0116] By implementing the above method, users can use the ability of the electronic device 100 to cache the preview stream for a period of time to shield the impact of human reaction delay and electronic device transmission delay, take more ideal photos, and thus obtain a better shooting experience.
[0117] 5A-5E are other user interfaces for enabling the automatic snapshot function provided in embodiments of the present application.
[0118] As shown in Figure 5A, the mode bar 121 may include an "Auto Snapshot" option. The user can then enable the automatic snapshot function by setting the automatic snapshot mode. For example, referring to Figures 5A-5B, the electronic device 100 may detect an operation of dragging the mode bar 121 to the right and causing the "Auto Snapshot" option to remain on the float 125. In response to this operation, the electronic device 100 may switch to the automatic snapshot mode, i.e., enable the automatic snapshot function.
[0119] Optionally, referring to FIG5C , electronic device 100 may further include a control 129 on the preview interface. Control 129 is used to enable automatic capture. Referring to the method for enabling manual capture via control 127 shown in FIG4A-4B , electronic device 100 may provide the user with the ability to enable automatic capture via control 129, which will not be further described here.
[0120] Alternatively, referring to Figures 5D-5E , the electronic device 100 may set a control 511 on the preview interface. Upon detecting a user operation on control 511, the electronic device 100 may display a control 512. Control 512 may display an "Auto Snapshot" option and a "Manual Snapshot" option. Upon detecting a user operation on the "Auto Snapshot" option, the electronic device 100 may enable auto-snapshot. Upon detecting a user operation on the "Manual Snapshot" option, the electronic device 100 may enable manual snapshot.
[0121] The electronic device 100 can enable both automatic and manual capture. In some embodiments, when the time interval between the wonderful image frame determined by automatic capture and the best frame determined by manual capture is very short, the electronic device 100 can save the best frame captured manually and discard the wonderful image frame captured automatically.
[0122] Specifically, the electronic device 100 may set a time interval t (or frame interval number), for example, 1 second (frame interval number 30 frames). When the time interval between the automatically captured wonderful image frame and the manually captured best frame is within 1 second, the electronic device 100 may discard the automatically captured wonderful image frame. If the time interval between the automatically captured wonderful image frame and the manually captured best frame is greater than 1 second, the electronic device 100 may save the automatically captured wonderful image frame and the manually captured best frame.
[0123] In this way, the electronic device 100 can avoid generating photos that are very similar to photos taken by the user, causing redundancy and wasting storage resources.
[0124] FIG6A is a schematic diagram of a method for implementing automatic snapshot provided in an embodiment of the present application.
[0125] The image obtained after the photosensitive element in the camera converts the captured light source signal into an electrical signal can be called an original image, also known as a RAW image. The above process is also called camera acquisition image. The process of the camera sending the acquired image to the functional module in the system structure of the electronic device 100 can be called reporting. The module responsible for shooting and outputting photos (such as the processing and capturing module shown in Figure 6A) processes the image reported by the camera, and then outputs it as a photo or other image resource and saves it. The process can be called shooting.
[0126] In the zero shutter lag (ZSL) framework, a rotating buffer is provided in the electronic device 100. The buffer is used to store a set of RAW images recently reported by the camera. For example, the size of the rotating buffer is 6, that is, the 6 frames of RAW images recently reported by the camera can be stored, recorded as Fi-5~Fi. After the camera reports the i+1th frame RAW image, the rotating buffer will write the i+1th frame RAW image Fi+1 and delete the earliest written image Fi-5 in the buffer. At this time, the images stored in the rotating buffer are updated to Fi-4~Fi+1.
[0127] The smaller image stream obtained by downsampling the RAW image stream is called a processed stream, also known as a Tiny stream. A single image frame in a Tiny stream is called a Tiny image. The RAW image stream here can be directly derived from the RAW image reported by the camera or directly from the RAW image stored in the rotating buffer. For example, the size of the RAW image can be 3024*4032(p), and the size of the downsampled image in the Tiny stream can be 378*502(p).
[0128] In some embodiments, images in a Tiny stream can also be extracted from RAW images reported by the camera or stored in a rotating buffer. For example, if a set of RAW images reported by the camera or stored in a rotating buffer includes frames 1 to 20, the module that performs downsampling to obtain the Tiny stream can extract a frame every three frames from these frames, such as frame 1, frame 5, frame 9, and so on, to generate the corresponding Tiny image.
[0129] The Tiny image and the RAW image are aligned by frame number. For example, the frame number of the RAW image reported by the camera is i. The Tiny image obtained by downsampling the RAW image Fi is the i-th Tiny image, denoted as fi. The frame number of fi is i.
[0130] The electronic device 100 is further provided with a dedicated buffer zone for storing wonderful image frames in RAW format. The electronic device 100 reads the wonderful image frames from the dedicated buffer zone and then outputs the corresponding wonderful photos.
[0131] The electronic device 100 is pre-installed with a perception module and a decision module. The perception module is pre-installed with multiple detection algorithms for obtaining various data indicating image content and image quality. The decision module can determine a comprehensive image score based on this data and identify outstanding image frames based on the comprehensive score.
[0132] As shown in Figure 6A, the perception module may include a subject detection algorithm, a motion evaluation algorithm, a face detection algorithm, a face attribute algorithm, and a clarity algorithm. The subject detection algorithm, motion evaluation algorithm, face detection algorithm, and face attribute algorithm can be referred to as image content extraction algorithms and can be used to obtain image content. The clarity algorithm can be referred to as an image quality detection algorithm and can be used to obtain image clarity.
[0133] Specifically, the subject detection algorithm is used to obtain a specific subject in the image, such as a person, a cat's face, a dog, etc. This specific subject may be referred to as the first subject. In particular, for subjects other than people, such as the cats and dogs mentioned above, the subject detection algorithm may also obtain partial objects of these subjects, such as cat faces and dog faces. It will be appreciated that the embodiments of this application do not limit the specific type of subject.
[0134] After identifying a preset subject, the subject detection algorithm outputs an object frame. Furthermore, the object frame identifies the size and position of the object in the image. The decision module can then determine whether the image contains a specific subject based on whether the subject detection algorithm outputs an object frame. Furthermore, the decision module can determine the number, size, and position of the objects based on the number, size, and position of the output object frames, and evaluate the objects. For example, the larger the object frame and the more centrally positioned it is, the higher the score for the subject corresponding to that frame.
[0135] The action evaluation algorithm is used to capture the subject's actions, such as jumping, looking back, throwing an object, playing table tennis, badminton, running, splashing water, playing baseball, playing rugby, flying a Frisbee, and so on. It then determines the degree of completeness of the action in any frame based on the optimal completion point of each action, and then outputs an action score for that image. Images with higher action completeness have higher scores. These specific actions, such as jumping, looking back, and throwing an object, can be referred to as first actions. Based on the action scores output by the perception module, the decision module determines whether the subject in the image has performed a specific action, as well as the degree of completeness of the subject's action in each frame.
[0136] For example, taking jumping as an example, the motion state in which the object reaches its highest point after leaving the ground can be called the optimal completion point for the jump. When the object in the input Tiny image of the fi-th frame is in a motion state of leaving the ground and reaching its highest point, the motion evaluation algorithm can output a motion score of 1 (the highest score) for the image. When the object in the image does not leave the ground, or leaves the ground but does not reach the highest point, the motion evaluation algorithm can output a motion score of 0.3 or 0.5, or a score less than 1. Specifically, the motion evaluation algorithm can determine the motion score at different moments of leaving the ground but not reaching the highest point based on the distance from the highest point.
[0137] As will be appreciated, determining the optimal completion point requires a basis for the subject's trajectory over a period of time. Therefore, after receiving multiple frames of images over a period of time, the motion evaluation algorithm can determine the optimal completion point within these frames. Based on this optimal completion point, the motion state of these frames is evaluated, and the motion scores for these frames are input into the decision module. In some embodiments, the motion evaluation module can also identify the motion of non-human objects, such as cats and dogs running and jumping.
[0138] The face detection algorithm is used to detect faces in an image. Once a face is recognized, the face detection algorithm outputs a face frame. Furthermore, the face frame indicates the size and position of the face in the image. The decision module can then determine whether the image contains a face based on whether the face detection algorithm outputs a face frame. Furthermore, the decision module can output the number, size, and position of the face frames to determine the number, size, and position of the faces, and then evaluate the faces. For example, a larger face frame and a more centered face frame will receive a higher score.
[0139] The facial attribute algorithm is used to obtain facial information from the image, such as the curvature of the lips and the distance between the upper and lower eyelids. The decision module can use this information to determine whether the face is smiling, whether the eyes are open, and so on. Furthermore, the decision module can determine the degree of smile based on the curvature of the lips and the degree of eye openness based on the distance between the upper and lower eyelids. The decision module can then evaluate the facial performance based on the degree of smile and eye openness, outputting a facial performance score.
[0140] In one implementation, a larger lip curvature corresponds to a higher degree of smiling, and the decision module determines a higher facial performance score. In another implementation, a larger distance between the upper and lower eyelids corresponds to a higher degree of eye openness, and the decision module determines a higher facial performance score. When combining these two factors, the weights of eye openness and smiling on the facial performance score can be equal or different.
[0141] In an optional implementation, face detection can be performed after subject detection identifies a person. Similarly, the facial attribute algorithm can be performed after the face detection algorithm identifies a face. In this case, the face detection algorithm can use the image containing the person identified by subject detection to obtain the face, and the facial attribute algorithm can use the face image output by the face detection algorithm to obtain the facial information of each face, thereby saving computing costs and improving algorithm efficiency.
[0142] The sharpness algorithm is used to determine the image sharpness. Images with less jitter and noise have higher sharpness scores.
[0143] It is understood that the perception module may also employ more detection algorithms to obtain more information indicating image content and image quality. Alternatively, the perception module may also directly obtain information indicating image content and image quality, such as exposure, from data reported by the camera and / or other sensors, although this is not a limitation in the present embodiment.
[0144] The decision module can determine a comprehensive score reflecting whether the image is wonderful and the degree of wonderfulness, that is, the degree of wonderfulness, based on the various data indicating the image content and image quality output by the perception module.
[0145] FIG6B is a schematic diagram of determining image brilliance provided by the present application.
[0146] As shown in Figure 6B, the perception module may include a single-frame perception module and a multi-frame perception module. The single-frame perception module can use a frame of image to determine a type of information about the frame, such as whether it contains a specific object, whether it contains a human face, facial attributes, clarity, exposure, etc. The single-frame perception module is suitable for obtaining a type of information from one or more frames of a group of images, such as an action score.
[0147] Taking image fi as an example, after the downsampled image fi is input into the perception module, the decision module obtains data indicating the image content and quality of fi: the number, size, and position of specific objects, the degree of completeness of actions, the number, size, and position of faces, the degree of smiles, the degree of eye openness, clarity, and exposure. The decision module then determines the wonderfulness of fi based on this data, and thus whether it is wonderful. A higher wonderfulness value indicates a more wonderful image.
[0148] In one implementation, the decision module may combine multiple categories of information output by the perception module according to image content and image quality, single frame and multiple frames, reduce the number of items, and then determine the final wonderfulness based on the scores of the reduced items.
[0149] As shown in Figure 6B, the decision module can fuse the image quality information, such as clarity and exposure, output by the quality perception module to generate a quality score indicating image quality. This fusion can be performed, for example, using a weighted average. The decision module can also fuse the object boxes, face boxes, and facial attributes output by the content perception module to generate a static content score indicating the content of the static image. In this case, the decision module can obtain scores for three categories: a quality score, a static content score, and a motion score (dynamic content score).
[0150] The decision module may determine the static content score based on one or more of the object frame, face frame, and facial attributes output by the content perception module. For example, the decision module may first determine the subject in the image. When no specific object is identified, the results output by the face detection algorithm and the face attribute algorithm are correspondingly null. In this case, the decision module may determine the static content score to be 0 based on the fact that the subject detection module does not output a valid object frame. When a face is identified, the decision module may determine the static content score based on the object frame output by the subject detection module, the face frame output by the face detection module, and / or the facial attributes (eyes open / smiling).
[0151] When the subject detection algorithm identifies that the image does not contain a person, for example, when the subject is a cat or dog, the corresponding output of the face detection algorithm and the face attribute algorithm is empty. In this case, the decision module can determine the static content score based on the object box output by the subject detection module, without considering the output of the face detection algorithm and the face attribute algorithm. This prevents the empty value of the face detection algorithm and the face attribute algorithm from reducing the excitement of the image. I will not list them one by one here.
[0152] After determining the quality score, the static content score, and the motion score, the decision module may determine the excitement level according to one or more of the quality score, the static content score, and the motion score.
[0153] For example, when an image does not include any specific objects or specific actions, the static content score and the action score are both 0 or invalid. In this case, the decision module may determine the image's comprehensive score based solely on the quality score, thereby avoiding the static content score and action score being 0 or invalid, which would reduce the image's excitement. For another example, when an image does not include any specific objects but does not include any specific actions, the action scores are both 0 or invalid. In this case, the decision module may determine the image's comprehensive score based solely on the quality score and the static content score, thereby avoiding the action score being 0 or invalid, which would reduce the image's excitement.
[0154] Due to the differences between content-aware algorithms (subject detection algorithms, face detection algorithms, and face attribute algorithms) and action detection algorithms, in some embodiments, the action evaluation module can determine that a group of images includes a specific action and determine the action score for each frame based on the completeness of the action in each image. However, the content-aware algorithm cannot identify specific objects or their static representations. In this case, the decision module can also determine the overall score of the image based on the quality score and the action score, thereby avoiding static content scores of 0 or invalid values that reduce the image's excitement.
[0155] The decision module may be configured with a wonderfulness threshold. The decision module determines an image as wonderful only when the wonderfulness of the image, as determined by the above method, exceeds the wonderfulness threshold. It is understood that when the wonderfulness determined by the decision module is derived from multiple scoring criteria, the decision module may further configure thresholds for each scoring criteria, such as a quality score threshold, a static content score threshold, and a motion score threshold.
[0156] When the excitement is derived solely from the quality score, the excitement threshold corresponding to the excitement can be referred to as the first preset condition. When the excitement is derived from multiple item scores, such as the quality score, a static content score threshold, and an action score threshold, the quality score threshold can be referred to as the first preset condition.
[0157] The embodiment of the present application does not limit the specific method for determining the comprehensive image score based on the output results of the perception module.
[0158] The electronic device 100 also includes a hardware abstraction layer (HAL). The HAL may include a processing buffer module and a processing snapshot module. The processing buffer module is used to obtain wonderful image frames in RAW format and write them to a dedicated buffer. The processing snapshot module is used to process the wonderful image frames and output wonderful photos.
[0159] Taking fi as an example, when fi meets the candidate conditions and / or the wonderfulness of fi reaches a preset value thres_1, the decision module can determine fi as a wonderful image frame. The above candidate conditions can be set based on the output results of the perception module. For example, the above candidate conditions include one or more of the following: including a specific object, the number, size, and position of the specific objects meeting preset requirements, including the first action, including a face, the number, size, and position of the faces meeting preset requirements, the face is smiling, the face has open eyes, the clarity is higher than a threshold, or the exposure is within a preset range, etc.
[0160] Then, the decision module may report the event of finding a wonderful image frame to the HAL. The above event may include the frame number of the wonderful image frame. Otherwise, the decision module will not report to the HAL, or return an indication that there is no wonderful image frame.
[0161] After receiving frame number i from the decision module, the processing cache module retrieves the RAW image Fi corresponding to frame number i from the rotating buffer and writes Fi to a dedicated buffer. The capture processing module retrieves the highlight image frame Fi from the dedicated buffer and outputs it as a highlight photo. While generating the highlight photo, the capture processing module also generates a corresponding thumbnail for preview.
[0162] Optionally, during the process of outputting the wonderful photos, the capture processing module may also use other image processing algorithms to optimize the wonderful image frame Fi to output a more effective wonderful photo. Such image processing algorithms include but are not limited to saturation optimization algorithms, exposure compensation algorithms, and facial / body beautification algorithms.
[0163] In some embodiments, the processing buffer module can also obtain multiple RAW images from the rotating buffer and write these multiple RAW images into the dedicated buffer. The processing capture module can use these multiple RAW images to synthesize a wonderful picture, further improving the quality of the wonderful photo.
[0164] Exemplarily, the processing cache module can obtain the RAW image Fi corresponding to the frame number i, as well as the RAW images before and after Fi, such as Fi-1 to Fi-3, Fi+1, from the rotating buffer according to the received frame number i, and write them into a dedicated buffer. Optionally, the processing cache module may also only obtain the RAW image Fi corresponding to the frame number i, and the RAW image before Fi. Alternatively, the processing cache module may also only obtain the RAW image Fi corresponding to the frame number i, and the RAW image after Fi, etc. The embodiment of the present application does not impose specific restrictions on multiple frames of RAW images including Fi.
[0165] Taking Fi-3 to Fi+1 as an example, the capture processing module can fuse multiple frames of Fi-3 to Fi+1 to obtain a fused image Fi-N. The capture processing module can then generate a wonderful photo based on Fi-N. In this method, Fi (for example, image K) can be called the fourth image, and Fi-N, which is the result of fusing multiple frames of Fi-3 to Fi+1, including Fi, can be called the first image.
[0166] Furthermore, the processing buffer module can also determine whether to retrieve one or multiple RAW frames from the rotating buffer based on the shooting mode. For example, in Night mode, the processing buffer module can retrieve multiple RAW frames from the rotating buffer; in non-Night modes, such as Portrait mode or High Dynamic Range mode, the processing buffer module can only retrieve one RAW frame from the rotating buffer.
[0167] Compared with directly inputting RAW images to obtain the image content information of RAW images, the small-sized Tiny images can greatly reduce the computational cost of each detection algorithm in the perception module, increase the rate at which each detection algorithm outputs the corresponding image content information, and effectively avoid frame drops and freezes.
[0168] Furthermore, in one implementation, the electronic device 100 can simultaneously enable all detection algorithms and set the operating frequency of each detection algorithm to be the same as the frequency at which the camera reports images. For example, after receiving each frame of a tiny image, the subject detection algorithm in the perception module can process the frame to obtain the subject in the frame; at the same time, the action evaluation algorithm can process the frame to determine the action score for the frame; and at the same time, the face detection algorithm, face attribute algorithm, and clarity algorithm can all process the frame to obtain the corresponding image content information.
[0169] In another implementation, the electronic device 100 can turn on all detection algorithms at the same time, but the working frequencies of different detection algorithms are not the same. For example, the electronic device 100 can set the working frequency of the subject detection algorithm to be the same as the frequency of the camera reporting images, that is, the subject detection algorithm is executed once per frame. The electronic device 100 can set the working frequency of the motion evaluation algorithm to 1 / 4 of the frequency of the camera reporting images, that is, the motion evaluation algorithm is executed once every 4 frames. The electronic device 100 can set the working frequency of the face detection algorithm to 1 / 2 of the frequency of the camera reporting images, that is, the motion evaluation algorithm is executed once every 2 frames. The electronic device 100 can set the working frequency of the clarity algorithm to be the same as the frequency of the camera reporting images, and so on. The examples are not listed here one by one. In this way, the electronic device 100 can further reduce the computing cost of the perception module and save power consumption.
[0170] In particular, in scenarios where the operating frequencies of different detection algorithms are not the same, the detection algorithm that does not perform processing can output the results obtained from the last detection, thereby avoiding the score being too low due to non-detection, which reduces the stability and accuracy of the wonderful moment detection.
[0171] In another implementation, the electronic device 100 may selectively enable some detection algorithms. Specifically, the electronic device 100 may determine which detection algorithms to enable based on the user-preset objects and / or object motion states. The remaining detection algorithms may be disabled. For example, if the user-set automatic capture objects only include cats and dogs, the electronic device 100 may disable the face detection algorithm and the face attribute algorithm.
[0172] FIG7 is a flowchart of implementing automatic snapshot provided in an embodiment of the present application.
[0173] S101: Start automatic capture.
[0174] Referring to the user interfaces shown in Figures 1C-1E (or the user interfaces shown in Figures 5A-5E), the electronic device 100 may detect a user operation to enable the automatic capture function. In response to the user operation, the electronic device 100 may enable automatic capture. After enabling automatic capture, the electronic device 100 may perform the operations shown in the subsequent steps to achieve automatic capture.
[0175] S102: Obtain the current image frame (frame-b) reported by the camera.
[0176] The camera of electronic device 100 generates a RAW image in real time based on the light within the viewing range and sends the RAW image to the upper-layer application that calls the camera, such as the camera application. For example, at a frame rate of 30fps, the camera reports a RAW image frame to the upper-layer application every 33.3 milliseconds (ms), meaning the upper-layer application receives a RAW image frame every 33.3ms.
[0177] At a certain moment, the upper layer receives the latest RAW image frame reported by the camera, for example, the i-th RAW image. At this moment, the i-th RAW image is also called the current image frame. Referring to Figure 6A , after downsampling and splitting, the electronic device 100 also obtains the i-th Tiny image, denoted as frame-b. The electronic device 100 can use the small Tiny image for processing and analysis, reducing computational costs and improving processing efficiency.
[0178] S103: Determine whether frame-b meets the candidate conditions?
[0179] The electronic device 100 may be pre-installed with a selector. The selector may include candidate conditions. Referring to the output of the perception module shown in FIG6A , the candidate conditions may include one or more of the following: including a specific object, the size and position of the specific object meeting preset requirements, including a specific action, including a human face, the size and position of the human face meeting preset requirements, the human face smiling, the human face with eyes open, clarity exceeding a preset value, or exposure within a preset range, etc.
[0180] Based on the output of the perception module, the selector can determine whether frame-b meets the aforementioned candidate criteria. If so, the selector can preliminarily determine that frame-b is excellent. Therefore, the electronic device 100 can retain frame-b. Conversely, if it is not excellent, the electronic device 100 can discard frame-b and not perform subsequent operations. The electronic device 100 can then obtain the next Tiny image and determine whether it meets the candidate criteria.
[0181] The selector can be included in the decision module shown in FIG6A . The output of the detection algorithm of the perception module can first be input into the selector of the decision module. The selector can then determine whether frame-b meets the candidate conditions based on the output of the perception module.
[0182] Specifically, when the subject detection algorithm outputs at least one object frame for frame-b, the selector can determine that frame-b contains a specific object. When the object frame accounts for between 30% and 80% of the image and the distance between the object's center and the image's center is within 200p (pixels), the selector can determine that the size and position of the specific object in frame-b meet preset requirements. The above-mentioned requirements of the object frame accounting for between 30% and 80% of the image and the distance between the object's center and the image's center being within 200p can be referred to as the first preset requirement. When the action evaluation algorithm outputs a valid action score, the selector can determine that frame-b contains a specific action. When the face detection algorithm outputs a face frame, the selector can determine that frame-b contains a face. When the face frame accounts for between 10% and 60% of the image and the distance between the face's center and the image's center is within 300p, the selector can determine that the size and position of the face in frame-b meet preset requirements. The above-mentioned face frame accounts for 10% to 60% of the image, and the distance between the center point of the face and the center point of the image is within 300p, which can be called the second preset requirement. When the lip curvature output by the facial attribute algorithm is greater than the threshold, the selector can determine that the face in frame-b is smiling. When the upper and lower eyelids output by the facial attribute algorithm are greater than the threshold, the selector can determine that the face in frame-b is open. When the clarity output by the clarity algorithm is greater than the first threshold, the selector can determine that frame-b is clear. When the exposure reported by the camera is within the first range, the selector can determine that the color brightness of frame-b is normal.
[0183] By executing S103 , the electronic device 100 can perform a primary screening on the images reported by the camera, and filter out image frames that obviously do not meet the requirements of a wonderful image, thereby saving computing costs and reducing power consumption.
[0184] The decision module also determines a comprehensive score, or "wonderfulness," based on the specific data reported by the perception module. Therefore, based on the candidate conditions being met, the decision module can further determine whether the comprehensive score for frame-b meets a threshold. The wonderment of frame-b can be determined using the outputs of the various detection algorithms in the perception model shown in Figure 6A, and will not be further elaborated here.
[0185] If the comprehensive score of frame-b is higher than the threshold, the electronic device 100 may determine to perform subsequent operations. Otherwise, the electronic device 100 may discard frame-b and not perform subsequent operations. The electronic device 100 may obtain the next Tiny image frame and then determine whether the image meets the candidate conditions.
[0186] S104: Is it determined whether the cache area is empty?
[0187] The decision module may include a cache area, referred to as a cache, which can be used to cache the candidate wonderful image frames output by the selector. Furthermore, the decision module may include a survival-timer, which can be used to record the survival time of the candidate wonderful image frames in the cache.
[0188] After the selector confirms that frame-b meets the candidate criteria, the decision module determines whether the cache is empty, that is, whether the cache stores previously output candidate highlight frames. If the cache is empty, that is, no candidate highlight frames are stored, refer to S107: the decision module writes frame-b to the cache and resets the survival-timer to record the survival time of frame-b in the cache. If the cache is not empty, the decision module determines the similarity and highlight level between the candidate highlight frame frame-a cached in the cache and the current frame frame-b. The similarity between frame-a and frame-b can be determined using a similarity algorithm.
[0189] S105: Determine whether frame-a and frame-b are similar.
[0190] First, the decision module can first determine whether frame-a and frame-b are similar based on the similarity between frame-a and frame-b. The similarity between frame-a and frame-b means that the two candidate wonderful image frames output by the selector are very similar. From the perspective of avoiding redundancy, preferably, the decision module should screen the above two frames of images and select the more wonderful image to output a wonderful photo. If frame-a and frame-b are not similar, this means that the candidate wonderful image frame frame-a cached in the current cache is the most wonderful image among all similar images in the previous scene. At this time, the decision module can trigger the capture of the image frame-a.
[0191] The decision module may be preset with a similarity threshold (a first preset value). When the similarity between frame-a and frame-b is lower than the threshold, the decision module may determine that frame-a and frame-b are dissimilar. Conversely, the decision module may determine that frame-a and frame-b are similar. If frame-a and frame-b are similar, the decision module may execute S106 to determine the degree of excellence of frame-a and frame-b. If frame-a and frame-b are dissimilar, the decision module may execute S115.
[0192] S106: Is the excitement of frame-a less than that of frame-b?
[0193] The wonderfulness of the candidate wonderful image frame frame-a cached in the cache is less than the wonderfulness of the current frame frame-b, which means that: among the similar frames-a and b, frame-b is a more wonderful image; conversely, frame-a is a more wonderful image.
[0194] Therefore, when the excitement of frame-a is lower than that of frame-b, the decision module can execute S107 to discard frame-a and retain frame-b, thereby avoiding redundancy. Conversely, when the excitement of frame-a is higher than that of frame-b, the electronic device can execute S108 to discard frame-b and continue to retain frame-a.
[0195] S107: Write frame-b into the cache and reset the survival-timer.
[0196] The decision module can write frame-b into the cache, replacing the candidate excellent image frame frame-a originally stored in the cache, thereby abandoning frame-a and retaining frame-b. At the same time, the decision module can reset the survival timer, causing it to restart recording the survival time of frame-b in the cache.
[0197] Then, electronic device 100 can obtain the next Tiny image and restart execution from S102. If the image frame frame-b' after frame-b is similar to frame-b and has a higher degree of excitement than frame-b, the decision module can continue to write frame-b' to replace frame-b, thereby obtaining the most exciting image among the set of similar images.
[0198] S108: The lifetime of frame-a increases.
[0199] When frame-a is more exciting than frame-b, the cache can continue to cache frame-a. In this case, frame-b, which is similar to frame-a but less exciting than frame-a, can be filtered out after frame-a, thus avoiding redundancy.
[0200] When frame-b is discarded and frame-a is retained, the survival time of frame-a recorded by the survival-timer continues to increase. Similarly, in S107, if the image frame frame-b' following frame-b is similar to frame-b but less exciting than frame-b, the decision module may continue to cache frame-b. In this case, the survival time of frame-b recorded by the survival-timer continues to increase.
[0201] S109: The lifetime of frame-a is greater than the threshold thres_t2 (1 s).
[0202] A threshold value thres_t2 is set in the decision module. Exemplarily, thres_t2 can be 1s. When the timing duration of survival-timer reaches thres_t2, it means that the candidate wonderful image frame-a stored in the cache has been the most exciting image for a long period of time. Therefore, when the timing duration of survival-timer reaches thres_t2, the decision module can trigger a snapshot of the candidate wonderful frame frame-a currently stored in the cache. Conversely, when the timing duration of survival-timer does not reach thres_t2, the electronic device 100 can obtain the next Tiny image, and then restart execution from S102 to determine whether there is a subsequent image that is similar to frame-a and more exciting than frame-a. The time interval indicated by the above-mentioned threshold value thres_t2 can be called the first time interval.
[0203] The processing strategies shown in S105, S106, S108 and S109 can not only obtain wonderful image frames in the image stream, but also retain only the most wonderful frame among similar candidate wonderful image frames to avoid redundancy.
[0204] S110: The interval time of frame-a is greater than the threshold thres_t1 (5s).
[0205] Generally, the similarity of images generated by the camera within a very short period of time is relatively high. When capturing a frame of image, if a second picture is captured immediately afterwards, this picture is likely to be highly similar to the captured picture. Therefore, in order to further limit the number of snapshots and obtain as many wonderful pictures as possible in different scenes, a timer waiting-timer and a threshold thres_t1 may be set in the decision module. After capturing a wonderful picture, the waiting-timer may restart the timing. When the snapshot is triggered next time, if the timing length of the waiting-timer is less than the threshold thres_t1, the decision module may terminate the snapshot. The time interval indicated by the above threshold thres_t1 may be referred to as the second time interval.
[0206] For example, thres_t1 = 5s and waiting-timer = 3s. After capturing the most exciting image, frame-a, from the most recent images captured within the last second, the decision module can determine, based on the waiting-timer, that the interval between frame-a and the last captured exciting image is only 3 seconds, which is less than the 5s required by thres_t1. At this point, the decision module can terminate capturing frame-a.
[0207] The waiting-timer can also be replaced by a parameter recording the last snapshot time. When executing S110, the decision module can obtain the parameter recording the last snapshot time. If the interval between the last snapshot time and the current time is less than the threshold thres_t1, the decision module can also terminate the snapshot.
[0208] After the capture is terminated, the electronic device 100 may reacquire the next Tiny image and then restart execution from S102 to acquire a wonderful image frame.
[0209] S111: The number of captured images of the category to which frame-a belongs does not reach the threshold thres_s (15 images).
[0210] If the camera captures the same subject for a long time, even if automatic capture is limited by a waiting timer, a large number of duplicate photos will still be generated. Therefore, to further limit the frequency of automatic capture and reduce the repetition rate of excellent photos, the decision module can mark the shooting scene based on the image content and set an automatic capture upper limit for each shooting scene, namely a threshold thres_s (a fourth preset value). When the number of excellent photos obtained for the shooting scene corresponding to the candidate excellent image frame that triggered automatic capture reaches thres_s, the decision module can terminate capture.
[0211] Table 1 exemplarily shows the upper limits of automatic snapshots for multiple scenes maintained by the electronic device 100 .
[0212] Table 1
[0213] For example, thres_s1=15 (photos), counter1=8. Among them, counter1 is a counter that records the wonderful photos that have been captured in the athlete jumping scene. Thres_s1 is the threshold corresponding to counter1, that is, the upper limit of automatic capture corresponding to the athlete jumping scene. After triggering the capture of frame-a (frame-a belongs to the athlete jumping scene), the decision module can obtain the current counting result of counter1, which is 8. At this time, the decision module can determine that the shooting scene corresponding to frame-a has not reached the capture upper limit: 15, so the decision module can continue to capture frame-a. If the current counting result of counter1 is 15, the decision module can determine that the shooting scene corresponding to frame-a has reached the capture upper limit, and at this time, the decision module can terminate the capture of frame-a. The above thres_s1=15 is a specific fourth preset value.
[0214] After the capture is terminated, the electronic device 100 may obtain the next Tiny image frame, and then restart execution from S102 to obtain a wonderful image frame.
[0215] The present embodiment does not limit the order of S110 and S111. The decision module can first determine whether the interval between the last snapshot and the waiting-timer is long enough, and can also determine whether the shooting scene corresponding to the candidate wonderful image frame currently triggering the snapshot has output enough wonderful photos through thres_s.
[0216] In some embodiments, the electronic device 100 may also set a total upper limit for automatic capture, such as 100. When the number of captured photos reaches 100, the electronic device 100 will no longer capture wonderful image frames. The above 100 may be referred to as a third preset value.
[0217] S112: Capture frame-a.
[0218] If both S110 and S111 are met, the decision module can report the capture event to the HAL, instructing the HAL to execute the capture operation and output the highlight photo. For example, the decision module can report the frame number of the candidate highlight image frame "frame-a" to the HAL. The processing buffer module in the HAL can retrieve the RAW image corresponding to "frame-a" from the rotating buffer and write it to a dedicated buffer. The processing and capture module can then read the highlight image frame "frame-a" from the dedicated buffer, ultimately obtaining the highlight photo and its corresponding thumbnail.
[0219] 6A , during this period, the processing and capturing module may perform one or more image processing operations on the candidate wonderful image frames, thereby further enhancing the effect of the wonderful photos.
[0220] Alternatively, as described in Figure 6A , after reporting the frame number of the candidate highlight frame frame-a to the HAL, the processing cache module can retrieve a group of image frames, including frame-a, from the rotating buffer and write them to a dedicated buffer. The processing capture module then synthesizes a highlight frame frame-a' based on this group of image frames and outputs the highlight photo and thumbnail corresponding to frame-a'.
[0221] S113: Clear the cache.
[0222] After reporting a snapshot, the decision module can clear the cached candidate wonderful image frames, such as frame-a. This allows subsequent candidate wonderful image frames that meet the candidate criteria to be written to the cache. The electronic device 100 can continue to determine whether to capture the candidate wonderful image frames cached in the cache using the method shown in FIG7 .
[0223] S114: Update the last capture time (or reset the waiting-timer) and the number of captured images.
[0224] After reporting a snapshot, the decision module can update the last snapshot time or reset the waiting-timer to limit the continuous capture of redundant photos in a short period of time.
[0225] The decision module can also update the number of captured images. For example, when a captured frame "a" is reported, the decision module can update the number of captured images for the scene to which frame "a" belongs. The number of captured images for that scene increases by 1. When the number reaches the upper limit for automatic capture for that scene, the decision module can stop capturing more redundant images of the same scene.
[0226] S115: Determine whether frame-a is similar to the captured image.
[0227] The dissimilarity between frame-a and frame-b indicates that the scene may have changed, and frame-a and frame-b are not redundant highlight frames from the same scene. In this case, based on the end of the previous scene, the decision module can determine the candidate highlight frame frame-a from the previous scene that triggers the capture cache.
[0228] To avoid redundancy, before triggering the capture of frame-a, the decision module can further determine whether frame-a is similar to a previously captured highlight photo. If frame-a is similar to a previously captured highlight photo, this indicates that frame-a is redundant, and the decision module can discard frame-a. As shown in Figure 7, the decision module can perform the operation shown in S107: writing frame-b to the cache, replacing the previously stored candidate highlight image frame frame-a, and resetting the survival timer.
[0229] If frame-a is not similar to the captured wonderful photos, this means that frame-a is not redundant. In this case, the decision module may execute S116: triggering the capture of frame-a.
[0230] S116: Triggering the capture of frame-a.
[0231] Referring to the introduction of S110 to S114, after triggering the capture of frame-a, the decision module can also determine the timing length of the waiting-timer to confirm whether the interval between the last capture is long enough. The decision module can also obtain the number of wonderful photos captured for the shooting scene corresponding to frame-a to determine whether the capture limit has been reached. No further details will be given here.
[0232] When the interval time meets the threshold and / or the corresponding captured image does not reach the upper limit of automatic capture, HAL can perform a capture operation and output the wonderful photo corresponding to frame-a.
[0233] S117: Write frame-b into the cache.
[0234] After capturing frame-a in the cache, the decision module may write frame-b into the cache. Subsequently, the electronic device 100 may compare frame-b with the image after frame-b to determine whether to capture frame-b.
[0235] Similarly, after capturing frame-a through the method shown in S116 to S116, the decision module will also execute the step shown in S114: update the last capture time (or reset the waiting-timer) and the number of captured images to avoid redundancy.
[0236] In the flowchart shown in Figure 7, frame-a is referred to as the first image, and the photo captured by capturing the first image is referred to as the first photo. Frame-b, captured within a first time interval (threshold thres_t2) after frame-a, is referred to as the second image. The image captured before frame-a according to the flowchart shown in Figure 7 is referred to as the third image, and the corresponding photo is referred to as the third photo.
[0237] FIG8 is a schematic diagram of the system structure of the electronic device 100 provided in an embodiment of the present application.
[0238] The system of electronic device 100 can adopt a layered architecture. As shown in Figure 8, the system layers of electronic device 100 include an application layer, an application framework layer, a hardware abstraction layer, a driver layer, and a hardware layer. The layers communicate with each other through software interfaces.
[0239] The application layer may include a series of application packages. For example, an application package may include a camera application, a gallery application, and the like.
[0240] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a camera access interface. The camera access interface includes camera management and camera devices. The camera access interface is used to provide an application programming interface and programming framework for camera applications.
[0241] The hardware abstraction layer is an interface layer located between the application framework layer and the driver layer, which provides a virtual hardware platform for the operating system. Exemplarily, the hardware abstraction layer may include a camera hardware abstraction layer and a camera algorithm library. Among them, the camera hardware abstraction layer may provide virtual hardware for camera device 1 (first camera), camera device 2 (second camera) and more camera devices. The camera algorithm library stores a variety of image processing algorithms. For example, in an embodiment of the present application, the camera algorithm library may include a subject detection algorithm, a motion evaluation algorithm, a face detection algorithm, a face attribute measurement algorithm, a clarity algorithm, etc. The camera hardware abstraction layer can call the algorithm in the camera algorithm library to obtain the corresponding image information.
[0242] The driver layer is the layer between hardware and software. It includes drivers for various hardware components. For example, the driver layer may include a camera device driver, a digital signal processor driver, and an image processor driver. The camera device driver drives the camera's sensor to capture images and the image signal processor to pre-process them. The digital signal processor driver drives the digital signal processor to process images. The image processor driver drives the graphics processor to process images.
[0243] In the implementation of this application, after detecting a user operation to open the camera application (the user operation acting on the camera application icon 113G shown in Figure 1A), the camera application calls the camera access interface of the application framework layer to start the camera application, and then sends an instruction to start the camera application by calling the camera device in the camera hardware abstraction layer, such as camera device 1. The camera hardware abstraction layer sends the instruction to the camera device driver of the driver layer. The camera device driver can start the sensor corresponding to the camera device, such as sensor 1, and then collect the image light signal through the sensor, and transmit the image light signal to the image signal processor for preprocessing to obtain a RAW image, and then transmit the original stream back to the camera hardware abstraction layer through the camera device driver.
[0244] The camera hardware abstraction layer can send the RAW image stream to the camera algorithm library. Based on the support of the digital signal processor and image processor, the camera algorithm library can downsample the RAW image stream to obtain a low-resolution processing stream: Tiny stream.
[0245] Then, with support from the digital signal processor and image processor, the camera algorithm library can call on subject detection algorithms, motion assessment algorithms, face detection algorithms, face attribute algorithms, and clarity algorithms to obtain image content and clarity information. Based on this information, the library can then determine whether the image is excellent. After identifying an excellent image frame, the camera algorithm library can report an automatic capture event to the HAL.
[0246] After receiving an automatic capture event, HAL retrieves the corresponding image frame from the received RAW image stream based on the frame number carried in the event, and then outputs it as a wonderful photo. During this process, HAL can also call on the camera algorithm library to perform other image processing on the wonderful image frame that triggered the automatic capture, such as saturation optimization algorithm, exposure compensation algorithm, and beauty / body enhancement algorithm to achieve better image quality.
[0247] FIG9 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
[0248] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0249] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0250] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0251] The controller can generate an operation control signal based on the instruction operation code and the timing signal to complete the control of instruction fetching and execution. The processor 110 can also be provided with a memory for storing instructions and data.
[0252] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0253] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0254] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0255] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0256] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0257] The charging management module 140 is configured to receive charging input from a charger. While charging the battery 142 , the charging management module 140 can also provide power to the electronic device through the power management module 141 .
[0258] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.
[0259] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0260] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0261] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniLED, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device can include one or N display screens 194, where N is a positive integer greater than one.
[0262] In an embodiment of the present application, the electronic device 100 can display the user interface shown in Figures 1A-1F, Figures 2A-2H, Figures 3A-3J, Figures 4A-4E, and Figures 5A-5E through the display function provided by devices such as the GPU, the display screen 194, and the application processor.
[0263] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0264] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0265] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0266] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0267] In an embodiment of the present application, the electronic device 100 can obtain images and perform automatic capture through the shooting functions provided by the ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0268] The internal memory 121 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data, and can be pre-loaded into the RAM for direct reading and writing by the processor 110.
[0269] In an embodiment of the present application, the computer program code corresponding to automatic capture can be stored in NVM. When this function is enabled, the corresponding program code can be mounted in RAM. The processor 110 can directly read the program code in RAM to implement automatic capture. The wonderful photos captured by automatic capture and their thumbnail images can be written to NVM for storage and access by the user at any time.
[0270] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, image files such as automatically captured wonderful photos and their thumbnails can be stored in the external non-volatile memory.
[0271] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor. For example, after the camera application is turned on, the camera application can call the audio module 170 to obtain the ambient audio signal and combine it with the image stream generated by the camera and other devices to form a video.
[0272] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A may be located on display screen 194. When a touch operation is performed on display screen 194, electronic device 100 detects the intensity of the touch operation using pressure sensor 180A. Electronic device 100 may also calculate the location of the touch based on the detection signal from pressure sensor 180A.
[0273] Gyroscope sensor 180B can be used to detect the magnitude of the angular velocity of electronic device 100 in various directions (generally three axes). Acceleration sensor 180E can detect the magnitude of the acceleration of electronic device 100 in various directions. Gyroscope sensor 180B and acceleration sensor 180E can be used to determine the motion posture of electronic device 100.
[0274] The air pressure sensor 180C is used to measure air pressure. The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. The distance sensor 180F is used to measure distance. In a shooting scenario, the electronic device 100 can use the distance sensor 180F to measure distance for fast focusing. The proximity light sensor 180G can be used to determine the presence of an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. In a shooting scenario, the ambient light sensor 180L can also be used to automatically adjust the white balance when taking photos. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect temperature. The bone conduction sensor 180M can obtain vibration signals.
[0275] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0276] In an embodiment of the present application, the electronic device 100 can identify whether there is a touch operation acting on the screen and which position and type of touch operation is acting on the screen through the touch detection function provided by the touch sensor 180K, thereby realizing the switching of the user interface and displaying the user interface shown in Figures 1A-1F, Figures 2A-2H, Figures 3A-3J, Figures 4A-4E, and Figures 5A-5E, so that the user can obtain automatic capture service.
[0277] Keys 190 include a power button, volume button, and other buttons. Electronic device 100 can receive key inputs and generate key signal inputs related to user settings and function control of electronic device 100. Motor 191 can generate vibration prompts. Indicator 192 can be an indicator light. SIM card interface 195 is used to connect a SIM card.
[0278] The term "user interface (UI)" in the specification, claims and drawings of this application refers to the media interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface of an application is a source code written in a specific computer language such as Java and Extensible Markup Language (XML). The interface source code is parsed and rendered on the terminal device, and finally presented as content that the user can recognize, such as pictures, text, buttons and other controls. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, pictures and text. The properties and contents of controls in the interface are defined by tags or nodes, such as XML through <textview> 、 <imgview> 、 <videoview>The controls contained in the interface are specified by nodes such as <head> and <body>. A node corresponds to a control or attribute in the interface, and the node is presented as user-visible content after parsing and rendering. In addition, many applications, such as hybrid applications, usually also contain web pages in their interfaces. A web page, also known as a page, can be understood as a special control embedded in the application interface. A web page is a source code written in a specific computer language, such as hypertext markup language (HTML), cascading style sheets (CSS), JavaScript (JS), etc. The web page source code can be loaded and displayed as user-recognizable content by a browser or a web page display component with similar functions to a browser. The specific content contained in a web page is also defined by tags or nodes in the web page source code, such as HTML through <body>. 、 、 <video> 、 <canvas>To define the elements and attributes of a web page.
[0279] A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operations that uses graphics. It can be an icon, window, control, or other interface element displayed on the display of an electronic device. Controls can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and other visual interface elements.
[0280] As used in the specification and appended claims of the present application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items. As used in the above embodiments, the term "when..." can be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...". Similarly, the phrase "when determining..." or "if (stated condition or event) is detected" can be interpreted to mean "if determining..." or "in response to determining..." or "when (stated condition or event) is detected" or "in response to detecting (stated condition or event)", depending on the context.
[0281] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
[0282] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0283] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.< / canvas> < / video> < / videoview> < / imgview> < / textview>
Claims
1. A shooting method, applied to an electronic device, wherein the electronic device includes a camera, characterized in that: The method comprises: Open the Camera app; At time T1, a preview interface is displayed, wherein the preview interface includes a preview area, a shutter key, and a third control, and the preview area displays image frames collected by the camera in real time; Keep displaying the preview interface, and at time T2, display a thumbnail of the first image in the third control; The first image is an image automatically captured by the electronic device between time T1 and time T2, in which the object is in a first posture and the image quality meets a first preset condition, the image quality includes image clarity and exposure, the first posture is a posture in a first action, the first action is determined according to a plurality of image frames collected by the electronic device in real time, and the first action is a preset action; Wherein, the T1 moment is before the T2 moment; A first operation on the third control is detected; in response to the first operation, a first image is displayed.
2. The method according to claim 1, characterized in that The first image also satisfies one or more of the following: It includes a first object, the size and position of the first object meet a first preset requirement, it includes a face, the size and position of the face meet a second preset requirement, the face has eyes open, or the face is smiling.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: At the time T2, a first mark is further displayed on the preview interface, where the first mark is used to mark that the electronic device automatically captures the first image.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: A third interface is displayed, wherein the third interface displays one or more images stored in the electronic device, wherein the one or more images include a thumbnail of the first image, and a first identifier is displayed on the thumbnail, wherein the first identifier is used to mark the first image as being automatically taken by the electronic device.
5. The method according to any one of claims 1 to 4, characterized in that: The preview interface also includes a first control, and the method further includes: Detecting a user operation on the first control, displaying a fourth interface, wherein the fourth interface includes the second control; A user operation on the second control is detected, and an automatic shooting function is enabled.
6. The method according to any one of claims 1 to 5, characterized in that: After the first image, the image captured by the camera also includes a second image, the second image also includes the first action and the image quality of the second image also meets the first preset condition, the wonderfulness of the second image is lower than the wonderfulness of the first image, and the image taken by the electronic device does not include the second image; the wonderfulness of the image is determined by the completion of the first action in the image and the image quality of the image.
7. The method according to claim 6, characterized in that A time interval between the second image and the first image is smaller than a first time interval.
8. The method according to any one of claims 1 to 5, characterized in that: Before the first image, the image captured by the camera also includes a third image, the third image also includes the first action and the image quality of the second image also meets the first preset condition, and the method further includes: automatically shooting the third image; The similarity between the first image and the third image is smaller than a first preset value, or the time interval between the first image and the third image is greater than a second time interval.
9. The method according to any one of claims 1 to 8, characterized in that: Before the electronic device automatically captures the first image including the first action and whose image quality meets the first preset condition, the method further includes: determining that the number of images that the electronic device has automatically captured is lower than a third preset value.
10. The method according to claim 9, characterized in that The determining that the number of images automatically captured by the electronic device is lower than a third preset value specifically includes: determining that the number of images that belong to the same scene as the first image among the images automatically captured by the electronic device is lower than a fourth preset value.
11. The method according to any one of claims 1 to 10, characterized in that: The first image is an image automatically taken by the electronic device between time T1 and time T2, including a first action and whose image quality meets a first preset condition, specifically including: the first image is obtained by the electronic device automatically taking multiple frames of images including a fourth image, and the fourth image is an image between time T1 and time T2 that includes the first action and whose image quality meets the first preset condition.
12. The method according to claim 11, characterized in that The first image is obtained by the electronic device automatically shooting a plurality of frames of images including the fourth image, specifically including: in a first shooting mode, the first image is obtained by the electronic device automatically shooting a plurality of frames of images including the fourth image.
13. The method according to claim 12, characterized in that The first shooting mode includes a night scene mode.
14. An electronic device, characterized in that: The method comprises one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, wherein the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the method according to any one of claims 1 to 13 is executed.
15. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the method according to any one of claims 1 to 13 is executed.
Citation Information
Patent Citations
Video processing method, electronic equipment and readable medium
CN114827342A
Video processing method and electronic equipment
CN115002340A
Video processing method and device, equipment and storage medium
CN115379290A
Shooting method and electronic equipment
CN115525188A
Shooting method
CN117119284A
