Image capture method and related electronic device
By identifying the preset actions of the subject and saving wonderful images after detecting the user's operation, the problem of users' difficulty in capturing the exciting moments of the moving subject is solved, and the shooting experience is improved.
Patent Information
- Application Number
- PCT/CN2024/108387
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-07-30
- Publication Date
- 2025-07-03
AI Technical Summary
When users take pictures of moving subjects, it is difficult for users to capture photos of exciting moments, resulting in poor shooting experience.
The preset actions of the subject are identified by the electronic device, the wonderful image is determined, and the image is saved after detecting the user's shooting operation, avoiding frame-by-frame comparisons to reduce calculation costs and power consumption.
It improves the success rate of users to capture wonderful images when shooting moving subjects and improves the shooting experience.
Smart Images

Figure CN2024108387_03072025_PF_FP_ABST
Abstract
Description
Shooting method and related electronic equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 29, 2023, with application number 202311863466.X and application name “Photographing Method and Related Electronic Equipment”, 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 and related electronic equipment. 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] This application provides a shooting method and related electronic devices. Electronic devices such as mobile phones and tablets can implement the above shooting method to identify wonderful images when shooting moving objects, helping users capture wonderful images.
[0006] In a first aspect, the present application provides a shooting method, which is applied to an electronic device, the method comprising: displaying a preview interface, the preview interface displaying an image captured by a camera; identifying a first wonderful image that meets a first condition from the image captured by the camera; in response to identifying the first wonderful image, setting the first wonderful image as a candidate image, and starting a first counter, the first counter being used to record the number of image frames captured by the camera after identifying the first wonderful image; detecting a first shooting operation when the first counter counts to a first value, the first value being less than or equal to a first threshold; in response to the first shooting operation, starting a second counter, the second counter being used to record the number of image frames captured by the camera after the first shooting operation; and saving the candidate image after starting the second counter.
[0007] By implementing the method provided in the first aspect, a mobile phone or other electronic device can identify images captured by a camera and determine whether there are any wonderful images that meet a preset condition (first condition). After identifying a wonderful image, the electronic device can set the wonderful image as a candidate image and start a counter (first counter) to detect whether there has been a shooting operation within a certain period of time. After detecting the shooting operation (first shooting operation), the electronic device can start another counter (second counter). After starting the second counter, the electronic device can capture the candidate image.
[0008] In combination with the method provided in the first aspect, in some embodiments, after the second counter is started, saving the candidate image specifically includes: saving the candidate image when the second counter counts to a second threshold.
[0009] The electronic device may start the second counter and save the candidate image as a result of the user's first shooting operation when the second counter reaches the corresponding second threshold.
[0010] In combination with the method provided in the first aspect, in some embodiments, after the second counter is turned on, the candidate image is saved, specifically including: detecting a second shooting operation when the second counter counts to a second value, and the second value is less than or equal to a second threshold; and saving the candidate image in response to the second shooting operation.
[0011] Before the second counter reaches the corresponding second threshold, the electronic device may detect another shooting operation (second shooting operation) of the user. At this time, the electronic device may immediately save the candidate image as a result of the previously detected user shooting operation without having to wait until the second counter reaches the second threshold.
[0012] In combination with the method provided in the above embodiments, in some embodiments, after saving the candidate image, the method further includes: starting a third counter to update the candidate image to a second image, where the second image is an image captured by the camera when the second shooting operation is detected, and the third counter is used to record the number of image frames captured by the camera after the second shooting operation; when the third counter counts to a third threshold, saving the candidate image; or, when the third counter counts to a third value, detecting a third shooting operation, the third value is less than or equal to the third threshold, and in response to the third shooting operation, saving the candidate image.
[0013] By implementing the above method, the electronic device can, after detecting a continuous shooting operation (second shooting operation), temporarily determine the image at the moment the second shooting operation occurs as a candidate image, and after the third counter counts to the corresponding third threshold or another continuous shooting operation (third shooting operation) is detected, save the candidate image as the result of the second shooting operation, and continue to help the user capture wonderful images during the continuous shooting process.
[0014] In combination with the method provided in the above embodiments, in some embodiments, before detecting the first shooting operation, the method also includes: identifying a second wonderful image that meets the first condition from the image captured by the camera; when the wonderfulness of the first wonderful image is higher than the wonderfulness of the second wonderful image, saving the candidate image, specifically including: saving the first wonderful image; when the wonderfulness of the first wonderful image is lower than the wonderfulness of the second wonderful image, updating the candidate image to the second wonderful image, and saving the candidate image, specifically including: saving the second wonderful image.
[0015] By implementing the above method, the electronic device can, while the first counter is counting and before detecting the first capture operation, continue to identify whether the images captured by the camera include new wonderful images that meet preset conditions. After detecting a new, more wonderful, wonderful image, the electronic device can update the candidate images. In this way, in response to the first capture operation, the electronic device can display to the user a more wonderful image near the first capture operation, thereby enhancing the user's capture experience.
[0016] In combination with the method provided in the above embodiments, in some embodiments, when the degree of wonderfulness of the first wonderful image is higher than the degree of wonderfulness of the second wonderful image, the method further includes: in response to the first shooting operation, displaying a first thumbnail on the preview interface, and the first thumbnail is obtained based on the first wonderful image; when the degree of wonderfulness of the first wonderful image is lower than the degree of wonderfulness of the second wonderful image, the method further includes: in response to the first shooting operation, displaying a second thumbnail on the preview interface, and the second thumbnail is obtained based on the second wonderful image.
[0017] After detecting the shooting operation, the electronic device can immediately output a thumbnail to the user based on the current candidate image to give the user shooting feedback.
[0018] In combination with the method provided in the above embodiments, in some embodiments, after detecting the first shooting operation and before detecting the second shooting operation, the method also includes: identifying a third wonderful image that meets the first condition from the image captured by the camera; when the wonderfulness of the first wonderful image is higher than the wonderfulness of the third wonderful image, saving the candidate image, specifically including: saving the first wonderful image; when the wonderfulness of the first wonderful image is lower than the wonderfulness of the third wonderful image, updating the candidate image to the third wonderful image, and saving the candidate image, specifically including: saving the third wonderful image.
[0019] By implementing the above method, after detecting the first shooting operation, the electronic device can continue to identify whether the images captured by the camera include new wonderful images that meet the preset conditions, and then determine whether to update the candidate images, so that the user can obtain more wonderful images near the shooting operation, thereby improving the user's shooting experience.
[0020] In a specific implementation, after each new wonderful image is detected, the electronic device may compare the new wonderful image with the current candidate image. When the new wonderful image is more wonderful than the current candidate image, the electronic device may immediately update the candidate image.
[0021] In another specific implementation, after the first shooting operation, the electronic device can set the second image captured by the camera when the second shooting operation is detected as another candidate image, such as the second candidate image. The candidate image before the second shooting operation is also called the first candidate image. After each new wonderful image is detected, the electronic device can compare the new wonderful image with the second candidate image. When the new wonderful image is more wonderful than the second candidate image, the electronic device can immediately update the second candidate image. After the second counter reaches the corresponding second threshold or the second shooting operation is detected, the electronic device can compare the first candidate image and the second candidate image, determine the more wonderful frame of the two as the result of the first shooting operation, and continue to help the user capture wonderful images during the continuous shooting process.
[0022] In combination with the method provided in the above embodiment, in some embodiments, the method further includes: in response to the first shooting operation, displaying a third thumbnail on the preview interface, where the third thumbnail is obtained based on the first wonderful image.
[0023] After the shooting operation occurs, after the thumbnail is displayed, the candidate image is updated but the thumbnail is not updated to avoid affecting the user's shooting experience.
[0024] In combination with the method provided in the above embodiments, in some embodiments, the wonderfulness of the image is determined based on one or more of the following: confidence, clarity, the number and position of target objects in the image, the number and position of faces, and facial information.
[0025] In combination with the method provided in the above embodiments, in some embodiments, when the third counter counts to the third threshold, the candidate image is saved, specifically including: when the third counter counts to the third threshold and no wonderful image meeting the first condition is identified during the counting of the third counter, the second image is saved.
[0026] In combination with the method provided in the above embodiments, in some embodiments, when the third counter counts to the third threshold, the candidate image is saved, specifically including: identifying a fourth wonderful image that meets the first condition during the counting of the third counter, updating the candidate image to the fourth wonderful image; when the third counter counts to the third threshold, saving the fourth wonderful image.
[0027] By implementing the above method, after detecting the second shooting operation, the electronic device can also continue to identify whether the images captured by the camera include new wonderful images that meet the preset conditions, and then determine whether to update the candidate image, so that the user can obtain more wonderful images near the second shooting operation, thereby improving the user's shooting experience.
[0028] In conjunction with the methods provided in the above embodiments, in some embodiments, satisfying the first condition specifically includes: including a first action. The first action is preset and includes, but is not limited to, long jump, high jump, hurdle jump, basketball shooting, cat-dog jumping, and cat-dog standing.
[0029] In combination with the method provided in the above embodiment, in some embodiments, satisfying the first condition further includes one or more of the following: clarity satisfies a fourth threshold; only one target subject is included, and the target subject is complete and centered; multiple target subjects are included, and the multiple target subjects are complete.
[0030] In combination with the method provided in the above embodiments, in some embodiments, only one target photographic subject is included, and the target photographic subject is complete and centered, specifically including: only one person is included, and the person is complete and centered with a smiling face.
[0031] In combination with the method provided in the above embodiment, in some embodiments, the first threshold is equal to 30 and the second threshold is equal to 15.
[0032] 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 a computer program. When the one or more processors execute the computer program, the electronic device executes the method described in the first aspect and any possible implementation method of the first aspect.
[0033] 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.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium comprising a computer program. When the computer program is run on an electronic device, the electronic device executes the method described in the first aspect and any possible implementation of the first aspect.
[0035] 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.
[0036] 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
[0037] FIG1 is a schematic diagram of a long jump provided by an embodiment of the present application;
[0038] Figures 2A-2I are a set of shooting user interfaces provided in an embodiment of the present application;
[0039] FIG3 is a schematic diagram of the software structure of a camera application provided in an embodiment of the present application;
[0040] FIG4 is a flowchart of determining a wonderful image based on evaluation data according to an embodiment of the present application;
[0041] FIG5A is a flow chart of a snapshot method provided in an embodiment of the present application;
[0042] FIG5B is a flow chart of another snapshot method provided in an embodiment of the present application;
[0043] FIG6 is a flowchart of another snapshot method provided in an embodiment of the present application;
[0044] 7A-7C are schematic diagrams of snapshots provided in an embodiment of the present application;
[0045] 8A-8B are another snapshot diagram provided by an embodiment of the present application;
[0046] FIG9 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] 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.
[0048] FIG1 is a schematic diagram of a long jump provided in an embodiment of the present application.
[0049] During a long jump, an athlete will sequentially present the five states shown in Figure 1: preparation, take-off, ascent, descent, and landing. Generally, athletes are most captivating during the liftoff phase (e.g., ascent and descent), especially at their highest point. Images capturing these states are considered highlights. When capturing a shot, the photographer most desires to capture these highlights. However, due to the extremely short duration of the long jump and human reaction time, capturing these highlights is often difficult.
[0050] For example, at time T3, after observing the athlete ascending, the user clicks the capture control / button, controlling the electronic device (including the camera and capture control / button) to capture the currently captured image. However, due to human reaction time, the electronic device may receive the user's click action later, for example, until time T5. At this point, the image captured by the electronic device after executing the capture operation is actually the image of the athlete landing at time T5, not the image of the athlete ascending at time T3.
[0051] Not limited to the long jump shown in Figure 1, in dynamic shooting scenes such as high jump, hurdles, and shooting, due to the rapid changes in movements, the target shooting image determined by the electronic device based on the moment of receiving the user's click operation (for example, the image of the landing state at time T5) is obviously different from the wonderful image expected by the user (for example, the image of the rising state at time T3), which does not meet the user's expectations and thus greatly affects the user's shooting experience.
[0052] In view of this, an embodiment of the present application provides a photographing method. The method is applied to an electronic device 100. The electronic device 100 includes a camera, and can capture images through the camera.
[0053] The embodiment of the present application provides a shooting method, in which the electronic device 100 can identify whether the subject of the shooting makes a preset action through the image captured by the camera, and after identifying the preset action, determine a frame of image with the best performance from a group of images containing the action, that is, a wonderful image. After detecting the wonderful image, the electronic device 100 can detect the user's shooting operation. If the user's shooting operation is detected within the preset time, the electronic device 100 can save the above-mentioned wonderful image as a photo taken by the user's shooting operation; if the preset time expires and the user's shooting operation is not detected, the electronic device 100 can abandon the above-mentioned wonderful image, stop detecting the user's shooting operation, and wait for the next detection of a wonderful image.
[0054] By implementing the above method, the electronic device 100 can not only help the user capture wonderful images when photographing a moving object, but also avoid frame-by-frame comparison, reduce computing costs, and save power consumption.
[0055] The electronic device 100 includes, but is not limited to, terminal electronic devices such as smartphones and tablet computers. For example, the electronic device 100 may also be a laptop computer, a desktop computer, an augmented reality (AR) device, a virtual reality (VR) 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 particular restrictions on the specific type of the electronic device.
[0056] First, Figures 2A-2I are a set of shooting user interfaces provided in an embodiment of the present application.
[0057] The electronic device 100 may display the homepage shown in FIG2A . The homepage may display multiple application icons, such as a gallery application icon, a weather application icon, a phone application icon, a camera application icon 211 , and the like. Each application icon corresponds to an application. The homepage is not limited to the aforementioned icons and may also include other application icons, which are not listed here one by one.
[0058] As shown in FIG2A , the electronic device 100 may detect a user operation, such as a click operation, on the camera application icon 211. In response to the operation, the electronic device 100 may open the camera application. After opening the camera application, the electronic device 100 may display the camera preview interface shown in FIG2B .
[0059] The camera preview interface may include control 221. Control 221 can be used to enable assisted snapshot. As shown in FIG2B , electronic device 100 may detect a user operation on control 221. In response to the operation, electronic device 100 may enable assisted snapshot. Referring to FIG2C , after assisted snapshot is enabled, electronic device 100 may display control 222 in place of control 221. Control 222 can be used to disable assisted snapshot.
[0060] As shown in Figure 2C, after turning on the auxiliary capture, the electronic device 100 can also turn on the automatic capture function at the same time, and replace the control 225 displayed on the original camera preview interface with control 226. Automatic capture refers to a shooting method that automatically saves a wonderful image as a photo after identifying a wonderful image without considering the user's shooting operation. Control 225 is used to indicate that the automatic capture function is not turned on. Control 226 is used to indicate that the automatic capture function is turned on. In the user interface shown in Figure 2B, the electronic device 100 can also detect the user operation of the control 225. In response to the above operation, the electronic device 100 can turn on the automatic capture function and replace the control 225 with the control 226. In the user interface shown in Figure 2C, the electronic device 100 can also detect the user operation of the control 226. In response to the above operation, the electronic device 100 can turn off the automatic capture function and replace the control 226 with the control 225.
[0061] As shown in FIG2C , after enabling assisted snapshot, the electronic device 100 may also display a control 227. Control 227 may be used to set the degree of background blur. After receiving the degree of background blur set by the user via control 227, the electronic device 100 may perform background blur processing on the image captured by the camera based on the degree of background blur. Background blur processing includes identifying the subject in the image (e.g., a person / cat / dog, etc.) and blurring the image content other than the subject.
[0062] After turning on assisted capture, the electronic device 100 can use the images captured by the camera to identify whether the subject is performing a preset action. The above-mentioned preset actions include but are not limited to long jump, high jump, hurdles, and shooting. It is understandable that according to the settings of the R&D personnel, the electronic device 100 can recognize more and richer actions. After detecting the preset action, the electronic device 100 can determine a frame of the best-performing wonderful image from a group of images containing the action. After detecting the user's shooting operation, the electronic device 100 can save the above-mentioned wonderful image as a photo taken by the user's shooting operation.
[0063] After enabling assisted snapshot, the user can hold electronic device 100 and aim the camera of electronic device 100 at a subject, such as the long jumper shown in Figure 1 . At this point, as shown in Figures 2D, 2E, 2F, 2G, and 2H, preview window 223 of the camera preview interface can sequentially display images of the athlete in the states of preparation, takeoff, ascent, descent, and landing. Referring to Figure 2F , when preview window 223 displays image P3 (including the image of the athlete in the ascending state), the user may determine that the subject's performance in image P3 is exceptional. At this point, the user can reach out and click capture control 224. Referring to Figure 2G , due to delayed human reaction time, by the time electronic device 100 receives the click on capture control 224, the image displayed in preview window 223 has already been updated to image P4. At this point, according to existing capture methods, electronic device 100 will save image P4 as the photo captured by the user's capture operation.
[0064] In the embodiment of the present application, the electronic device 100 can recognize that the subject has made a long jump based on the images captured by the camera between images P1 and P4, and determine that image P3 is the best and most exciting image from this group of images. Then, the electronic device 100 can start detecting the user's shooting operation. Referring to Figure 2G, the electronic device 100 can immediately detect the user's shooting operation. In response to the above-mentioned shooting operation, the electronic device 100 can save image P3 as a photo taken by the user's shooting operation. Referring to Figure 2H, after detecting the user's shooting operation, the electronic device 100 can display a thumbnail of image P3 on the review control 228. After detecting the user operation acting on the review control 228, the electronic device 100 can display the gallery preview interface shown in Figure 2I for the user to browse the shooting results.
[0065] At this time, despite the reaction time delay, with the help of the electronic device 100 recognizing the wonderful image, the user can also take wonderful images and get a better shooting experience.
[0066] FIG3 is a schematic diagram of the software structure of a camera application provided in an embodiment of the present application.
[0067] As shown in FIG3 , a camera application may include a perception layer, a decision layer, and a camera hardware abstraction layer (Camera HAL).
[0068] When the camera of electronic device 100 is turned on, it can capture light signals and convert them into electrical signals to produce raw images, also known as RAW images. In Figure 3, F(i-2), F(i-1), F(i), and F(i+1) are four illustrative raw images. The camera can send the captured raw images to the camera application.
[0069] The camera can send the original image to the perception layer. Preferably, the camera can downsample the original image to obtain a small-sized processed image, also known as a tiny image. For example, the size of the RAW image before downsampling can be 3024*4032(p), and the size of the tiny image after downsampling can be 378*502(p). The camera can send the tiny image obtained after downsampling to the perception layer instead of directly sending the original image.
[0070] The perception layer has multiple pre-built detection algorithms, including subject detection, face detection, facial attribute detection, human motion detection, other motion detection, and clarity. The camera application uses these algorithms to identify any image frame reported by the camera and obtain evaluation data describing its content and quality. Compared to directly processing large RAW images, the smaller Tiny images reduce the computational complexity of the perception layer's detection algorithms, improving computational speed and enabling faster acquisition of image evaluation data.
[0071] The comprehensive evaluation module of the decision layer can determine whether the images captured by the camera contain the wonderful images expected by the user based on the evaluation data output by each detection algorithm in the perception layer.
[0072] After the comprehensive evaluation module identifies a wonderful image, the shooting detection module can determine the wonderful image as a candidate image and report the cache to the HAL cache control module, that is, send a cache signaling. The cache signaling can carry a unique identifier for the candidate image. The above unique identifier can be a frame number or a timestamp. The cache control module can determine the original image of the candidate image based on the above unique identifier and then write the above original image to the rotating buffer. After identifying a more wonderful image, the shooting detection module can update the candidate image. After updating the candidate image, the shooting detection module will also report the cache to the HAL cache control module. The cache control module can obtain the original image of the new candidate image and write it to the rotating buffer.
[0073] Then, the shooting detection module can detect the user's shooting operation. After detecting the user's shooting operation, the shooting detection module can report a thumbnail and a snapshot to the snapshot control module. Reporting a thumbnail means sending a thumbnail output signaling. Reporting a snapshot means sending a photo output signaling. The snapshot control module can obtain the corresponding original image from the rotating buffer based on the unique identifier carried in the thumbnail output signaling, set it as a thumbnail, and display it. The snapshot control module can obtain the corresponding original image from the rotating buffer based on the unique identifier carried in the photo output signaling, save it, and use it as a photo taken by the user's shooting operation.
[0074] Specifically, the subject detection algorithm in the perception layer can be used to identify whether an image contains a preset target subject, such as a person, cat, dog, etc. After identifying a target subject, the subject detection algorithm can output an object frame that indicates the object's position and size in the image. It is understood that a single image frame may contain multiple target subjects. After identifying multiple target subjects in an image, the subject detection algorithm can output object frames that match each of these target subjects.
[0075] Face detection algorithms can be used to identify whether an image contains a human face. After identifying a face, the face detection algorithm outputs a face frame that identifies the face's location and size within the image. Similarly, a single image frame can contain multiple faces. After identifying multiple faces in an image, the face detection algorithm outputs object frames that match each of these faces.
[0076] A facial attribute algorithm can be used to obtain facial information. Facial information includes, but is not limited to, frontal / profile, smiling, and eyes open / closed. In one embodiment, the facial attribute algorithm can directly obtain facial information from a complete Tiny image frame. In another embodiment, the face detection algorithm can also send the face frame to the facial attribute algorithm. The facial attribute algorithm can first extract facial image blocks from the complete Tiny image frame based on the face frame, and then obtain facial information from the facial image blocks to improve the accuracy and speed of obtaining facial information.
[0077] Motion detection algorithms include human motion detection algorithms and other motion detection algorithms.
[0078] Human action detection algorithms can be used to identify whether a person in an image is performing a preset action, such as the long jump, high jump, hurdle jump, or basketball shot mentioned above. Other action detection algorithms can be used to identify whether other target subjects in an image are performing other preset actions, such as cats or dogs jumping or standing.
[0079] The motion detection algorithm needs to specifically determine an action through multiple frames of images. After recognizing a preset action based on multiple frames of images, the motion detection algorithm is also used to select the best-performing frame from these multiple frames of images. This frame of image is also called the preferred action image. The best performance standards for different actions are different. Taking long jump as an example, the best performance standard can be the rising state shown in Figure 1. At this time, after the long jump action is detected, the image containing the rising state (such as image P3 shown in Figure 2F) can be determined by the motion detection algorithm as the preferred action image. The best performance standard for each action can be set by R&D personnel based on experience, and is not limited here.
[0080] When a preset action is recognized based on multiple image frames, the action detection algorithm determines the confidence level for each frame. The confidence level indicates the degree of similarity between the action in the image and a preset standard action template. A preset standard action template represents the best possible performance of an action. The higher the confidence level, the more similar the image is to the preset standard action template. Based on the confidence level, the action detection algorithm determines the best performing frame among the multiple frames, i.e., the frame with the highest confidence level.
[0081] After identifying the preset action and determining the frame with the highest confidence, the action detection algorithm can set the scene flag to a typical scene, that is, a wonderful scene, to indicate that the comprehensive evaluation module determines that the above-mentioned frame of image with the highest confidence contains the preset action, thereby triggering the comprehensive evaluation module to determine whether the above-mentioned image is a wonderful image according to preset conditions, and triggering the shooting detection module to start auxiliary capture after identifying the wonderful image. By default, the scene flag is set to an atypical scene. At this time, the comprehensive evaluation module will not determine whether the image captured by the camera is a wonderful image, and the shooting detection module will not perform auxiliary capture. In this scenario, after detecting the user's shooting operation, the electronic device 100 can perform normal shooting. Among them, normal shooting means: after detecting the user's shooting operation, directly saving the image captured by the camera at the time the user's shooting operation occurs as the shooting result of the user's shooting operation.
[0082] A sharpness algorithm can be used to determine the sharpness of an image.
[0083] It is understood that the perception layer can also include more detection algorithms to obtain more evaluation data describing image content or quality, so as to improve the accuracy of the electronic device 100 in identifying excellent images and enhance the user's shooting experience. Alternatively, the perception layer can also directly obtain relevant parameters during the shooting process, such as aperture, exposure, anti-shake mode, etc., from the camera and / or other sensors to evaluate image content or quality, improve the accuracy of the electronic device 100 in identifying excellent images, and enhance the user's shooting experience.
[0084] Taking the i-th frame tiny image F(i) as an example, the perception layer subject detection module can first process F(i) and identify the target subject in F(i). After identifying a person, the subject detection module can send F(i) to the face detection algorithm. The face detection algorithm can then identify the face in F(i). After identifying the face, the face detection algorithm can send F(i) to the face attribute algorithm. The face attribute algorithm can obtain the facial information of F(i). After identifying the person, the subject detection module also sends F(i) to the human action detection algorithm to identify whether the person in the image performs a preset action. After identifying F(i) as a cat or dog or other target subject, the subject detection module sends F(i) to other action detection algorithms to identify whether other target subjects in F(i) perform other preset actions.
[0085] FIG4 is a flowchart of determining a wonderful image based on evaluation data provided by an embodiment of the present application.
[0086] As shown in Figure 4, for any frame of image, the comprehensive evaluation module can first determine whether the image is a preferred action image. If the image is not a preferred action image, the comprehensive evaluation module can directly determine that the image is not exciting.
[0087] The comprehensive evaluation module can determine whether an image is a preferred action image based on the output of an action detection algorithm (either a human action detection algorithm or another action detection algorithm). After the action detection algorithm identifies a preset action and determines a preferred action image, it sends a unique identifier for the image to the comprehensive evaluation module. The comprehensive evaluation module can then determine a preferred action image based on the unique identifier.
[0088] Furthermore, after determining that a frame of image is a preferred action image, the comprehensive evaluation module can determine whether the clarity of the image exceeds a clarity threshold (also known as a fourth threshold). The comprehensive evaluation module can receive the clarity of the image reported by the clarity detection algorithm. If the clarity of the image is below the clarity threshold, the comprehensive evaluation module can directly determine that the image is not exciting.
[0089] If the clarity is above a clarity threshold, the comprehensive evaluation module can determine the number of target subjects in the image. The comprehensive evaluation module can determine the number of target subjects in the image based on the number of object frames reported by the subject detection algorithm. Furthermore, the comprehensive evaluation module can determine the type of target subject in the image (human / cat / dog, etc.) based on the type of object frames reported by the subject detection algorithm.
[0090] When an image contains only one target subject, the comprehensive evaluation module can determine whether the subject is complete and centered based on the position and size of the subject frame. Complete means that all components of the target subject are intact, such as a person's torso and limbs; centered means that the complete target subject is within a pre-set central area of the image. After determining that the subject is complete and centered, the comprehensive evaluation module can determine that the image is excellent; if any of the above conditions are not met, the comprehensive evaluation module can determine that the image is not excellent. When an image contains only one target subject, and that subject is a person, the comprehensive evaluation module can also determine whether the face in the image frame is facing forward, smiling, and with eyes open based on the facial information reported by the facial attribute algorithm. After determining that the subject is complete, centered, facing forward, smiling, and with eyes open, the comprehensive evaluation module can determine that the image is excellent. Conversely, if any of the above conditions are not met, the comprehensive evaluation module can determine that the image is not excellent.
[0091] When an image includes multiple target objects, the comprehensive evaluation module can determine whether each target object is complete based on the position and size of each object frame. If all target objects are complete, the comprehensive evaluation module can determine that the image is excellent. Conversely, if any object is incomplete, the comprehensive evaluation module can determine that the image is not excellent.
[0092] After determining that an image is outstanding using the method described in FIG4 , the comprehensive evaluation module can further determine its outstandingness based on the image's evaluation data (number and location of target subjects, number and location of faces, facial information, confidence level, clarity, etc.). The outstandingness can be represented by a floating-point number between 0 and 1. The shot detection module can determine which of two outstanding images is more outstanding based on their outstandingness. A larger floating-point number (i.e., closer to 1) indicates a more outstanding image.
[0093] Understandably, since action detection relies on multiple frames of images, there is a delay in the action detection algorithm reporting the optimal action image, and correspondingly, there is also a delay in the comprehensive evaluation module's judgment of the excellent image.
[0094] For example, the camera currently reports the 10th frame image F(10) collected. The subject detection algorithm, face detection algorithm, and face attribute algorithm of the single frame detection can output the detection result of F(10) before receiving the next frame F(11). However, the action detection algorithm still needs to wait for several frames of images after F(10), and determine whether the target subject has made a preset action during this period based on a group of images before and after F(10), and determine the frame with the best action performance in this group of images. For example, after collecting the 15th frame image F(15), the action detection algorithm will detect that a group of images (such as F(5)-F(15)) containing F(10) includes a preset action, and determine that F(10) is the preferred action image. At this time, the comprehensive evaluation module will determine that F(10) is the preferred action image at F(15), and then, if other preset conditions are met, the comprehensive evaluation module will determine that F(10) is a wonderful image at F(15).
[0095] In some embodiments, when determining a preferred action image, the action detection algorithm also compares the image's clarity and the state of the target subject: whether it is complete, centered, facing forward, smiling, and with eyes open, etc. In this case, the comprehensive evaluation module only needs to determine whether the image is a preferred action image. For preferred action images marked by the action detection algorithm, the comprehensive evaluation module can directly determine that the image is a good image; conversely, the comprehensive evaluation module can directly determine that the image is not a good image. In this case, the comprehensive evaluation module does not need to perform checks on clarity, the number of target subjects, their position, and other aspects, and the perception layer no longer needs to include algorithms such as face detection algorithms, face attribute algorithms, and clarity algorithms.
[0096] In the above method, the confidence level of the preferred action image can be directly used to indicate the image's excitement. In this case, the comprehensive evaluation module no longer needs to determine excitement based on the confidence level of the preferred action image. The shot detection module can directly determine which of the two exciting images is more exciting based on the confidence levels of the two images.
[0097] FIG5A is a flowchart of a snapshot method provided in an embodiment of the present application.
[0098] S101 , detecting a wonderful image F1 and determining F1 as a candidate image.
[0099] After the comprehensive evaluation module determines a wonderful image F1 (eg, image P3 shown in FIG2F ), the shooting detection module may immediately determine the wonderful image F1 as a candidate image.
[0100] S102: Start timer TimerA.
[0101] After determining candidate image F1, the shot detection module reports the cache to the HAL cache control module. The cache signaling may include a unique identifier for candidate image F1. The cache control module retrieves the original image F1 from the raw image stream based on the unique identifier in the cache signaling and then writes it to the rotating buffer.
[0102] On the other hand, after determining F1, the shooting detection module can start timer A. The shooting detection module can detect the user's shooting operation during the timing of timer A. Preferably, the timing duration of timer A is 1 second. The above-mentioned shooting operation can be a touch operation acting on the shooting control 224 as shown in Figure 2G, or a press operation on a mechanical button (such as a power button or a volume button).
[0103] Optionally, the capture detection module may use a counter instead of a timer to record a period of time. The capture detection module may detect the user's capture operation before the counter value exceeds a threshold. The counter increments each time the camera captures a frame of image.
[0104] In the embodiment of the present application, the shooting detection module may turn on counterA after S101. CounterA is used to record the number of images captured by the camera after the wonderful image F1 is recognized. That is, when the wonderful image F1 is recognized, counterA=0; thereafter, each time the camera captures a frame of image, counterA counts up by 1. In the case of a frame rate of 30FPS, counterA=30 corresponds to a timing length of 1 second for timerA. At this time, the shooting detection module may detect the user's shooting operation when counterA≤30. It is understandable that other timers used in subsequent embodiments may be replaced by counters accordingly.
[0105] S103, end.
[0106] When timerA expires and no user shooting operation is detected, the shooting detection flowchart ends. The shooting detection module waits for the next report of the wonderful image from the comprehensive evaluation module.
[0107] S104, capture F1.
[0108] Assume that at time T1 before timer A ends, the shooting detection module detects a shooting operation of the user. This shooting operation can be recorded as a first shooting operation. In response to the first shooting operation, the shooting detection module can confirm the capture F1.
[0109] Specifically, the shooting detection module can send thumbnail output signaling and photo output signaling to the HAL snapshot control module, that is, report the thumbnail and report the snapshot. In response to the above-mentioned thumbnail output signaling, the snapshot control module can obtain the original image of F1 from the rotating buffer, generate a thumbnail, and then display the above-mentioned thumbnail in the specified area of the screen. Referring to Figure 2H, the electronic device 100 can display a thumbnail of image P3 in the review control 228. In response to the above-mentioned photo output signaling, the snapshot control module can obtain the original image of F1 from the rotating buffer and write it to the local memory. The original image of F1 stored in the local memory is the wonderful photo taken by the user through the first shooting operation.
[0110] At time T1 before timerA expires, counterA = N1, where 0 ≤ N1 ≤ M1. M1 is the counterA counting threshold, for example, 30. The capture detection module detects the first capture operation at time T1, that is, the capture detection module detects the first capture operation when counterA = N1.
[0111] FIG5B is a flowchart of another snapshot method provided in an embodiment of the present application.
[0112] S201 : Detect a wonderful image F1 and determine F1 as a candidate image.
[0113] S202: Start timer TimerA.
[0114] S203 : Detect the wonderful image F2, update the candidate image, and reset TimerA.
[0115] During TimerA, the action detection algorithm may detect a new preferred action image. Based on this new preferred action image, the comprehensive evaluation module may determine a new outstanding image, designated F2. At this point, the shot detection module may compare the two outstanding images, F1 and F2, and determine the more outstanding one, designated as the winning image. The shot detection module may update the candidate image based on the winning image. For example, if F1 is more outstanding than F2, i.e., if F1 is the winning image, the shot detection module may determine F1 as the candidate image. If F2 is more outstanding than F1, i.e., if F2 is the winning image, the shot detection module may update the candidate image to F2.
[0116] After updating the candidate image, the shot detection module can report the cache to the HAL cache control module. The cache control module can obtain the original image of the new candidate image and write it into the rotating buffer.
[0117] After updating the candidate image, for example, after updating the candidate image to F2, the shooting detection module can reset TimerA and restart the timing. In the scenario where a new wonderful image is detected but the candidate image has not been updated, TimerA is not reset and continues to count.
[0118] As described in Figure 4, after identifying a highlight image, the comprehensive evaluation module can determine the highlight level of the image based on evaluation parameters such as the number and location of target subjects, the number and location of faces, facial information, confidence level, and clarity. Alternatively, the confidence level of the highlight image can be used to directly represent the highlight level. The shot detection module can determine which of the two highlight images is more highlight-oriented based on their respective highlights.
[0119] S204, end.
[0120] S205: Capture the current candidate image.
[0121] Before timerA expires, after detecting the user's shooting operation, the shooting detection module can confirm that the current candidate image is captured. For example, if the current candidate image is F1, the shooting detection module can confirm that F1 is captured; if the current candidate image is updated to F2, the shooting detection module can confirm that F2 is captured.
[0122] It is understandable that during the timing of TimerA, the comprehensive evaluation module can detect new wonderful images multiple times. Correspondingly, the shooting detection module can update the candidate images multiple times. This will not be listed one by one here.
[0123] Because the action detection algorithm reports the preferred action image with a delay, the comprehensive evaluation module cannot determine whether the image currently captured by the camera is excellent. As a result, the method shown in Figures 5A and 5B (which immediately captures the current candidate image after detecting the user's shooting action) will miss the image at the moment of shooting, which in turn reduces the user's shooting experience.
[0124] Based on this, an embodiment of the present application provides another snapshot method. FIG6 is a flow chart of another snapshot method provided by an embodiment of the present application.
[0125] S301 : Detect a wonderful image F1 and determine F1 as a candidate image.
[0126] S302: Start timer TimerA.
[0127] S303 : Detect the wonderful image F2, update the candidate image, and reset TimerA.
[0128] S304, end.
[0129] S305 : A shooting operation is detected at time T1 , and the current candidate image is reported as a thumbnail.
[0130] Assume that at time T1 before timer A expires, the shooting detection module can detect the user's shooting operation (ie, the first shooting operation). In response to the above shooting operation, the shooting detection module can report the current candidate image as a thumbnail.
[0131] For example, after S301, if there is no new, more exciting image, the shooting detection module may report the current candidate image F1 as a thumbnail; if there is a new, more exciting image F2, the shooting detection module may report the current candidate image F2 as a thumbnail. The electronic device 100 may then display the thumbnails in a designated area of the screen.
[0132] S306: Start timer TimerB.
[0133] In response to the first shooting operation, the shooting detection module also starts timer B. Preferably, the timing duration of timer B is 0.5 seconds. Optionally, the shooting detection module may also start counter B. Counter B is used to record the number of images captured by the camera after the first shooting operation. At a frame rate of 30 FPS, counter B = 15 corresponds to a timing duration of 0.5 seconds for timer B. Therefore, the counting threshold M2 of counter B can be set to 15.
[0134] S307 : After the timer TimerB expires or a continuous shooting operation is detected, the current candidate image is captured.
[0135] While TimerB is counting, the comprehensive evaluation module can continue to identify whether the images captured by the camera include any outstanding images. Upon identifying a new outstanding image with a higher degree of outstandingness, the shot detection module can update the candidate images. After TimerB expires or a continuous shooting operation is detected, the shot detection module captures the current candidate image as the result of the first shooting operation. User shooting operations detected before TimerB expires are considered continuous shooting operations.
[0136] In this way, the electronic device 100 can avoid missing images near the time when the user takes the photo, especially the images at the time when the user takes the photo, thereby ensuring the user's shooting experience.
[0137] In one specific implementation, while TimerB is counting, the shot detection module may determine that the frame F3 following F1 is a highlight image. F3 may be the image captured by the camera at the moment the first capture operation occurs. After determining that F3 is a highlight image, the shot detection module may immediately compare F3 with the current candidate image, such as F2. If F3's highlight rating is higher than that of the current candidate image F2, the shot detection module may update the candidate image to F3. After TimerB expires or a continuous capture operation is detected, the shot detection module captures the current candidate image F3.
[0138] It is understood that after determining that wonderful image F3 is a wonderful image, and before TimerB expires, the capture detection module may continue to determine that a frame F4 following F3 is a wonderful image. In this case, the capture detection module may continue to compare wonderful image F4 with the current candidate image, such as F3. If the wonderfulness of wonderful image F4 is higher than that of the current candidate image F3, the capture detection module may continue to update the current candidate image, for example, from F3 to F4. In this case, after TimerB expires or a continuous shooting operation is detected, the capture detection module captures the current candidate image F4.
[0139] After the first shooting operation, if the candidate images are updated, such as F3 and F4, the thumbnails (such as F1 / F2) displayed by the electronic device 100 are different from the actually captured images (such as F3 / F4).
[0140] In another specific implementation, upon detecting a first capture operation, the capture detection module may buffer the image currently captured by the camera, i.e., the image captured by the camera at time T1, denoted as FT1. The capture detection module may mark FT1 as the second candidate image. The candidate image before time T1, such as F2, is also referred to as the first candidate image. Before TimerB expires, the capture detection module may further determine that a frame F5 after F1 is a highlight image. After determining highlight image F5, the capture detection module may compare highlight image F5 with the second candidate image FT1. If the highlight image F5 is higher in highlight than the second candidate image FT1, the capture detection module may update the second candidate image, for example, by updating the second candidate image from FT1 to F5. Similarly, after determining highlight image F5, the capture detection module may continue to determine more highlight images and, if a highlight image with a higher highlight is found, update the second candidate image. In this case, after TimerB expires or a continuous capture operation is detected, the capture detection module may first compare the first candidate image before time T1 with the second candidate image after time T1, and capture the more highlight image between the first and second candidate images.
[0141] S308: Set the image at the time of the continuous shooting operation as a new candidate image, start a timer, and when the timer expires and no new wonderful image is detected, capture the current candidate image (i.e., the image at the time of the continuous shooting operation).
[0142] Before time T2, when Timer B expires, the capture detection module may detect another capture operation by the user, which is recorded as a second capture operation. The second capture operation is a continuous capture operation. In response to the second capture operation, the capture detection module may capture the current candidate image as the capture result of the first capture operation.
[0143] At time T2 before timerB expires, counterB=N2, 0≤N2≤M2. The shooting detection module detects the second shooting operation at time T2, that is, the shooting detection module detects the second shooting operation when counterB=N2.
[0144] Based on the fact that the electronic device 100 should output a photo in response to a shooting operation of the user, in response to a second shooting operation, the shooting detection module needs to determine a new candidate image and capture the new candidate image as a shooting result of the second shooting operation.
[0145] Specifically, after detecting the second shooting operation, the shooting detection module may buffer the image currently captured by the camera, that is, the image captured by the camera at time T2, which is recorded as FT2 (second image). The shooting detection module may set FT2 as a new candidate image. Similarly, based on the delay in detecting wonderful photos, the shooting detection module may also start another timer. Preferably, the timing duration of the timer is the same as TimerB. Therefore, the timer may also be recorded as TimerB. Also optionally, the shooting detection module may also start another counter to record the number of images captured by the camera after the second shooting operation. Correspondingly, the counting threshold M3 of the counter may also be set to 15.
[0146] If a new wonderful image is detected before the other timer expires, the capture detection module may similarly compare the wonderfulness of the new wonderful image with the current candidate image FT2 and determine whether to retain the candidate image as FT2 or update the candidate image to the new wonderful image. After the other timer expires, the capture detection module may save the current candidate image as the capture result of the second capture operation.
[0147] During the second timer, the capture detection module may detect another capture operation by the user, which is recorded as a third capture operation. The third capture operation is a continuous capture operation. In this case, the capture detection module can immediately save the current candidate image as the capture result of the second capture operation without waiting for the second timer to expire.
[0148] In response to the third capture operation, the capture detection module can determine a new candidate image, start a new timer, and capture the current candidate image as the capture result of the third capture operation after the new timer expires or a fourth capture operation is detected. Similarly, after each continuous capture operation is detected, the capture detection module can immediately save the current candidate image as the capture result of the previous capture operation. The capture detection module can then set the image captured by the camera at the time of the most recent continuous capture operation as the candidate image and start Timer B. After Timer B expires or a new continuous capture operation is detected, the current candidate image is captured.
[0149] Similarly, after setting the image captured by the camera at the time of the most recent continuous shooting operation as a candidate image, the shooting detection module can report it to the cache. The cache control module can write the original image captured by the camera at the time of the most recent continuous shooting operation to the rotating buffer. After determining to capture the image, the capture control module can retrieve the original image from the rotating buffer, save it as a photo, and present it to the user for viewing.
[0150] In the method shown in FIG. 5A-FIG 5B and FIG. 6:
[0151] The wonderful image F1 can be called the first wonderful image, counterA can be called the first counter, the count value N1 of counterA can be called the first value, and the count threshold M1 of counterA can be called the first threshold; counterB can be called the second counter, the count value N2 of counterB can be called the second value, and the count threshold M2 of counterB can be called the second threshold; in S308, the other counter turned on after FT2 is set as the new candidate image can be called the third counter, and the count threshold M3 can be called the third threshold. The count value of the third counter when the third shooting operation is detected is the third value.
[0152] The wonderful image F2 shown in S203 may be referred to as the second wonderful image, and the wonderful images F3, F4, and F5 shown in S307 may be referred to as the third wonderful image.
[0153] FIG7A is a snapshot diagram provided in an embodiment of the present application.
[0154] As shown in FIG7A , for example, when the camera reports the 10th frame image F(10), the action detection algorithm may report the 5th frame image F(5) to the comprehensive evaluation module as a preferred action image. F(5) is, for example, image P3 shown in FIG2F . The comprehensive evaluation module may determine that F(5) is a wonderful image (the first wonderful frame). Furthermore, the shooting detection module may determine that F(5) is a candidate image and start Timer A to detect whether the user has made a shooting operation.
[0155] As shown in FIG7A , the shooting detection module can detect the user's shooting operation before timerA expires, for example, when the camera reports the 15th frame image F(15), which is recorded as Capture 1 (the first shooting operation). In response to Capture 1, the shooting detection module can immediately report the current candidate image F(5) as a thumbnail. At this time, referring to FIG2H , the user can feel in real time that a shot has been completed through the thumbnail. On the other hand, in response to Capture 1, the shooting detection module can also start timerB.
[0156] Assume that, during the period from F(10) to the end of timerB, the capture detection module does not detect any new wonderful images, that is, the current candidate image is still F(5). After timerB ends, the capture detection module can capture the current candidate image F(5) and save F(5) as the photo taken by the user's capture operation Capture 1.
[0157] During the period from F(10) to the end of timerB, the shooting detection module may detect new wonderful images.
[0158] Referring to FIG7B , in one embodiment, the shooting detection module may detect that the 12th frame image F(12) is a wonderful image (the third wonderful frame) after Capture 1. At this time, the shooting detection module may immediately compare F(5) and F(12) to determine which one is more wonderful, that is, which one has a higher degree of wonderfulness. Exemplarily, after determining that F(12) is more wonderful than F(5), the shooting detection module may update the candidate image to F(12). After timerB expires, the shooting detection module may capture the current candidate image F(12) and save F(12) as the photo taken by the user's shooting operation Capture 1.
[0159] Referring to FIG7C , in one embodiment, the shooting detection module may detect a new wonderful image before Capture 1, such as the 9th frame image F(9) (the second wonderful frame). The shooting detection module then compares F(5) and F(9) and updates the candidate image. Exemplarily, after determining that F(9) is more wonderful than F(5), the shooting detection module may update the candidate image to F(9). At the same time, the shooting detection module may reset timerA and restart the timing for 1 second. After detecting Capture 1, the shooting detection module may immediately report the current candidate image F(9) as a thumbnail. In the absence of a new more wonderful image, after timerB expires, the shooting detection module may capture the current candidate image F(9) and save F(9) as the photo taken by the user's shooting operation Capture 1. Referring to FIG7B , in the presence of a new more wonderful image, the shooting detection module may update the current candidate image. After timerB expires, the shooting detection module may capture the current candidate image. This will not be described in detail here.
[0160] The timerB started after the user's shooting operation is detected for the first time (ie, Capture 1) is recorded as timerB1.
[0161] Referring to FIG8A , before timer B1 expires, the capture detection module may detect another capture operation by the user, which is recorded as Capture 2 (the second capture operation). Capture 2 is also called the first continuous capture operation. For example, the capture detection module may detect Capture 2 when the camera reports the 19th frame image F(19) (the second image).
[0162] In the absence of a new and more exciting image, after detecting Capture 2, the shooting detection module can stop timer B1 and capture the current candidate image F(5). Similarly, referring to FIG7B , after Capture 1, if a new and more exciting image is available, the shooting detection module can update the current candidate image, and after detecting Capture 2, the shooting detection module can capture the updated current candidate image.
[0163] As shown in FIG8B , after capturing the current candidate image F(5) as the photo of Capture 1, the shooting detection module can set the image F(19) at the time of Capture 2 as the candidate image, report the current candidate image F(19) as a thumbnail, and start timerB2. Preferably, the timing duration of timerB2 is consistent with that of timerB1. In the case that there is no new wonderful image, after timerB ends or a continuous shooting operation (Capture 3, i.e., the third shooting operation) is detected again, the shooting detection module can capture the previous candidate image F(19) and save F(19) as the shooting result of Capture 2. Similarly, referring to FIG7B , after Capture 2, if there is a new and more wonderful image, the shooting detection module can update the current candidate image. After timerB ends or Capture 3 is detected, the shooting detection module can capture the updated current candidate image.
[0164] FIG9 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
[0165] 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.
[0166] The processor 110 may include one or more processing units, such as 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).
[0167] 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. The processor 110 may be coupled to various components via one or more of the above interfaces.
[0168] Internal memory 121 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). RAM can be directly read and written by processor 110 and can be used to store executable programs for an operating system or other running programs, as well as user and application data. NVM can also store executable programs and user and application data. Executable programs and user data stored in NVM can be pre-loaded into RAM for direct reading and writing by processor 110.
[0169] The computer program code for implementing the auxiliary capture method described in the embodiments of the present application can be stored in NVM. When the electronic device 100 implements the above-mentioned capture method, the processor 110 can obtain the computer program code for the above-mentioned capture method from NVM and then execute it, thereby implementing the auxiliary capture function shown in Figures 2A-2I.
[0170] 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 computer program code for implementing the auxiliary capture method described in the embodiment of the application can also be stored in an external non-volatile memory connected through the external memory interface 120.
[0171] The electronic device 100 can capture and display images through the ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0172] 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, collecting sound signals when collecting and displaying images.
[0173] The electronic device 100 can implement wireless communication functions through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0174] The touch sensor 180K is also called a "touch 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 to or near the touch sensor. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event, such as the click operation shown in Figures 2A-2I. Based on the detected touch operation, the electronic device 100 can provide visual output related to the touch operation through the display screen 194.
[0175] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may determine a shooting operation based on a user operation on the buttons 190.
[0176] It should be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. The electronic device 100 may include more or fewer components.
[0177] 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.
[0178] 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.
[0179] 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.
[0180] 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).
[0181] 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.< / canvas> < / video> < / videoview> < / imgview> < / textview>
Claims
1. A shooting method, applied to an electronic device, characterized in that The method includes: Displaying a preview interface that displays an image captured by a camera; Identifying a first wonderful image that meets a first condition from the image captured by the camera; In response to identifying the first wonderful image, setting the first wonderful image as a candidate image and starting a first counter, where the first counter is used to record the number of image frames captured by the camera after the first wonderful image is identified; Detecting a first shooting operation when the first counter counts to a first value, where the first value is less than or equal to a first threshold; in response to the first shooting operation, starting a second counter, where the second counter is used to record the number of image frames captured by the camera after the first shooting operation; After starting the second counter, saving the candidate image.
2. The method according to claim 1, wherein The step of saving the candidate image after starting the second counter specifically includes: saving the candidate image when the second counter counts to a second threshold.
3. The method according to claim 1, characterized in that, The step of saving the candidate image after starting the second counter specifically includes: detecting a second shooting operation when the second counter counts to a second value, where the second value is less than or equal to a second threshold; in response to the second shooting operation, saving the candidate image.
4. The method according to claim 3, wherein After saving the candidate image, the method further includes: Starting a third counter, updating the candidate image to a second image, where the second image is the image captured by the camera when the second shooting operation is detected, and the third counter is used to record the number of image frames captured by the camera after the second shooting operation; Saving the candidate image when the third counter counts to a third threshold; Or, detecting a third shooting operation when the third counter counts to a third value, where the third value is less than or equal to a third threshold, and in response to the third shooting operation, saving the candidate image.
5. The method according to claim 3, characterized in that, Before detecting the first shooting operation, the method further includes: Identifying a second wonderful image that meets the first condition from the image captured by the camera; When the wonderfulness of the first wonderful image is higher than that of the second wonderful image, the step of saving the candidate image specifically includes: saving the first wonderful image; When the wonderfulness of the first wonderful image is lower than that of the second wonderful image, updating the candidate image to the second wonderful image, and the step of saving the candidate image specifically includes: saving the second wonderful image.
6. The method according to claim 5, wherein When the wonderfulness of the first wonderful image is higher than that of the second wonderful image, the method further includes: in response to the first shooting operation, displaying a first thumbnail on the preview interface, where the first thumbnail is obtained based on the first wonderful image; When the wonderfulness of the first wonderful image is lower than that of the second wonderful image, the method further includes: in response to the first shooting operation, displaying a second thumbnail on the preview interface, where the second thumbnail is obtained based on the second wonderful image.
7. The method according to claim 3, characterized in that, After detecting the first shooting operation and before detecting the second shooting operation, the method further includes: Identifying a third wonderful image that meets the first condition from the images captured by the camera; When the wonderfulness of the first wonderful image is higher than that of the third wonderful image, the saving of the candidate image specifically includes: saving the first wonderful image; When the wonderfulness of the first wonderful image is lower than that of the third wonderful image, updating the candidate image to the third wonderful image, and the saving of the candidate image specifically includes: saving the third wonderful image.
8. The method according to claim 7, wherein The method further includes: in response to the first shooting operation, displaying a third thumbnail on the preview interface, the third thumbnail being obtained based on the first wonderful image.
9. The method according to any one of claims 5-8, characterized in that The wonderfulness of an image is determined according to one or more of the following: confidence level, clarity, the number and position of target shooting objects in the image, the number and position of faces, and face information.
10. The method according to claim 4, characterized in that The saving of the candidate image when the third counter counts to a third threshold specifically includes: when the third counter counts to the third threshold and no wonderful image that meets the first condition is identified during the counting of the third counter, saving the second image.
11. The method according to claim 4, characterized in that, The saving of the candidate image when the third counter counts to a third threshold specifically includes: When a fourth wonderful image that meets the first condition is identified during the counting of the third counter, updating the candidate image to the fourth wonderful image; When the third counter counts to the third threshold, saving the fourth wonderful image.
12. The method according to claim 1, wherein The meeting of the first condition specifically includes: including a first action.
13. The method according to claim 12, characterized in that The meeting of the first condition further includes one or more of the following: The clarity meets a fourth threshold; Only including one target shooting object, and the one target shooting object is complete and centered; Including multiple target shooting objects, and the multiple target shooting objects are complete.
14. The method according to claim 13, wherein The only including one target shooting object, and the one target shooting object is complete and centered specifically includes: only including one person, and the one person is complete and centered and smiling.
15. The method according to claim 2 or 3, characterized in that The first threshold is equal to 30, and the second threshold is equal to 15.
16. An electronic device, characterized in that, Including 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 a computer program, and when the one or more processors execute the computer program, the electronic device executes the method according to any one of claims 1-15.
17. A chip system, the chip system is applied to an electronic device, the chip system includes one or more processors, characterized in that, The processor is used to call and execute computer instructions so that the electronic device executes the method according to any one of claims 1-15.
18. A computer-readable storage medium, comprising a computer program, characterized in that, When the computer program runs on the electronic device, the electronic device executes the method according to any one of claims 1-15.
Citation Information
Patent Citations
Photographing control method and apparatus, terminal and storage medium
CN107155067A
Photographing method, mobile terminal and computer readable storage medium
CN107302666A
Capturing method and terminal equipment
CN108184056A
Shooting method and mobile terminal
CN108322659A
Shooting method
CN117119284A