A photographing method and an electronic device

Through the scene recognition function during the shooting process, the electronic device will enter the corresponding shooting mode only after identifying a stable shooting scene, which solves the problem of unstable shooting mode, achieves shooting stability and accuracy, improves user experience and reduces resource waste.

CN118075599BActive Publication Date: 2025-10-10HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211466980.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-10-10
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

During the shooting process, the shooting mode of the electronic device is adjusted unstably, resulting in a poor user experience and serious waste of resources.

Method used

Through the scene recognition function, the electronic device will enter the corresponding shooting mode only after identifying a stable shooting scene, avoiding immediate adjustments due to slight changes in the shooting content, ensuring the stability and accuracy of the shooting mode, and exiting the shooting mode when it is identified that the scene has exited, reducing resource waste.

Benefits of technology

It improves the stability and accuracy of shooting, reduces unnecessary waste of resources, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118075599B_ABST
    Figure CN118075599B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a shooting method and an electronic device, comprising: in response to a starting operation acting on a first camera mode, the electronic device displays a preview picture of the first camera mode, the preview picture displays an image frame collected by continuous exposure of a camera of the electronic device; the first camera mode is one of a shooting mode, a video recording mode and a movie mode; in the case that a scene recognition function is started, the electronic device performs scene recognition processing on the image frame; starting from a first image frame, the electronic device determines a first shooting scene based on a first scene recognition condition when the first scene recognition condition is met; and judges whether all the image frames meet the first scene recognition condition within a first stable frame duration; in the case of meeting, the electronic device collects the image frame based on a shooting mode of the first shooting scene. The embodiment of the application can improve the stability and accuracy of the shooting mode and the picture display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a shooting method and electronic equipment. Background Art

[0002] When users use their mobile phones to shoot, electronic devices often need to adjust their shooting methods to ensure better image frames. For example, they may switch to a clearer camera or adjust the focus. This can ensure better image quality or better meet user requirements. However, during the shooting process, adjusting the shooting method can cause users to see unstable images captured by the mobile phone, resulting in a poor user experience. Summary of the Invention

[0003] The embodiments of the present application disclose a shooting method and an electronic device, which can improve the stability and accuracy of shooting of the electronic device.

[0004] In a first aspect, the present application provides a shooting method, which is applied to an electronic device, comprising: in response to a startup operation acting on a first camera mode, the electronic device displays a preview screen of the first camera mode, the preview screen displaying image frames captured by continuous exposure of the camera of the electronic device; the first camera mode is one of a photo mode, a video mode and a movie mode; when a scene recognition function is started, the electronic device performs scene recognition processing on the image frames, and the scene recognition processing is used to determine whether the image frames meet the scene recognition conditions corresponding to the shooting scenes of the first camera mode; starting from the first image frame, the first scene recognition conditions are met, and the electronic device determines a first shooting scene based on the first scene recognition conditions; and determines whether all image frames within a first stable frame time meet the first scene recognition conditions; if so, the electronic device captures image frames based on the shooting method of the first shooting scene; wherein, the first image frame is a frame of image among the image frames captured by the continuous exposure.

[0005] Among them, when the first camera mode is the photo mode, the first shooting scene can be Figure 6 The first photographing scene in the first stable frame duration can be the photographing start duration corresponding to the first photographing scene under the stable frame photographing condition, and the scene recognition condition is the photographing scene condition; in the first camera mode, the first shooting scene can be Figure 7 The first recording scene in the first stable frame length can be the recording start length corresponding to the first recording scene under the stable frame recording condition, and the scene recognition condition is the recording scene condition; when the first camera mode is the movie mode, the first shooting scene can be Figure 8The first movie scene in the first stable frame duration can be the movie start duration corresponding to the first movie scene under the stable frame movie condition, and the scene recognition condition is the movie scene condition.

[0006] In an embodiment of the present application, the electronic device can enable a scene recognition function. When a scene is recognized, the electronic device can perform recognition under the scene recognition conditions to determine whether the images captured by the camera over a period of time have consistently met the specific scene recognition conditions. The electronic device can ensure that the shooting scene is stable before entering the shooting mode for the shooting scene to capture image frames. The shooting mode will not be directly adjusted due to one or two frames of changes in the shooting content, thereby ensuring the stability and accuracy of the shooting mode and avoiding waste of processing resources.

[0007] In one possible implementation, before the electronic device determines whether all image frames within the first frame stabilization duration meet the first scene recognition condition, the method further includes: the electronic device determining the first frame stabilization duration corresponding to the first shooting scene based on a first mapping relationship; the first mapping relationship is a mapping relationship between the shooting scene and the start-up frame stabilization duration; the first frame stabilization duration is the start-up frame stabilization duration corresponding to the first shooting scene; and the electronic device stores the first mapping relationship. In this way, the electronic device can determine the corresponding first frame stabilization duration based on the specific shooting scene. For the specific shooting scene, the determined first frame stabilization duration is more accurate and effective, further ensuring the accuracy of the camera mode adjustment.

[0008] In one possible implementation, after the electronic device captures image frames based on the shooting mode of the first shooting scene, the method further includes: starting from the second image frame, the first scene recognition condition is not satisfied, and the electronic device determines whether all image frames within the second stable frame time do not satisfy the first scene recognition condition; if so, the electronic device exits the shooting mode of the first shooting scene to capture image frames. In this way, when the electronic device can recognize that a certain scene has been exited, it can perform recognition under this camera scene according to the scene recognition condition, and determine whether the image acquired by the camera for a period of time has not satisfied the specific scene recognition condition. It can ensure that the camera mode of this shooting scene is exited only after the exited shooting scene is stable to capture image frames, and will not directly adjust the shooting mode due to one or two frames of changes in the shooting content, thereby ensuring the stability and accuracy of the shooting mode and avoiding the waste of processing resources.

[0009] In a possible implementation, before the electronic device determines whether all image frames in the second stable frame duration do not satisfy the first scene recognition condition, the method further includes: determining, by the electronic device, a second stable frame duration corresponding to the first shooting scene based on a second mapping relationship; the second mapping relationship is a mapping relationship between a shooting scene and an exit stable frame duration; the second stable frame duration is an exit stable frame duration corresponding to the first shooting scene; and the electronic device stores the second mapping relationship. In this way, the electronic device can determine a corresponding second stable frame duration based on a specific exit shooting scene, and the determined second stable frame duration is more accurate and effective for a specific shooting scene, further ensuring the accuracy of the camera mode adjustment.

[0010] In a possible implementation, after the electronic device collects image frames based on the shooting mode of the first shooting scene, the method further includes: determining, by the electronic device, whether image frames of a continuous first stable frame number all need to display prompt information of a second shooting scene; if yes, displaying, by the electronic device, the prompt information of the second shooting scene; otherwise, not displaying, by the electronic device, the prompt information of the second shooting scene; the prompt information includes text prompt and / or icon prompt of the second shooting scene, and the first shooting scene includes the second shooting scene. In this way, the electronic device can determine whether to display prompt information for a plurality of frames, the determination of the plurality of frames can delay the display, improve the display condition, the scene prompt in the shooting process will not change frequently, and the stability and reliability of the display are ensured.

[0011] In a possible implementation, after the electronic device displays the prompt information of the second shooting scene, the method further includes: determining, by the electronic device, whether image frames of a continuous second stable frame number all cancel the display of the prompt information of the second shooting scene; if yes, canceling, by the electronic device, the display of the prompt information of the second shooting scene; otherwise, continuing, by the electronic device, to display the prompt information of the second shooting scene. In this way, the electronic device can determine whether to exit the display of prompt information for a plurality of frames, the determination of the plurality of frames can delay the exit of the display, improve the exit condition of the display, the scene prompt in the shooting process will not change frequently, and the stability and reliability of the display are ensured.

[0012] In one possible implementation, before the electronic device determines whether a first stable number of consecutive image frames require displaying prompt information for a second shooting scene, the method further includes: if the first shooting scene includes multiple shooting scene types, the electronic device filters the shooting scene types according to their priority to obtain a second shooting scene after filtering; the shooting scene type of the second shooting scene is a shooting scene with a higher priority among the shooting scene types in the first shooting scene. In this way, from the scene identified to the scene prompted, the electronic device can filter the shooting scene, ensuring the necessity of displaying the scene and the accuracy of the prompt, preventing the misuse of prompt information in the case of multiple shooting scenes, ensuring the simplicity and accuracy of the prompt, and maintaining the user's photography experience.

[0013] In one possible implementation, before the electronic device determines whether a first stable number of consecutive image frames need to display prompt information of the second shooting scene, the method further includes: when the first shooting scene includes multiple types of shooting scenes, the electronic device fuses the first shooting scene to obtain a second shooting scene after fusion; the shooting scene type of the second shooting scene is a shooting scene in the first shooting scene. In this way, from the recognized scene to the prompted scene, the electronic device can filter the shooting scene to ensure the necessity of displaying the scene and the accuracy of the prompt, and also prevent the abuse of prompt information in the case of multiple shooting scenes, thereby ensuring the user's photo-taking experience. In this way, from the recognized scene to the prompted scene, the electronic device can filter the shooting scene to ensure the necessity of displaying the scene and the accuracy of the prompt, and also prevent the abuse of prompt information in the case of multiple shooting scenes, thereby ensuring the simplicity and accuracy of the prompt, thereby ensuring the user's photo-taking experience.

[0014] Among them, the above method embodiments can refer to the process of integrating multiple scenarios in S611, S711, and S811, which will not be repeated.

[0015] In a possible implementation, the electronic device displays prompt information of the second shooting scene, specifically including:

[0016] The electronic device displays first prompt information of the second shooting scene, the first prompt information including the text prompt and the icon prompt; after a preset time period, the electronic device displays second prompt information of the second shooting scene, the second prompt information including the icon prompt.

[0017] The above method embodiments can refer to Figure 3B and Figure 3C The relevant description is omitted here.

[0018] In one possible implementation, the electronic device includes an image recognition module; when a scene recognition function is activated, the electronic device performs scene recognition processing on the image frames, specifically comprising: the electronic device performing scene recognition processing via the image recognition module; the electronic device determining a first shooting scene based on a first scene recognition condition, specifically comprising: the electronic device determining the first shooting scene based on the first scene recognition condition via the image recognition module; the electronic device determining whether all image frames within a first stable frame duration meet the first scene recognition condition; if so, the electronic device capturing image frames based on a shooting mode for the first shooting scene, specifically comprising: the electronic device determining whether all image frames within the first stable frame duration meet the first scene recognition condition via the image recognition module; if so, the electronic device capturing image frames based on a shooting mode for the first shooting scene via the image recognition module. In this way, the electronic device can ensure that during shooting, it can determine whether images captured by its camera consistently meet specific scene recognition conditions over a period of time. It can ensure that the shooting mode for this shooting scene is entered to capture image frames only after the shooting scene stabilizes, and the shooting mode will not be adjusted directly due to one or two frames of shooting content changing, thereby ensuring the stability and accuracy of the shooting mode and avoiding waste of processing resources.

[0019] The above method embodiments can refer to the Figure 5 、 Figure 6 、 Figure 7 and Figure 8 The relevant description is omitted here.

[0020] In one possible implementation, the electronic device determines whether all image frames within the second stable frame time length do not meet the first scene recognition condition; if so, the electronic device exits the shooting mode of the first shooting scene and collects image frames, specifically including: the electronic device determines through the image recognition module whether all image frames within the second stable frame time length do not meet the first scene recognition condition; if so, the electronic device exits the shooting mode of the first shooting scene and collects image frames.

[0021] In one possible implementation, the electronic device further includes a frame stabilization processing module and a prompt module; when the first camera mode is a photo mode, the electronic device determines whether a first number of consecutive image frames of the stabilized frame number need to display prompt information of a second shooting scene; if so, the electronic device displays the prompt information of the second shooting scene; otherwise, the electronic device does not display the prompt information of the second shooting scene. Specifically, the electronic device determines, via the frame stabilization processing module, whether a first number of consecutive image frames of the stabilized frame number need to display prompt information of the second shooting scene; if so, the electronic device sends a start display instruction to the prompt module via the frame stabilization processing module, and the electronic device displays the prompt information of the second shooting scene based on the start display instruction via the prompt module; otherwise, the prompt information is not sent. In this way, the electronic device can be in photo mode, so that the frame stabilization processing module can determine relevant information of the first number of stabilized frames, ensuring the feasibility of the solution and the accuracy and reliability of the display of the recognition result.

[0022] The start display instruction can be Figure 6 The first display instruction in .

[0023] In one possible implementation, the electronic device determines whether the prompt information of the second shooting scene is canceled for a second consecutive number of image frames with a second stable frame number; if so, the electronic device cancels the prompt information of the second shooting scene; otherwise, the electronic device continues to display the prompt information of the second shooting scene. Specifically, the electronic device determines, through the stabilization processing module, whether the prompt information of the second shooting scene is canceled for a second consecutive number of image frames with a second stable frame number; if so, the electronic device sends an exit display instruction to the prompt module through the stabilization processing module, and the electronic device cancels the prompt information of the second shooting scene based on the start display instruction through the prompt module; otherwise, no instruction is sent. In this way, the electronic device can be in the photo mode, so that the stabilization processing module can determine the relevant information of the second stable frame number, ensuring the feasibility of the solution and the accuracy and reliability of the display of the recognition result.

[0024] Among them, the exit display instruction can be Figure 6 The second display instruction in .

[0025] In one possible implementation, the electronic device further includes a frame stabilization algorithm module and a prompt module; when the first camera mode is video mode or movie mode, the electronic device determines whether a first number of consecutive image frames of the stabilized frame number need to display prompt information of the second shooting scene; if so, the electronic device displays the prompt information of the second shooting scene; otherwise, the electronic device does not display the prompt information of the second shooting scene. Specifically, the electronic device determines, through the frame stabilization algorithm module, whether a first number of consecutive image frames of the stabilized frame number need to display prompt information of the second shooting scene; if so, the electronic device sends a start display instruction to the prompt module through the frame stabilization algorithm module, and the electronic device displays the prompt information of the second shooting scene based on the start display instruction through the prompt module; otherwise, the prompt information is not sent. In this way, the electronic device ensures the accuracy and reliability of the prompt information in video mode or movie mode.

[0026] In one possible implementation, the electronic device determines whether the prompt information of the second shooting scene has been canceled for a second number of consecutive stable frame frames; if so, the electronic device cancels the prompt information of the second shooting scene; otherwise, the electronic device continues to display the prompt information of the second shooting scene. Specifically, the electronic device determines, through the stabilization algorithm module, whether the prompt information of the second shooting scene has been canceled for a second number of consecutive stable frame frames; if so, the electronic device sends an exit display instruction to the prompt module through the stabilization algorithm module, and the electronic device cancels the prompt information of the second shooting scene based on the start display instruction through the prompt module; otherwise, no instruction is sent. In this way, the electronic device ensures the accuracy and reliability of the prompt information in video mode or movie mode.

[0027] In a second aspect, the present application provides an electronic device, comprising: a battery, one or more processors, and one or more memories; the one or more processors are coupled to the one or more memories, the one or more memories being configured to store computer program code, the computer program code comprising computer instructions, and when the one or more processors execute the computer instructions, causing the electronic device to perform:

[0028] In response to a startup operation acting on a first camera mode, a preview screen of the first camera mode is displayed, wherein the preview screen displays image frames collected by continuous exposure of the camera of the electronic device; the first camera mode is one of a photo mode, a video mode and a movie mode; when a scene recognition function is started, scene recognition processing is performed on the image frames, and the scene recognition processing is used to determine whether the image frames meet the scene recognition conditions corresponding to the shooting scenes of the first camera mode; starting from the first image frame, the first scene recognition conditions are met, and a first shooting scene is determined based on the first scene recognition conditions; and it is determined whether all image frames within a first stable frame time meet the first scene recognition conditions; if so, image frames are collected based on the shooting method of the first shooting scene; wherein the first image frame is a frame of image among the image frames collected by the continuous exposure.

[0029] Among them, when the first camera mode is the photo mode, the first shooting scene can be Figure 6 The first photographing scene in the first stable frame duration can be the photographing start duration corresponding to the first photographing scene under the stable frame photographing condition, and the scene recognition condition is the photographing scene condition; in the first camera mode, the first shooting scene can be Figure 7 The first recording scene in the first stable frame length can be the recording start length corresponding to the first recording scene under the stable frame recording condition, and the scene recognition condition is the recording scene condition; when the first camera mode is the movie mode, the first shooting scene can be Figure 8 The first movie scene in the first stable frame duration can be the movie start duration corresponding to the first movie scene under the stable frame movie condition, and the scene recognition condition is the movie scene condition.

[0030] In an embodiment of the present application, the electronic device can enable a scene recognition function. When a scene is recognized, the electronic device can perform recognition under the scene recognition conditions to determine whether the images captured by the camera over a period of time have consistently met the specific scene recognition conditions. The electronic device can ensure that the shooting scene is stable before entering the shooting mode for the shooting scene to capture image frames. The shooting mode will not be directly adjusted due to one or two frames of changes in the shooting content, thereby ensuring the stability and accuracy of the shooting mode and avoiding waste of processing resources.

[0031] In one possible implementation, before the electronic device determines whether all image frames within the first frame stabilization duration meet the first scene recognition condition, the electronic device further performs the following steps: determining a first frame stabilization duration corresponding to the first shooting scene based on a first mapping relationship; the first mapping relationship is a mapping relationship between shooting scenes and start-up frame stabilization durations; the first frame stabilization duration is the start-up frame stabilization duration corresponding to the first shooting scene; and the electronic device stores the first mapping relationship. In this way, the electronic device can determine the corresponding first frame stabilization duration based on the specific shooting scene. For the specific shooting scene, the determined first frame stabilization duration is more accurate and effective, further ensuring the accuracy of the camera mode adjustment.

[0032] In one possible implementation, after the electronic device captures image frames based on the shooting mode of the first shooting scene, the electronic device further performs: starting from the second image frame that does not meet the first scene recognition condition, it is determined whether all image frames within the second stable frame time do not meet the first scene recognition condition; if so, exit the shooting mode of the first shooting scene to capture image frames. In this way, the electronic device can recognize that a certain scene has been exited, and can perform recognition under this camera scene according to the scene recognition condition to determine whether the image acquired by the camera for a period of time has not met the specific scene recognition condition. It can ensure that the camera mode of this shooting scene is exited only after the exited shooting scene is stable to capture image frames, and will not directly adjust the shooting mode due to one or two frames of changes in the shooting content, thereby ensuring the stability and accuracy of the shooting mode and avoiding the waste of processing resources.

