Photographing method and related electronic device
By recognizing and capturing stunning images that meet preset conditions in electronic devices, the problem of users struggling to capture memorable moments is solved, thus enhancing the shooting experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2023-12-29
- Publication Date
- 2026-04-21
AI Technical Summary
During the shooting process, due to human reaction time delay and electronic device transmission delay, users find it difficult to capture wonderful photos of exciting moments, resulting in a decline in the shooting experience.
By implementing a shooting method in an electronic device, a wonderful image that meets preset conditions is identified in the images captured by the camera. After the wonderful image is identified, it is set as a candidate image. A counter is activated to detect the user's shooting operation. The result of the counter determines whether to capture the image, ensuring that the wonderful image expected by the user is captured.
It improves the success rate of users when shooting moving subjects, increases the accuracy of capturing wonderful images, and enhances the user's shooting experience.
Smart Images

Figure CN120282011B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminals, and more particularly to a shooting method and related electronic equipment. Background Technology
[0002] During the shooting process, due to human reaction time delays and transmission delays of electronic devices, users often find it difficult to capture truly memorable moments. This significantly reduces the user's shooting experience. Summary of the Invention
[0003] This application provides a shooting method and related electronic devices. Mobile phones, tablets, and other electronic devices can implement the above shooting method to identify exciting images during the shooting of moving objects, helping users capture memorable moments.
[0004] In a first aspect, this application provides a shooting method applied to an electronic device. The method includes: displaying a preview interface showing images captured by a camera; identifying a first highlight image that meets a first condition from the images captured by the camera; in response to identifying the first highlight image, setting the first highlight image as a candidate image, and activating a first counter, the first counter being used to record the number of image frames captured by the camera after the first highlight image is identified; 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, activating 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 activating the second counter.
[0005] Implementing the method provided in the first aspect, mobile devices such as smartphones can identify images captured by a camera and determine whether there are any outstanding images that meet preset conditions (first conditions). After identifying an outstanding image, the electronic device can set the outstanding image as a candidate image and start a counter (first counter) to detect whether there will be a shooting operation within a certain period of time. After detecting a 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 aforementioned candidate image.
[0006] In conjunction with the method provided in the first aspect, in some embodiments, after activating the second counter, saving the candidate image specifically includes: saving the candidate image when the second counter counts to a second threshold.
[0007] The electronic device can save the candidate image as the result of the user's first shooting operation when the second counter is activated and the second counter counts to the corresponding second threshold.
[0008] In conjunction with the method provided in the first aspect, in some embodiments, after activating the second counter, saving the candidate image specifically includes: detecting a second shooting operation when the second counter counts to a second value, the second value being less than or equal to a second threshold; and saving the candidate image in response to the second shooting operation.
[0009] Before the second counter reaches the corresponding second threshold, the electronic device can detect another shooting action by the user (the second shooting action). At this time, the electronic device can immediately save the candidate image as the result of the previously detected user shooting action, without having to wait for the second counter to reach the second threshold.
[0010] In conjunction with the methods provided in the above embodiments, in some embodiments, after saving the candidate image, the method further includes: activating a third counter, updating the candidate image to a second image, the second image being an image captured by the camera when the second shooting operation is detected, the third counter being 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, the third value being less than or equal to the third threshold, and saving the candidate image in response to the third shooting operation.
[0011] By implementing the above method, the electronic device can temporarily set the image at the moment the second shooting operation occurs as a candidate image after detecting a burst shooting operation (second shooting operation). After the third counter reaches the corresponding third threshold or another burst shooting operation (third shooting operation) is detected, the candidate image is saved as the result of the second shooting operation, thus continuing to help the user capture wonderful images during the burst shooting process.
[0012] In conjunction with the methods provided in the above embodiments, in some embodiments, before detecting the first shooting operation, the method further includes: identifying a second brilliant image that meets a first condition from the image captured by the camera; when the brilliance of the first brilliant image is higher than the brilliance of the second brilliant image, saving a candidate image, specifically including: saving the first brilliant image; when the brilliance of the first brilliant image is lower than the brilliance of the second brilliant image, updating the candidate image to the second brilliant image and saving the candidate image, specifically including: saving the second brilliant image.
[0013] By implementing the above method, the electronic device can continue to identify whether the image captured by the camera includes new, more exciting images that meet preset conditions during the first counter counting process, before detecting the first shooting operation. After detecting a new, more exciting image, the electronic device can update the candidate images. In this way, in response to the first shooting operation, the electronic device can output more exciting images near the first shooting operation to the user, improving the user's shooting experience.
[0014] In conjunction with the methods provided in the above embodiments, in some embodiments, when the brilliance of the first brilliant image is higher than that of the second brilliant image, the method further includes: in response to the first shooting operation, displaying a first thumbnail on the preview interface, the first thumbnail being obtained based on the first brilliant image; when the brilliance of the first brilliant image is lower than that of the second brilliant image, the method further includes: in response to the first shooting operation, displaying a second thumbnail on the preview interface, the second thumbnail being obtained based on the second brilliant image.
[0015] After detecting a shooting action, the electronic device can immediately output a thumbnail to the user based on the current candidate images, providing shooting feedback to the user.
[0016] In conjunction with the methods provided in the above embodiments, in some embodiments, after detecting the first shooting operation and before detecting the second shooting operation, the method further includes: identifying a third highlight image that meets the first condition from the image captured by the camera; when the highlight value of the first highlight image is higher than that of the third highlight image, saving the candidate image, specifically including: saving the first highlight image; when the highlight value of the first highlight image is lower than that of the third highlight image, updating the candidate image to the third highlight image and saving the candidate image, specifically including: saving the third highlight image.
[0017] By implementing the above method, after detecting the first shooting operation, the electronic device can continue to identify whether the image captured by the camera includes new exciting images that meet the preset conditions, and then determine whether to update the candidate image, so that the user can obtain more exciting images near the shooting operation and improve the user's shooting experience.
[0018] In one specific implementation, after each new highlight image is detected, the electronic device can compare the new highlight image with the current candidate image. If the new highlight image is more highlight-worthy than the current candidate image, the electronic device can immediately update the candidate image.
[0019] 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 exciting image is detected, the electronic device can compare the new exciting image and the second candidate image. When the new exciting image is more exciting 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, and determine the more exciting frame as the result of the first shooting operation, continuing to help the user capture exciting images during continuous shooting.
[0020] In conjunction with the methods provided in the above embodiments, in some embodiments, 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 highlight image.
[0021] After the shooting operation occurs and the thumbnail is displayed, the candidate image is updated but the thumbnail is not updated to avoid affecting the user's shooting experience.
[0022] In conjunction with the methods provided in the above embodiments, in some embodiments, the quality of an image is determined based on one or more of the following: confidence level, sharpness, number and location of target objects in the image, number and location of faces, and facial information.
[0023] In conjunction with the methods 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 excellent image satisfying the first condition is identified during the third counter counting period, the second image is saved.
[0024] In conjunction with the methods 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 excellent image that meets the first condition during the third counter counting period, updating the candidate image to the fourth excellent image; and saving the fourth excellent image when the third counter counts to the third threshold.
[0025] By implementing the above method, after detecting the second shooting operation, the electronic device can continue to identify whether the image captured by the camera includes new exciting images that meet the preset conditions, and then determine whether to update the candidate image, so that the user can obtain more exciting images near the second shooting operation and improve the user's shooting experience.
[0026] 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; the first action includes, but is not limited to, long jump, high jump, hurdles, basketball shooting, cat / dog jumping, and cat / dog standing.
[0027] In conjunction with the methods provided in the above embodiments, in some embodiments, satisfying the first condition further includes one or more of the following: the clarity satisfies the fourth threshold; only one target object is included, and the target object is complete and centered; multiple target objects are included, and the multiple target objects are complete.
[0028] In conjunction with the methods provided in the above embodiments, in some embodiments, only one target object is included, and the target object is complete and centered. Specifically, this includes only one person, and the person is complete, centered, and has a smiling face.
[0029] In conjunction with the methods provided in the above embodiments, in some embodiments, the first threshold is equal to 30 and the second threshold is equal to 15.
[0030] In a second aspect, this application provides an electronic device including one or more processors and one or more memories; wherein the one or more memories are coupled to one or more processors, and the one or more memories are used to store a computer program, which, when executed by one or more processors, causes the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0031] Thirdly, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the methods described in the first aspect and any possible implementation thereof.
[0032] Fourthly, this application provides a computer-readable storage medium including a computer program that, when run on an electronic device, causes the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0033] Fifthly, this application provides a computer program product containing instructions that, when the computer program product is run on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0034] Understandably, 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 execute the method provided in this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description
[0035] Figure 1 This application provides a schematic diagram of the long jump in its embodiments;
[0036] Figures 2A-2I This is a set of shooting user interfaces provided in the embodiments of this application;
[0037] Figure 3 This is a schematic diagram of the software structure of a camera application provided in an embodiment of this application;
[0038] Figure 4 This application provides a flowchart for determining outstanding images based on evaluation data.
[0039] Figure 5AThis is a flowchart of a snapshot method provided in an embodiment of this application;
[0040] Figure 5B This is a flowchart of another image capture method provided in the embodiments of this application;
[0041] Figure 6 This is a flowchart of another image capture method provided in the embodiments of this application;
[0042] Figures 7A-7C This is a snapshot illustration provided in an embodiment of this application;
[0043] Figures 8A-8B This is another snapshot illustration provided in an embodiment of this application;
[0044] Figure 9 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application. Detailed Implementation
[0045] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be a limitation of this application.
[0046] Figure 1 This application provides a schematic diagram of the long jump.
[0047] During the long jump, the athletes will present their forms in sequence. Figure 1 The five states shown are: ready, takeoff, ascent, descent, and landing. Generally, the most captivating moments for athletes are during the takeoff process (e.g., ascent and descent), especially at the highest point of their jump. Images capturing these states are considered highlight shots. Photographers most desire to capture these highlight shots during the shooting process. However, due to the extremely short duration of the long jump and human reaction time, users often find it difficult to capture such highlights.
[0048] For example, at time T3, after observing the athlete ascending, the user will click the shooting control / button to control the electronic device (including the camera and shooting control / button) to capture the currently acquired image. However, due to human reaction time, the electronic device will receive the user's click operation with a delay, for example, until time T5. At this time, the image captured by the electronic device is actually the image of the athlete in the landing state at time T5, not the image of the athlete ascending at time T3.
[0049] Not limited to Figure 1As shown in the example of long jump, in dynamic shooting scenarios such as high jump, hurdles, and basketball shooting, due to the rapid changes in movement, the target image determined by the electronic device based on the moment the user clicks (e.g., the image of the landing state at time T5) is significantly different from the exciting image expected by the user (e.g., 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.
[0050] Therefore, this application provides a method for capturing images. This method is applied to an electronic device 100. The electronic device 100 includes a camera, which can capture images.
[0051] The shooting method provided in this application embodiment allows the electronic device 100 to identify whether the subject is performing a preset action based on images captured by a camera. Upon identifying the preset action, the electronic device 100 selects the best-performing image (i.e., the "highlight image") from a set of images containing that action. After detecting the highlight image, the electronic device 100 can detect the user's shooting action. If the user's shooting action is detected within a preset time, the electronic device 100 can save the highlight image as a photo taken by the user. If the preset time ends and no user shooting action is detected, the electronic device 100 can discard the highlight image and stop detecting the user's shooting action, waiting for the next highlight image to be detected.
[0052] The above-described shooting method is also known as assisted capture. By implementing this method, the electronic device 100 can not only help the user capture exciting images while shooting moving objects, but also avoid frame-by-frame comparison, reduce computing costs, and save power consumption.
[0053] Electronic device 100 includes, but is not limited to, terminal electronic devices such as smartphones and tablets. For example, electronic device 100 may also be a laptop, desktop computer, augmented reality (AR) device, virtual reality (VR) device, wearable device, in-vehicle device, smart home device and / or smart city device. This application embodiment does not impose any special limitation on the specific type of electronic device.
[0054] first, Figures 2A-2I This is a set of shooting user interfaces provided in the embodiments of this application.
[0055] Electronic device 100 can display Figure 2A The main interface (homepage) shown is displayed. The homepage can display multiple application icons, such as the gallery app icon, weather app icon, phone app icon, camera app icon, etc. Each application icon corresponds to one application. In addition to the icons mentioned above, the homepage may also include other application icons, which will not be listed here.
[0056] like Figure 2A As shown, the electronic device 100 can detect user actions, such as clicking, on the camera application icon 211. In response to this action, the electronic device 100 can open the camera application. After opening the camera application, the electronic device 100 can display... Figure 2B The camera preview interface shown.
[0057] The camera preview interface may include control 221. Control 221 can be used to enable assisted snapshot capture. Figure 2B As shown, the electronic device 100 can detect user operations applied to the control 221. In response to the aforementioned operation, the electronic device 100 can activate auxiliary image capture. (Reference) Figure 2C After enabling assisted image capture, the electronic device 100 can display control 222 to replace control 221. Control 222 can be used to disable assisted image capture.
[0058] like Figure 2C As shown, after enabling assisted snapshot, the electronic device 100 can also simultaneously enable the automatic snapshot function, replacing control 225 displayed on the original camera preview interface with control 226. Automatic snapshot refers to a shooting method that automatically saves a captured image as a photograph after recognizing it, regardless of the user's shooting operation. Control 225 indicates that the automatic snapshot function is not enabled. Control 226 indicates that the automatic snapshot function is enabled. Figure 2B As shown in the user interface, the electronic device 100 can also detect user operations on the control 225. In response to the above operations, the electronic device 100 can activate the automatic snapshot function and replace the control 225 with the control 226. Figure 2C As shown in the user interface, the electronic device 100 can also detect user operations on the control 226. In response to the above operations, the electronic device 100 can turn off the automatic snapshot function and replace the control 226 with the control 225.
[0059] like Figure 2C As shown, after enabling assisted image capture, the electronic device 100 can also display control 227. Control 227 can be used to set the background blur level. After receiving the background blur level set by the user through control 227, the electronic device 100 can perform background blur processing on the image captured by the camera based on the aforementioned background blur level. Background blur processing includes identifying the subject in the image (e.g., a person / cat / dog, etc.) and blurring other image content outside the subject.
[0060] After enabling assisted image capture, the electronic device 100 can identify whether the subject is performing a preset action based on the image captured by the camera. These preset actions include, but are not limited to, long jump, high jump, hurdles, and basketball shooting. Understandably, depending on the developer's settings, the electronic device 100 can recognize more and richer actions. After detecting a preset action, the electronic device 100 can select the best-performing frame from a set of images containing that action. After detecting the user's shooting action, the electronic device 100 can save this best-performing frame as a photograph taken by the user.
[0061] After activating assisted snapshot, the user can hold the electronic device 100 handheld and point the camera of the electronic device 100 at the subject, for example... Figure 1 The long jumper shown. At this time, as... Figure 2D , Figure 2E , Figure 2F , Figure 2G , Figure 2H As shown, the preview window 223 of the camera preview interface can sequentially display images of the athlete in the ready, take-off, ascent, descent, and landing states. (Reference) Figure 2F When image P3 (containing an image of an athlete ascending) is displayed in preview window 223, the user can confirm that the subject in image P3 is performing exceptionally well. At this point, the user can reach out and click the shooting control 224. (Reference) Figure 2G Due to the human reaction time delay, when the electronic device 100 receives a click operation on the shooting control 224, the image displayed in the preview window 223 has already been updated to image P4. At this time, according to the existing shooting method, the electronic device 100 will save image P4 as the photo taken by the user's shooting operation.
[0062] In this embodiment, the electronic device 100 can identify a subject performing a long jump based on images captured by the camera between images P1 and P4, and determine image P3 as the best-performing image from this set of images. Therefore, the electronic device 100 can begin detecting the user's shooting action. (Reference) Figure 2G The electronic device 100 can immediately detect the user's shooting operation. In response to the shooting operation, the electronic device 100 can save image P3 as a photograph taken by the user. (See reference) Figure 2H After detecting a user's shooting action, the electronic device 100 can display a thumbnail of image P3 on the playback control 228. After detecting a user action on the playback control 228, the electronic device 100 can display... Figure 2I The gallery preview interface shown allows users to browse the shooting results.
[0063] At this point, despite the reaction time delay, with the help of the electronic device's 100% recognition of excellent images, users can also capture excellent images and have a better shooting experience.
[0064] Figure 3 This is a schematic diagram of the software structure of a camera application provided in an embodiment of this application.
[0065] like Figure 3 As shown, camera applications may include a perception layer, a decision layer, and a camera hardware abstraction layer (Camera HAL).
[0066] When the camera of electronic device 100 is turned on, it can collect light source signals and convert them into electrical signals to obtain the original image, also known as a RAW image. Figure 3 F(i-2), F(i-1), F(i), and F(i+1) are four example raw images. The camera can send the captured raw images to the camera application.
[0067] The camera can send the original image to the perception layer. Preferably, the camera can downsample the original image to obtain a smaller 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.
[0068] The perception layer contains multiple pre-built detection algorithms, such as subject detection, face detection, face attribute detection, human motion detection, other motion detection, and sharpness algorithms. Camera applications can use these pre-built algorithms to identify any frame reported by the camera and obtain evaluation data describing the content and image quality of that frame. Compared to directly processing large RAW images, small tiny images reduce the computational complexity of the detection algorithms in the perception layer, improving computation speed and allowing for faster acquisition of evaluation data for a single frame.
[0069] The decision-making layer comprehensive evaluation module can determine whether the images captured by the camera contain the exciting images that the user expects, based on the evaluation data output by each detection algorithm in the perception layer.
[0070] After the comprehensive evaluation module identifies a standout image, the capture detection module designates it as a candidate image and reports it to the HAL cache control module, i.e., sends a cache signaling message. This cache signaling message may carry a unique identifier for the candidate image. This unique identifier can be a frame number or a timestamp. The cache control module determines the original image of the candidate image based on this unique identifier and then writes the original image into the rotation buffer. Upon identifying a more standout image, the capture detection module updates the candidate images. After updating the candidate images, the capture detection module also reports the cache to the HAL cache control module. The cache control module then obtains the original image of the new candidate image and writes it into the rotation buffer.
[0071] 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 capture control module. Reporting a thumbnail means sending a thumbnail output signaling. Reporting a snapshot means sending a photo output signaling. The capture control module can obtain the corresponding original image from the rotation buffer according to the unique identifier carried in the thumbnail output signaling, set it as a thumbnail, and send it for display. The capture control module can obtain the corresponding original image from the rotation buffer according to the unique identifier carried in the photo output signaling, save it, and use it as the photo taken by the user's shooting operation.
[0072] Specifically, the subject detection algorithm in the perceptual layer can be used to identify whether an image contains a preset target object, such as a person, cat, or dog. After identifying a target object, the subject detection algorithm outputs an object bounding box, marking the object's position and size in the image. Understandably, a single image frame can contain multiple target objects. After identifying multiple target objects in the image, the subject detection algorithm can output object bounding boxes that match each of these target objects one by one.
[0073] Face detection algorithms can be used to identify whether an image contains human faces. After detecting a face, the algorithm outputs a bounding box, marking the face's position and size in the image. Similarly, a single image frame can contain multiple faces. After detecting multiple faces in an image, the algorithm outputs bounding boxes that match each face individually.
[0074] Face attribute algorithms can be used to acquire facial information. Facial information includes, but is not limited to, frontal / side profile, smiling, and open / closed eyes. In one embodiment, the face attribute algorithm can directly acquire facial information from a complete tiny image frame. In another embodiment, the face detection algorithm can also send face bounding boxes to the face attribute algorithm. The face attribute algorithm can first extract face image patches from a complete tiny image frame based on the face bounding boxes, and then acquire facial information from the face image patches, thereby improving the accuracy and speed of acquiring facial information.
[0075] Action detection algorithms include human action detection algorithms and other action detection algorithms.
[0076] Human motion detection algorithms can be used to identify whether people in an image are performing preset actions, such as the aforementioned long jump, high jump, hurdles, and basketball shooting. Other motion detection algorithms can be used to identify whether other subjects in an image, besides people, are performing other preset actions, such as cats and dogs jumping or standing.
[0077] Action detection algorithms require multiple frames of images to determine a specific action. After identifying a preset action based on these frames, the algorithm further selects the best-performing frame from them. This frame is also called the preferred action image. The criteria for "best-performing" differs for different actions. Taking the long jump as an example, the criteria for "best-performing" could be... Figure 1 The image shows the ascending state. At this point, after the long jump action is detected, an image containing the ascending state (e.g., ...) Figure 2F Image P3 shown can be identified as the preferred action image by the action detection algorithm. The criteria for the best performance of each action can be set by the R&D personnel based on experience, and are not limited here.
[0078] In identifying a preset action based on multiple frames of images, the action detection algorithm determines the confidence level of each frame. The confidence level represents the degree of similarity between the action in the image and a preset action standard template. A preset action standard template is a standard representing the best performance of an action. The higher the confidence level, the more similar the image is to the preset action standard template. The action detection algorithm then determines the best-performing frame among these multiple frames based on the confidence level; that is, the frame with the highest confidence level.
[0079] After recognizing a preset action and determining the frame with the highest confidence level, the action detection algorithm can set the scene flag to a typical scene, i.e., a highlight scene, to instruct the comprehensive evaluation module to determine that the image with the highest confidence level contains the preset action. This triggers the comprehensive evaluation module to determine whether the image is a highlight image according to preset conditions, and then triggers the shooting detection module to start assisted capture after recognizing the highlight image. By default, the scene flag is set to an atypical scene. In this case, the comprehensive evaluation module will not determine whether the image captured by the camera is a highlight image, and the shooting detection module will not perform assisted capture. In this scenario, after detecting the user's shooting operation, the electronic device 100 can perform normal shooting. Normal shooting means that after detecting the user's shooting operation, the image captured by the camera at the moment the user's shooting operation occurs is directly saved as the shooting result of the user's shooting operation.
[0080] Sharpness algorithms can be used to determine the sharpness of an image.
[0081] Understandably, the perception layer can also include more detection algorithms to obtain more evaluation data describing image content or image quality, thereby improving the accuracy of the electronic device 100 in recognizing outstanding images and enhancing the user's shooting experience. Alternatively, the perception layer can also directly obtain relevant parameters from the camera and / or other sensors during the shooting process, such as aperture, exposure, and image stabilization mode, to evaluate image content or image quality, further improving the accuracy of the electronic device 100 in recognizing outstanding images and enhancing the user's shooting experience.
[0082] Taking the i-th tiny image F(i) as an example, the subject detection module of the perception layer can first process F(i) to identify the target objects 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 faces in F(i). After identifying a face, the face detection algorithm can send F(i) to the face attribute algorithm. The face attribute algorithm can obtain the face information of F(i). After identifying a person, the subject detection module will also send F(i) to the person action detection algorithm to identify whether the person in the image is performing a preset action. After identifying other target objects in F(i), such as cats / dogs, the subject detection module will send F(i) to other action detection algorithms to identify whether other target objects in F(i) are performing other preset actions.
[0083] Figure 4 This application provides a flowchart for determining outstanding images based on evaluation data.
[0084] like Figure 4 As shown, for any given frame, 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.
[0085] The comprehensive evaluation module determines whether a frame is a preferred action image based on the output of action detection algorithms (human action detection algorithms and other action detection algorithms). After recognizing a preset action and determining a preferred action image, the action detection algorithm sends a unique identifier for the image to the comprehensive evaluation module. The comprehensive evaluation module then determines a preferred action image based on this unique identifier.
[0086] Furthermore, after determining a frame as the preferred action image, the comprehensive evaluation module can determine whether the image's sharpness is higher than a sharpness threshold (also known as the fourth threshold). The comprehensive evaluation module can receive the image's sharpness reported by the sharpness detection algorithm. If the image's sharpness is lower than the sharpness threshold, the comprehensive evaluation module can directly determine that the image is not impressive.
[0087] If the sharpness is above a sharpness threshold, the comprehensive evaluation module can determine the number of target objects in the image. The comprehensive evaluation module can determine the number of target objects in the image based on the number of object boxes reported by the subject detection algorithm. On the other hand, the comprehensive evaluation module can also determine the type of target objects in the image (human / cat / dog, etc.) based on the type of object boxes reported by the subject detection algorithm.
[0088] When an image contains only one target object, the comprehensive evaluation module can determine whether the object is complete and centered based on the position and size of the object frame. "Complete" means that all components of the target object are intact, such as a person's torso and limbs; "centered" means that the complete target object is within a preset central area of the image. After determining that the object is complete and centered, the comprehensive evaluation module can determine that the image is excellent, i.e., it is a great image. 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 object and that object is a person, the comprehensive evaluation module can also determine whether the face in the frame is facing forward, smiling, and has open eyes based on the facial information reported by the facial attribute algorithm. After determining that the object is complete, centered, facing forward, smiling, and has open eyes, 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.
[0089] When an image includes multiple subjects, the comprehensive evaluation module determines whether each subject is complete based on the position and size of its bounding box. If all subjects are complete, the comprehensive evaluation module determines the image to be excellent. Conversely, if any subject is incomplete, the comprehensive evaluation module determines the image to be unsatisfactory.
[0090] In passing Figure 4 After determining the quality of a frame using the method described above, the comprehensive evaluation module can further determine the quality level based on the image's evaluation data (number and location of target objects, number and location of faces, facial information, confidence level, sharpness, etc.). The quality level can be represented by a floating-point number between 0 and 1. The shooting detection module can determine which of two frames is more quality based on their quality levels. A larger floating-point number (closer to 1) indicates a more quality image.
[0091] Understandably, since action detection relies on multiple frames of images, there is a time delay in the action detection algorithm reporting the best action images. Correspondingly, there is also a time delay in the comprehensive evaluation module's determination of the best images.
[0092] For example, the camera currently reports the 10th frame image F(10). The single-frame detection algorithm for subject detection, face detection, and face attribute 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 after F(10), and determine whether the target subject has performed a preset action during this period based on a set of images before and after F(10), and determine the frame with the best action performance in this set of images. For example, after acquiring the 15th frame image F(15), the action detection algorithm will detect that a set of images containing F(10) (e.g., F(5)-F(15)) 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 all other preset conditions are met, the comprehensive evaluation module will determine that F(10) is the best image at F(15).
[0093] In some embodiments, when determining preferred action images, the action detection algorithm also compares the image's sharpness and the state of the target subject: whether it is complete, centered, whether the person is facing forward, smiling, and with their eyes open, etc. In this case, the comprehensive evaluation module only needs to identify 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 compelling image; conversely, it can directly determine that the image is not compelling. In this case, the comprehensive evaluation module no longer needs to check for sharpness, the number of target subjects, their positions, etc., and the perception layer no longer needs to set up algorithms such as face detection, face attribute algorithms, and sharpness algorithms.
[0094] In the above method, the confidence level of the preferred action image can be directly used to represent the quality of the image. Therefore, the comprehensive evaluation module no longer needs to determine the quality based on the confidence level of the preferred action image. The shooting detection module can directly determine which of the two best images is more exciting by using the confidence levels of the two best images.
[0095] Figure 5A This is a flowchart of a snapshot method provided in an embodiment of this application.
[0096] S101. A wonderful image F1 was detected, and F1 was determined as a candidate image.
[0097] In the comprehensive evaluation module, a single best image (F1) is determined (e.g.) Figure 2F After the image P3 shown, the image detection module can immediately determine the above-mentioned excellent image F1 as a candidate image.
[0098] S102, Start TimerA.
[0099] After determining the candidate image F1, the image capture and detection module can report the cache to the HAL cache control module. At this time, the cache signaling can carry a unique identifier for the candidate image F1. The cache control module can obtain the original image of F1 from the original image stream based on the unique identifier carried in the cache signaling, and then write the original image of F1 into the round-robin buffer.
[0100] On the other hand, after determining F1, the shooting detection module can start timerA. The shooting detection module can detect the user's shooting action during the timerA period. Preferably, the timerA duration is 1 second. The aforementioned shooting action can be... Figure 2G The touch operation shown can be applied to the shooting control 224, or it can be applied to the pressing operation on the mechanical buttons (such as the power button and volume button).
[0101] Optionally, the shooting detection module can also use a counter instead of a timer to record a period of time. The shooting detection module can detect the user's shooting operation before the counter value exceeds a threshold. The counter increments its count after the camera captures each frame.
[0102] In this embodiment, after S101, the shooting detection module can activate counterA. counterA is used to record the number of images captured by the camera after the excellent image F1 is detected. That is, when the excellent image F1 is detected, counterA = 0; thereafter, counterA increments by 1 for each frame captured by the camera. At a frame rate of 30 FPS, counterA = 30 corresponds to a timing duration of 1 second for timerA. At this time, the shooting detection module can detect the user's shooting operation while counterA ≤ 30. It is understood that other timers used in subsequent embodiments can be replaced by counters accordingly.
[0103] S103, End.
[0104] If timerA expires and no user shooting action is detected, the shooting detection flowchart ends. The shooting detection module then waits for the comprehensive evaluation module to report the next outstanding image.
[0105] S104, snapshot F1.
[0106] Suppose that at time T1, before timerA expires, the capture detection module detects a user's capture operation. This capture operation can be recorded as the first capture operation. In response to the first capture operation, the capture detection module can confirm the capture of F1.
[0107] Specifically, the capture detection module can send thumbnail output signaling and photo output signaling to the HAL capture control module, i.e., report thumbnails and report captures. In response to the thumbnail output signaling, the capture control module can retrieve the original image of F1 from the rotation buffer, generate a thumbnail, and then display the thumbnail in a designated area of the screen. (Reference) Figure 2H The electronic device 100 can display a thumbnail of image P3 in the playback control 228. In response to the aforementioned photo output signaling, the capture control module can obtain the original image of F1 from the rotation buffer and write it to the local memory. The original image of F1 stored in the local memory is the excellent photo taken by the user through the first shooting operation.
[0108] At time T1 before timerA finishes counting, counterA = N1, where 0 ≤ N1 ≤ M1. Here, M1 is the counterA counting threshold, for example, 30. The shooting detection module detects the first shooting operation at time T1, meaning the shooting detection module detects the first shooting operation when counterA = N1.
[0109] Figure 5B This is a flowchart of another image capture method provided in the embodiments of this application.
[0110] S201. A wonderful image F1 has been detected, and F1 has been determined as a candidate image.
[0111] S202, Start TimerA.
[0112] S203, A wonderful image F2 has been detected. Update the candidate images and reset TimerA.
[0113] During the TimerA timing process, the action detection algorithm can detect new preferred action images. The comprehensive evaluation module can determine a new highlight image based on these new preferred action images, denoted as F2. At this point, the capture detection module can compare the two preceding and following highlight images, F1 and F2, and determine the more impressive frame, denoted as the winning image. The capture detection module can update the candidate images based on the winning image. For example, if F1 is more impressive than F2 (i.e., F1 is the winning image), the capture detection module can determine F1 as the candidate image; if F2 is more impressive than F1 (i.e., F2 is the winning image), the capture detection module can update the candidate image to F2.
[0114] After updating the candidate images, the capture and detection module can report the cache to the HAL cache control module. The cache control module can then acquire the original image of the new candidate image and write it into the rotation buffer.
[0115] After updating the candidate image, for example, after updating the candidate image to F2, the capture detection module can reset TimerA and restart the timing. In scenarios where a new exciting image is detected but the candidate image has not been updated, TimerA will not reset and the timing will continue.
[0116] refer to Figure 4 The description explains that after identifying a standout image, the comprehensive evaluation module can determine the standout quality of this image based on evaluation parameters such as the number and location of the target subjects, the number and location of faces, facial information, confidence level, and sharpness. Alternatively, it can directly use the confidence level of the standout image to represent its standout quality. The shooting detection module can determine which standout image is more standout by comparing the standout quality of two consecutive standout images.
[0117] S204, End.
[0118] S205, Capture the current candidate image.
[0119] Before timerA expires, after detecting the user's shooting action, the shooting detection module can confirm capturing the current candidate image. For example, if the current candidate image is F1, the shooting detection module can confirm capturing F1; if the current candidate image is updated to F2, the shooting detection module can confirm capturing F2.
[0120] Understandably, during the TimerA timing process, the comprehensive evaluation module can detect new and exciting images multiple times. Correspondingly, the image detection module can update the candidate images multiple times. These will not be listed individually here.
[0121] Because of the time delay in the action detection algorithm reporting the optimal action image, the comprehensive evaluation module cannot determine whether the image captured by the current camera is compelling. This leads to... Figures 5A-5B The method shown (which captures the current candidate image immediately after detecting the user's shooting action) misses the image at the moment of shooting, which actually reduces the user's shooting experience.
[0122] Based on this, the embodiments of this application provide another method for capturing images. Figure 6 This is a flowchart of another image capture method provided in the embodiments of this application.
[0123] S301. A wonderful image F1 has been detected, and F1 has been determined as a candidate image.
[0124] S302, Start TimerA.
[0125] S303, A great image F2 has been detected. Update candidate images and reset TimerA.
[0126] S304, End.
[0127] At time S305 and T1, a shooting operation is detected, and the current candidate image is reported as a thumbnail.
[0128] Suppose that at time T1, before timerA ends, the image detection module can detect the user's shooting operation (i.e., the first shooting operation). In response to the above shooting operation, the image detection module can report the current candidate image as a thumbnail.
[0129] For example, after S301, if there is no new, more exciting image, the image detection module can report the current candidate image F1 as a thumbnail; if there is a new, more exciting image F2, the image detection module can report the current candidate image F2 as a thumbnail. Then, the electronic device 100 can display the thumbnail in a designated area of the screen.
[0130] S306, Start TimerB.
[0131] In response to the first shooting operation, the shooting detection module also activates timer B. Preferably, timer B has a duration of 0.5 seconds. Optionally, the shooting detection module can also activate 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 timer B duration of 0.5 seconds. Therefore, the corresponding counting threshold M2 of counter B can be set to 15.
[0132] S307. After the timer B finishes timing or a continuous shooting operation is detected, capture the current candidate image.
[0133] During the TimerB timing process, the comprehensive evaluation module continues to identify whether the images captured by the camera include any outstanding images. Upon identifying a new, more outstanding image, the capture detection module updates the candidate images. When the TimerB timing ends or a burst shooting operation is detected, the capture detection module captures the current candidate image as the result of the first shooting operation. The user shooting operation detected before the TimerB timing ends can be referred to as a burst shooting operation.
[0134] In this way, the electronic device 100 can avoid missing images near the moment the user takes the picture, especially images at the moment the user takes the picture, thus ensuring the user's shooting experience.
[0135] In one specific implementation, during the timing of TimerB, the capture detection module can determine that the next frame, F3, following F1, is the best image. F3 can be the image captured by the camera at the exact moment the first capture operation occurs. After determining F3 as the best image, the capture detection module immediately compares F3 with the current candidate image, such as F2. If the quality of F3 is higher than that of the current candidate image F2, the capture detection module updates the candidate image to F3. After the timing of TimerB ends or a burst shooting operation is detected, the capture detection module captures the current candidate image F3.
[0136] Understandably, after determining the best image F3, before TimerB expires, the capture detection module can continue to determine a subsequent frame, F4, as the best image. At this point, the capture detection module can continue to compare the best image F4 with the current candidate image, such as F3. When the best image F4 has a higher quality rating than the current candidate image F3, the capture detection module can update the current candidate image, for example, changing it from F3 to F4. Then, after TimerB expires or a continuous shooting operation is detected, the capture detection module captures the current candidate image F4.
[0137] After the first shooting operation, if the candidate image is updated, such as F3 or F4, the thumbnail displayed by the electronic device 100 (e.g., F1 / F2) is different from the actual captured image (e.g., F3 / F4).
[0138] In another specific implementation, upon detecting the first shooting operation, the shooting detection module can capture the image currently acquired by the camera, i.e., the image captured by the camera at time T1, denoted as FT1. The shooting detection module can mark FT1 as the second candidate image. Candidate images before time T1, such as F2, are also called the first candidate image. Before the timer B ends, the shooting detection module can also continue to determine a frame image F5 after F1 as a highlight image. After determining the highlight image F5, the shooting detection module can compare the highlight image F5 with the second candidate image FT1. When the highlight image F5 has a higher highlight value than the second candidate image FT1, the shooting detection module can update the second candidate image, for example, by updating the second candidate image from FT1 to F5. Similarly, after determining the highlight image F5, the shooting detection module can continue to determine more highlight images, and update the second candidate image when a highlight image with higher highlight value is available. At this time, after the timer B ends or a continuous shooting operation is detected, the shooting detection module can first compare the first candidate image before time T1 with the second candidate image after time T1, and capture the image with higher highlight value between the first and second candidate images.
[0139] S308. Set the image at the moment the burst shooting operation occurs as a new candidate image, start the timer, and capture the current candidate image (i.e., the image at the moment the burst shooting operation occurs) when the timer expires and no new exciting image is detected.
[0140] Before timer B expires at time T2, the capture detection module can detect the user's capture operation again, which is recorded as the second capture operation. The second capture operation is a burst capture operation. In response to the second capture operation, the capture detection module can capture the current candidate image as the capture result of the first capture operation.
[0141] At time T2, before timerB ends, counterB = N2, where 0 ≤ N2 ≤ M2. The shooting detection module detects the second shooting operation at time T2, meaning the shooting detection module detects the second shooting operation when counterB = N2.
[0142] Based on the following: the electronic device 100 should output a photo in response to a user's shooting operation. 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 the shooting result of the second shooting operation.
[0143] Specifically, after detecting the second shooting operation, the shooting detection module can pause the image currently captured by the camera, i.e., the image captured by the camera at time T2, denoted as FT2 (the second image). The shooting detection module can set FT2 as a new candidate image. Similarly, based on the time delay in detecting featured photos, the shooting detection module can also start another timer. Preferably, the duration of this timer is the same as TimerB. Therefore, this timer can also be denoted as TimerB. Optionally, the shooting detection module can 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 this counter can also be set to 15.
[0144] If a new highlight image is detected before the other timer expires, the capture detection module can similarly compare the highlight value of the new highlight image with the FT2 of the current candidate image to determine whether to keep the candidate image as FT2 or update the candidate image to the new highlight image. After the other timer expires, the capture detection module can save the current candidate image as the capture result of the second capture operation.
[0145] During the timing of the other timer mentioned above, the shooting detection module can detect the user's shooting operation again, which is recorded as the third shooting operation. The third shooting operation is a burst shooting operation. At this time, the shooting detection module can immediately save the current candidate image as the shooting result of the second shooting operation without waiting for the other timer to finish.
[0146] In response to the third shooting operation, the shooting detection module can identify new candidate images, start a new timer, and capture the current candidate image as the result of the third shooting operation after the new timer expires or after a fourth shooting operation is detected. This process continues; after each continuous shooting operation is detected, the shooting detection module can immediately save the current candidate image as the result of the previous shooting operation. Then, the shooting detection module can set the image captured by the camera at the moment the latest continuous shooting operation occurred as a candidate image and start TimerB. After TimerB expires or a new continuous shooting operation is detected, the current candidate image is captured.
[0147] Similarly, after setting the image captured by the camera at the moment of the latest burst 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 moment of the latest burst shooting operation into the rotation buffer. After determining to capture the image, the capture control module can retrieve the original image from the rotation buffer, save it as a photo, and present it to the user for viewing.
[0148] exist Figures 5A-5B , Figure 6 In the method shown:
[0149] The best image F1 can be called the first best 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, another counter that is started after FT2 is set as a new candidate image can be called the third counter, and the count threshold M3 can be called the third threshold. When the third shooting operation is detected, the count value of the third counter is the third value.
[0150] The excellent image F2 shown in S203 can be called the second excellent image. The excellent images F3, F4, and F5 shown in S307 can be called the third excellent images.
[0151] Figure 7A This is a snapshot diagram provided in an embodiment of this application.
[0152] like Figure 7A As shown, for example, when the camera reports the 10th frame image F(10), the motion detection algorithm can report the 5th frame image F(5) as the preferred motion image to the comprehensive evaluation module. The aforementioned F(5) is, for example... Figure 2FImage P3 is shown. The comprehensive evaluation module can determine F(5) as a wonderful image (first wonderful frame). Then, the shooting detection module can determine F(5) as a candidate image and start TimerA to detect whether the user has made a shooting operation.
[0153] like Figure 7A As shown, the capture detection module can detect the user's capture operation before timerA ends, for example, when the camera reports the 15th frame image F(15), denoted as Capture 1 (first capture operation). In response to Capture 1, the capture detection module can immediately report the current candidate image F(5) as a thumbnail. At this time, refer to Figure 2H Users can see the thumbnail in real time that a shot has been taken. On the other hand, in response to Capture 1, the shooting detection module can also enable timerB.
[0154] Assume that during the time from F(10) to the end of timerB, the capture detection module does not detect any new exciting images, meaning the current candidate image remains 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.
[0155] During the time from F(10) to the end of timerB, the image detection module may detect new and exciting images.
[0156] refer to Figure 7B In one embodiment, the capture detection module can detect that the 12th frame image F(12) is a highlight image (the third highlight frame) after Capture 1. At this time, the capture detection module can immediately compare F(5) and F(12) to determine which is more highlight, i.e., which has a higher highlight level. For example, after determining that F(12) is more highlight than F(5), the capture detection module can update the candidate image to F(12). After timer B ends, the capture detection module can capture the current candidate image F(12) and save F(12) as the photo taken by the user's capture operation Capture 1.
[0157] refer to Figure 7CIn one embodiment, the capture detection module can detect a new highlight image, such as frame 9 (the second highlight frame), before Capture 1. The capture detection module then compares F(5) and F(9) and updates the candidate image. For example, after determining that F(9) is more highlight than F(5), the capture detection module can update the candidate image to F(9), and simultaneously reset timerA to restart the 1-second countdown. After detecting Capture 1, the capture detection module can immediately report the current candidate image F(9) as a thumbnail. If no new more highlight image is found, after timerB has finished counting down, the capture detection module can capture the current candidate image F(9) and save F(9) as the photo taken by the user's Capture 1 operation. Reference Figure 7B When new and more exciting images are available, the image detection module can update the current candidate image. After timerB expires, the image detection module can capture the current candidate image, which will not be elaborated here.
[0158] The timerB that is activated after the first user shooting operation (i.e., Capture 1) is detected is denoted as timerB1.
[0159] refer to Figure 8A Before timerB1 expires, the capture detection module may detect the user's capture operation again, denoted as Capture 2 (second capture operation). Capture 2 is also called the first burst capture operation. For example, the capture detection module may detect Capture 2 when the camera reports the 19th frame image F(19) (second image).
[0160] If no new or more compelling images are found, the capture detection module can stop timer B1 and capture the current candidate image F(5) after detecting Capture 2. Similarly, refer to Figure 7B After Capture 1, if there are new and more exciting images, the capture detection module can update the current candidate image. After Capture 2 is detected, the capture detection module can capture the updated current candidate image.
[0161] like Figure 8BAs shown, 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 moment when Capture 2 occurs as the candidate image, report the current candidate image F(19) as a thumbnail, and start timerB2. Preferably, the timing duration of timerB2 is the same as that of timerB1. If there are no new exciting images, after the timing of timerB ends or another continuous shooting operation (Capture 3, i.e., the third shooting operation) is detected, the shooting detection module can capture the previous candidate image F(19) and save F(19) as the shooting result of Capture 2. Similarly, refer to Figure 7B After Capture2, if there are new and more exciting images, the capture detection module can update the current candidate image. After timerB ends or Capture 3 is detected, the capture detection module can capture the updated current candidate image.
[0162] Figure 9 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application.
[0163] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.
[0164] 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), etc.
[0165] Processor 110 may include one or more interfaces. These 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, etc. Processor 110 can couple various components through one or more of these interfaces.
[0166] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be used to store executable programs 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. Executable programs and user data stored in the NVM can be pre-loaded into the RAM for direct read and write operations by the processor 110.
[0167] The computer program code implementing the assisted image capture method described in this application embodiment can be stored in the NVM. When the electronic device 100 implements the above-described image capture method, the processor 110 can obtain the computer program code of the above-described image capture method from the NVM, and then execute it to achieve the desired result. Figures 2A-2I The auxiliary snapshot function shown.
[0168] 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 implementing the assisted snapshot method described in this application embodiment can also be stored in a non-volatile memory connected to an external memory via the external memory interface 120.
[0169] Electronic device 100 can capture and display images through ISP, camera 193, video codec, GPU, display screen 194, and application processor, etc.
[0170] Electronic device 100 can implement audio functions through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor, such as acquiring sound signals when acquiring and displaying images.
[0171] Electronic device 100 can realize wireless communication function through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0172] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event, such as... Figures 2A-2I The click operation is shown. Based on the detected touch operation, the electronic device 100 can provide visual output related to the touch operation via the display screen 194.
[0173] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. The electronic device 100 can determine the shooting operation through user operation on the buttons 190.
[0174] It is understood that the structure illustrated in the embodiments 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.
[0175] The term "user interface (UI)" used in the specification, claims, and drawings of this application refers to the medium through which an application or operating system interacts and exchanges information with the user. It converts information from its internal form to a form acceptable to the user. The user interface of an application is source code written in a specific computer language such as Java or Extensible Markup Language (XML). This source code is parsed and rendered on the terminal device, ultimately presenting user-recognizable content such as images, text, and buttons. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, images, and text. The attributes and content of controls in the interface are defined using tags or nodes, such as XML tags. <textview> 、 <imgview> 、
[0176] <videoview>Nodes define the controls contained in the interface. A node corresponds to a control or property in the interface, and after parsing and rendering, the node is presented as the content visible to the user. In addition, many applications, such as hybrid applications, often contain web pages within their interfaces. A web page, also known as a webpage, can be understood as a special control embedded in the application interface. Web pages are source code written in a specific computer language, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript (JS), etc. Web page source code can be loaded and displayed as user-readable content by a browser or a web page display component with browser-like functionality. The specific content contained in a webpage is also defined through tags or nodes in the webpage source code; for example, HTML uses tags or nodes to define the content. 、 、 <video> 、 <canvas>Used to define the elements and attributes of a webpage.
[0177] The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0178] As used in the specification and appended claims of this application, the singular expressions "a," "an," "the," "the," "the," and "this" are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the listed items. As used in the above embodiments, depending on the context, the term "when" can be interpreted as meaning "if..." or "after..." or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining..." or "in response to determining..." or "when (the stated condition or event) is detected" or "in response to detecting (the stated condition or event)."
[0179] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially 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, all or part of the processes or functions described in the embodiments of this application are generated. 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. 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 wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0180] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above 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 electronic devices, characterized in that, The method includes: A preview interface is displayed, showing images captured by the camera; Identify a first excellent image that meets the first condition from the images captured by the camera, determine the first excellent image as a candidate image, and start the first counter; Before the first counter finishes counting, in response to the first shooting operation, the first thumbnail corresponding to the first wonderful image is displayed in the playback control of the preview interface, and the second counter is started; When the second counter finishes counting, if no new wonderful image that meets the first condition is identified, the candidate image is saved; if a new wonderful image that meets the first condition is identified, the candidate image is updated to the new wonderful image that meets the first condition, and the updated candidate image is saved.
2. The method of claim 1, wherein, After activating the second counter, the method further includes: Before the second counter finishes counting, in response to the second shooting operation, the candidate image is saved and the third counter is started; wherein, when no new wonderful image that meets the first condition is identified, the candidate image is the first wonderful image; when a new wonderful image that meets the first condition is identified, the candidate image is the new wonderful image that meets the first condition. The candidate image is updated to the second image captured by the camera when the second shooting operation occurs, and a thumbnail corresponding to the second image is displayed in the playback control of the preview interface.
3. The method of claim 2, wherein, The method further includes: When the third counter finishes counting, if no new excellent image that meets the first condition is identified, the second image that is currently a candidate image is saved; if a new excellent image that meets the first condition is identified, the candidate image is updated to the new excellent image that meets the first condition, and the updated candidate image is saved.
4. The method of claim 2, wherein, The method further includes: Before the third counter finishes counting, in response to the third shooting operation, the candidate image is saved; wherein, when no new excellent image satisfying the first condition is identified, the candidate image is the second image; when a new excellent image satisfying the first condition is identified, the candidate image is the new excellent image satisfying the first condition.
5. The method according to any one of claims 1 to 4, characterized in that, Before detecting the first shooting operation, the method further includes: Identify new, second, impressive images that meet the first condition from the images captured by the camera; When the brilliance of the first brilliant image is lower than that of the second brilliant image, the candidate image is updated to the second brilliant image; Before the first counter finishes counting, in response to the first shooting operation, a second thumbnail corresponding to the second highlight image is displayed in the playback control of the preview interface, and the second counter is started.
6. The method of any one of claim 5, characterized in that, The quality level is determined based on one or more of the following: confidence level, sharpness, number and location of target objects in the image, number and location of faces, and facial information.
7. The method of claim 1, wherein, The fulfillment of the first condition includes: including a first action.
8. The method of claim 7, wherein, The fulfillment of the first condition also includes one or more of the following: Clarity meets the fourth threshold; It includes only one target object, and the target object is complete and centered; It includes multiple target objects, and all of the multiple target objects are complete.
9. The method of claim 8, wherein, The phrase "only one target subject" specifically includes: only one person, and the person is complete, centered, and has a smiling face.
10. The method of claim 1 or 2, wherein, The count value of the first counter is greater than the count value of the second counter.
11. An electronic device, comprising: It includes 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, which, when executed by the one or more processors, causes the electronic device to perform the method as described in any one of claims 1-10.
12. A chip system applied to an electronic device, the chip system comprising one or more processors, characterized in that, The processor is used to invoke and execute computer instructions to cause the electronic device to perform the method as described in any one of claims 1-10.
13. A computer readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-10.
Citation Information
Patent Citations
Capturing method and terminal equipment
CN108184056A
Shooting method
CN117119284A