Shooting method and related electronic equipment
By identifying and capturing wonderful images that meet the conditions in electronic devices, the problem of difficulty for users to capture wonderful photos is solved, and the shooting experience is improved.
Patent Information
- Application Number
- CN202311863466.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2043-12-29
AI Technical Summary
During the shooting process, due to the delay in human reaction and the transmission delay of electronic devices, it is difficult for users to capture wonderful photos at exciting moments, which reduces the shooting experience.
By implementing a shooting method in an electronic device, it is possible to identify the wonderful images that meet preset conditions in the images captured by the camera, and turn on the counter after identifying the wonderful images, detect the user's shooting operations, capture the images that meet the conditions, and avoid 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 user's shooting experience.
Smart Images

Figure CN120282011A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminals, and in particular, to a shooting method and related electronic devices. Background Art
[0002] During the shooting process, due to problems such as the reaction delay of people and the transmission delay of electronic devices, it is often difficult for users to capture wonderful photos at truly wonderful moments. This greatly reduces the shooting experience of users. Summary of the Invention
[0003] This application provides a shooting method and related electronic devices. Electronic devices such as mobile phones and tablet computers can implement the above shooting method to identify wonderful images during the process of shooting moving objects and help users capture wonderful images.
[0004] In a first aspect, this application provides a shooting method applied to an electronic device. The method includes: displaying a preview interface, where the preview interface displays an image collected by a camera; identifying a first wonderful image that meets a first condition from the images collected 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 collected 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 collected by the camera after the first shooting operation; and saving the candidate image after the second counter is started.
[0005] By implementing the method provided in the first aspect, electronic devices such as mobile phones can identify the images collected by the camera and determine whether there are wonderful images that meet the preset conditions (the first condition). After identifying a wonderful image, the electronic device can set the wonderful image as a candidate image and start a counter (the first counter) to detect whether there is a shooting operation within a future period of time. After detecting a shooting operation (the first shooting operation), the electronic device can start another counter (the second counter). After the second counter is started, the electronic device can capture the above candidate image.
[0006] 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.
[0007] The electronic device can save the candidate image when the second counter is started and the second counter counts to the corresponding second threshold as the result of the user's first shooting operation.
[0008] 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.
[0009] Before the second counter count reaches the corresponding second threshold, the electronic device can detect another shooting operation (second shooting operation) of the user. At this time, the electronic device can immediately save the candidate image as a result of the user shooting operation detected before, without having to wait until the second counter count reaches the second threshold.
[0010] In combination with the method provided in the above embodiments, in some embodiments, after saving the candidate image, the method also includes: starting a third counter to update the candidate image to a second image, the second image being an image captured by the camera when a 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, a third shooting operation is detected, the third value is less than or equal to the third threshold, and in response to the third shooting operation, saving the candidate image.
[0011] By implementing the above method, the electronic device can, after detecting a continuous shooting operation (second shooting operation), temporarily determine the image at the time when the second shooting operation occurs as a candidate image, and after the third counter counts to reach the corresponding third threshold or detects another continuous shooting operation (third shooting operation), 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.
[0012] 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.
[0013] By implementing the above method, the electronic device can continue to identify whether the images captured by the camera include new wonderful images that meet the preset conditions before detecting the first shooting operation during the counting process of the first counter. After detecting a new more wonderful image, the electronic device can update the candidate image. In this way, in response to the first shooting operation, the electronic device can output to the user more wonderful images near the first shooting operation, thereby improving the user's shooting experience.
[0014] Combined with the method provided in the above embodiments, in some embodiments, when the highlight degree of the first highlight image is higher than that of the second highlight 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 highlight image; when the highlight degree of the first highlight image is lower than that of the second highlight 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 highlight image.
[0015] After detecting a shooting operation, the electronic device can immediately output a thumbnail based on the current candidate image to give the user shooting feedback.
[0016] Combined 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 further includes: recognizing a third highlight image that meets the first condition from the images captured by the camera; when the highlight degree 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 degree 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] Implementing the above method, after detecting the first shooting operation, the electronic device can continue to recognize whether the images captured by the camera include new highlight images that meet the preset conditions, and then determine whether to update the candidate image, so that the user can obtain more highlight images near the shooting operation and improve the user shooting experience.
[0018] In a specific implementation manner, after detecting each new highlight image, the electronic device can compare the new highlight image with the current candidate image. When the new highlight image is more highlight than the current candidate image, the electronic device can immediately update the candidate image.
[0019] In another specific implementation manner, after the first shooting operation, the electronic device can set the second image captured by the camera when detecting the second shooting operation as another candidate image, such as the second candidate image, and the candidate image before the second shooting operation is also called the first candidate image. After detecting each new highlight image, the electronic device can compare the new highlight image with the second candidate image. When the new highlight image is more highlight than the second candidate image, the electronic device can immediately update the second candidate image. After the second counter counts up to the corresponding second threshold or after detecting the second shooting operation, the electronic device can compare the first candidate image and the second candidate image, and determine the more highlight one of the two as the result of the first shooting operation, and continue to help the user capture highlight images during continuous shooting.
[0020] In combination with the method provided in the above embodiments, in some embodiments, the method further includes: in response to a first shooting operation, displaying a third thumbnail in a preview interface, where the third thumbnail is obtained based on a first wonderful image.
[0021] After the shooting operation occurs and after the thumbnail is displayed, the candidate image is updated but the thumbnail is not updated, so as to avoid affecting the user's shooting experience.
[0022] In combination with the method provided in the above embodiments, in some embodiments, the wonderfulness of an image is determined according to one or more of the following: confidence, clarity, the number and position of target shooting objects in the image, the number and position of faces, and face information.
[0023] In combination with the method provided in the above embodiments, in some embodiments, when a third counter counts to a third threshold, saving the candidate image specifically includes: when the third counter counts to the third threshold and no wonderful image satisfying the first condition is recognized during the counting of the third counter, saving the second image.
[0024] In combination with the method provided in the above embodiments, in some embodiments, when a third counter counts to a third threshold, saving the candidate image specifically includes: when a fourth wonderful image satisfying the first condition is recognized 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.
[0025] When implementing the above method, after detecting a second shooting operation, the electronic device can also continue to identify whether the images captured by the camera include new wonderful images satisfying a preset condition, and then determine whether to update the candidate image, so that the user can obtain more wonderful images near the second shooting operation, improving the user's shooting experience.
[0026] In combination with the method provided in the above embodiments, in some embodiments, satisfying the first condition specifically includes: including a first action. Wherein, the first action is preset; the first action includes but is not limited to long jump, high jump, hurdles, shooting, jumping of cats and dogs, standing of cats and dogs.
[0027] In combination with the method provided in the above embodiments, in some embodiments, satisfying the first condition further includes one or more of the following: the clarity satisfies a fourth threshold; only includes one target shooting object, and the one target shooting object is complete and centered; includes multiple target shooting objects, and the multiple target shooting objects are complete.
[0028] In combination with the method provided in the above embodiments, in some embodiments, only includes one target shooting object, and the one target shooting object is complete and centered, specifically includes: only includes one person, and the one person is complete and centered and smiling.
[0029] In some embodiments, in combination with the method provided in the above embodiments, the first threshold is equal to 30 and the second threshold is equal to 15.
[0030] In a second aspect, the present application provides an electronic device, which 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. When the one or more processors execute the computer program, the electronic device is caused to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0031] In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the processor is used to call computer instructions to cause the electronic device to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0032] In a fourth aspect, the present application provides a computer-readable storage medium, including a computer program. When the computer program runs on an electronic device, the electronic device is caused to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0033] In a fifth aspect, the present application provides a computer program product containing instructions. When the computer program product runs on an electronic device, the electronic device is caused to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0034] It can be understood 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 execute the method provided in the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, and will not be elaborated here. Description of the Drawings
[0035] Figure 1 is a schematic diagram of long jump provided by an embodiment of the present application;
[0036] Figures 2A - 2I is a set of captured user interfaces provided by an embodiment of the present application;
[0037] Figure 3 is a schematic software structure diagram of a camera application provided by an embodiment of the present application;
[0038] Figure 4 is a flowchart for determining excellent images according to evaluation data provided by an embodiment of the present application;
[0039] Figure 5AIt is a flowchart of a snapshot method provided by an embodiment of the present application;
[0040] Figure 5B It is a flowchart of another snapshot method provided by an embodiment of the present application;
[0041] Figure 6 It is a flowchart of yet another snapshot method provided by an embodiment of the present application;
[0042] Figures 7A - 7C It is a snapshot schematic diagram provided by an embodiment of the present application;
[0043] Figures 8A - 8B It is another snapshot schematic diagram provided by an embodiment of the present application;
[0044] Figure 9 It is a schematic structural diagram of the electronic device 100 provided by an embodiment of the present application. Detailed implementation manners
[0045] 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.
[0046] Figure 1 It is a long jump schematic diagram provided by an embodiment of the present application.
[0047] During the long jump process of the athlete, the athlete will successively present Figure 1 the 5 states shown: preparation, takeoff, ascent, descent, landing. Generally, during the takeoff process (such as ascent and descent), the athlete, especially the athlete at the highest point of takeoff, is the most attractive. An image containing the above states can be called a wonderful image. During the snapshot process, the photographer most hopes to capture the above wonderful image. However, due to the extremely short duration of the long jump process and the reaction time of people, etc., users often have difficulty capturing wonderful images.
[0048] For example, at time T3, after observing the athlete in the ascent state, the user will click the shooting control / button to control the electronic device (including the camera and the shooting control / button) to shoot the image currently collected. However, due to the reaction time of people, the moment when the electronic device receives the user's click operation will be delayed, for example, delayed to time T5. At this time, the image captured by the electronic device during the shooting operation is actually an image of the landing state at time T5, rather than an image of the ascent state at time T3.
[0049] Not limited to Figure 1In the long jump shown, in dynamic shooting scenarios 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 when it receives the user's click operation (for example, the image of the landing state at time T5) is significantly different from the wonderful image expected by the user (for example, the image of the ascending state at time T3), which does not meet the user's expectations and thus greatly affects the user's shooting experience.
[0050] In view of this, embodiments of the present application provide a shooting method. This method is applied to the electronic device 100. The electronic device 100 includes a camera and can collect images through the camera.
[0051] When implementing the shooting method provided by the embodiments of the present application, the electronic device 100 can identify whether the shooting object makes a preset action through the images collected by the camera, and after identifying the preset action, determine the best-performing image, that is, the wonderful image, from a group of images including this action. 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 wonderful image as the photo taken by the user's shooting operation; if the preset time ends and the user's shooting operation is not detected, the electronic device 100 can discard the above wonderful image and stop detecting the user's shooting operation, waiting for the next detection of the wonderful image.
[0052] The above shooting method is also called assisted capture. By implementing the above method, the electronic device 100 can not only help the user capture wonderful images during the process of shooting moving objects, but also avoid frame-by-frame comparison, reduce the computing cost, and save power consumption.
[0053] The electronic device 100 includes but is not limited to terminal electronic devices such as smart phones and tablet computers. Exemplarily, the electronic device 100 can also be a laptop computer, a desktop computer, an augmented reality (AR) device, a virtual reality (VR) device, a wearable device, a vehicle-mounted device, a smart home device, and / or a smart city device. Embodiments of the present application do not impose special restrictions on the specific type of this electronic device.
[0054] First, Figures 2A - 2I is a set of shooting user interfaces provided by embodiments of the present application.
[0055] The electronic device 100 can display Figure 2A the main interface (homepage) shown. Multiple application icons can be displayed in the main interface, such as the gallery application icon, the weather application icon, the phone application icon, the camera application icon 211, etc. One application icon corresponds to one application program. Not limited to the above icons, the main interface may also include other application program icons, which will not be listed one by one here.
[0056] As shown Figure 2A in FIG. 1, the electronic device 100 can detect a user operation acting on the camera application icon 211, such as a click operation. In response to the above operation, the electronic device 100 can launch the camera application. After launching the camera application, the electronic device 100 can display Figure 2B the camera preview interface as shown in FIG. 2.
[0057] The camera preview interface may include a control 221. The control 221 can be used to enable assisted capture. As shown Figure 2B in FIG. 3, the electronic device 100 can detect a user operation acting on the control 221. In response to the above operation, the electronic device 100 can enable assisted capture. Referring to Figure 2C FIG. 4, after enabling assisted capture, the electronic device 100 can display a control 222 replacing the control 221. The control 222 can be used to disable assisted capture.
[0058] As shown Figure 2C in FIG. 5, after enabling assisted capture, the electronic device 100 can also simultaneously enable the automatic capture function and replace the control 225 originally displayed in the camera preview interface with a control 226. Automatic capture refers to a shooting method of automatically saving a wonderful image as a photo after recognizing the wonderful image without considering the user's shooting operation. The control 225 is used to indicate that the automatic capture function is not enabled. The control 226 is used to indicate that the automatic capture function is enabled. In the user interface shown Figure 2B in FIG. 6, the electronic device 100 can also detect a user operation on the control 225. In response to the above operation, the electronic device 100 can enable the automatic capture function and replace the control 225 with the control 226. In the user interface shown Figure 2C in FIG. 7, the electronic device 100 can also detect a user operation on the control 226. In response to the above operation, the electronic device 100 can disable the automatic capture function and replace the control 226 with the control 225.
[0059] As shown Figure 2C in FIG. 8, after enabling assisted capture, the electronic device 100 can also display a control 227. The control 227 can be used to set the background blur degree. After receiving the background blur degree set by the user through the control 227, the electronic device 100 can perform background blur processing on the image captured by the camera based on the above background blur degree. The background blur processing includes identifying the shooting object (such as a person / cat / dog, etc.) in the image and blurring other image contents outside the shooting object.
[0060] After enabling assisted capture, the electronic device 100 can identify whether the subject makes a preset action through the images captured by the camera. The above-mentioned preset actions include, but are not limited to, long jump, high jump, hurdles, and shooting. It can be understood that according to the settings of the R & D personnel, the electronic device 100 can identify 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 the photo taken by the user's shooting operation.
[0061] After enabling assisted capture, the user can hold the electronic device 100 and align the camera of the electronic device 100 with the subject, such as Figure 1 the long jumper shown. At this time, as Figure 2D , Figure 2E , Figure 2F , Figure 2G , Figure 2H shown, the 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 the preview window 223 displays the image P3 (the image of the athlete in the ascending state), the user can determine that the performance of the subject in the image P3 is very wonderful. At this time, the user can reach out and click on the shooting control 224. Referring to Figure 2G , due to the reaction time delay of the human, when the electronic device 100 receives the click operation on the shooting control 224, the image displayed in the preview window 223 has been updated to the image P4. At this time, according to the existing shooting method, the electronic device 100 will save the image P4 as the photo taken by the user's shooting operation.
[0062] In the embodiment of the present application, the electronic device 100 can identify that the subject makes a long jump action according to the images captured by the camera between the images P1 - P4, and determine that the image P3 is the best-performing wonderful image from this group of images. Then, the electronic device 100 can start to detect 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 shooting operation, the electronic device 100 can save the image P3 as the 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 the image P3 on the review control 228. After detecting the user operation on the review control 228, the electronic device 100 can display Figure 2I the gallery preview interface shown for the user to browse the shooting results.
[0063] At this time, despite the reaction time delay, with the help of the electronic device 100 recognizing excellent images, users can also capture excellent images and obtain a better shooting experience.
[0064] Figure 3 It is a schematic software structure diagram of a camera application provided by an embodiment of the present application.
[0065] As Figure 3 shown, the camera application may include a perception layer, a decision layer, and a camera hardware abstraction layer (Camera HAL).
[0066] After the camera of the electronic device 100 is turned on, it can collect light source signals and convert them into electrical signals to obtain a raw image, also known as a RAW map. Figure 3 In it, F(i - 2), F(i - 1), F(i), and F(i + 1) are 4 frames of raw images given as examples. The camera can send the collected raw images to the camera application.
[0067] The camera can send the raw images to the perception layer. Preferably, the camera can perform downsampling on the raw images to obtain a small-sized processed image, also called a tiny map. Exemplarily, the size of the RAW map before downsampling can be 3024 * 4032(p), and the size of the tiny map after downsampling can be 378 * 502(p). The camera can send the tiny map obtained after downsampling to the perception layer instead of directly sending the raw images.
[0068] Multiple detection algorithms are preset in the perception layer, such as a subject detection algorithm, a face detection algorithm, a face attribute algorithm, a human action detection algorithm, other action detection algorithms, and a sharpness algorithm. The camera application can identify any frame of the image reported by the camera through the algorithms preset in the perception layer and obtain evaluation data describing the content and image quality of the frame. Compared with directly processing large-sized RAW maps, small-sized tiny maps can reduce the computational complexity of the detection algorithms in the perception layer and improve the calculation speed, so as to obtain the evaluation data of a frame of image more quickly.
[0069] The comprehensive evaluation module in the decision layer can determine whether there is an excellent image expected by the user in the image collected by the camera according to the evaluation data output by each detection algorithm in the perception layer.
[0070] 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 may carry the unique identifier of 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 according to the above unique identifier, and then write the above original image into the rotation 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 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 the thumbnail and the capture to the capture control module. Reporting the thumbnail means sending a thumbnail output signaling. Reporting the capture 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 the thumbnail and display it. 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 and save it as the photo taken by the user's shooting operation.
[0072] Specifically, the object detection algorithm in the perception layer can be used to identify whether the image includes a preset target shooting object, such as a person, a cat, a dog, etc. After identifying a target shooting object, the object detection algorithm can output an object box to mark the position and size of the object in the image. It can be understood that a frame of image may include multiple target shooting objects. After identifying multiple target shooting objects in the image, the object detection algorithm can output object boxes that match these multiple target shooting objects one by one.
[0073] The face detection algorithm can be used to identify whether the image includes a face. After identifying a face, the face detection algorithm can output a face box to mark the position and size of the face in the image. Similarly, a frame of image may include multiple faces. After identifying multiple faces in the image, the face detection algorithm can output object boxes that match these multiple faces one by one.
[0074] The face attribute algorithm can be used to obtain face information. The face information includes but is not limited to frontal / side face, smile, eyes open / closed. In one embodiment, the face attribute algorithm can directly obtain face information from a complete tiny image. In another embodiment, the face detection algorithm can also send the face box to the face attribute algorithm. The face attribute algorithm can first extract a face image block from a complete tiny image according to the face box, and then obtain face information from the face image block to improve the accuracy and speed of obtaining face information.
[0075] Motion detection algorithms include human motion detection algorithms and other motion detection algorithms.
[0076] The human action detection algorithm can be used to identify whether the human in the image performs a preset action, such as the long jump, high jump, hurdle jump, shooting, etc. The other action detection algorithm can be used to identify whether other target subjects other than human in the image perform other preset actions, such as cats and dogs jumping, standing, etc.
[0077] The action detection algorithm needs to identify a specific action through multiple frames of images. After identifying a preset action based on multiple frames of images, the action detection algorithm is also used to select the best performance frame from these multiple frames. This frame of image is also called the preferred action image. Different actions have different best performance standards. Taking long jump as an example, the best performance standard can be Figure 1 At this time, after the long jump action is detected, the image containing the rising state (for example Figure 2F The image P3) shown can be determined as a preferred action image by the action detection algorithm. The best performance standard for each action can be set by the R&D personnel based on experience and is not limited here.
[0078] When a preset action is recognized based on multiple frames of images, the action detection algorithm can determine the confidence of each frame of the image. The confidence can be used to indicate the similarity between the action in the image and the preset action standard template. A preset action standard template is a standard for the best performance of an action. The higher the confidence, the more similar the image is to the preset action standard template. The action detection algorithm can determine the best performance frame among the multiple frames of images, that is, the frame with the highest confidence, based on the confidence.
[0079] 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 when the user's shooting operation occurs as the shooting result of the user's shooting operation.
[0080] A sharpness algorithm can be used to determine the sharpness of an image.
[0081] It can be understood that the perception layer may further include more detection algorithms to obtain more evaluation data for describing the image content or image quality, so as to improve the accuracy of the electronic device 100 in identifying wonderful images and enhance the user's shooting experience. Alternatively, the perception layer may directly obtain relevant parameters during the shooting process from the camera and / or other sensors, such as aperture, exposure, anti-shake mode, etc., for evaluating the image content or image quality, improving the accuracy of the electronic device 100 in identifying wonderful images, and enhancing the user's shooting experience.
[0082] Taking the i-th frame of tiny image F(i) as an example, the main body detection module of the perception layer may first process F(i) to identify the target shooting object in F(i). After identifying a person, the main body detection module may send F(i) to the face detection algorithm. The face detection algorithm may then identify the face in F(i). After identifying the face, the face detection algorithm may send F(i) to the face attribute algorithm. The face attribute algorithm may obtain the face information of F(i). After identifying a person, the main body detection module will also send F(i) to the human action detection algorithm to identify whether the person in the image makes a preset action. After identifying that F(i) includes other target shooting objects such as cats / dogs, the main body detection module will send F(i) to other action detection algorithms to identify whether other target shooting objects in F(i) make other preset actions.
[0083] Figure 4 It is a flowchart for determining wonderful images according to evaluation data provided by an embodiment of the present application.
[0084] As Figure 4 shown, for any frame of image, the comprehensive evaluation module may first determine whether the image is a preferred action image. If the image is not a preferred action image, the comprehensive evaluation module may directly determine that the image is not wonderful.
[0085] Among them, the comprehensive evaluation module may determine whether a frame of image is a preferred action image according to the outputs of the action detection algorithms (human action detection algorithm and other action detection algorithms). After the action detection algorithm identifies a preset action and determines a frame of preferred action image, it will send a unique identifier of an image to the comprehensive evaluation module. The comprehensive evaluation module may determine a frame of preferred action image according to the above unique identifier.
[0086] Further, after determining that a frame of image is a preferred action image, the comprehensive evaluation module may determine whether the clarity of the image is higher than the clarity threshold (the clarity threshold is also called the fourth threshold). The comprehensive evaluation module may receive the clarity of the image reported by the clarity detection algorithm. If the clarity of the image is lower than the clarity threshold, the comprehensive evaluation module may directly determine that the image is not wonderful.
[0087] When the clarity is higher than the clarity threshold, the comprehensive evaluation module can determine the number of target shooting objects in the image. The comprehensive evaluation module can determine the number of target shooting objects in the image according to the number of object frames reported by the subject detection algorithm. On the other hand, the comprehensive evaluation module can also determine the type of the target shooting object (person / cat / dog, etc.) in the image according to the type of the object frame reported by the subject detection algorithm.
[0088] When there is only one target shooting object in the image, the comprehensive evaluation module can determine whether the above object is complete and centered according to the position and size of the object frame. Among them, complete means that the components of the target shooting object are complete. For example, the torso and limbs of a person are complete; centered means that the complete target shooting object is within the preset image center area. After determining that the object is complete and centered, the comprehensive evaluation module can determine that the image is wonderful, that is, determine that the image is a wonderful image; if any of the above conditions is not met, the comprehensive evaluation module can determine that the image is not wonderful. When there is only one target shooting object in the image and the object is a person, the comprehensive evaluation module can also determine whether the face in this frame of image is a frontal face, smiling, and with eyes open according to the face information reported by the face attribute algorithm. After determining that the object is complete, centered, frontal face, smiling, and with eyes open, the comprehensive evaluation module can determine that the image is wonderful. Conversely, if any of the above conditions is not met, the comprehensive evaluation module can determine that the image is not wonderful.
[0089] When there are multiple target shooting objects in the image, the comprehensive evaluation module can determine whether each target shooting object is complete according to the position and size of each object frame. When all target shooting objects are complete, the comprehensive evaluation module can determine that the image is wonderful. Conversely, if any one object is incomplete, the comprehensive evaluation module can determine that the image is not wonderful.
[0090] After determining that a frame of image is wonderful by Figure 4 the method described above, the comprehensive evaluation module can also determine the wonderful degree based on the evaluation data of the image (the number and position of target shooting objects, the number and position of faces, face information, confidence level, clarity, etc.). The wonderful degree can be represented by a floating point number from 0 to 1. The shooting detection module can determine which of the two frames of images is more wonderful through the wonderful degrees of the two frames of wonderful images. Among them, the larger the floating point number (that is, the closer it is to 1), the more wonderful the image is.
[0091] It can be understood that since action detection depends on multiple frames of images. There is a time delay in the action detection algorithm reporting the preferred action image. Correspondingly, there is also a time delay in the comprehensive evaluation module's determination of wonderful images.
[0092] Exemplarily, the camera currently reports the 10th frame of image F(10) collected. The main detection algorithm for single-frame detection, face detection algorithm, and face attribute algorithm 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 shooting object makes 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. Exemplarily, after the 15th frame of image F(15) is collected, the action detection algorithm detects that a preset action is included in a group of images containing F(10) (such as F(5)-F(15)), and determines that F(10) is the preferred action image. At this time, the comprehensive evaluation module determines that F(10) is the preferred action image at F(15), and then, when other preset conditions are met, the comprehensive evaluation module determines that F(10) is an excellent image at F(15).
[0093] In some embodiments, when the action detection algorithm determines the preferred action image, it also compares the clarity of the image and the state of the target shooting object: whether it is complete, whether it is centered, whether the person's face is frontal, smiling and with eyes open, etc. At this time, the comprehensive evaluation module only needs to identify whether the image is the preferred action image. For the preferred action image marked by the action detection algorithm, the comprehensive evaluation module can directly determine that the image is an excellent image; otherwise, the comprehensive evaluation module can directly determine that the image is not excellent. At this time, the comprehensive evaluation module does not need to check aspects such as clarity, the number of target shooting objects, and position, and the perception layer does not need to set algorithms such as face detection algorithm, face attribute algorithm, and clarity algorithm either.
[0094] In the above method, the confidence of the preferred action image can be directly used to represent the excellence of the image. At this time, the comprehensive evaluation module does not need to determine the excellence based on the confidence of the preferred action image anymore. The shooting detection module can directly determine which of the two excellent images is more excellent through the confidence of the two excellent images.
[0095] Figure 5A It is a flowchart of a snapshot method provided by an embodiment of the present application.
[0096] S101. Detect the excellent image F1 and determine F1 as the candidate image.
[0097] After the comprehensive evaluation module determines an excellent image F1 (such as the image P3 shown Figure 2F ), the shooting detection module can immediately determine the above excellent image F1 as the candidate image.
[0098] S102. Start the timer TimerA.
[0099] After determining the candidate image F1, the shooting detection module may report the cache to the HAL cache control module. At this time, the unique identifier of the candidate image F1 may be carried in the cache signaling. The cache control module may obtain the original image of F1 from the original image stream according to the unique identifier carried in the cache signaling, and then write the original image of F1 into the circular buffer.
[0100] On the other hand, after determining F1, the shooting detection module may start a timer timerA. The shooting detection module may detect the user's shooting operation during the timing of timerA. Preferably, the timing duration of timerA is 1 second. The above shooting operation may be Figure 2G the touch operation acting on the shooting control 224 as shown, or the pressing operation acting on the mechanical keys (such as the power key, volume key).
[0101] Optionally, the shooting detection module may also use a counter instead of a timer to record a period of time. The shooting detection module may detect the user's shooting operation before the count value of the counter exceeds the threshold. Among them, the counter increases the count value every time the camera captures a frame of image.
[0102] In the embodiment of the present application, after S101, the shooting detection module may start counterA. 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; after that, every time the camera captures a frame of image, the count of counterA increases by 1. In the case of a frame rate of 30 FPS, counterA = 30 corresponds to the timing duration of timerA of 1 second. At this time, the shooting detection module may detect the user's shooting operation during the process of counterA ≤ 30. It can be understood that other timers used in subsequent embodiments can be correspondingly replaced with counters.
[0103] S103. End.
[0104] In the case where the timing of timerA ends and the user's shooting operation is not detected, the shooting detection flowchart ends. The shooting detection module waits for the next report of the wonderful image by the comprehensive evaluation module.
[0105] S104. Capture F1.
[0106] Suppose that at time T1 before the timing of timerA ends, the shooting detection module detects the user's shooting operation. This shooting operation may be recorded as the first shooting operation. In response to the above first shooting operation, the shooting detection module may confirm the capture of F1.
[0107] Specifically, the shooting detection module may send a thumbnail output signaling and a photo output signaling to the HAL capture control module, that is, report the thumbnail and report the capture. In response to the above thumbnail output signaling, the capture control module may obtain the original image of F1 from the circular buffer, generate a thumbnail, and then display the above thumbnail in a specified area of the screen. Refer to Figure 2H , the electronic device 100 may display a thumbnail of the image P3 in the review control 228. In response to the above photo output signaling, the capture control module may obtain the original image of F1 from the circular buffer and write it into 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.
[0108] At the moment T1 before the timer A times out, it may correspond to counter A = N1, 0 ≤ N1 ≤ M1. Where M1 is the counting threshold of counter A, for example, 30. The shooting detection module detects the first shooting operation at the moment T1, that is, the shooting detection module detects the first shooting operation when counter A = N1.
[0109] Figure 5B is a flowchart of another capture method provided by an embodiment of the present application.
[0110] S201. Detect the wonderful image F1 and determine F1 as the candidate image.
[0111] S202. Start the timer TimerA.
[0112] S203. Detect the wonderful image F2, update the candidate image, and reset TimerA.
[0113] During the timing of TimerA, the motion detection algorithm may detect a new preferred motion image, and the comprehensive evaluation module may determine a new wonderful image according to the above new preferred motion image, denoted as F2. At this time, the shooting detection module may compare the two consecutive wonderful images: F1 and F2, and determine the more wonderful one from the two consecutive wonderful images, denoted as the winning image. The shooting detection module may update the candidate image according to the winning image. For example, in the case where F1 is more wonderful than F2, that is, in the case where F1 is the winning image, the shooting detection module may determine F1 as the candidate image; in the case where F2 is more wonderful than F1, that is, in the case where F2 is the winning image, the shooting detection module may update the candidate image to F2.
[0114] After updating the candidate image, the shooting detection module may report the cache to the HAL cache control module. The cache control module may obtain the original image of the new candidate image and write it into the circular buffer.
[0115] After updating the candidate image, for example, after updating the candidate image to F2, the shooting detection module can reset TimerA and start timing again. In the scenario where a new wonderful image is detected but the candidate image is not updated, TimerA is not reset and continues to count.
[0116] Reference Figure 4 As introduced in, after determining a wonderful image frame, the comprehensive evaluation module can determine the wonderfulness of this image frame according to evaluation parameters such as the number and position of the target shooting objects, the number and position of faces, face information, confidence level, clarity, etc., or directly use the confidence level of the wonderful image to represent the wonderfulness of this image frame. The shooting detection module can determine which one is more wonderful according to the wonderfulness of the two consecutive wonderful image frames.
[0117] S204. End.
[0118] S205. Capture the current candidate image.
[0119] Before the timing of timerA ends, after detecting the user's shooting operation, the shooting detection module can confirm to capture the current candidate image. Exemplarily, if the current candidate image is F1, the shooting detection module can confirm to capture F1; if the current candidate image is updated to F2, the shooting detection module can confirm to capture F2.
[0120] It can be understood 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 image multiple times. This is not listed one by one here.
[0121] Due to the time delay in reporting the preferred action image by the action detection algorithm, the comprehensive evaluation module cannot determine whether the image captured by the current camera is wonderful. This results in Figures 5A - 5B the method shown (the method of immediately capturing the current candidate image after detecting the user's shooting operation) will miss the image at the shooting moment, and the result will instead reduce the user's shooting experience.
[0122] Based on this, the embodiments of the present application provide another capture method. Figure 6 It is a flowchart of another capture method provided by the embodiments of the present application.
[0123] S301. Detect the wonderful image F1 and determine F1 as the candidate image.
[0124] S302. Start the timer TimerA.
[0125] S303. Detect the wonderful image F2, update the candidate image, and reset TimerA.
[0126] S304. End.
[0127] S305. At time T1, a shooting operation is detected and the current candidate image is reported as a thumbnail.
[0128] Suppose that at time T1 before the end of the timerA timing, the shooting detection module can detect a user's shooting operation (i.e., the first shooting operation). In response to the above shooting operation, the shooting detection module can report the current candidate image as a thumbnail.
[0129] Exemplarily, after S301, when there is no new wonderful image with a higher wonderfulness, the shooting detection module can report the current candidate image F1 as a thumbnail; when there is a new wonderful image F2 with a higher wonderfulness, the shooting detection module can report the current candidate image F2 as a thumbnail. Then, the electronic device 100 can display the above thumbnail in a specified area of the screen.
[0130] S306. Start timer TimerB.
[0131] In response to the first shooting operation, the shooting detection module will also start timer timerB. Preferably, the timing duration of timerB is 0.5 seconds. Optionally, the shooting detection module can also start counter counterB. CounterB is used to record the number of images collected by the camera after the first shooting operation. In the case of a frame rate of 30 FPS, counterB = 15 corresponds to the timing duration of 0.5 seconds of timerB. Therefore, correspondingly, the counting threshold M2 of counterB can be set to 15.
[0132] S307. Capture the current candidate image after the timer TimerB times out or a continuous shooting operation is detected.
[0133] During the timing of TimerB, the comprehensive evaluation module can continue to identify whether the images collected by the camera include wonderful images. After identifying a new wonderful image with a higher wonderfulness, the shooting detection module can update the candidate image. After the timer TimerB times out or a continuous shooting operation is detected, the shooting detection module captures the current candidate image as the shooting result of the first shooting operation. Among them, the user shooting operation detected before the end of the TimerB timing can be called a continuous shooting operation.
[0134] In this way, the electronic device 100 can avoid missing the images near the user's shooting operation moment, especially the image at the user's shooting operation moment, and ensure the user's shooting experience.
[0135] In a specific implementation, during the timing of TimerB, the shooting detection module can determine that a frame of image F3 after F1 is an excellent image. Wherein, F3 can just be the image captured by the camera at the moment when the first shooting operation occurs. After determining the excellent image F3, the shooting detection module can immediately compare F3 with the current candidate image, such as F2. If the excellence degree of F3 is higher than that of the current candidate image F2, the shooting detection module can update the candidate image to F3. After the timing of TimerB ends or a continuous shooting operation is detected, the shooting detection module captures the current candidate image F3.
[0136] It can be understood that after determining the excellent image F3 and before the timing of TimerB ends, the shooting detection module can continue to determine that a frame of image F4 after F3 is an excellent image. At this time, the shooting detection module can continue to compare the excellent image F4 with the current candidate image, such as F3. When the excellence degree of the excellent image F4 is higher than that of the current candidate image F3, the shooting detection module can continue to update the current candidate image, for example, update the current candidate image from F3 to F4. At this time, after the timing of TimerB ends or a continuous shooting operation is detected, the shooting detection module captures the current candidate image F4.
[0137] After the first shooting operation, if the candidate image is updated, such as F3, F4, the thumbnail displayed on the electronic device 100 (such as F1 / F2) is different from the actually captured image (such as F3 / F4).
[0138] In another specific implementation, when the first shooting operation is detected, the shooting detection module can buffer the image captured by the current camera, that is, the image captured by the camera at time T1, denoted as FT1. The shooting detection module can mark FT1 as the second candidate image. The candidate image before time T1, such as F2, is also called the first candidate image. Before the timing of TimerB ends, the shooting detection module can continue to determine that a frame of image F5 after F1 is an excellent image. After determining the excellent image F5, the shooting detection module can compare the excellent image F5 with the second candidate image FT1. When the excellence degree of the excellent image F5 is higher than that of the second candidate image FT1, the shooting detection module can update the second candidate image, for example, update the second candidate image from FT1 to F5. Similarly, after determining the excellent image F5, the shooting detection module can continue to determine more excellent images, and update the second candidate image when there is an excellent image with a higher excellence degree. At this time, after the timing of TimerB ends or a continuous shooting operation is detected, the shooting detection module can first compare the first candidate image before time T1 and the second candidate image after time T1, and capture the image with a higher excellence degree among the first candidate image and the second candidate image.
[0139] S308. Set the image at the moment when the continuous shooting operation occurs as the new candidate image, start the timer. When the timer expires and no new wonderful image is detected, capture the current candidate image (i.e., the image at the moment when the continuous shooting operation occurs).
[0140] Before the T2 moment when TimerB expires, the shooting detection module can detect the user's shooting operation again, which is recorded as the second shooting operation. The second shooting operation is a continuous shooting operation. In response to the second shooting operation, the shooting detection module can capture the current candidate image as the shooting result of the first shooting operation.
[0141] At the T2 moment before the expiration of timerB, it can correspond to counterB = N2, where 0 ≤ N2 ≤ M2. The shooting detection module detects the second shooting operation at the T2 moment, that is, the shooting detection module detects the second shooting operation when counterB = N2.
[0142] Based on: The electronic device 100 should output one photo for one shooting operation of the user. In response to the 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 buffer the image collected by the current camera, that is, the image collected by the camera at the T2 moment, which is recorded as FT2 (the second image). The shooting detection module can set FT2 as the new candidate image. Similarly, due to the time delay in the detection of wonderful photos, the shooting detection module can also start another timer. Preferably, the timing duration of this timer is the same as that of TimerB. Therefore, this timer can also be recorded as TimerB. Similarly, optionally, the shooting detection module can also start another counter to record the number of images collected by the camera after the second shooting operation. Correspondingly, the counting threshold M3 of this counter can also be set to 15.
[0144] Before the expiration of the above-mentioned another timer, if a new wonderful image is detected, similarly, the shooting detection module can compare the wonderfulness of the new wonderful image with the current candidate image FT2 to determine whether to keep the candidate image as FT2 or update the candidate image to the new wonderful image. After the expiration of the above-mentioned another timer, the shooting detection module can save the current candidate image as the shooting result of the second shooting operation.
[0145] During the timing of the above-mentioned another timer, 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 continuous 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 expiration of the above-mentioned another timer.
[0146] In response to the third shooting operation, the shooting detection module can determine a new candidate image and start a new timer. After the new timer expires or the fourth shooting operation is detected, the current candidate image is captured as the shooting result of the third shooting operation. By analogy, after each continuous shooting operation is detected, the shooting detection module can immediately save the current candidate image as the shooting result of the previous shooting operation. Then, the shooting detection module can set the image captured by the camera at the moment of the latest continuous shooting operation as the 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 continuous shooting operation as the candidate image, the shooting detection module can report the cache. The cache control module can write the original image captured by the camera at the moment of the latest continuous shooting operation into the circular buffer. After determining to capture this image, the capture control module can obtain the above original image from the circular buffer, save it as a photo, and present it to the user for browsing.
[0148] In Figures 5A - 5B , Figure 6 the method shown:
[0149] 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 counting 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 counting threshold M2 of counterB can be called the second threshold; in S308, another counter started after setting FT2 as the new candidate image can be called the third counter, the counting threshold M3 can be called the third threshold, and the count value of the third counter when the third shooting operation is detected is the third value.
[0150] The wonderful image F2 shown in S203 can be called the second wonderful image. The wonderful images F3, F4, and F5 shown in S307 can be called the third wonderful images.
[0151] Figure 7A is a capture schematic diagram provided by an embodiment of the present application.
[0152] As Figure 7A shown, for example, when the camera reports the 10th frame image F(10), the action detection algorithm can report the 5th frame image F(5) to the comprehensive evaluation module as the preferred action image. The above F(5) is, for example Figure 2FThe image P3 shown. The comprehensive evaluation module can determine that F(5) is an excellent image (the first excellent frame). Furthermore, the shooting detection module can determine F(5) as a candidate image and start TimerA to detect whether the user makes a shooting operation.
[0153] As Figure 7A shown, before the end of the timerA timing, for example, when the camera reports the 15th frame image F(15), the shooting detection module can detect the user's shooting operation, denoted 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 Figure 2H , the user can feel that a shooting has been completed in real time through the thumbnail. On the other hand, in response to Capture 1, the shooting detection module can start timerB.
[0154] Suppose that during the process from F(10) to the end of the timerB timing, the shooting detection module does not detect any new excellent images, that is, the current candidate image is still F(5). After the timerB timing ends, the shooting detection module can capture the current candidate image F(5) and save F(5) as the photo taken by the user's shooting operation Capture 1.
[0155] During the process from F(10) to the end of the timerB timing, the shooting detection module may detect new excellent images.
[0156] Referring to Figure 7B , in an embodiment, after Capture 1, the shooting detection module can detect that the 12th frame image F(12) is an excellent image (the third excellent frame). At this time, the shooting detection module can immediately compare F(5) and F(12) to determine which is more excellent, that is, which has a higher excellent degree. Exemplarily, after determining that F(12) is more excellent than F(5), the shooting detection module can update the candidate image to F(12). After the timerB timing ends, the shooting detection module can capture the current candidate image F(12) and save F(12) as the photo taken by the user's shooting operation Capture 1.
[0157] Referring to Figure 7C, 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 start timing for 1s again. After detecting Capture 1, the shooting detection module may immediately report the current candidate image F(9) as the thumbnail. In the case of no new more wonderful image, after the timerB times out, 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. Reference Figure 7B , in the case of a new more wonderful image, the shooting detection module may update the current candidate image. After the timerB times out, the shooting detection module may capture the current candidate image, which will not be elaborated here.
[0158] The timerB started after the first detection of the user's shooting operation (i.e., Capture 1) is denoted as timerB1.
[0159] Reference Figure 8A , before the timerB1 times out, the shooting detection module may detect the user's shooting operation again, denoted as Capture 2 (the second shooting operation). Capture 2 is also called the first continuous shooting operation. Exemplarily, the shooting detection module may detect Capture 2 when the camera reports the 19th frame image F(19) (the second image).
[0160] In the case of no new more wonderful image, after detecting Capture 2, the shooting detection module may stop timerB1 and capture the current candidate image F(5). Similarly, reference Figure 7B , after Capture 1, in the case of a new more wonderful image, the shooting detection module may update the current candidate image. After detecting Capture 2, the shooting detection module may capture the updated current candidate image.
[0161] Such as Figure 8BAs shown, after capturing the current candidate image F(5) as the photo of Capture 1, the shooting detection module may set the image F(19) at the occurrence moment of Capture 2 as the candidate image, report the current candidate image F(19) as the thumbnail, and start timerB2. Preferably, the timing duration of timerB2 is the same as that of timerB1. In the case of no new wonderful images, after the timerB timing ends or a continuous shooting operation (Capture 3, i.e., the third shooting operation) is detected again, the shooting detection module may capture the previous candidate image F(19) and save F(19) as the shooting result of Capture 2. Similarly, referring to Figure 7B , after Capture2, in the case of having a new and more wonderful image, the shooting detection module may update the current candidate image. After the timerB timing ends or Capture 3 is detected, the shooting detection module may capture the updated current candidate image.
[0162] Figure 9 is a schematic structural diagram of the electronic device 100 provided in the embodiment of the present application.
[0163] 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, a headphone 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. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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.
[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] 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, etc. The processor 110 may couple each component through one or more of the above interfaces.
[0166] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 110, and can be used to store the operating system or the executable programs of other running programs, and can also be used to store the data of users and application programs, etc. The non-volatile memory can also store executable programs and store the data of users and application programs, etc. The executable programs and user data stored in the NVM can be pre-loaded into the random access memory for the processor 110 to directly read and write.
[0167] The computer program code for implementing the auxiliary capture method described in the embodiments of the present application can be stored in the NVM. When the electronic device 100 implements the above capture method, the processor 110 can obtain the computer program code of the above capture method from the NVM and then execute it, thereby implementing Figures 2A - 2I the auxiliary capture function shown.
[0168] The external memory interface 120 can be used to connect to an external non-volatile memory to implement the storage capacity expansion of the electronic device 100. The computer program code for implementing the auxiliary capture method described in the embodiments of the present application can also be stored in the external non-volatile memory connected through the external memory interface 120.
[0169] The electronic device 100 can collect and display images through the ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.
[0170] The electronic device 100 can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor, etc., such as collecting sound signals when collecting and displaying images.
[0171] The electronic device 100 can implement wireless communication functions through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor, baseband processor, etc.
[0172] The touch sensor 180K, also known as a "touch control device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch control screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the touch event type, such as Figures 2A - 2I the click operation shown. Based on the detected touch operation, the electronic device 100 can provide visual output related to the touch operation through the display screen 194.
[0173] The button 190 includes a power-on button, volume buttons, etc. The button 190 can be a mechanical button or a touch button. The electronic device 100 can determine a shooting operation through a user operation acting on the button 190.
[0174] It can be understood that the structure schematically shown 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)" in the specification, claims and drawings of this application is a media interface for interaction and information exchange between an application or an 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 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 a terminal device and finally presented as content recognizable by the user, such as controls like pictures, texts, buttons, etc. A control (also known as a widget) is a basic element of the user interface. Typical controls include a toolbar, a menu bar, a text box, a button, a scrollbar, pictures, and texts. The attributes and content of the controls in the interface are defined by tags or nodes. For example, XML passes through <textview> 、 <imgview> 、
[0176] <videoview>Nodes such as these are used to specify the controls included in the interface. One node corresponds to one control or property in the interface, and after being parsed and rendered, the node presents visible content to the user. In addition, in the interfaces of many applications, such as hybrid applications, there are usually also web pages. A web page, also known as a page, can be understood as a special control embedded in the application interface. A web page is source code written in a specific computer language, such as hyper text markup language (HTML), cascading stylesheets (CSS), JavaScript (JS), etc. The web page source code can be loaded and displayed as recognizable content to the user by a browser or a web page display component similar to the browser's function. The specific content included in the web page is also defined by tags or nodes in the web page source code. For example, HTML uses 、 、 <video> 、 <canvas>to define the elements and attributes of a web page.
[0177] A commonly used form of the user interface is the graphical user interface (GUI), which refers to the user interface related to computer operations displayed in a graphical manner. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of an electronic device, where the control can include visible interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, etc.
[0178] As used in the specification and appended claims of this application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are intended to also include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this application refers to and includes any and 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 to mean "if...", or "after...", or "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if detecting (the stated condition or event)" can be interpreted to mean "if determining...", or "in response to determining...", or "when detecting (the stated condition or event)", or "in response to detecting (the stated condition or event)".
[0179] 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 processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. 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 by wire (such as coaxial cable, fiber optic, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.
[0180] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by relevant hardware instructed by a computer program. This program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes various media that can store program codes, such as ROM or random access memory RAM, magnetic disks, or optical discs.< / 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, characterized in that, The 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 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 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 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, wherein 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 in 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, 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, wherein 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, characterized in that, 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, characterized in that, 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, which is applied to an electronic device and includes one or more processors, characterized in that, The processor is used to call and execute computer instructions to cause the electronic device to execute 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
Apparatus and method for positioning image area using image sensor location
CN105103535A
Capturing method and terminal equipment
CN108184056A
Image processing method, image processing device, electronic equipment and readable storage medium
CN112422828A
Photographing method and electronic equipment
CN116055857A
Shooting method
CN117119284A