[0033] In one possible implementation, before the electronic device determines whether all image frames within the second frame stabilization duration do not meet the first scene recognition condition, the electronic device further performs the following steps: determining a second frame stabilization duration corresponding to the first shooting scene based on a second mapping relationship; the second mapping relationship is a mapping relationship between shooting scenes and exit frame stabilization durations; the second frame stabilization duration is the exit frame stabilization duration corresponding to the first shooting scene; and the second mapping relationship is stored. In this way, the electronic device can determine the corresponding second frame stabilization duration based on the specific exit shooting scene. For a specific shooting scene, the determined second frame stabilization duration is more accurate and effective, further ensuring the accuracy of the camera mode adjustment.

[0034] In a possible implementation, after the electronic device collects the image frames based on the shooting mode of the first shooting scene, the electronic device further performs: determining whether image frames of a first stable frame number in succession all need to display prompt information of a second shooting scene; if yes, displaying the prompt information of the second shooting scene; otherwise, not displaying the prompt information of the second shooting scene; the prompt information includes text prompt and / or icon prompt of the second shooting scene, and the first shooting scene includes the second shooting scene. In this way, the electronic device can determine whether to display the prompt information for a plurality of frames in succession, the determination for the plurality of frames can delay the display, improve the display condition, the scene prompt in the shooting process will not change frequently, and the stability and reliability of the display are ensured.

[0035] In a possible implementation, after the electronic device displays the prompt information of the second shooting scene, the electronic device further performs: determining whether image frames of a second stable frame number in succession all cancel the display of the prompt information of the second shooting scene; if yes, canceling the display of the prompt information of the second shooting scene; otherwise, continuing to display the prompt information of the second shooting scene. In this way, the electronic device can determine whether to exit the display of the prompt information for a plurality of frames in succession, the determination for the plurality of frames can delay the exit of the display, improve the exit condition of the display, the scene prompt in the shooting process will not change frequently, and the stability and reliability of the display are ensured.

[0036] In a possible implementation, before the electronic device determines whether image frames of a first stable frame number in succession all need to display prompt information of a second shooting scene, the electronic device further performs: in a case where the first shooting scene includes a plurality of kinds of shooting scenes, performing filtering according to a priority of a shooting scene kind to obtain a second shooting scene after the filtering; the shooting scene kind of the second shooting scene is a shooting scene with a high priority among shooting scene kinds in the first shooting scene. In this way, the electronic device can filter the shooting scenes from the identified scenes to the prompted scenes, ensure the necessity of the displayed scenes and the accuracy of the prompt, and also prevent the abuse of the prompt information in the case of multiple shooting scenes, ensure the simplicity and accuracy of the prompt, and ensure the shooting experience of the user.

[0037] In one possible implementation, before the electronic device determines whether a first stable number of consecutive image frames need to display prompt information of the second shooting scene, the electronic device further performs: when the first shooting scene includes multiple types of shooting scenes, the first shooting scene is fused to obtain a second shooting scene after fusion; the shooting scene type of the second shooting scene is a shooting scene in the first shooting scene. In this way, from the recognized scene to the prompted scene, the electronic device can filter the shooting scene to ensure the necessity of displaying the scene and the accuracy of the prompt, and also prevent the abuse of prompt information in the case of multiple shooting scenes, thereby ensuring the user's photo-taking experience. In this way, from the recognized scene to the prompted scene, the electronic device can filter the shooting scene to ensure the necessity of displaying the scene and the accuracy of the prompt, and also prevent the abuse of prompt information in the case of multiple shooting scenes, thereby ensuring the simplicity and accuracy of the prompt, thereby ensuring the user's photo-taking experience.

[0038] Among them, the above method embodiments can refer to the process of integrating multiple scenarios in S611, S711, and S811, which will not be repeated.

[0039] In a possible implementation, the electronic device displays prompt information of the second shooting scene by specifically performing:

[0040] Displaying first prompt information of the second shooting scene, the first prompt information including the text prompt and the icon prompt; after a preset time period, displaying second prompt information of the second shooting scene, the second prompt information including the icon prompt.

[0041] The above method embodiments can refer to Figure 3B and Figure 3C The relevant description is omitted here.

[0042] In one possible implementation, the electronic device includes an image recognition module; when a scene recognition function is activated, the electronic device performs scene recognition processing on the image frames, specifically by: performing scene recognition processing by the image recognition module; determining a first shooting scene based on a first scene recognition condition by the image recognition module; determining the first shooting scene based on the first scene recognition condition by the image recognition module; determining whether all image frames within a first stable frame duration meet the first scene recognition condition; and if so, capturing image frames based on a shooting mode for the first shooting scene by the image recognition module. In this way, the electronic device can ensure that during shooting, it can determine whether images captured by the camera consistently meet specific scene recognition conditions over a period of time. It can ensure that the shooting mode for capturing image frames is entered only after the shooting scene stabilizes, and the shooting mode will not be adjusted directly due to one or two frames of changed shooting content, thereby ensuring the stability and accuracy of the shooting mode and avoiding waste of processing resources.

[0043] The above method embodiments can refer to the Figure 5 、 Figure 6 、 Figure 7 and Figure 8 The relevant description is omitted here.

[0044] In one possible implementation, the electronic device determines whether all image frames within the second stable frame time length do not meet the first scene recognition condition; if so, the electronic device exits the shooting mode of the first shooting scene and collects image frames, specifically performing: determining through the image recognition module whether all image frames within the second stable frame time length do not meet the first scene recognition condition; if so, the electronic device exits the shooting mode of the first shooting scene and collects image frames.

[0045] In one possible implementation, the electronic device further includes a frame stabilization processing module and a prompt module; when the first camera mode is a photo mode, the electronic device determines whether all consecutive image frames of the first stabilized frame number need to display prompt information of the second shooting scene; if so, the electronic device displays the prompt information of the second shooting scene; otherwise, the electronic device does not display the prompt information of the second shooting scene. Specifically, the electronic device determines, through the frame stabilization processing module, whether all consecutive image frames of the first stabilized frame number need to display prompt information of the second shooting scene; if so, the frame stabilization processing module sends a start display instruction to the prompt module, and the prompt module displays the prompt information of the second shooting scene based on the start display instruction; otherwise, the prompt information is not sent. In this way, the electronic device can be in photo mode, so that the frame stabilization processing module can determine the relevant information of the first stabilized frame number, ensuring the feasibility of the solution and the accuracy and reliability of the display of the recognition result.

[0046] The start display instruction can be Figure 6 The first display instruction in .

[0047] In one possible implementation, the electronic device determines whether the prompt information of the second shooting scene is canceled for a second consecutive number of image frames with a stable frame rate; if so, the electronic device cancels the prompt information of the second shooting scene; otherwise, the electronic device continues to display the prompt information of the second shooting scene. Specifically, the following steps are performed: the stable frame processing module determines whether the prompt information of the second shooting scene is canceled for a second consecutive number of image frames with a stable frame rate; if so, the stable frame processing module sends an exit display instruction to the prompt module, and the prompt module cancels the prompt information of the second shooting scene based on the start display instruction; otherwise, no instruction is sent. In this way, the electronic device can be in the photo mode, so that the stable frame processing module can determine the relevant information of the second stable frame rate, ensuring the feasibility of the solution and the accuracy and reliability of the display of the recognition result.

[0048] Among them, the exit display instruction can be Figure 6 The second display instruction in .

[0049] In one possible implementation, the electronic device further includes a frame stabilization algorithm module and a prompt module; when the first camera mode is video mode or movie mode, the electronic device determines whether a first number of consecutive image frames of the stabilized frame number need to display prompt information of the second shooting scene; if so, the electronic device displays the prompt information of the second shooting scene; otherwise, the electronic device does not display the prompt information of the second shooting scene, specifically performing the following steps: determining, by the frame stabilization algorithm module, whether a first number of consecutive image frames of the stabilized frame number need to display prompt information of the second shooting scene; if so, sending a start display instruction to the prompt module via the frame stabilization algorithm module, and having the prompt module display the prompt information of the second shooting scene based on the start display instruction; otherwise, not sending the prompt information. In this way, the electronic device ensures the accuracy and reliability of the prompt information in video mode or movie mode.

[0050] The start display instruction can be Figure 7 The third display instruction and Figure 8 The fifth display instruction in .

[0051] In one possible implementation, the electronic device determines whether the prompt information for the second shooting scene has been canceled for a second number of consecutive stabilized frame frames; if so, the electronic device cancels the prompt information for the second shooting scene; otherwise, the electronic device continues to display the prompt information for the second shooting scene. Specifically, the electronic device determines, through the stabilization algorithm module, whether the prompt information for the second shooting scene has been canceled for a second number of consecutive stabilized frame frames; if so, the stabilization algorithm module sends an exit display instruction to the prompt module, and the prompt module cancels the prompt information for the second shooting scene based on the start display instruction; otherwise, the instruction is not sent. In this way, the electronic device ensures the accuracy and reliability of the prompt information in video mode or movie mode.

[0052] Among them, the exit display instruction can be Figure 7 The fourth display instruction and Figure 8 The sixth display instruction in .

[0053] In a third aspect, the present application provides an electronic device, comprising: one or more functional modules. The one or more functional modules are configured to execute the shooting method in any possible implementation of any of the above aspects.

[0054] In a fourth aspect, an embodiment of the present application provides a computer storage medium comprising computer instructions, which, when executed on an electronic device, enables a communication device to execute a shooting method in any possible implementation of any of the above aspects.

[0055] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the shooting method in any possible implementation of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0057] Figures 2A to 2I This is a set of user interface schematic diagrams provided by the embodiments of the present application;

[0058] Figures 3A to 3I is another set of user interface schematic diagrams provided in an embodiment of the present application;

[0059] Figure 4A and Figure 4B This is another set of user interface schematic diagrams provided by the embodiments of the present application;

[0060] Figure 5 This is a flowchart of a photographing method provided by an embodiment of the present application;

[0061] Figure 6 This is a flowchart of another shooting method provided by an embodiment of the present application;

[0062] Figure 7 This is a flowchart of another shooting method provided by an embodiment of the present application;

[0063] Figure 8 This is a flowchart of another shooting method provided by an embodiment of the present application;

[0064] Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0066] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0067] Figure 1 Schematic diagram of the system structure of the electronic device according to an embodiment of the present application.

[0068] The following is an example of a layered architecture for the system structure of an electronic device. The system is divided into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the system is divided into five layers: application layer, application framework layer, hardware abstraction layer, kernel layer, and hardware layer, from top to bottom.

[0069] The application layer can include a series of application packages.

[0070] The application layer may include applications such as a camera and a gallery (not shown).

[0071] The camera application may include a camera application module, a mode switching module, a scene recognition module, a frame stabilization processing module, and a prompt module. The camera application module can detect user touch operations on the camera, such as when the user clicks to open the camera or switches to the camera capture module. The mode switching module can switch to the corresponding camera mode based on the user's operation. The mode switching modes include video mode, photo mode, and movie mode. In video mode, the electronic device can record videos. The recording scenes in this mode can include one or more of the following: portrait, macro, main character, night scene, high dynamic range, and multi-lens recording. In photo mode, the electronic device can take photos. The photo scenes in this mode can be diverse. For example, if the camera is currently capturing text, the photo scene is text; if it is capturing a sunrise, the photo scene is sunrise; if it is capturing a person, the photo scene is portrait, and so on. In movie mode, the electronic device can record movies. In movie mode, the electronic device can identify movie scenes. For example, if the electronic device captures an image of a person, the movie scene can be determined to be portrait; if the electronic device captures an image of a plant, the movie scene can be determined to be plant, and so on. Movie scenes can refer to photo scenes. The frame stabilization processing module can perform frame stabilization processing in the photo mode and determine whether to prompt the current photo scene. The prompt module can prompt based on the determined photo, video or movie scene.

[0072] In the embodiments of the present application, video recording scenes may include macro recording, portrait recording, night scene recording, high dynamic range recording, protagonist mode, and multi-camera recording. Photo shooting scenes may include portraits, night scenes, sunrises, sunsets, waterfalls, beaches, seaside, buildings, greenery, cats, dogs, text, clothing, and so on. Movie scenes can be the same as the photo shooting scenes mentioned above and are not described in detail here.

[0073] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0074] In some embodiments, the application framework layer may include a camera access interface (camera API), which may include a camera manager (camera service), and the camera access interface is used to provide an application programming interface and a programming framework for camera applications.

[0075] The hardware abstraction layer is an interface layer located between the application framework layer and the kernel layer, providing a virtual hardware platform for the operating system.

[0076] In the embodiment of the present application, the hardware abstraction layer may include a camera hardware abstraction layer (camera HAL).

[0077] The camera hardware abstraction layer (HAL) includes a camera abstraction module, a frame stabilization algorithm module, an image recognition module, filters, beautification, and background blurring modules. The HAL connects the API from the camera application layer to the underlying camera driver and hardware, providing specific camera functions and services.

[0078] Among them, the camera abstraction module controls the processing of other modules such as the frame stabilization algorithm module and the image recognition module.

[0079] The frame stabilization algorithm module can perform frame stabilization processing in the video mode and the movie mode, and determine whether to prompt the current scene or stop prompting the current scene.

[0080] After receiving the image captured by the camera device driver, the image recognition module can start acquiring the image and identify the corresponding scene according to the current mode. For example, in photo mode, it can identify the photo scene. In video mode, it can identify the video scene.

[0081] Functional modules such as filters, beautification, and background blur can call on the processing resources of the graphics processor to process the acquired image frames to obtain corresponding images. The above functional modules are only exemplary and not limiting.

[0082] The scene recognition module can be used to calculate whether the current shooting scene of the electronic device is moving.

[0083] The kernel layer is the layer between hardware and software. The kernel layer includes drivers for various hardware.

[0084] In some embodiments, the kernel layer may include a camera device driver, a graphics processor driver, a DP driver, and the like.

[0085] The DP driver is used to start the camera, adjust the focus, and so on. The camera device driver drives the camera's sensor to capture images and the image signal processor to pre-process them. The graphics processor driver drives the graphics processor to process images.

[0086] The hardware layer may include a camera module, an image signal processor, an image processor, an image buffer, and the like.

[0087] The camera module may include multiple cameras and multiple sensors for capturing images. For example, the camera module may include camera 1, camera 2, and so on. An image signal processor processes the images captured by the cameras and uploads them to the camera device driver. The processed images are then cached in an image buffer. The image processor, driven by a graphics processor, processes the images in the image buffer and stores them in the image buffer.

[0088] The camera module may include a camera (e.g., Figure 1 Modules such as camera 1 and camera 2 (e.g., in the image sensor) and an image sensor (not shown) are included. When the camera receives light and presents it on the image sensor, the camera module can obtain continuously exposed image frames. The image signal processor can obtain the continuously exposed image frames from the camera module and pre-process them. After that, the image signal processor can send them to the camera hardware abstraction layer through the camera device driver. After pre-processing, the image signal processor can store the image frames in an image buffer for image processing by the camera hardware abstraction layer.

[0089] The camera abstraction module can call the functions of the frame stabilization algorithm module, image recognition module, filter, beauty and background blur modules. The filter, beauty and background blur modules can be driven by the image processor to call the graphics processor to perform the above functions on the image in the image buffer and store the processing results in the image buffer.

[0090] When a user uses an electronic device to take pictures, the electronic device can take pictures in different modes, thereby ensuring that the way the pictures are adjusted is in line with the user's desired scenario.

[0091] In an embodiment of the present application, the electronic device can include three camera modes during the shooting process: photo mode, video mode, and movie mode. In photo mode, the electronic device can capture images in different photo scenes; in video mode, the electronic device can record videos in different video scenes. In movie mode, the electronic device can record movies in different movie scenes. The following describes the scenarios of the three camera modes.

[0092] Figures 2A to 2I This is a set of user interface diagrams disclosed exemplarily in the embodiments of this application. Figures 2A to 2I , specifying the photo taking mode.

[0093] Figure 2A The user interface diagram of the electronic device is shown as an example. The user turns on his electronic device and the display screen of the electronic device displays the desktop of the electronic device, that is, the user interface 210. Figure 2A As shown, the user interface 210 may include at least one application icon (e.g., settings, application market, gallery, browser, camera, address book, phone, and message, etc.). The positions of the application icons and the corresponding application names may be adjusted according to the user's preferences, which is not limited in the present embodiment.

[0094] It should be noted that Figure 2A The interface diagram of the electronic device shown is an exemplary display of the embodiment of the present application. The interface diagram of the electronic device can also be in other styles, and the embodiment of the present application is not limited to this.

[0095] exist Figure 2A In the example, the user can click the camera control 211 in the user interface 210, and the electronic device can display the camera control 211 after receiving the operation. Figure 2B The user interface shown. Figure 2B FIG. 1 is a schematic diagram of a user interface for shooting. Figure 2B As shown, the electronic device enters the photo taking mode and displays a user interface 220. The user interface 220 may include a preview box 224, a camera mode menu 226, a camera switch control 221, a shooting control 222, an album 223, and a tool menu 225.

[0096] The preview frame 224 is an image of the shooting scene captured by the electronic device through the camera in real time. Figure 2B In the preview box 224, what is displayed is the image of the person captured by the electronic device through the camera.

[0097] The camera mode menu 226 may include options for various camera modes such as night scene, portrait, video, photo, movie, and more. Different camera modes can achieve different shooting functions. The photo mode pointed to by the "triangle" in the camera mode menu is used to indicate the initial or user-selected camera mode, such as Figure 2B As shown in the figure, the “triangle” points to “photograph”, indicating that the current camera is in photo mode.

[0098] The camera switching control 221 is used to switch the camera for collecting images between the front camera and the rear camera.

[0099] The shooting control 222 is used to respond to the user's operation to enable the electronic device to shoot a photo. When the user clicks the shooting control 222, the electronic device can obtain the photo in the current preview box and determine it as the photo shot by the electronic device.

[0100] The photo album 223 is used for users to view the pictures and videos they have taken.

[0101] The tool menu 225 may include a variety of switch controls, namely, a filter switch 225a for turning the filter on or off; a flash switch 225b for turning the flash on or off; a scene recognition switch 225c for turning scene recognition on or off; and a setting control 225d for setting various parameters when capturing images.

[0102] like Figure 2B As shown, when the electronic device turns on the camera and enters the photo mode, the corresponding scene recognition switch 225c is turned on. In contrast, the filter switch 225a and the flash switch 225b are turned off.

[0103] Optionally, when the electronic device turns on the camera and enters the photo mode, the scene recognition switch 225c may be turned off. After the user clicks the scene recognition switch 225c, the electronic device may turn on the scene recognition switch 225c. The default state of other switch controls in the tool menu 225 when entering the photo mode may also be the opposite of the above, which is not limited in the embodiments of the present application.

[0104] When the scene recognition switch 225c is turned on, the electronic device can perform scene recognition on the image frames obtained from the camera, determine the photographing scene corresponding to the current subject, and prompt the user.

[0105] There are many different photo shooting scenes, and different photo shooting scenes are described below with examples.

[0106] 1. Text photo taking scenario:

[0107] Figure 2CThe following is an example of a user interface diagram of an electronic device. The electronic device displays a user interface 230 in the preview interface of the camera mode. The image captured by the electronic device in the preview frame 231 is a text image on a piece of paper. A prompt window 232 (which can be called a "capsule pop-up window") can be displayed in the preview frame 231. The prompt window 232 may include a text prompt "text" and an icon prompt of the text. When the user observes the prompt window 232 pop-up in the user interface 230, it indicates that the electronic device has entered the text photography scene in the camera mode.

[0108] After the "text" capsule pop-up window is displayed in the preview frame 231 of the electronic device for a period of time, the capsule pop-up window can be simplified. Figure 2D As shown, the electronic device can display a user interface 240, wherein the pop-up capsule window in the preview box 241 changes from the prompt window 232 with the text prompt "text" and the icon prompt of the text to a prompt window 242 that only displays the icon prompt of the text. In this way, the display area of ​​the pop-up capsule window can be reduced while reminding the user of the current photo shooting scene. If the electronic device cannot detect the text afterwards, Figure 2B As shown, the electronic device can display the user interface 220, the text image on the paper does not exist in the preview box 224, and the "text" capsule pop-up window is not displayed in the preview box.

[0109] If the user needs to exit the current text photo shooting scene, he can click the prompt window 242 in the user interface 240 (or click the prompt window 232 in the user interface 230). In response to the user's operation of exiting the text photo shooting scene, the electronic device can exit the display of the text photo shooting scene. Figure 2E As shown, the electronic device can display user interface 250. The preview box 251 in user interface 250 changes from the open state of prompt window 242 to the closed state of prompt window 252, indicating the "text" photo scene. The open and closed states of the "text" photo scene can be distinguished by color, shape, etc., which is not limited in this application.

[0110] 2. Dog (animal) photo shooting scene:

[0111] Figure 2F The following diagram illustrates an exemplary user interface of an electronic device. The electronic device displays user interface 260 in a preview interface of camera mode. Preview frame 261 shows a picture of a puppy captured by the electronic device. A prompt window 262 (referred to as a "pop-up capsule") may be displayed in preview frame 261. Prompt window 262 may display the text prompt "dog" and a dog icon. When a user observes prompt window 262 pop up in user interface 260, it indicates that the electronic device has entered the camera mode, where a dog is being photographed.

[0112] 3. People photo shooting scene:

[0113] exist Figure 2G In the preview box 271 of the user interface 270, the picture captured by the electronic device is a person, and a prompt window 272 (which can be called a "capsule pop-up window") can be displayed in the preview box 271. The prompt window 272 can display a text prompt "portrait" and an icon prompt of the portrait. After the user observes the prompt window 272 pop-up in the user interface 270. Among them, the prompt window 272 may include a jump control 2721 of the current photo scene. When the user clicks the jump control 2721, the electronic device can display the shooting method in the "portrait" photo scene. Clicking the jump control 2721 is used to start the portrait photo mode.

[0114] like Figure 2H As shown, the electronic device can start to display the portrait shooting mode. The preview box 281 of the user interface 280 can display the beauty control 282 and the background blur control 283. If the user needs to use the relevant portrait processing function, he can click the control of the corresponding function, and the electronic device can call the relevant function module of the camera hardware abstraction layer to process the image. For details, please refer to Figure 1 In addition, after the user clicks on the above-mentioned beauty function, the electronic device can display the beauty adjustment parameter controls for the user to adjust, and the same applies to background blur.

[0115] 4. Green plant photo shooting scene:

[0116] exist Figure 2I In the example, a preview box 291 of user interface 290 shows a picture of a succulent plant captured by the electronic device. A prompt window 292 may be displayed in the preview box 291. The prompt window 292 may display a text prompt "Green Plant". When the user observes the prompt window 292 pop-up in user interface 290, it indicates that the electronic device has entered the photo mode for photographing a green plant.

[0117] Optionally, the electronic device may be capable of displaying multiple photo shooting scenes simultaneously, which is not limited in this application.

[0118] The above-mentioned "capsule pop-up window" may include text and / or icon prompts of the corresponding scene, which is not limited in this application.

[0119] In the embodiment of the present application, the information prompted by the "capsule pop-up window" is related to the information in the picture and the common functions that the camera needs to call. If the current scene needs to provide new functions for the user, the "capsule pop-up window" needs to provide a jump control (for example, Figure 2G ), an interface for users to click to start the response function. If the current scenario does not require the user to process or use the function, (for example Figure 2F), the capsule pop-up window does not need to provide a jump control. Therefore, the presence or absence of the jump control depends on the situation and is not limited in the embodiments of the present application.

[0120] Figures 3A to 3I This is another set of user interface schematic diagrams disclosed in an exemplary embodiment of the present application. The electronic device enters a video recording mode and performs scene recognition in the video recording mode.

[0121] After the electronic device displays the user interface of the photo mode, assuming that the electronic device displays the user interface 220 (i.e., the electronic device displays the preview screen of the photo), the user can click the video control in the camera mode menu. In response to the operation on the video control, the electronic device can display the user interface 310, in which the "triangle" points to "video", indicating that the current camera is in the video mode. Figure 3A As shown, the preview box 311 of the user interface 310 is a preview interface in the video recording mode. At this time, the user can start recording after clicking the shooting control 312. Optionally, the tool menu can also include a protagonist mode switch 313 to turn on or off the protagonist mode. When the protagonist mode is turned on, the electronic device will record a video of the protagonist in the picture separately during the recording process. For other switch controls, please refer to Figure 2B The relevant description is omitted here.

[0122] In the scene of the video recording mode, the electronic device can perform scene recognition on the picture in the preview frame, determine the video recording scene corresponding to the current subject, and display a prompt window. The video recording scene can be varied. The following is an example description of different video recording scenes (the video recording scenes that can be included in this application can be specifically referred to the above Figure 1 The relevant description in is omitted here).

[0123] 1. Macro video:

[0124] Figure 3B The following diagram illustrates an exemplary user interface of an electronic device. The electronic device displays user interface 320 in the preview interface of the video recording mode. In preview frame 321, the electronic device is filming a succulent plant at a very close distance. A prompt window 322 (referred to as a "capsule pop-up window") may be displayed in preview frame 321. Prompt window 322 may display the text prompt "Macro Video" and an icon prompt indicating macro video recording. When the user observes prompt window 322 pop-up in user interface 320, it indicates that the electronic device has entered the macro video recording scene in the video recording mode.

[0125] After the "macro video" pop-up window is displayed in the preview frame 321 of the electronic device for a period of time, the pop-up window can be simplified. Figure 3CAs shown, the electronic device can display a user interface 330, wherein the prompt window 332 in the preview frame 331 can be changed from including the text prompt "macro video" and the macro icon prompt to only displaying the macro icon prompt. In this way, the display area of ​​the capsule pop-up window can be reduced while reminding the user of the current recording scene. If the electronic device cannot detect the macro scene, Figure 3A As shown, the electronic device can display the user interface 310, there is no object with a very close shooting distance in the preview frame 311, and the "macro video" capsule pop-up window is not displayed in the preview frame.

[0126] If the user needs to exit the current macro video scene, he can click the prompt window 332 in the user interface 330. In response to the user's operation of exiting the macro video scene, Figure 3D As shown, the electronic device can display a user interface 340. The prompt window 332 in the preview box 341 in the user interface 340 changes from an open state to a closed state of the macro video scene. The open and closed states of the macro video scene can be distinguished by color, shape, etc., which is not limited in this application.

[0127] 2. Portrait video:

[0128] exist Figure 3E In the preview box 351 of the user interface 350, the image captured by the electronic device is a person, and a prompt window 352 (which can be called a "capsule pop-up window") can be displayed in the preview box 351. The prompt window 352 can display a text prompt "portrait recording" and an icon prompt of the portrait recording. The prompt window 352 can include a jump control, and the user can click the jump control to enter the portrait recording mode. After entering the portrait recording mode, the electronic device can provide corresponding function controls. For details, please refer to Figure 2H The beauty control 282 and background blur control 283 are not described in detail.

[0129] 3. Night scene video:

[0130] exist Figure 3F In the preview box 361 of the user interface 360, the light in the picture captured by the electronic device is relatively low, and a prompt window 362 (which can be called a "capsule pop-up window") can be displayed in the preview box 361. The prompt window 362 can display the text prompt "Night Scene Recording" and an icon prompt for night scene recording. The prompt window 362 can include a jump control. The user can click the jump control to enter the night scene recording mode. After entering the night scene recording mode, the electronic device can provide the corresponding night scene recording function control.

[0131] 4. High dynamic range video:

[0132] exist Figure 3GIn the example, if the brightness range of the image captured by the electronic device in the preview box 371 of the user interface 370 is relatively large, a prompt window 372 (which may be referred to as a "capsule pop-up window") may be displayed in the preview box 371. The prompt window 372 may display the text prompt "High Dynamic Range Recording" and an icon prompt for high dynamic range recording. The prompt window 372 may include a jump control, which the user can click to enter high dynamic range recording mode. After entering high dynamic range recording mode, the electronic device may provide corresponding high dynamic range recording function controls.

[0133] 5. Multi-camera recording:

[0134] exist Figure 3H In the user interface 380, the preview box 381 of the electronic device shows a person in the image. A prompt window 382 (which may be called a "capsule pop-up window") may be displayed in the preview box 381. The prompt window 382 may display the text prompt "Multi-camera recording" and an icon prompt for multi-camera recording. When the user observes the prompt window 382 pop-up in the user interface 380, it indicates that the electronic device has entered the multi-camera recording scene in the recording mode.

[0135] It should be noted that the five scenes described above are merely exemplary descriptions and may include other recording scenes, which are not limited in the implementation of this application.

[0136] Optionally, the electronic device can record multiple scenes simultaneously.

[0137] For example, Figure 3I As shown, the electronic device captures a scene in preview box 394 of user interface 390, depicting a person in dimly lit conditions with significant brightness variations. User interface 390 can display prompt window 391, prompt window 392, and prompt window 393 (referred to as "capsule pop-up windows"). Prompt window 391 is a capsule pop-up window for "Portrait Video"; prompt window 392 is a capsule pop-up window for "High Dynamic Range Video"; and prompt window 393 is a capsule pop-up window for "Night Scene Video." These three prompt windows can appear simultaneously in the video preview interface.

[0138] Figure 4A-4B This is another set of user interface schematic diagrams disclosed illustratively in the embodiments of the present application. The electronic device enters the movie mode and performs scene recognition in the movie mode.

[0139] After the electronic device displays the user interface of the movie mode, assuming that the electronic device displays the user interface 410, the user can click the movie control in the movie mode menu. In response to the operation on the movie control, the electronic device can display the user interface 410, at which time the "triangle" points to "movie", indicating that the current camera is in movie mode. Figure 4AAs shown, the preview box 411 of the user interface 410 is a preview interface in the movie mode. At this time, the user can start recording a movie after clicking the shooting control 412.

[0140] Optionally, in movie mode, the electronic device may display filter controls for a variety of movie filters, such as Figure 4A As shown, the electronic device can display four filter controls: Filter 1, Filter 2, Filter 3, and Filter 4. When the user clicks one of the filter controls, the filter mode of the electronic device's movie is adjusted to the corresponding mode. The filter types are diverse, such as Gothic, Hollywood Classic, Soft, Black and White, Emboss, etc., and this application is not limited thereto.

[0141] In the movie mode, the electronic device can perform scene recognition on the preview frame, determine the movie scene corresponding to the current subject, and prompt the user to enter the filter. Movie scenes can be diverse, and the following examples are provided for different movie scenes.

[0142] 1. Classic Hollywood movie scenes:

[0143] Figure 4B The following is an example of a user interface diagram of an electronic device. The electronic device displays user interface 420 in a preview interface of movie mode. The image captured by the electronic device in preview frame 421 is a person. A prompt window 422 (which can be called a "capsule pop-up window") can be displayed in preview frame 421. Prompt window 422 can display the text prompt "Hollywood Classic" and a Hollywood Classic filter icon prompt. When the user observes the pop-up prompt window 422 in user interface 420, it indicates that the electronic device has entered a movie scene with a Hollywood Classic filter in movie mode.

[0144] After the "Hollywood Classics" pop-up window is displayed in the preview frame 421 of the electronic device for a period of time, the pop-up window can be simplified. Figure 2D If the user needs to exit the current text movie scene, he can click the prompt window 422 in the user interface 420. The exit movie photo scene display method can refer to Figure 2E The relevant description is omitted here.

[0145] In the movie recording mode, the movie scenes are varied. The movie scene prompt window of the preview screen shot by the electronic device can refer to Figure 2C to Figure 2I The relevant description of the embodiments of this application will not be repeated.

[0146] It should be noted that the scenes included in the above three camera modes can be the same or different, and the embodiment of the present application is not limited thereto.

[0147] In the three camera modes, after the electronic device has displayed a capsule pop-up window, if it needs to simplify the display of this capsule pop-up window after a period of time, the simplified display may include the icon prompt therein without displaying the text prompt (for example, Figure 2D , the simplification of other prompt capsules can also refer to this method, which will not be repeated); after simplification, the prompts can also include text prompts instead of icon prompts, which is not limited in the embodiments of the present application.

[0148] For the aforementioned electronic devices in photo mode, video mode, and movie mode, if scene recognition is enabled in the preview mode screen, upon detecting a scene entry, the electronic device can directly enter that scene and display a corresponding pop-up window. However, changes in the content of the electronic device's preview screen may require a change in the corresponding scene, without requiring adjustments to the shooting scene. This change may involve capturing a scene or exiting the current scene. For example, a user might want to capture a flower with their phone, but a dog appears in the preview screen, causing the phone to exit the flower scene and switch to the dog scene. Another example is a user capturing a person, but the camera becomes obscured, and the user resumes capturing the person. This causes the user to re-recognize and enter the portrait video mode after exiting the preview mode. In this process, the scene exits when it is not necessary to exit, and directly enters (with a pop-up window) when it is not appropriate to enter. Therefore, during shooting, the scene entry and exit process in the three camera modes described above is unstable, and the pop-up window display is also unstable, resulting in an unstable display, poor display quality, and a poor user shooting experience.

[0149] In response to the above-mentioned scenario, an embodiment of the present application proposes a shooting method, wherein the camera mode of the electronic device may include a photo mode, a video mode, and a movie mode. After the electronic device opens the camera and enters the camera application, it may enter the first camera mode and perform scene recognition processing on the continuously exposed image frames. The scene recognition function is capable of performing scene recognition on scenes in the above-mentioned three camera modes. After detecting that the first image frame meets the first scene recognition condition in the first camera mode, it determines whether the first scene recognition condition is met in all subsequent image frames of the first stable frame length. If so, the electronic device shoots according to the shooting mode of the first camera scene; otherwise, the shooting mode remains unchanged. The electronic device may determine whether a prompt message for the second shooting scene is required to be displayed for the first number of consecutive stable frames. If so, the electronic device may display the prompt message for the second shooting scene; otherwise, it does not display the prompt message. The electronic device continues scene recognition and finds that the second image frame does not meet the above-mentioned scene recognition condition. It may determine whether the first scene recognition condition is met in all subsequent image frames of the second stable frame length. If so, the shooting mode of the first shooting scene is exited; otherwise, the shooting mode is maintained. Afterwards, the electronic device determines whether the prompt information of the second shooting scene is canceled for the second number of consecutive stable frames. If so, the electronic device can cancel the prompt information of the second shooting scene; otherwise, it keeps displaying. In this way, when the electronic device enters or exits the shooting mode of a certain scene (in photo, video and movie modes), it can perform delayed execution according to the corresponding stable frame conditions (the first stable frame duration and the second stable frame duration). Displaying the prompt information or canceling the display of the prompt information is delayed according to the stable frame strategy (the first stable frame number and the second stable frame number), which can ensure the effectiveness and accuracy of the execution while ensuring the stability of entering and exiting the scene, ensuring the accuracy of the prompts on the preview screen, and improving the user's shooting experience.

[0150] Figure 5 This is a flow chart of a method for photographing disclosed in an embodiment of the present application. Figure 5 As shown, the method for shooting and stabilizing frames may include but is not limited to the following steps:

[0151] In the embodiment of the present application, the camera mode includes three modes: photo mode, video mode and movie mode. Each camera mode can include multiple shooting scenes. For details, please refer to the above Figures 1 to 4B The relevant description in is not repeated here.

[0152] S501: When the electronic device enters a first camera mode, the electronic device performs scene recognition processing on continuously exposed image frames.

[0153] The user can click on the control for starting the first camera mode (for details, please refer to the first operation in S601, the second operation in S701 and the third operation in S801). In response to the above operation, the electronic device can obtain the operation instruction for starting the first camera mode, and the electronic device can enter the first camera mode. In the embodiment of the present application, the first camera mode can be one of the photo mode, video mode and movie mode. The operation of starting the photo mode can refer to Figures 2A to 2C ; For the operation of opening the video mode, please refer to Figure 3A and Figure 3B ; For the operation of opening the movie mode, please refer to Figure 4A In addition, the specific process of entering the first camera mode in the corresponding camera mode can also be referred to Figures 6 to 8 The relevant description in is not repeated here.

[0154] In the first camera mode, if the scene recognition function is enabled, the electronic device can perform scene recognition processing on the continuously exposed image frames. The activation method of the scene recognition function can refer to the above Figures 2A to 2I After the electronic device turns on the camera, the camera begins continuous exposure to obtain image frames. The electronic device can then perform scene recognition processing on the image frames, i.e., determine whether the image frames meet the corresponding scene recognition conditions. Different camera modes have different scene recognition processing methods. For specific scene recognition processing in camera modes, please refer to the relevant descriptions in S609, S709, and S809, and will not be repeated here.

[0155] S502: The electronic device satisfies a first scene recognition condition starting from a first image frame, determines a first shooting scene based on the first scene recognition condition, and determines a first stable frame duration based on the first shooting scene.

[0156] After performing scene recognition processing, the electronic device can determine the scene recognition result for each exposed image frame. Starting from the first image frame, the electronic device determines that the first image frame satisfies the first scene recognition condition. The first scene recognition condition corresponds to the first shooting scene. For details, please refer to the relevant descriptions in Tables 1, 2, and 3.

[0157] For example, the first camera mode is a video mode, and no scene is recognized in the previous images. The first image frame starts, and the distance between the fleshy object and the first image frame is <D1;光照度<L1;变焦倍率=1x(参考表2),满足微距录像的录像场景条件(即第一场景识别条件),因此可以确定第一拍摄场景为微距录像。

[0158] Exemplarily, the first camera mode is the photo mode. When the photo mode is entered, the acquired image frame includes text information, and the object distance is less than a certain distance (refer to Table 1). It is determined that the photo scene conditions for the text photo scene are met (i.e., the first scene recognition conditions). Therefore, it can be determined that the first photo scene is a text photo scene.

[0159] After determining the first shooting scene, the electronic device may determine a first stable frame duration based on the first shooting scene. The first stable frame duration may include a photo start duration, a video start duration, and a movie start duration. The specific first stable frame durations corresponding to different shooting scenes in the same camera mode may be the same or different.

[0160] Specifically, the electronic device can determine the first stable frame duration corresponding to the first shooting scene based on a first mapping relationship; the first mapping relationship is a mapping relationship between the shooting scene and the start-up stable frame duration; the first stable frame duration is the start-up stable frame duration corresponding to the first shooting scene; the electronic device stores the first mapping relationship. For details of the first mapping relationship, please refer to the relevant information in Tables 1, 2, and 3. It should be noted that the first scene recognition conditions corresponding to different shooting scenes should be different. For details, please refer to the relevant descriptions in S609, S709, and S809, which will not be repeated here.

[0161] S503: The electronic device determines whether all image frames within the first stable frame duration meet the first scene recognition condition. If so, execute S505; otherwise, execute S504.

[0162] The electronic device starts from the first image frame and determines whether all image frames within a first stable frame time length meet the first scene recognition condition.

[0163] For example, the first stable frame duration is 10 seconds, and the first shooting scene is macro video in video mode. The electronic device can start from the first image frame and determine whether the image frames within the subsequent 10 seconds all meet the recording scene conditions for macro video (first scene recognition conditions). Assuming that 30 frames of images are acquired within 10 seconds after the first image frame, it can be determined whether these 30 frames of images all meet the recording scene conditions for macro video. In this way, the electronic device can detect whether the image frames within a period of time stably meet the first scene recognition conditions, thereby ensuring the stability of the shooting mode.

[0164] S504: The electronic device maintains the current shooting mode to capture image frames.

[0165] The electronic device may not adjust the shooting mode. For example, in the photo mode, if the electronic device does not recognize a face, the shooting mode does not need to focus on the face; if the electronic device recognizes a face but the face is unstable (the face appears and disappears during the first stable frame period), the electronic device does not focus on the face.

[0166] S505: The electronic device collects image frames based on the shooting mode of the first shooting scene.

[0167] The electronic device can determine the shooting mode of the first shooting scene and collect image frames according to the shooting mode.

[0168] Exemplarily, in the face photographing scene, if the face photographing scene condition in S503 is met within the first stable frame duration, the face can be focused (the shooting mode of the first shooting scene).

[0169] It should be noted that the shooting mode of different first shooting scenes can be different, and specific descriptions can be referred to the descriptions of the first photographing mode in S609, the first video recording mode in S709, and the first movie mode in S809, which will not be repeated herein.

[0170] Specifically, S505 can be referred to the descriptions of S613, S713, and S813, which will not be repeated herein.

[0171] S506: The electronic device determines the first stable frame number based on the second shooting scene.

[0172] After S505 is performed, the electronic device can determine that the shooting mode is adjusted, and then begin to determine that the image frame needs to display the prompt information of the second shooting scene. Then, the electronic device can determine the first stable frame number based on the first shooting scene. The entering frame number conditions in Table 1, Table 2, and Table 3 can be referred to.

[0173] Previously, the electronic device can first determine the second shooting scene through the first shooting scene.

[0174] In a possible implementation, the second shooting scene is selected from the first shooting scene according to the priority of the type of the shooting scene, and the shooting scene type of the second shooting scene is the shooting scene type with high priority in the shooting scene type in the first shooting scene. The related descriptions of S611, S711, and S811 can be referred to.

[0175] S507: The electronic device determines whether the image frames of the first stable frame number in succession all need to display the prompt information of the second shooting scene. If yes, S509 is performed; otherwise, S508 is performed.

[0176] Exemplarily, whether all the image frames (30 image frames after the first image frame) within the first stable frame duration of 10s meet the first scene recognition condition, the first frame after the 30 image frames is the image frame that needs to display the prompt information of the second shooting scene, and then it can be determined whether the image frames of the first stable frame number in succession all need to display. The related descriptions of S506 and S507 can be referred to the descriptions of S613, S713, and S813, which will not be repeated herein.

[0177] S508: The electronic device does not display the prompt information of the second shooting scene.

[0178] The electronic device may not process the information, that is, may simply keep the information from being displayed.

[0179] S509: The electronic device displays prompt information of the second shooting scene.

[0180] Among them, S509 can refer to S614~S615, S714~S715 and S814~S815, as well as Figure 2C to Figure 2I , Figure 3B to Figure 3I and Figure 4B The relevant descriptions of etc. are not repeated here.

[0181] For example, assume the first image frame is a1, the first stable frame duration is 10 seconds, and the image frames 10 seconds after a1 are a1 to a30, totaling 30 frames. Determine whether all 30 frames meet the first scene recognition condition described above; if they do, shoot according to the shooting method of the first shooting scene. Then, image frame a30 determines whether the prompt information of the second shooting scene needs to be displayed; determine whether the image frames starting from image frame a30, which are the first number of stable frames, also determine whether the prompt information of the second shooting scene needs to be displayed. For example, if the first stable frame number is 8, the results from a30 to a37 determine whether the prompt information of the second shooting scene needs to be displayed. If it is determined that it is necessary, the prompt information is displayed; otherwise, it is not displayed.

[0182] As can be seen from the above, in the embodiment of the present application, whether each image frame needs to display the prompt information of the second shooting scene is determined by the scene recognition result of the image frame with the first stable frame length before it. Only when the first scene recognition condition is met can it be determined that the prompt information of the second shooting scene needs to be displayed. Whether it is finally displayed or not also needs to be judged by the number of consecutive first stable frames thereafter. Therefore, the display conditions of the prompt information (capsule window) are relatively strict, so that the accuracy of the display and the stability of the picture can be guaranteed.

[0183] S510: The electronic device does not meet the first scene recognition condition starting from the second image frame, and determines a second stable frame time length based on the first shooting scene.

[0184] The electronic device performs scene recognition processing on the image frames starting from S501, and this processing will be executed as long as the scene recognition function is turned on. After the electronic device shoots according to the shooting method of the first shooting scene in S505, if it detects that the second image frame does not meet the first scene recognition condition, the first shooting scene determines the second stable frame length. The second stable frame length may include the photo exit length, the video exit length and the movie exit length. The specific second stable frame lengths corresponding to different shooting scenes under the same camera mode may be the same or different. For details, please refer to the relevant descriptions in S502, S616, S716 and S816, which will not be repeated here.

[0185] Specifically, the electronic device may determine a second frame stabilization duration corresponding to the first shooting scene based on a second mapping relationship; the second mapping relationship is a mapping relationship between shooting scenes and exit frame stabilization durations; the second frame stabilization duration is the exit frame stabilization duration corresponding to the first shooting scene; and the electronic device stores the second mapping relationship. For details about the second mapping relationship, please refer to Tables 1, 2, and 3.

[0186] S511: The electronic device determines whether all image frames within the second stable frame duration do not meet the first scene recognition condition. If so, execute S513; otherwise, execute S512.

[0187] After determining the second stable frame duration, the electronic device may determine whether all image frames within the second stable frame duration do not meet the first scene recognition condition. Detailed descriptions may be made in S616, S716, and S816.

[0188] S512: The electronic device maintains the shooting mode of the first shooting scene to capture image frames.

[0189] The electronic device does not perform any processing, that is, the first shooting scene is kept unchanged.

[0190] For example, in a face photography scenario (portrait photography), after the electronic device focuses on the face, if it determines that there is an image frame that meets the portrait photography scene condition (first scene recognition condition) within 4 seconds of the photography exit time, it will continue to focus on the face.

[0191] S513: The electronic device exits the shooting mode of the first shooting scene and captures image frames.

[0192] If all the image frames do not meet the first scene recognition condition within the second stable frame time, the electronic device can exit the shooting mode of the first shooting scene and collect image frames.

[0193] For example, in a face photography scenario (portrait photography), after focusing on the face, the electronic device determines that no image frame meets the portrait photography scene condition (first scene recognition condition) within the photography exit time of 4 seconds, exits face focus, and performs center focus.

[0194] Among them, the specific description of S513 can refer to S619, S719 and S819, which will not be repeated here.

[0195] S514: The electronic device determines a second stable frame number based on the first shooting scene.

[0196] After the electronic device exits the capture mode for the first capture scene, it determines that the corresponding image frame needs to exit the display of the prompt information for the second capture scene, and can determine a second stable frame number based on the first capture scene. The second stable frame number can refer to the detailed description of the exit frame number conditions, specifically, S506, S619, S719, and S819 and the descriptions of Tables 1, 2, and 3.

[0197] S515: The electronic device determines whether the prompt information of the second shooting scene is canceled for the second number of consecutive image frames. If so, execute S517; otherwise, execute S516.

[0198] After determining the second stable frame number, the electronic device determines whether the prompt information of the second shooting scene is canceled for all consecutive image frames of the second stable frame number.

[0199] For example, when the electronic device is already in a macro video recording scene, a macro video recording prompt is displayed. If the electronic device determines to cancel the macro video recording prompt after a second number of consecutive stable frames (e.g., 10 frames), the macro video recording prompt may not be displayed; otherwise, the macro video recording prompt remains displayed.

[0200] S516: The electronic device continues to display the prompt information of the second shooting scene.

[0201] The electronic device can keep the prompt information of the second shooting scene unchanged. For details, please refer to and Figure 2C to Figure 2I , Figure 3B to Figure 3I and Figure 4B The relevant descriptions of etc. are not repeated here.

[0202] S517: The electronic device cancels displaying the prompt information of the second shooting scene.

[0203] When the electronic device determines that the prompt information of the second shooting scene is canceled for the image frames of the second stable frame number, the prompt information of the second shooting scene can be canceled. Figure 2C to Figure 2I , Figure 3B to Figure 3I and Figure 4B The relevant descriptions of etc. are not repeated here.

[0204] In the above embodiment, the first stable frame duration and the second stable frame duration may be within the range of 1 to 30 seconds, and the first stable frame number and the second stable frame number may be within the range of 2 to 30 frames.

[0205] For example, assuming the second image frame is b1, the second stable frame duration is 4 seconds, and the image frames 4 seconds after b1 are b1 to b10, a total of 10 frames. Determine whether all 10 frames do not meet the first scene recognition condition described above; if none of them meet the condition, exit the shooting mode for the first shooting scene. Then, determine whether image frame b10 cancels the display of the prompt information for the second shooting scene; determine whether the image frames starting from image frame b10, which are consecutive for the second stable frame number, also cancel the display of the prompt information for the second shooting scene. For example, if the second stable frame number is 5, the results from b10 to b14 satisfy whether to cancel the display of the prompt information for the second shooting scene. If canceled, stop displaying the prompt information; otherwise, keep displaying it.

[0206] As can be seen from the above, in the embodiment of the present application, the determination of whether to cancel the display of the prompt information of the second shooting scene for each image frame is determined by the scene recognition results of the image frame with the first stable frame duration before it. Only when the first scene recognition condition is not met can it be determined that the prompt information of the second shooting scene is canceled. The final display or not also needs to be determined by the number of consecutive second stable frames thereafter. Therefore, the cancellation condition of the prompt information (capsule window) is also relatively strict, so as to ensure the accuracy of the display and the stability of the picture.

[0207] The following combines the above Figures 2A to 2I and Figure 5 Description in Figure 6 Another method flow chart of shooting is disclosed as an example. In the embodiment of the present application, the camera mode includes three modes: photo mode, video mode and movie mode. Figure 1 The workflow of the frame stabilization method for scene recognition in the electronic device in the photo mode (the first camera mode is the photo mode) is described. The method flow may include but is not limited to the following steps:

[0208] The electronic device may include an application layer and a camera hardware abstraction layer, and the application layer may include a camera application. Among them, the camera application of the application layer may include a camera application module, a mode switching module, a scene recognition module, a frame stabilization processing module and a prompt module. The camera hardware abstraction layer is in the hardware abstraction layer, which may include an image recognition module and a camera abstraction module. The detailed description of the above modules can be referred to Figure 1 The relevant description in is not repeated here.

[0209] S601: The camera application module obtains a first operation.

[0210] like Figure 2A As shown, the user clicks the camera control 211 in the user interface to turn on the camera. In response to the user's operation on the camera control 211, the camera application module can obtain the first operation of the user to start the camera.

[0211] like Figure 2A As shown, the user clicks the control to open the camera, and the electronic device displays a preview screen for taking a photo. In the preview screen, the electronic device enters the photo mode by default and turns on the scene recognition function. The electronic device can perform scene recognition processing on the image frames obtained from the camera and perform scene processing based on the recognition results.

[0212] Optionally, when the user is in a preview screen of another camera mode (eg, a video recording mode), after the user clicks a photo taking control (a first operation), the electronic device may also display a preview screen of the photo taking mode.

[0213] S602: The camera application module sends a photo-taking start instruction to the mode switching module.

[0214] After the camera application module acquires the first operation, it can send a photo start instruction to the mode switching module. Correspondingly, the mode switching module can receive the photo start instruction from the camera application module.

[0215] The photo-taking start instruction is used to instruct the module to switch to start the photo-taking mode.

[0216] S603: The mode switching module starts the photo taking mode based on the photo taking start instruction.

[0217] After the mode switching module receives the photo start instruction from the camera application module, it can start the photo mode based on the photo start instruction. Specifically, after the mode switching module can confirm that the current camera mode is the photo mode, the mode switching module can configure the camera's data stream. That is, the electronic device can turn on or switch the camera in the current mode (for example, the main camera), and configure the image data collected by the camera, image processing, image display channels, etc. For example, turn on the main camera, and cache the image on the sensor corresponding to the main camera to the corresponding buffer. The camera application module can call the data in this buffer for processing or display, etc. It can be understood that after turning on the photo mode, the electronic device uses the data channel in the photo mode to ensure that the electronic device displays the acquired image. Furthermore, the electronic device can display the taken photos, and the display results can be referred to. Figure 2B The relevant description is omitted here.

[0218] S604: The mode switching module sends a photo-taking scene trigger instruction to the scene recognition module.

[0219] After the mode switching module turns on the photo mode, it can send a photo scene triggering instruction to the scene recognition module. Correspondingly, the scene recognition module can receive the photo scene triggering instruction from the mode switching module.

[0220] The photo scene trigger instruction is used to instruct the scene recognition module to enable scene recognition in the photo mode. The photo scene trigger instruction may include the photo mode identifier. For example, the photo mode identifier is "1," the video mode identifier is "2," and the movie mode identifier is "3." The photo scene trigger instruction may include the identifier "1." Therefore, if the video mode is enabled, the mode switching module should send a video scene trigger instruction including "2" to the scene recognition module; if the movie mode is enabled, the mode switching module should send a movie scene trigger instruction including "3" to the scene recognition module.

[0221] S605: The scene recognition module sends a photo-taking and frame-stabilizing instruction to the frame-stabilizing processing module.

[0222] After receiving the scene trigger instruction, the scene recognition module can send a picture taking and stabilizing frame instruction to the frame stabilization processing module. Correspondingly, the frame stabilization processing module can receive the picture taking and stabilizing frame instruction from the scene recognition module.

[0223] The frame stabilization instruction for taking a photo is used to instruct the frame stabilization processing module to enable the frame stabilization processing function in the photo scene. The frame stabilization instruction for taking a photo may include a label of a photo mode.

[0224] S606: The frame stabilization processing module enables the photo frame stabilization function based on the photo frame stabilization instruction.

[0225] After receiving the frame stabilization instruction from the scene recognition module, the frame stabilization processing module can enable the frame stabilization function based on the frame stabilization instruction. Specifically, the frame stabilization processing module can start the frame stabilization algorithm and wait for data to be processed for frame stabilization (the data to be processed for frame stabilization can be the first frame stabilization scene information in S612). After receiving the data, the frame stabilization processing can be performed immediately.

[0226] S607: The scene recognition module sends a photo-taking scene start instruction to the camera abstraction module.

[0227] After the scene recognition module receives the photo scene trigger instruction, it can send a photo scene start instruction to the camera abstract module. Correspondingly, the camera abstract module can receive the photo scene start instruction from the scene recognition module. Specifically, the scene recognition module can send the photo scene start instruction to the camera abstract module through the camera access interface. For details, please refer to Figure 1The related description of the foregoing is not repeated.

[0228] The photographing scene starting instruction can include a tag of the photographing mode. In addition, the tags of the photographing mode, the video recording mode and the movie mode are all different and can be uniquely identified by the tags.

[0229] The execution order of S605 and S607 is not limited, S605 can be executed first and then S607 can be executed, or S607 can be executed first and then S605 can be executed.

[0230] S608: The camera abstraction module sends the photographing scene starting instruction to the image recognition module.

[0231] After the camera abstraction module obtains the photographing scene starting instruction, the photographing scene starting instruction is sent to the image recognition module. Correspondingly, the image recognition module can receive the photographing scene starting instruction from the camera abstraction module.

[0232] After the camera abstraction module receives the photographing scene starting instruction, the photographing scene starting instruction can be used to determine to start the photographing scene recognition function, and the corresponding mode needs to be controlled to recognize the scene, that is, the photographing scene starting instruction can be sent to the image recognition module, and the photographing scene starting instruction can be used to instruct the image recognition module to start the photographing scene recognition function, so as to recognize the photographing scene.

[0233] S609: The image recognition module starts the photographing scene recognition function based on the photographing scene starting instruction, and in the case that the first photographing scene is recognized, the first photographing mode is controlled to enter based on the first stable frame photographing condition of the first photographing scene.

[0234] After the image recognition module obtains the photographing scene starting instruction, the photographing scene recognition function can be started. Specifically, the image recognition module can start mounting the photographing scene recognition algorithm, and perform photographing scene recognition on the obtained image frame according to the above algorithm. For example, the image recognition module can determine the type of the shooting subject (for example, person, text, dog, etc.) in the image frame through the neural network mode, and determine whether the type can correspond to one or several photographing scenes. If it can correspond, it is judged that this image frame corresponds to a photographing scene (for example, portrait). The first photographing scene is the first shooting scene in the photographing scene. Figure 5

[0235] ​After performing photo scene recognition, the image recognition module can determine whether a certain photo scene is recognized. When one or more photo scenes are recognized (these one or more photo scenes are collectively referred to as the first photo scene), the image recognition module can control the entry into the first photo mode based on the first stable frame photo condition of this photo scene. Specifically, the image recognition module can determine the first stable frame photo condition corresponding to the first photo scene (that is, the stable frame photo condition of the first photo scene), and then determine whether the acquired image frame meets the first stable frame photo condition. When the first stable frame photo condition is met, the image recognition module can control the entry into the first photo mode; when the first stable frame photo condition is not met, it can control the entry into the first photo mode. Among them, the first photo mode is Figure 5 How the first shooting scene in was shot.

[0236] Among them, the current mode is to enter a certain shooting scene, so the first stable frame shooting condition should be the condition of the shooting start time. Figure 5 The first stable frame duration in may be the start-up stable frame duration.

[0237] The processing of S609 can be specifically described through the contents of steps 1 to 4:

[0238] Step 1: The image recognition module performs photo scene recognition (i.e., scene recognition processing).

[0239] After the photo scene recognition function is started, the image recognition module may begin to perform photo scene recognition.

[0240] The image recognition module can obtain the image frames continuously exposed by the camera from the camera device driver, and then detect whether each image frame meets the conditions of a certain photo shooting scene.

[0241] The image recognition module may store a photographic scene recognition algorithm, and the image recognition module may identify the photographic scene of the image frame through the photographic scene recognition algorithm. The photographic scenes (i.e., the camera scenes in the video recording mode) are diverse, for example: "text", "portrait", "cat", "dog", "sunrise", "sunset", "clothing", "waterfall", "night scene", "green plants", "cup", "beach", "seaside", "architecture" and "fallen leaves" and other photographic scenes. The above-mentioned photographic scenes are merely illustrative and are not limited in the embodiments of the present application.

[0242] Table 1 is an information table of a photographing scene exemplarily disclosed in an embodiment of the present application.

[0243] Table 1

[0244]

[0245] As shown in Table 1, the execution logic of the photo scene recognition algorithm can include photo scene conditions corresponding to different scenarios. For portrait photography, the condition is that the image frame contains an image with a person as the subject; for text photography, the condition is that the object distance of the image frame is less than a preset distance and the image frame contains text information; for night scene photography, the condition is that the average brightness of the image frame is less than a preset brightness threshold; for moon photography, the condition is that the image frame contains the moon; for sunrise photography, the condition is that the current time is local morning and the image frame contains the sun; for building photography, the condition is that the subject position in the image includes a building; for cat photography, the condition is that the image contains a cat, and so on. The above descriptions are merely illustrative and will not be elaborated on.

[0246] It should be noted that one image frame may satisfy one photographic scene condition or multiple photographic scene conditions at the same time. For example, when taking a photo of a person outdoors at night, the image frame may satisfy both night scene and portrait photographic scenes.

[0247] In the above process, the image recognition module can determine whether the image frame meets the photographic scene condition through the photographic scene recognition algorithm. If it does, it is determined that the first photographic scene is recognized, and the first photographic scene is a scene that meets the photographic scene condition.

[0248] Step 2: After the image recognition module recognizes the first photographing scene, it determines a first stable frame photographing condition for the first photographing scene based on the first photographing scene.

[0249] The image recognition module may store a mapping relationship between photographing scenes and frame-stabilized photographing conditions, and may determine a first frame-stabilized photographing condition corresponding to the first photographing scene based on the mapping relationship.

[0250] Table 1 exemplarily discloses a mapping relationship table between a photographing scene and a frame-stabilizing photographing condition (i.e. Figure 5 (The first mapping relationship and the second mapping relationship in Table 1). According to the mapping relationship in Table 1, when the first photo scene is text, the first stable frame photo condition is the condition of "photo start duration 1s". "Photo start duration 1s" means that starting from the current image frame meeting the first photo scene condition, the image frames within a continuous period of 1s all meet the stable frame photo condition of the first photo scene condition. The meanings of the stable frame photo conditions for other photo scenes are basically the same as those above and are not repeated here. Among them, the photo start duration can be in the range of 1 to 20 seconds.

[0251] Step 3: The image recognition module determines whether the first stable frame shooting condition is met.

[0252] After determining the first stable-frame photography condition, the process can then determine whether the first stable-frame photography condition is met. Specifically, if all image frames within the initial capture duration meet the first scene condition, the image recognition module determines that the first stable-frame photography condition is met. Otherwise, the process determines that the first stable-frame photography condition is not met. If the first stable-frame photography condition is met, the process proceeds to step 4; if not, the process does not proceed.

[0253] Step 4: The image recognition module enters the first photographing mode (first shooting mode) of the first photographing scene.

[0254] When the first stable frame photography condition is met, the image recognition module enters the first photography mode of the first photography scene. That is, the image recognition module can shoot based on the photography mode of the first photography scene (collect image frames according to the photography mode of the first camera scene). For example, when the electronic device enters the text photography scene, it can switch the camera from the main camera to the wide-angle camera (first photography mode); when entering the portrait photography scene, it can remind the user to enter the portrait mode to take a photo (first photography mode). It should be understood that in different photography scenes, the specific method of starting the first photography mode may be different, and this application is not limited.

[0255] In the above-described embodiment, the electronic device can initiate scene recognition after receiving a command to initiate a photo scene. Upon identifying a specific scene, the electronic device can identify the scene in accordance with the stable frame photography conditions to determine whether the scene satisfies the stable frame photography conditions. Only when the stable frame photography conditions are met will the camera begin capturing the scene. In this case, the stable frame photography condition determines whether the images captured by the camera consistently meet the first photo scene conditions over a period of time. This ensures that the first photo scene is stable before capturing the scene, preventing the camera from adjusting the capture mode based on changes in one or two frames. This ensures stable capture and avoids wasting processing resources.

[0256] S610: The image recognition module sends first scene start information to the camera abstraction module.

[0257] After entering the shooting method of the first shooting scene, the image recognition module enters the first shooting mode of the first shooting scene and sends the first scene start information to the camera abstraction module. Correspondingly, the camera abstraction module can receive the first scene start information from the image recognition module.

[0258] The first scene startup information may include the identifier of the currently activated photography scene (first shooting scene). Assuming that the currently activated shooting scene is "text", it can be determined that the current label is text and the identifier is a, and the first scene startup information may include a. Assuming that the currently activated scene is "portrait", it can be determined that the current label is portrait and the identifier is b, and the first scene startup information may include b. Assuming that the currently activated shooting scenes are "text" and "portrait", it can be determined that the first scene startup information may include a and b.

[0259] S611: The camera abstraction module determines first stable frame scene information based on the first scene startup information.

[0260] After receiving the first scene start information from the image recognition module, the camera abstraction module may determine first stable frame scene information based on the first scene start information.

[0261] The first frame-stabilized scene information includes at least one of the first photographing scenes included in the first scene startup information as its frame-stabilized photographing scene. After the camera abstract module receives the first scene startup information, it needs to determine the frame-stabilized photographing scene based on the first scene startup information. Each frame-stabilized photographing scene can be uniquely identified by a tag. The frame-stabilized photographing scene and the first photographing scene may be of the same type or different type, which is not limited in this application. The frame-stabilized photographing scene is Figure 5 The second shooting scene.

[0262] In the case where the first scene startup information only includes one photographic scene, the camera abstraction module can determine that the stabilized frame scene information is used to indicate that the photographic scene should be stabilized, that is, the stabilized frame scene information includes the stabilized frame photographic scene, and the stabilized frame photographic scene is the first photographic scene included in the first scene startup information.

[0263] In the case where the first scene activation information includes multiple shooting scenes, it can be determined that the first frame stabilization scene information can include one or more frame stabilization shooting scenes. The specific method for determining the frame stabilization shooting scene is described below:

[0264] Method 1: Determine the stable frame shooting scene according to the priority of the shooting scene in the first scene starting information.

[0265] The camera abstraction module may store priority information for each photo scene. The camera abstraction module may first determine the photo scene in the first scene activation information. The camera abstraction module may then prioritize each photo scene, sort them based on their priority levels, and select the highest-ranked photo scene or the top few photo scenes as the stabilized-frame photo scene.

[0266] For example, the camera abstraction module may store the priorities of various photo scenes as shown in Table 1. (A lower priority number indicates a higher priority.) The camera abstraction module may determine that the first scene activation information includes three photo scenes: portrait, night scene, and moon scene. The portrait scene may have the highest priority, "1"; the night scene scene may have the second highest priority, "3"; and the moon scene may have the lowest priority, "4." The camera abstraction module may determine that the portrait scene is a stabilized frame scene.

[0267] In the above embodiment, the electronic device can determine the stable frame scene that the user is most likely to need in order of priority, and can filter out the scenes that the user does not need, avoiding the appearance of text prompt information that the user does not want, thereby ensuring the accuracy of the stable frame photography scene.

[0268] Method 2: The first photographing scene in the first scene start information is integrated to determine a stable-frame photographing scene (second photographing scene).

[0269] The camera abstraction module may first determine multiple photographic scenes (N) in the first scene startup information. The camera abstraction module may then fuse the photographic scenes to obtain one or more stabilized-frame photographic scenes (M). N is a positive integer greater than M. M is also a positive integer.

[0270] For example, the first scene startup information includes two photographic scenes of "sunset" and "building". The camera abstraction module can fuse these two photographic scenes to obtain a stable-frame photographic scene of "scenery".

[0271] In the above implementation, a frame-stabilized photographing scene that can include one of the above two scenes can be determined, thereby ensuring the accuracy of the frame-stabilized photographing scene while simplifying the scene information and improving the execution efficiency.

[0272] Optionally, the above methods 1 and 2 are combined. When multiple scenes are required, the scenes that can be fused can be fused, and the fusion results are prioritized to determine the stable frame shooting scene.

[0273] In one possible case, the camera abstraction module can fuse multiple scenes in the first shooting scene to obtain multiple stable-frame shooting scenes. The fused stable-frame shooting scenes can then be sorted according to priority, and a stable-frame shooting scene with a higher priority can be selected according to the sorting result to determine the stable-frame shooting scene.

[0274] For example, the camera abstraction module determines the first photo scene as portrait, night scene, moon, and beach. After performing scene fusion, it obtains three stabilized photo scenes: portrait, night scene with moon, and beach. After sorting them in order of priority, the first two are added to the portrait and night scene with moon stabilized photo scenes. In this process, the electronic device can ignore less important scenes and retain the important stabilized scenes. This not only simplifies the subsequent stabilization process and improves processing efficiency, but also ensures the accuracy of scene selection.

[0275] S612: The camera abstraction module sends first frame stabilization scene information to the frame stabilization processing module.

[0276] After determining the first stabilized frame scene information, the camera abstraction module may send the first stabilized frame scene information to the stabilized frame processing module. Correspondingly, the stabilized frame processing module may receive the first stabilized frame scene information from the camera abstraction module. The first stabilized frame scene information includes a stabilized frame shooting scene (a second shooting scene).

[0277] S613: The frame stabilization processing module performs frame stabilization entry processing according to the first frame stabilization shooting strategy based on the first frame stabilization scene information.

[0278] The frame stabilization processing module receives the first frame stabilization scene information, can determine the frame stabilization shooting scene included therein, determine the first frame stabilization shooting strategy, and then can perform frame stabilization processing according to the first frame stabilization shooting strategy. Among them, the first frame stabilization shooting strategy is used to control the strategy of starting to display the prompt information. The prompt information can be the above Figure 2C to Figure 2I The first stable frame shooting strategy may include a frame number condition (entry frame number condition) for delaying the start of displaying the prompt information. For example, if the entry frame number is 4 frames, that is, the entry frame number condition indicates that the prompt information of the stable frame shooting scene starts to be displayed when the first stable frame scene information corresponding to 4 consecutive frames of images indicates the start of displaying the prompt information of the stable frame shooting scene.

[0279] In one possible implementation, the stabilization processing module may store a first stabilization photography strategy. After receiving the first stabilization scene information, the stabilization processing module may determine, based on the first stabilization photography strategy, whether the entry frame number condition in the first stabilization photography strategy is met. If so, S614 is executed; if not, it is not executed. After entering the stabilization photography scene, the first stabilization scene information of K consecutive image frames of the first stabilization photography strategy all include the stabilization photography scene, i.e., it is determined that the entry frame number condition for the stabilization photography scene is met. The K frame size range may be 1-10 frames, for example, 4 frames. K is a positive integer.

[0280] In the above process, assuming that the time interval between two consecutive frames of images is 25ms, 4 frames of images require 25*4=100ms. The stability of 100ms is much greater than the stability of 25ms, which can ensure that the scene prompts will not change frequently during the shooting process, ensuring the stability and reliability of the display interface.

[0281] In another possible implementation, the frame stabilization processing module may store a mapping relationship between a frame stabilization shooting scene and a frame stabilization shooting strategy. The number of stable frames (entry frame number conditions) corresponding to the frame stabilization shooting strategy in the frame stabilization shooting scene may be different. As shown in Table 1, in a portrait photography scene, the first stabilized frame scene information, which requires a frame count of 5 consecutive image frames, includes the portrait stabilized frame photography scene (entering 5 frames means the first stabilized frame count is 5 consecutive frames). The "portrait" prompt will be displayed after 5 frames. In a text photography scene, the "text" prompt will be displayed after 4 consecutive frames of the first stabilized frame count. In a night scene photography scene, the "night scene" prompt will be displayed after 4 consecutive frames of the first stabilized frame count. In a moon photography scene, the "moon" prompt will be displayed after 3 consecutive frames of the first stabilized frame count. In a sunrise photography scene, the "sunrise" prompt will be displayed after 3 consecutive frames of the first stabilized frame count. In a building photography scene, the "building" prompt will be displayed after 3 consecutive frames of the first stabilized frame count. In a cat photography scene, the "cat" prompt will be displayed after 3 consecutive frames of the first stabilized frame count. Table 1 is merely illustrative and not limiting. After determining the first stable frame shooting strategy, a judgment can be made based on the entry frame number condition in the first stable frame shooting strategy. The judgment logic is the same as that of the previous embodiment and will not be repeated.

[0282] In the embodiment of the present application, the entry frame number conditions of different stable frame photography scenes are differentiated to ensure the accuracy of the display.

[0283] S614: The frame stabilization processing module sends a first display instruction to the prompt module.

[0284] After the frame stabilization processing module determines that the first frame stabilization shooting strategy is satisfied, the prompt module may send a first display instruction to the prompt module. Correspondingly, the prompt module may receive the first display instruction from the frame stabilization processing module.

[0285] The first display instruction may be used to instruct the prompt module to start displaying prompt information of the stable frame photography scene (starting the display instruction). The first display instruction may include an identifier of the stable frame photography scene.

[0286] S615: The prompt module displays a photo-taking scene prompt based on the first display instruction.

[0287] After the prompt module receives the first display instruction from the frame stabilization processing module, it can display the prompt information of the frame stabilization shooting scene. Figure 2C to Figure 2I The description of the capsule pop-up window in the .

[0288] S616: When the image recognition module cannot recognize the first photographing scene, the first photographing mode is exited based on the second stable frame photographing condition of the first photographing scene.

[0289] After S608, the image recognition module begins performing image recognition on each subsequent image frame to determine whether the image frame meets the corresponding stable frame shooting conditions. After the image recognition module recognizes the first shooting scene and controls entry into the first shooting scene based on the stable frame shooting conditions, if image recognition continues, if the first shooting scene cannot be recognized, the first shooting mode is exited based on the second stable frame shooting conditions of the first shooting scene. In this case, the second stable frame shooting condition includes entering a certain shooting scene and failing to recognize the shooting scene, and then, starting from the unrecognized image frame, the image frame does not meet the conditions of the shooting scene within the time period of the exit period. That is, if the second stable frame shooting condition is met, the first shooting mode is exited (generally understood as resuming the original shooting mode); otherwise, the shooting mode is not exited.

[0290] For example, as shown in Table 1, the "photo exit time 4s" for the portrait photography scene indicates that starting from the moment the current image frame fails to meet the first photography scene condition, the image frames within 4 consecutive seconds do not meet the second stable frame photography condition of the first photography scene condition. The corresponding second stable frame photography condition for different photography scenes may be different. In Table 1, the photography exit time for the "text" photography scene is 1s; the photography exit time for the night scene is 1s, and so on. Assuming that the current first photography scene is a portrait, if the image frame at time T1 detects that no portrait is recognized, the camera will not exit temporarily; determine whether the image frames received within 4s after T1 do not meet the first photography scene condition. If they do not meet the condition, exit the portrait photography scene, for example, exit the portrait mode; if there is at least one frame of image that meets the condition, exit is not executed (the camera method of the portrait photography scene is continued).

[0291] In the above process, by delaying the judgment of exiting the scene shooting mode, the stability of the shooting mode for entering the shooting scene can be guaranteed, the adjustment of the shooting mode can be reduced, the reliability of the shooting picture can be improved, and the user's shooting experience can be improved.

[0292] S617: The image recognition module sends first scene closing information to the camera abstraction module.

[0293] In a case where the image recognition module determines to exit the first shooting scene, the camera abstraction module can be sent first scene closing information. Correspondingly, the camera abstraction module can receive the first scene closing information from the image recognition module. The first scene closing information includes an identification of the first shooting scene.

[0294] S618: The camera abstraction module sends second steady frame scene information to the steady frame processing module.

[0295] After the camera abstraction module receives the first scene closing information from the image recognition module, the camera abstraction module can determine the second steady frame scene information based on the first scene closing information. Then, the camera abstraction module can send the second steady frame scene information to the steady frame processing module. Correspondingly, the steady frame processing module can receive the second steady frame scene information from the camera abstraction module.

[0296] The second steady frame scene information can be used to indicate prompt information for stopping displaying the second shooting scene. The second steady frame scene information can also include an identification of the first shooting scene (steady frame shooting scene).

[0297] S619: The steady frame processing module performs steady frame exit processing according to a second steady frame shooting strategy based on the second steady frame scene information.

[0298] After the camera abstraction module receives the second steady frame scene information, the camera abstraction module can perform steady frame exit processing according to the second steady frame shooting strategy based on the second steady frame scene information. The second steady frame shooting strategy can be used to control stopping displaying the shooting prompt information. The second steady frame shooting strategy can include a frame number condition (exit frame number condition) for delaying stopping displaying the prompt information. For example, the exit frame number is 4 frames, that is, the exit frame number condition is that the second steady frame scene information corresponding to the continuous 4 frames of images indicates stopping displaying the prompt information of the steady frame shooting scene.

[0299] In a possible implementation, the camera abstraction module can store the second steady frame shooting strategy. After receiving the second steady frame scene information, the camera abstraction module can determine whether the exit frame number condition is met based on the second steady frame shooting strategy, and perform S620 if the exit frame number condition is met; otherwise, the steady frame shooting scene prompt information is ensured to be displayed. The exit frame number condition can be that the second steady frame scene information of the continuous X frames of image frames all include the first steady frame shooting scene, that is, it is determined that the exit frame number condition is met. The size range of the second steady frame number (X) frames can be 1-10 frames, for example, 4 frames. X is a positive integer.

[0300] In the above process, the process of not displaying the capsule popup window can be determined through multiple frames, so that the scene prompt in the shooting process can be prevented from changing frequently, and the stability and reliability of the display interface can be ensured.

[0301] In another possible implementation, the frame stabilization processing module may store a mapping between the frame stabilization photography scene and the exit frame number condition. The exit frame number condition corresponding to the second frame stabilization photography strategy in the frame stabilization photography scene may be different. As shown in Table 1, in the portrait photography scene, the exit display condition is that the second frame stabilization scene information of four consecutive image frames includes an indication that the portrait frame stabilization photography scene is not displayed (exit 4 frames, 4 consecutive frames indicate exit) before the "portrait" prompt message is exited; in the text photography scene, the "text" prompt message is exited after four consecutive frames are exited; in the night scene photography scene, the "night scene" prompt message is exited after four consecutive frames are exited; in the moon photography scene, the "moon" prompt message is exited after three consecutive frames are exited; in the sunrise photography scene, the "sunrise" prompt message is exited after three consecutive frames are exited; in the building photography scene, the "building" prompt message is exited after three consecutive frames are exited; and in the cat photography scene, the "cat" prompt message is exited after three consecutive frames are exited. Table 1 above is merely illustrative and not limiting. After determining the second stable frame shooting strategy, a judgment can be made based on the exit frame number condition in the second stable frame shooting strategy. The logic of the judgment is the same as that of the previous embodiment and will not be repeated.

[0302] In the embodiment of the present application, the exit frame number conditions of different stable frame photography scenes are differentiated to ensure the accuracy of the display.

[0303] S620: The frame stabilization processing module sends a second display instruction to the prompt module.

[0304] After the frame stabilization processing module determines that the second frame stabilization shooting strategy is satisfied, the frame stabilization processing module may send a second display instruction to the prompt module. Correspondingly, the prompt module may receive the second display instruction from the frame stabilization processing module.

[0305] The second display instruction is used to instruct the prompt module to stop displaying the prompt information of the stable frame photography scene.

[0306] S621: The prompt module stops displaying the photo-taking scene prompt based on the second display instruction.

[0307] After the prompt module receives the second display instruction, it stops displaying the photo scene prompt based on the second display instruction. For example, if the current steady-frame shooting scene is a portrait, the result of exiting the steady-frame shooting scene can be as follows: Figure 2B The above scenarios are various and not limited.

[0308] In the above embodiments, the electronic device can delay the execution of the stable frame shooting condition based on different shooting scenes when the shooting mode in the scene enters or exits a certain shooting scene; and the display of the prompt information or the cancellation of the display of the prompt information is delayed based on the stable frame shooting strategy, which can ensure the effectiveness and accuracy of the execution, ensure the stability of the shooting scene entering and exiting, ensure the accuracy of the preview screen prompt, and improve the user's shooting experience.

[0309] The above embodiments are described below in combination with the scene recognition process of the video recording mode in Figures 3A to 3I Figure 7 Another exemplary method flowchart for shooting is disclosed, which is combined with Figure 1 , Figure 5 and Figure 6 The method flowchart can include but is not limited to the following steps:

[0310] The electronic device can include a camera application module, a mode switching module, a first scene recognition module, a second scene recognition module, a camera abstraction module, and a stable frame algorithm module. The above modules can refer to the related descriptions in Figure 1 and Figure 6 , which will not be described here.

[0311] S701: The camera application module obtains a second operation.

[0312] In Figure 2B , the user clicks the video recording control of the camera mode in the user interface to open the video recording mode. In response to the operation of the user acting on the video recording control, the camera application module can obtain the second operation of the user acting on the start of the video recording mode. The electronic device enters the video recording mode and starts the scene recognition function. The electronic device can perform scene recognition processing on the image frames obtained from the camera, and perform scene processing according to the recognition result.

[0313] S702: The camera application module sends a video recording start instruction to the mode switching module.

[0314] After the camera application module obtains the second operation, it can send a video recording start instruction to the mode switching module. Correspondingly, the mode switching module can receive the video recording start instruction from the camera application module.

[0315] The video recording start instruction is used to instruct the mode switching module to start (or switch to) the video recording mode.

[0316] S703: The mode switching module starts the video recording mode based on the video recording start instruction.

[0317] ​After the mode switching module receives the video start instruction from the camera application module, it can start the video mode based on the video start instruction. Specifically, after the mode switching module can confirm that the current camera mode is the video mode, the mode switching module can configure the camera's video data stream. That is, the electronic device can turn on or switch the camera in the current mode (for example, the main camera), and configure the image data collected by the camera, image processing, image display, image storage channels, etc. It can be understood that after turning on the video mode, the electronic device's data channel in the video mode ensures that the electronic device displays the acquired image. Furthermore, the electronic device can display the captured video, and the display results can be referred to. Figure 3A The relevant description is omitted here.

[0318] S704: The mode switching module sends a recording scene trigger instruction to the scene recognition module.

[0319] After the mode switching module turns on the video recording mode, it can send a video recording scene triggering instruction to the scene recognition module. Correspondingly, the scene recognition module can receive the video recording scene triggering instruction from the mode switching module.

[0320] The recording scene trigger instruction is used to instruct the scene recognition module to enable scene recognition in the recording mode. The recording scene trigger instruction may include a recording mode identifier. For example, based on the example in S604, when the recording mode is enabled, the mode switching module should send a recording scene trigger instruction including "2" to the scene recognition module. The above is for illustrative purposes only and is not intended to be limiting.

[0321] S705: The scene recognition module sends a video frame stabilization instruction to the frame stabilization algorithm module.

[0322] After receiving the scene trigger instruction, the scene recognition module can send a video frame stabilization instruction to the frame stabilization algorithm module. Correspondingly, the frame stabilization algorithm module can receive the video frame stabilization instruction from the scene recognition module.

[0323] The video frame stabilization instruction is used to instruct the frame stabilization processing module to enable the frame stabilization processing function in the video recording scene. The video frame stabilization instruction may include a label of the video recording mode.

[0324] S706: The frame stabilization algorithm module enables the video frame stabilization function based on the video frame stabilization instruction.

[0325] After receiving the video stabilization instruction from the scene recognition module, the frame stabilization algorithm module can enable the video stabilization function based on the video stabilization instruction. Specifically, the frame stabilization algorithm module can start the video stabilization algorithm and wait for data to be processed for stabilization (the data to be processed for stabilization can be the first stabilized scene information in S712). After receiving the data, the frame stabilization process can be performed immediately.

[0326] S707: The scene recognition module sends a video recording scene start instruction to the camera abstraction module.

[0327] After the scene recognition module receives the recording scene trigger instruction, it can send a recording scene start instruction to the camera abstraction module. Correspondingly, the camera abstraction module can receive the recording scene start instruction from the scene recognition module.

[0328] The video recording scene start instruction may include a tag for the video recording mode. In addition, the tags for the photo mode, video recording mode, and movie mode are all different and can all be uniquely identified by the tags.

[0329] The execution order of S705 and S707 is not limited.

[0330] S708: The camera abstraction module sends a recording scene start instruction to the image recognition module.

[0331] After the camera abstraction module obtains the video recording scene start instruction, it sends the video recording scene start instruction to the image recognition module. Correspondingly, the image recognition module can receive the video recording scene start instruction from the camera abstraction module.

[0332] After the camera abstract module receives the recording scene start instruction, it can determine to start the recording scene recognition function based on the recording scene start instruction. It needs to control the corresponding mode for scene recognition, that is, it can send the recording scene start instruction to the image recognition module. The recording scene start instruction can instruct the image recognition module to start the image recognition function of the recording scene, thereby identifying the recording scene.

[0333] S709: The image recognition module starts a recording scene recognition function based on the recording scene start instruction, and when a first recording scene is recognized, controls the entry into a first recording mode based on a first stable frame recording condition of the first recording scene.

[0334] After the image recognition module receives the video scene start instruction, it can start the video scene recognition function. Specifically, the image recognition module can start to mount the video scene recognition algorithm and perform video scene recognition on the acquired image frames according to the algorithm.

[0335] After performing recording scene recognition, the image recognition module can determine whether a certain recording scene is recognized. When one or more recording scenes are recognized (the one or more recording scenes are collectively referred to as the first recording scene), the image recognition module can control the entry into the first recording mode based on the first stable frame recording condition of this recording scene. Specifically, the image recognition module can determine the first stable frame recording condition corresponding to the first recording scene (that is, the stable frame recording condition of the first recording scene), and then determine whether the acquired image frame meets the first stable frame recording condition. When the first stable frame recording condition is met, the image recognition module can control the entry into the first recording mode; when the first stable frame recording condition is not met, it can control the entry into the first recording mode (maintaining the original recording mode). Among them, the first recording scene is Figure 5 The first shooting scene in.

[0336] Among them, the first steady-frame recording condition includes the condition of the recording start time and the condition of the recording exit time. The current mode is to enter a certain shooting scene, so the first steady-frame recording condition should be the condition of the recording start time. The recording start time is Figure 5 The first stable frame duration in may be the start-up stable frame duration.

[0337] Step 1: Execute video scene recognition (i.e., scene recognition processing).

[0338] The image recognition module stores the recording scene conditions and determines whether the image frame meets the recording scene conditions of a certain recording scene. If the recording scene conditions are met, the second step is executed; otherwise, it is not executed.

[0339] Table 2 is an information table of a video recording scenario disclosed exemplarily in an embodiment of the present application.

[0340] Table 2

[0341]

[0342] As shown in Table 2, the image recognition module can store the video scenes and the video scene conditions corresponding to the scenes. When the image frame meets one or more of the above conditions, it can be determined that a certain video scene is recognized. Among them, the video scene condition of macro video is the object distance. <D1;光照度<L1;且变焦倍率=1x。夜景录像的录像场景条件是光照度>L2; and the zoom ratio is within 1x-2x. The recording scene conditions for portrait video are that the maximum face area ratio is greater than P1; the illumination<L3;变焦倍率在1x-2x内。高动态录像的录像场景条件是曝光度> M1; zoom ratio is within 1x-6x. The recording scene conditions for multi-lens recording are to recognize preset objects such as cats and dogs; the zoom ratio is within 1x-6x. The recording scene conditions for protagonist mode are that the number of faces is greater than 1; the maximum face area ratio is 1.<P1且> P2; illuminance <L3;变焦倍率在0.56x-2x内。其中,物距阈值D1、光照度阈值L1、L2、L3和L4、比例阈值P1和P2均为预设阈值,本申请实施例对此不限定。可以理解,开发人员可基于经验设定。

[0343] For example, if the image frame meets the night scene recording conditions of illumination > L2 and the zoom ratio is between 1x and 2x, the image recognition module can determine that a night scene recording has been identified and that the night scene recording is the first recording scene. Step 2: After identifying the first recording scene, determine the frame stabilization conditions for the first recording scene based on the first recording scene.

[0344] The image recognition module may store a mapping relationship between recording scenes and frame-stabilized recording conditions. After the image recognition module recognizes a first recording scene, it determines a first frame-stabilized recording condition corresponding to the first recording scene based on the first recording scene.

[0345] For example, Table 1 discloses a mapping relationship table between a recording scene and a frame-stabilized recording condition. According to the mapping relationship in Table 1, when the first recording scene is a night scene, the first frame-stabilized recording condition is the condition of "recording start time 2s". "Recording start time 2s" means that starting from the time when the current image frame meets the first recording scene condition, the image frames within a continuous period of 2s all meet the frame-stabilized recording condition of the first recording scene condition. The meanings of the frame-stabilized recording conditions of other recording scenes are basically the same as those described above and will not be repeated. For details, please refer to the relevant descriptions of S609 and S503 to S505.

[0346] Step 3: Determine whether the first frame-stabilized recording condition is met.

[0347] After determining the first frame-stabilized recording condition, the system can then determine whether the first frame-stabilized recording condition is met. Specifically, if all image frames within the initial capture duration meet the first recording scene condition, the image recognition module determines that the first frame-stabilized recording condition is met; otherwise, it is not met. If the first frame-stabilized recording condition is met, the system proceeds to step 4; if not, it does not proceed.

[0348] Step 4: Enter the first video recording mode of the first video recording scene (capture image frames according to the shooting mode of the first video recording scene).

[0349] When the first frame-stabilized recording condition is met, the image recognition module enters the first recording mode of the first recording scene. That is, the image recognition module can shoot based on the recording mode of the first recording scene. For example, after entering the macro recording scene, the electronic device can switch the camera from the main camera to the wide-angle camera.

[0350] In the above embodiment, the electronic device can start scene recognition after receiving the recording scene start instruction. When a certain scene is recognized, the recognition of this recording scene can be performed according to the stable frame recording condition to determine whether it meets the first stable frame recording condition. Only when the first stable frame recording condition is met will the shooting of the recording scene be started. At this time, the stable frame recording condition is to determine whether the image acquired by the camera over a period of time has always met the first recording scene condition. It can ensure that the first recording scene is stable before entering the shooting of this recording scene, and will not directly adjust the shooting mode due to one or two frames of changes in the shooting content, thereby ensuring the stability of the shooting and avoiding the waste of processing resources.

[0351] S710: The image recognition module sends second scene start information to the camera abstraction module.

[0352] After entering the shooting method of the first recording scene, the image recognition module enters the first recording mode of the first recording scene and sends the second scene start information to the camera abstraction module. Correspondingly, the camera abstraction module can receive the second scene start information from the image recognition module.

[0353] The second scene activation information may include an identifier of the currently activated recording scene (the first recording scene).

[0354] S711: The camera abstraction module determines third stable frame scene information based on the second scene startup information.

[0355] After receiving the second scene start information from the image recognition module, the camera abstraction module may determine third stable frame scene information based on the second scene start information.

[0356] The third stabilized-frame scene information includes at least one of the recording scenes included in the second scene activation information as its stabilized-frame recording scene. After receiving the second scene activation information, the camera abstraction module needs to determine a stabilized-frame recording scene based on the second scene activation information. Each stabilized-frame recording scene can be uniquely identified by a tag.

[0357] In the case where the second scene startup information only includes one recording scene, the camera abstraction module can determine that the stabilized frame scene information is used to indicate that the recording scene is to be stabilized, that is, the stabilized frame scene information includes the stabilized frame recording scene, and the stabilized frame recording scene is the first recording scene (first shooting scene) included in the second scene startup information.

[0358] In the case where the second scene start information includes multiple recording scenes, it can be determined that the third frame stabilization scene information can include one or more frame stabilization recording scenes. The specific method for determining the frame stabilization recording scene is described below:

[0359] Method 1: Determine the frame-stabilized recording scene (the second shooting scene) according to the priority of the recording scene in the second scene starting information.

[0360] The camera abstraction module may store priority information for recording scenes. The camera abstraction module may first determine the recording scenes in the second scene activation information. The camera abstraction module may then determine the priority of each recording scene, sort the scenes based on their priority levels, and select the highest-priority recording scene or the first few scenes as the frame-stabilized recording scene.

[0361] For example, the camera abstraction module may store the priorities of various recording scenes as shown in Table 2. (A lower priority number indicates a higher priority.) The camera abstraction module may determine that the second scene activation information includes two recording scenes: portrait and night scene. Portrait recording may have the highest priority, "1," while night scene recording may have the second highest priority, "2."

[0362] In the above embodiment, the electronic device can determine the most likely frame-stabilized scene required by the user in order of priority, filter out scenes not required by the user, and avoid unwanted prompts, thereby ensuring the accuracy of the frame-stabilized recording scene.

[0363] Method 2: The first recording scene in the second scene start information is integrated to determine a stable frame recording scene.

[0364] For details, please refer to the relevant description in S611 and will not be repeated here.

[0365] In the above implementation, a frame-stabilized recording scene that can include one of the above two scenes can be determined, thereby ensuring the accuracy of the frame-stabilized recording scene while simplifying the scene information and improving the execution efficiency.

[0366] Optionally, the above methods 1 and 2 are combined. When multiple scenes are required, the scenes that can be fused can be fused, and the fusion results are prioritized to determine the frame-stabilized recording scene. Similarly, please refer to the relevant description in S611 and do not repeat it here.

[0367] S712: The camera abstraction module sends the third frame stabilization scene information to the frame stabilization algorithm module.

[0368] After determining the third stabilized frame scene information, the camera abstraction module can send the third stabilized frame scene information to the frame stabilization algorithm module. Correspondingly, the frame stabilization algorithm module can receive the third stabilized frame scene information from the camera abstraction module. The third stabilized frame scene information includes the stabilized frame recording scene.

[0369] S713: The frame stabilization algorithm module performs frame stabilization entry processing according to the first video recording frame stabilization strategy based on the third frame stabilization scene information.

[0370] The frame stabilization algorithm module receives the third frame stabilization scene information, can determine the frame stabilization recording scene included therein, determine the first video frame stabilization strategy, and then perform frame stabilization processing according to the first video frame stabilization strategy. The first video frame stabilization strategy is used to control the start of displaying the prompt information. The prompt information can be the above Figure 3B to Figure 3I The video stabilization strategy may include a frame number condition (entry frame number condition) for delaying the start of displaying the prompt information. For example, if the entry frame number is 5 frames, the entry frame number condition indicates that the third stabilized scene information corresponding to 5 consecutive frames of images indicates the start of displaying the prompt information of the stabilized recording scene.

[0371] In one possible implementation, the frame stabilization algorithm module may store a first video frame stabilization strategy. After receiving the third frame stabilization scene information, the frame stabilization algorithm module may use the first video frame stabilization strategy and determine whether the image frame satisfies the first video frame stabilization strategy, that is, whether it satisfies the entry frame number condition. If it does, execute S714; if it does not, do not execute. After the first video frame stabilization strategy enters the frame stabilization scene, the third frame stabilization scene information of Y consecutive image frames includes the first frame stabilization scene, that is, it is determined that the entry frame number condition of the frame stabilization scene is met. Among them, the Y frame size range can be 1-20 frames, for example, 10 frames. Y is a positive integer.

[0372] In another possible implementation, the frame stabilization algorithm module may store a mapping relationship between a frame stabilization recording scene and a frame stabilization recording strategy. The entry frame number conditions corresponding to the first frame stabilization recording strategy in the frame stabilization recording scene may be different. As shown in Table 1, in entering the portrait recording scene, the entry frame number condition is that the third frame stabilization scene information of 5 consecutive image frames includes a macro recording scene (entering 5 frames), and the prompt information of "macro recording" will be displayed only after the first frame stabilization frame number is 5 frames; in the night scene recording scene, the prompt information of "night scene recording" will be displayed only after the first frame stabilization frame number is 8 frames; in the portrait recording scene, the prompt information of "portrait recording" will be displayed only after the first frame stabilization frame number is 5 frames... For details, please refer to the description of S613 and will not be repeated here.

[0373] In the embodiment of the present application, the entry frame number conditions of different frame-stabilized recording scenes are differentiated to ensure the accuracy of display.

[0374] S714: The frame stabilization algorithm module sends a third display instruction to the prompt module.

[0375] After the frame stabilization algorithm module determines that the video recording frame stabilization strategy is met, it can send a third display instruction to the prompt module. Correspondingly, the prompt module can receive the third display instruction from the frame stabilization algorithm module.

[0376] The third display instruction may be used to instruct the prompt module to start displaying prompt information of the frame-stabilized video recording scene. The third display instruction may include an identifier of the frame-stabilized video recording scene.

[0377] S715: The prompt module displays a recording scene prompt based on the third display instruction.

[0378] After the prompt module receives the third display instruction (start display instruction) from the frame stabilization algorithm module, it can display the prompt information of the frame stabilization recording scene. Figure 2C to Figure 2I The description of the capsule pop-up window in the .

[0379] S716: When the image recognition module cannot recognize the first recording scene, the first recording mode is exited based on the second stable frame recording condition of the first recording scene.

[0380] After S708, the image recognition module begins to perform image recognition on each subsequent image frame to determine whether the image frame meets a certain recording scene condition. After the image recognition module recognizes the first recording scene and controls entry into the first recording scene based on the second steady-frame recording condition, if image recognition continues, if the first recording scene cannot be recognized, the first recording mode is exited based on the second steady-frame recording condition of the first recording scene. At this time, the second steady-frame recording condition includes entering a certain recording scene and failing to recognize the recording scene, and the image frames do not meet the conditions of the recording scene within the time period of the continuous recording exit duration starting from the image frame that cannot be recognized. That is, if the steady-frame recording condition is met within the recording exit duration, the first recording mode is exited (generally understood as restoring the original shooting mode); otherwise, it is not exited.

[0381] For example, as shown in Table 2, the "recording exit time 2s" of the macro recording scene indicates that starting from the time when the current image frame does not meet the first recording scene condition, the image frames do not meet the second stable frame recording condition of the first recording scene condition for 2 consecutive seconds. The corresponding stable frame recording conditions for different recording scenes may be different. In Table 2, the recording exit time of the macro recording scene is 2s; the recording exit time of the night scene is 2s, and so on. Assuming that the current first recording scene is macro, the image frame at time T2 detects that no portrait can be recognized, and the scene will not be exited temporarily; it is determined whether the image frames received within 2s after T2 do not meet the first recording scene condition. If they do not meet the condition, the macro recording scene is exited, for example, the wide-angle camera is switched to the main camera, the focus is adjusted, and so on.

[0382] In the above process, by delaying the judgment of exiting the scene recording mode, the stability of the camera mode for entering the recording scene can be guaranteed, the adjustment of the camera mode can be reduced, the reliability of the shooting picture can be improved, and the user's recording experience can be improved.

[0383] S717: The image recognition module sends second scene closing information to the camera abstraction module.

[0384] When the image recognition module determines to exit the first recording scene, the second scene closing information may be sent to the camera abstraction module. Correspondingly, the camera abstraction module may receive the second scene closing information from the image recognition module.

[0385] The second scene closing information may be used to indicate the prompt information for stopping displaying the frame-stabilized recording scene. The second scene closing information includes an identifier of the first recording scene.

[0386] S718: The camera abstraction module sends the fourth frame stabilization scene information to the frame stabilization algorithm module.

[0387] After receiving the second scene closure information from the image recognition module, the camera abstraction module may determine fourth frame stabilization scene information based on the information, and then send the fourth frame stabilization scene information to the frame stabilization algorithm module. Correspondingly, the frame stabilization algorithm module may receive the fourth frame stabilization scene information from the camera abstraction module.

[0388] The second scene-off information simply means that the electronic device cancels the display of the first recording scene (first shooting scene) corresponding to the first recording scene. The camera abstraction module can determine fourth frame-stabilized scene information based on the second scene-off information, where the fourth frame-stabilized scene information includes the frame-stabilized recording scene (second shooting scene). The specific method for determining the frame-stabilized recording scene based on the first recording scene can be found in the description of S711 and is not repeated here.

[0389] S719: The frame stabilization algorithm module performs frame stabilization exit processing according to the second frame stabilization recording strategy based on the fourth frame stabilization scene information.

[0390] After receiving the fourth frame stabilization scene information, the frame stabilization algorithm module may perform frame stabilization exit processing based on the third frame stabilization scene information according to the second frame stabilization recording strategy. The second frame stabilization recording strategy is a strategy for controlling the cessation of displaying the prompt message. The second frame stabilization recording strategy may include a frame number condition (exit frame number condition) for delaying the cessation of displaying the prompt message.

[0391] In one possible implementation, the frame stabilization algorithm module may store a second frame stabilization recording strategy. Upon receiving the fourth frame stabilization scene information, the frame stabilization algorithm module may determine, based on the second frame stabilization recording strategy, whether the exit frame number condition in the second frame stabilization recording strategy is met. If so, S720 is executed; if not, S720 is not executed, ensuring that the prompt information for the first recording scene is displayed. For details, please refer to S513-S517 and the relevant description of S619, which will not be repeated here.

[0392] In the above process, the process of not displaying the capsule pop-up window can be determined through multiple frames. In this way, it can be ensured that the scene prompt does not change frequently during the recording process, and the stability and reliability of the display interface can be guaranteed.

[0393] In another possible implementation, the frame stabilization algorithm module may store a mapping between the frame stabilization recording scenario and the exit frame number condition. The number of stabilized frames (exit frame number condition) corresponding to the second frame stabilization recording strategy in the frame stabilization recording scenario may be different. For details, please refer to the contents of Table 2 and will not be repeated here.

[0394] In the embodiment of the present application, the exit frame number conditions of different frame-stabilized recording scenes are differentiated to ensure the accuracy of display.

[0395] S720: The frame stabilization algorithm module sends a fourth display instruction to the prompt module.

[0396] After the frame stabilization algorithm module determines that the second frame stabilization recording strategy is satisfied, the frame stabilization algorithm module may send a fourth display instruction to the prompt module. Correspondingly, the prompt module may receive the fourth display instruction from the frame stabilization algorithm module.

[0397] The fourth display instruction is used to instruct the prompt module to stop displaying the prompt information of the frame-stabilized recording scene.

[0398] S721: The prompt module stops displaying the recording scene prompt based on the fourth display instruction.

[0399] After the prompt module receives the fourth display instruction, it stops displaying the recording scene prompt based on the fourth display instruction. For example, if the current frame-stabilized recording scene is a portrait, the result of exiting the frame-stabilized recording scene can be as follows: Figure 3A The above scenarios are various and not limited.

[0400] In the above-mentioned implementation manner, the electronic device can delay the execution of the recording mode of entering and exiting a certain recording scene in the scene based on different recording scenes according to the stable frame recording conditions; displaying prompt information or canceling the display of prompt information is delayed according to the stable frame recording strategy, which can ensure the effectiveness and accuracy of the execution, ensure the stability of scene entry and exit, ensure the accuracy of the preview screen prompt, and improve the user's recording experience.

[0401] The following combines the above Figure 4A-4B The scene recognition process of the movie mode in Figure 8 Another method flow chart of shooting is disclosed as an example, Figure 1 、 Figures 5 to 7 The workflow of the method may include but is not limited to the following steps:

[0402] The electronic device may include a camera application module, a mode switching module, a first scene recognition module, a third scene recognition module, a camera abstraction module, and a frame stabilization algorithm module. The above modules can be referred to Figure 1 and Figure 6 The relevant description in is not repeated here.

[0403] S801: The camera application module obtains a third operation.

[0404] exist Figure 2B In the example, a user clicks a movie control in the camera mode user interface to activate movie mode. In response to the user's operation on the movie control, the camera application module may obtain a third user operation to activate movie mode. The electronic device enters movie mode and activates scene recognition. The electronic device may perform scene recognition processing on image frames captured by the camera and perform scene processing based on the recognition results.

[0405] S802: The camera application module sends a movie start instruction to the mode switching module.

[0406] After the camera application module acquires the third operation, it can send a movie start instruction to the mode switching module. Correspondingly, the mode switching module can receive the movie start instruction from the camera application module.

[0407] The movie start instruction is used to instruct the module switching module to start (or switch to) the movie mode.

[0408] S803: The mode switching module starts the movie mode based on the movie start instruction.

[0409] After the mode switching module receives the movie start instruction from the camera application module, it can start the movie mode based on the movie start instruction. Specifically, the electronic device can start the filter function of the movie mode, wherein: Figure 1 The filters in the camera hardware abstraction layer can be called to add filters to the image frames.

[0410] S804: The mode switching module sends a movie scene trigger instruction to the scene recognition module.

[0411] After the mode switching module turns on the movie mode, it can send a movie scene trigger instruction to the scene recognition module. Correspondingly, the scene recognition module can receive the movie scene trigger instruction from the mode switching module.

[0412] The movie scene trigger instruction is used to instruct the scene recognition module to enable scene recognition in movie mode. The movie scene trigger instruction may include a movie mode identifier. For example, based on the example in S604, when movie mode is enabled, the mode switching module should send a movie scene trigger instruction including "3" to the scene recognition module. The above are examples and are not limiting.

[0413] S805: The scene recognition module sends a movie frame stabilization instruction to the frame stabilization algorithm module.

[0414] After receiving the scene trigger instruction, the scene recognition module can send a movie frame stabilization instruction to the frame stabilization algorithm module. Correspondingly, the frame stabilization algorithm module can receive the movie frame stabilization instruction from the scene recognition module.

[0415] The movie frame stabilization instruction is used to instruct the frame stabilization processing module to start the frame stabilization processing in the movie scene.

[0416] S806: The frame stabilization algorithm module starts the movie frame stabilization function based on the movie frame stabilization instruction.

[0417] After receiving the movie frame stabilization instruction from the scene recognition module, the frame stabilization algorithm module can enable the movie frame stabilization function based on the movie frame stabilization instruction. Specifically, the frame stabilization algorithm module can start the movie frame stabilization algorithm and wait for data for frame stabilization processing (the data for frame stabilization processing can be the fifth frame stabilization scene information in S812 and the sixth frame stabilization scene information in S819). After receiving the data, the frame stabilization processing can be performed immediately.

[0418] S807: The scene recognition module sends a movie scene start instruction to the camera abstraction module.

[0419] After the scene recognition module receives the movie scene trigger instruction, it can send a movie scene start instruction to the camera abstraction module. Correspondingly, the camera abstraction module can receive the movie scene start instruction from the scene recognition module.

[0420] Among them, the movie scene startup instruction can include a tag for the movie mode. In addition, the tags for the photo mode, movie mode, and movie mode are all different and can all be uniquely identified by the tag. The tags and identifiers in this application have the same meaning and there is no substantial difference.

[0421] The execution order of S805 and S807 is not limited.

[0422] S808: The camera abstraction module sends a movie scene start instruction to the image recognition module.

[0423] After the camera abstraction module obtains the movie scene start instruction, it can send the movie scene start instruction to the image recognition module. Correspondingly, the image recognition module can receive the movie scene start instruction from the camera abstraction module.

[0424] After the camera abstract module receives the movie scene start-up instruction, it can determine to start the movie scene recognition function based on the movie scene start-up instruction. It needs to control the corresponding mode for scene recognition, that is, it can send a movie scene start-up instruction to the image recognition module. The movie scene start-up instruction can instruct the image recognition module to start the image recognition function of the movie scene, thereby identifying the movie scene.

[0425] Among them, S801 to S808 may refer to the relevant descriptions of S701 to S708 and S601 to S608.

[0426] S809: The image recognition module starts a movie scene recognition function based on the movie scene start instruction, and when a first movie scene is recognized, controls entry into a first movie mode based on a first stable frame movie condition of the first movie scene.

[0427] After the image recognition module receives the movie scene start instruction, it can start the movie scene recognition function. Specifically, the image recognition module can start to mount the movie scene recognition algorithm and perform movie scene recognition on the acquired image frame according to the algorithm.

[0428] After performing movie scene recognition, the image recognition module can determine whether a certain movie scene is recognized (for example, a movie scene of sunset is recognized starting from the first image frame). When one or more movie scenes are recognized (these one or more movie scenes are collectively referred to as the first movie scene, i.e., the first shooting scene), the image recognition module can control the entry into the first movie mode (first shooting mode) based on the first stable frame movie condition of this movie scene. Specifically, the image recognition module can determine the first stable frame movie condition corresponding to the first movie scene (i.e., the stable frame movie condition of the first movie scene), and then determine whether the acquired image frame meets the first stable frame movie condition. If the first stable frame movie condition is met, the image recognition module can control the entry into the first movie mode; if the first stable frame movie condition is not met, the image recognition module can control the entry into the first movie mode.

[0429] The stable frame movie conditions include the movie start duration (the first stable frame duration) and the movie exit duration (the second stable frame duration). Since this is the method for entering a certain shooting scene, the first stable frame movie condition should be the movie start duration.

[0430] The first step is to perform movie scene recognition (i.e., scene recognition processing).

[0431] The image recognition module stores movie scene conditions and determines whether the image frame meets the movie scene conditions of a certain movie scene. If the movie scene conditions are met, the second step is executed; otherwise, the second step is not executed.

[0432] Table 3 is an information table of a movie scene disclosed exemplarily in an embodiment of the present application.

[0433] Table 3

[0434]

[0435]

[0436] As shown in Table 3, the image recognition module can store movie scenes and the movie scene conditions corresponding to the scenes. For details about Table 3, please refer to the relevant description of Table 1 and will not be repeated here. For shooting scenes in movie mode, please refer to the video recording scenes in photo mode. Table 3 is for illustrative purposes only and is not intended to be limiting.

[0437] Step 2: After identifying the first movie scene, determine a frame stabilization condition for photographing the first movie scene based on the first movie scene.

[0438] The image recognition module can store a mapping relationship between the movie scene and the stable frame movie condition. After the image recognition module recognizes the first movie scene, the first stable frame movie condition corresponding to the first movie scene is determined based on the first movie scene.

[0439] Exemplarily, a mapping relationship table between a movie scene and a stable frame movie condition is exemplarily disclosed in Table 3. According to the mapping relationship in Table 3, in the case that the first movie scene is a night scene, the first stable frame movie condition is the condition of “movie start time length 10s”. “Movie start video control time length 10s” means that the image frames in the stable frame movie condition meet the first movie scene condition for 10s continuously from the time when the current image frame meets the first movie scene condition. The meanings of the stable frame movie conditions of other movie scenes are basically the same as the above meanings, and are not described in detail. For reference, please refer to the related descriptions in S503, S609 and S709, which are not described in detail.

[0440] In addition, the movie start time length (first stable frame time length) and the movie exit time length (second stable frame time length) in Table 3 can be in the range of 1-30s.

[0441] Step 3: Determine whether the first stable frame movie condition is met.

[0442] In the case of determining the first stable frame movie condition, it can be determined whether the first stable frame movie condition is met. That is, when all image frames in the photograph start time length meet the first movie scene condition, the image recognition module determines that the first stable frame movie condition is met; otherwise, it is not met. In the case of meeting the first stable frame movie condition, Step 4 can be performed; otherwise, it is not performed.

[0443] Step 4: Enter the first movie mode of the first movie scene (collect image frames according to the shooting mode of the first camera scene).

[0444] In the case of meeting the first stable frame movie condition, the image recognition module enters the first movie mode of the first movie scene. That is, the image recognition module can shoot based on the movie mode of the first movie scene. For reference, please refer to the related descriptions in S505 and S609, which are not described in detail.

[0445] In the above embodiment, the electronic device can start scene recognition after receiving a movie scene start instruction. When a certain scene is recognized, the movie scene can be identified according to the stable frame movie condition to determine whether it meets the stable frame movie condition. Only when the stable frame movie condition is met will the shooting of the movie scene begin. At this time, the stable frame movie condition is to determine whether the image acquired by the camera over a period of time has always met the first movie scene condition. It can ensure that the first movie scene is stable before entering the shooting of this movie scene, and will not directly adjust the shooting method due to one or two frames of changes in the shooting content, thereby ensuring the stability of the shooting and avoiding the waste of processing resources.

[0446] S810: The image recognition module sends third scene start information to the camera abstraction module.

[0447] After entering the shooting method of the first movie scene, the image recognition module enters the first movie mode of the first movie scene and sends third scene start information to the camera abstraction module. Correspondingly, the camera abstraction module can receive the third scene start information from the image recognition module.

[0448] The third scene activation information may include an identifier of the currently activated movie scene (the first movie scene), ie, the first shooting scene).

[0449] S811: The camera abstraction module determines fifth stable frame scene information based on the third scene startup information.

[0450] After receiving the third scene start information from the image recognition module, the camera abstraction module may determine fifth stable frame scene information based on the third scene start information.

[0451] The stabilized scene information includes at least one movie scene included in the third scene startup information as a stabilized movie scene. After receiving the third scene startup information, the camera abstraction module needs to determine the stabilized movie scene based on the third scene startup information. Each stabilized movie scene can be uniquely identified by a tag.

[0452] In the case where the third scene startup information only includes one movie scene, the camera abstraction module can determine that the frame stabilization scene information is used to indicate that the movie scene is to be frame stabilized, that is, the frame stabilization scene information includes the frame stabilization movie scene, and the frame stabilization movie scene is the first movie scene included in the third scene startup information. In this case, the frame stabilization movie scene is Figure 5 The second shooting scene.

[0453] When the third scene start information includes multiple movie scenes, it can be determined that the fifth frame stabilization scene information includes one or more frame stabilization movie scenes. The specific method for determining the frame stabilization movie scene can refer to the relevant description of S611 and S711 above and will not be repeated here.

[0454] S812: The camera abstraction module sends the fifth frame stabilization scene information to the frame stabilization algorithm module.

[0455] After determining the fifth stabilized frame scene information, the camera abstraction module may send the fifth stabilized frame scene information to the stabilization algorithm module. Correspondingly, the stabilization algorithm module may receive the fifth stabilized frame scene information from the camera abstraction module. The fifth stabilized frame scene information includes a stabilized movie scene.

[0456] S813: The frame stabilization algorithm module performs frame stabilization entry processing according to the first frame stabilization movie strategy based on the fifth frame stabilization scene information.

[0457] The frame stabilization algorithm module receives the fifth frame stabilization scene information, can determine the frame stabilization movie scene included therein, determine the first frame stabilization movie strategy, and then perform frame stabilization processing according to the first frame stabilization movie strategy. The first frame stabilization movie strategy is used to control the start of displaying the prompt information. The prompt information can be the above Figure 4B The capsule pop-up window or prompt window in the stable frame movie strategy may include a frame number condition for delaying the start of displaying the prompt information (entry frame number condition, i.e., the first stable frame number).

[0458] In one possible implementation, the frame stabilization algorithm module may store a film frame stabilization strategy. After receiving the fifth frame stabilization scene information, the frame stabilization algorithm module may determine, based on the film frame stabilization strategy, whether the entry frame count condition in the film frame stabilization strategy is met. If so, step S814 is executed; if not, step S814 is not executed.

[0459] In another possible implementation, the frame stabilization algorithm module may store a mapping relationship between a frame stabilization movie scene and a frame stabilization movie strategy. The entry frame number conditions corresponding to the first frame stabilization movie strategy in the frame stabilization movie scene may be different. As shown in Table 3, please refer to Table 1 for a specific description, and the entry frame number values ​​are different. The above Table 3 is only an exemplary description and is not limiting. After determining the movie frame stabilization strategy, a judgment can be made based on the entry frame number conditions in the movie frame stabilization strategy. The logic of the judgment is the same as that of the previous implementation and will not be repeated.

[0460] In the above process, the process of entering the frame number condition for judgment can be specifically referred to S506 and S507, S613, S713 and the related descriptions, which will not be repeated here.

[0461] In the embodiment of the present application, the entry frame number conditions of different frame-stabilized movie scenes are differentiated to ensure the accuracy of display.

[0462] S814: The frame stabilization algorithm module sends a fifth display instruction to the prompt module.

[0463] After the frame stabilization algorithm module determines that the film frame stabilization strategy is met, it can send a fifth display instruction to the prompt module. Correspondingly, the prompt module can receive the fifth display instruction (start display instruction) from the frame stabilization algorithm module.

[0464] The fifth display instruction may be used to instruct the prompt module to start displaying prompt information of the stable-frame movie scene. The fifth display instruction may include an identifier of the stable-frame movie scene.

[0465] S815: The prompt module displays a movie scene prompt based on the fifth display instruction.

[0466] After the prompt module receives the fifth display instruction from the frame stabilization algorithm module, it can display the prompt information of the frame stabilization movie scene. The electronic device can store the mapping relationship between the frame stabilization movie scene and the filter. For example, in the portrait scene, it corresponds to the Hollywood classic filter; in the architectural scene, it corresponds to the Gothic style filter, etc. After obtaining the fifth display instruction, the filter prompt text can be determined based on the frame stabilization movie scene, and displayed, and the filter can be started at the same time. Specifically, Figure 4B The description of the capsule pop-up window in the .

[0467] Among them, the details of the above S814 and S815 can be referred to the relevant descriptions of S614, S615, S714 and S715, and will not be repeated here.

[0468] S816: When the image recognition module fails to recognize the first movie scene, the image recognition module controls the exit from the first movie mode based on the second stable frame movie condition of the first movie scene.

[0469] After S808, the image recognition module begins to perform image recognition on each frame of image thereafter to determine whether the image frame satisfies a certain movie scene condition. After the image recognition module recognizes the first movie scene and enters the first movie scene based on the steady-frame movie condition control, if image recognition continues, if the first movie scene cannot be recognized, the first movie mode is exited based on the steady-frame movie condition control of the first movie scene. At this time, the steady-frame movie condition includes entering a certain movie scene and failing to recognize this movie scene, and the image frame does not meet the conditions of this movie scene within the time period of the continuous movie exit duration starting from the image frame that cannot be recognized (see S511 for details). That is, if the steady-frame movie condition is met within the movie exit duration, the first movie mode is exited (generally understood as restoring the original shooting mode); otherwise, it will not exit. Please refer to the description of S616 for details. The number of frames is different, but the meaning is the same and will not be repeated.

[0470] In the above process, by delaying the judgment of exiting the scene movie mode, the stability of the camera mode for entering the movie scene can be guaranteed, the adjustment of the camera mode can be reduced, and the reliability of the shooting picture can be improved, thereby improving the user's movie experience.

[0471] S817: The image recognition module sends third scene closing information to the camera abstraction module.

[0472] When the image recognition module determines that the first movie scene has been exited, the third scene closing information may be sent to the camera abstraction module. Correspondingly, the camera abstraction module may receive the third scene closing information from the image recognition module.

[0473] The third scene closing information may be used to indicate prompt information for stopping displaying the frame-stabilized movie scene. The third scene closing information includes an identifier of the frame-stabilized movie scene.

[0474] S818: The camera abstraction module sends the sixth frame stabilization scene information to the frame stabilization algorithm module.

[0475] After receiving the third scene-off information from the image recognition module, the camera abstraction module may determine sixth frame-stabilized scene information and then send the sixth frame-stabilized scene information to the frame stabilization algorithm module. Correspondingly, the frame stabilization algorithm module may receive the sixth frame-stabilized scene information from the camera abstraction module.

[0476] The method for the camera abstraction module to determine the sixth stabilized frame scene information based on the third scene closing information may refer to S811 and will not be described in detail. The sixth stabilized frame scene information may include a stabilized frame movie scene.

[0477] S819: The frame stabilization algorithm module performs frame stabilization exit processing according to the second frame stabilization movie strategy based on the sixth frame stabilization scene information.

[0478] After receiving the sixth stabilized frame scene information, the frame stabilization algorithm module may perform a stabilized frame exit process based on the fifth stabilized frame scene information according to a second stabilized frame movie strategy. The second stabilized frame movie strategy is a strategy for controlling the cessation of displaying the prompt information. The second stabilized frame movie strategy may include a frame number condition for delaying the cessation of displaying the prompt information (the exit frame number condition, i.e., the second stabilized frame number, where the second shooting scene to be exited is a stabilized frame movie scene).

[0479] In one possible implementation, the frame stabilization algorithm module may store a second frame stabilization movie strategy. In the above process, the process of not displaying the capsule pop-up window can be determined over multiple frames. This ensures that scene prompts do not change frequently during the movie, ensuring the stability and reliability of the display interface.

[0480] In another possible implementation, the frame stabilization algorithm module may store a mapping relationship between a frame stabilization movie scene and an exit frame number condition. The exit frame number condition corresponding to the second frame stabilization movie strategy in the frame stabilization movie scene may be different. For details, refer to the relevant description in S619 and will not be repeated here.

[0481] In the embodiment of the present application, the exit frame number conditions of different frame-stabilized movie scenes are differentiated to ensure the accuracy of display.

[0482] S820: The frame stabilization algorithm module sends a sixth display instruction to the prompt module.

[0483] After the frame stabilization algorithm module determines that the second frame stabilization film strategy is satisfied, the frame stabilization algorithm module may send a sixth display instruction to the prompt module. Correspondingly, the prompt module may receive the sixth display instruction from the frame stabilization algorithm module.

[0484] The sixth display instruction is used to instruct the prompt module to stop (cancel) displaying the prompt information of the stable frame movie scene.

[0485] Among them, the details of the above S820 can be referred to the relevant description of S720 and will not be repeated here.

[0486] S821: The prompt module stops displaying the movie scene prompt based on the sixth display instruction.

[0487] After the prompt module receives the sixth display instruction, it stops displaying the movie scene prompt based on the sixth display instruction. For example, if the current stable frame movie scene is a portrait, the result of exiting the stable frame movie scene can be as follows: Figure 4A The above scenarios are various and not limited.

[0488] Among them, the details of the above S821 can be referred to the relevant description of S721 and will not be repeated here.

[0489] In the above-mentioned implementation, the electronic device can delay the execution of the movie mode of entering and exiting a certain movie scene in the scene based on different movie scenes according to the stable frame movie conditions; displaying prompt information or canceling the display of prompt information is delayed according to the stable frame movie strategy, which can ensure the effectiveness and accuracy of the execution, ensure the stability of entering and exiting the movie scene, ensure the accuracy of the preview screen prompts, and improve the user's movie shooting experience.

[0490] Figures 6 to 8 In the three implementation methods, the process of controlling whether to display or not according to the stable frame number is completed by two modules: Figure 6 In the photo mode, the frame stabilization processing module of the application layer is used to complete the process. Based on the processing of the hardware abstraction layer in the photo mode, the feasibility of the solution and the accuracy of the execution results can be guaranteed. Figure 7 and Figure 8 The frame stabilization algorithm module of the camera hardware abstraction layer processes the video and film mode. During the processing of the frame stabilization algorithm module, the efficiency of command execution is much higher, and the error rate of signal transmission is lower.

[0491] The device related to the embodiments of the application is described below.

[0492] Figure 9 A hardware structure schematic diagram of an electronic device provided by the embodiments of the application is provided.

[0493] The electronic device can 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 loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can 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.

[0494] It can be understood that the structure shown in the embodiments of the application does not constitute a specific limitation on the electronic device. In other embodiments of the application, the electronic device can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0495] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0496] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.

[0497] It is understood that the processor 110 may also include an AE system. The AE system may be specifically provided in the ISP. The AE system may be used to automatically adjust exposure parameters. Optionally, the AE system may also be integrated into other processor chips. This embodiment of the present application is not limited to this.

[0498] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0499] In some embodiments, the processor 110 may include one or more interfaces. The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge an electronic device, or to transfer data between the electronic device and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0500] The charging management module 140 is used to receive charging input from a charger. While charging the battery 142, the charging management module 140 can also power the electronic device through the power management module 141. In the embodiment of the present application, the charging management module may include a battery charging module.

[0501] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.

[0502] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0503] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0504] The mobile communication module 150 can provide wireless communication solutions for electronic devices, including 2G / 3G / 4G / 5G. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), and other components. The mobile communication module 150 receives electromagnetic waves from antenna 1, filters and amplifies the received electromagnetic waves, and transmits them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via antenna 1.

[0505] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs sound signals through an audio device (including but not limited to the speaker 170A, the receiver 170B, etc.) or displays images or videos through the display screen 194.

[0506] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including Wireless Local Area Networks (WLAN) (such as Wireless Fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR). The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be sent from the processor 110, frequency modulate them, amplify them, and convert them into electromagnetic waves for radiation through the antenna 2.

[0507] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that the electronic device can communicate with the network and other devices through wireless communication technology.

[0508] The electronic device implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0509] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (AMOLED), flexible light-emitting diode (FLED), Mini LED, Micro LED, Micro-OLED, quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device can include one or N display screens 194, where N is a positive integer greater than 1.

[0510] The electronic device can achieve the acquisition function through an ISP, a camera 193, a video codec, a GPU, a display 194, and an application processor.

[0511] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, light passes through the lens and is transmitted to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image or video. In some embodiments, the ISP can be located within camera 193.

[0512] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image or video signal. The ISP outputs the digital image or video signal to the DSP for processing. The DSP converts the digital image or video signal into an image or video signal in a standard RGB, YUV or other format. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1. For example, in some embodiments, the electronic device may use N cameras 193 to obtain images with multiple exposure coefficients, and then, in video post-processing, the electronic device may synthesize an HDR image using HDR technology based on the images with multiple exposure coefficients.

[0513] Digital signal processors (DSPs) are used to process digital signals. Besides digital images and video, they can also process other digital signals. For example, when an electronic device selects a frequency, a DSP performs a Fourier transform on the frequency energy.

[0514] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0515] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image and video playback function, etc.). The data storage area can store data created during the use of the electronic device (such as audio data, a phone book, etc.).

[0516] The sensor module 180 may include one or more sensors, which may be of the same type or of different types. Figure 1 The sensor module 180 shown is only an exemplary division method. There may be other division methods, which are not limited in this application.

[0517] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied on or near the touch sensor. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device, in a location different from that of the display screen 194.

[0518] As used in the above embodiments, the term “when…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0519] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).

[0520] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A shooting method, characterized in that: The method is applied to an electronic device, and includes: In response to a start-up operation for a first camera mode, the electronic device displays a preview screen of the first camera mode, the preview screen displaying image frames captured by a camera of the electronic device through continuous exposure; the first camera mode is one of a photo mode, a video mode, and a movie mode; When the scene recognition function is activated, the electronic device performs scene recognition processing on the image frame, wherein the scene recognition processing is used to determine whether the image frame meets a scene recognition condition corresponding to the shooting scene of the first camera mode; Starting from a first image frame that satisfies a first scene recognition condition, the electronic device determines a first shooting scene based on the first scene recognition condition, and determines whether all image frames within a first frame stabilization time period satisfy the first scene recognition condition; if so, the electronic device captures image frames based on a shooting method for the first shooting scene; the first image frame being one of the image frames captured by the continuous exposure; If the electronic device starts to capture image frames based on the shooting method of the first shooting scene, and when a consecutive first stable frame number of image frames need to display prompt information of the second shooting scene, the electronic device displays prompt information of the second shooting scene; the prompt information includes a text prompt and / or an icon prompt of the second shooting scene, and the first shooting scene includes the second shooting scene.

2. The method according to claim 1, characterized in that Before the electronic device determines whether all image frames within the first stable frame duration meet the first scene recognition condition, the method further includes: The electronic device determines a first stable frame duration corresponding to the first shooting scene based on a first mapping relationship; the first mapping relationship is a mapping relationship between the shooting scene and the startup stable frame duration; the first stable frame duration is the startup stable frame duration corresponding to the first shooting scene; the electronic device stores the first mapping relationship.

3. The method according to claim 1, characterized in that After the electronic device captures image frames based on the shooting mode of the first shooting scene, the method further includes: Starting from the second image frame, the first scene recognition condition is not met, and the electronic device determines whether all image frames within the second stable frame time do not meet the first scene recognition condition; if so, the electronic device exits the shooting mode of the first shooting scene and collects image frames.

4. The method according to claim 3, characterized in that Before the electronic device determines whether all image frames within the second stable frame duration do not meet the first scene recognition condition, the method further includes: The electronic device determines a second stable frame duration corresponding to the first shooting scene based on a second mapping relationship; the second mapping relationship is a mapping relationship between the shooting scene and the exit stable frame duration; the second stable frame duration is the exit stable frame duration corresponding to the first shooting scene; the electronic device stores the second mapping relationship.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The electronic device determines whether all image frames of the first stable frame number are required to display prompt information of the second shooting scene; if all image frames of the first stable frame number are not required to display prompt information of the second shooting scene, the electronic device does not display the prompt information of the second shooting scene.

6. The method according to claim 5, characterized in that After the electronic device displays prompt information of the second shooting scene, the method further includes: The electronic device determines whether the prompt information of the second shooting scene is canceled for a second stable number of consecutive image frames; if so, the electronic device cancels the prompt information of the second shooting scene; otherwise, the electronic device continues to display the prompt information of the second shooting scene.

7. The method according to claim 5, characterized in that Before the electronic device determines whether the image frames of the first stable frame number are all required to display prompt information of the second shooting scene, the method further includes: In the case where the first shooting scene includes multiple types of shooting scenes, the electronic device filters the shooting scene types according to the priority of the shooting scene types to obtain a second shooting scene after filtering; the shooting scene type of the second shooting scene is a shooting scene with a high priority among the shooting scene types in the first shooting scene.

8. The method according to claim 5, characterized in that The electronic device displays prompt information of the second shooting scene, specifically including: The electronic device displays first prompt information of the second shooting scene, where the first prompt information includes the text prompt and the icon prompt; After a preset time period, the electronic device displays second prompt information of the second shooting scene, where the second prompt information includes the icon prompt.

9. The method according to claim 5, characterized in that The electronic device includes an image recognition module; when the scene recognition function is activated, the electronic device performs scene recognition processing on the image frame, specifically including: The electronic device performs scene recognition processing through the image recognition module; The electronic device determining a first shooting scene based on the first scene recognition condition specifically includes: The electronic device determines a first shooting scene based on the first scene recognition condition by the image recognition module; The electronic device determines whether all image frames within the first stable frame duration meet the first scene recognition condition; if the condition is met, the electronic device captures image frames based on the shooting method of the first shooting scene, specifically including: The electronic device determines, through the image recognition module, whether all image frames within the first stable frame time period meet the first scene recognition condition; if so, the electronic device collects image frames based on the shooting method of the first shooting scene through the image recognition module.

10. The method according to claim 9, characterized in that The electronic device further includes a frame stabilization processing module and a prompt module; when the first camera mode is a photo mode, if image frames of a first number of consecutive stabilized frames all need to display prompt information of a second shooting scene, the electronic device displays the prompt information of the second shooting scene; if image frames of a first number of discontinuous stabilized frames all need to display prompt information of the second shooting scene, the electronic device does not display the prompt information of the second shooting scene, specifically including: The electronic device determines through the frame stabilization processing module whether all consecutive image frames of the first stable frame number need to display prompt information of the second shooting scene; if so, the electronic device sends a start display instruction to the prompt module through the frame stabilization processing module, and the electronic device displays the prompt information of the second shooting scene based on the start display instruction through the prompt module; otherwise, no information is sent.

11. The method according to claim 9, characterized in that The electronic device further includes a frame stabilization algorithm module and a prompt module; when the first camera mode is a video mode or a movie mode, if image frames of a first number of consecutive stabilized frames all need to display prompt information of a second shooting scene, the electronic device displays the prompt information of the second shooting scene; if image frames of a first number of discontinuous stabilized frames all need to display prompt information of the second shooting scene, the electronic device does not display the prompt information of the second shooting scene, specifically including: The electronic device determines whether all consecutive image frames of the first stable frame number need to display prompt information of the second shooting scene through the frame stabilization algorithm module; if so, the electronic device sends a start display instruction to the prompt module through the frame stabilization algorithm module, and the electronic device displays the prompt information of the second shooting scene based on the start display instruction through the prompt module; otherwise, no prompt information is sent.

12. An electronic device, characterized in that: include: A battery, one or more processors and one or more memories; the one or more processors are coupled to the one or more memories, the one or more memories are used to store computer program code, the computer program code includes computer instructions, when the one or more processors execute the computer instructions, the electronic device performs the method according to any one of claims 1 to 11.

13. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Image pickup apparatus and control method therefor

    CN102572238A

  • A smart auxiliary control method and terminal device

    CN111630836B

  • Shooting method and device, storage medium and computer program product

    CN113645408A