Video shooting method and related equipment

By identifying and calculating the proportion of the face area in the video frame data, and recommending appropriate video modes, it solves the problem of poor shooting results caused by user selection mismatch and improves the display effect of portrait videos.

CN117336597BActive Publication Date: 2024-11-12HONOR DEVICE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202311128121.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2024-11-12
Estimated Expiration
2043-01-04

AI Technical Summary

Technical Problem

When shooting portrait videos, the video mode selected by the user does not match the portrait, resulting in poor shooting effect of the portrait video, which affects the user experience.

Method used

By obtaining the video frame data captured by the camera, identifying whether faces are included, and calculating the proportion of face areas in the video frame data, and recommending appropriate video modes, such as portrait mode or protagonist mode, according to the proportion, to optimize the display of portraits Effect.

Benefits of technology

It effectively improves the display effect of portrait videos. When the face ratio is large, the portrait mode is recommended, and when the face ratio is small, the protagonist mode is recommended, which improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117336597B_ABST
    Figure CN117336597B_ABST
Patent Text Reader

Abstract

The present application provides a video shooting method and related equipment, the method comprising: obtaining video frame data shot by a camera, identifying whether the video frame data contains a face; if a face is contained, calculating the proportion of the size of the face area in the video frame data; judging whether the proportion is greater than or equal to a first preset value; if the proportion is greater than or equal to the first preset value, determining that the recommended video mode is a portrait mode, and shooting a video based on the portrait mode; if the proportion is less than the first preset value, judging whether the proportion is less than or equal to a second preset value, the second preset value is less than the first preset value; if the proportion is less than or equal to the second preset value, determining that the recommended video mode is a protagonist mode, and shooting a video based on the protagonist mode. When shooting a portrait video, the embodiment of the present application can recommend a video mode based on the size ratio of the face area, effectively optimizing the display effect of the portrait video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of terminal technology, users have an increasing demand for video shooting functions of electronic devices. At present, electronic devices can set a variety of video modes according to different shooting scenes for users to choose and shoot videos. However, in actual use, users may not be sure of the current shooting scene, nor do they know which video mode to choose, or even if they are sure of the shooting scene, they do not know how to choose the corresponding video mode. For example, when the shooting content includes a portrait, the user may select the portrait mode so that the electronic device can optimize the portrait effect in the video. However, when the portrait is far away from the electronic device, the proportion of the face in the shooting interface may be small. Even if the portrait is processed, the optimization effect of the portrait may not be good, resulting in poor shooting effect of the portrait video, thereby affecting the user experience. Summary of the invention

[0003] In view of the above, it is necessary to provide a video shooting method and related equipment to solve the technical problem that when shooting a portrait video scene, the video mode selected by the user does not match the portrait, resulting in poor shooting effect of the portrait video.

[0004] In a first aspect, the present application provides a video shooting method, the method comprising: obtaining video frame data shot by a camera, and identifying whether the video frame data contains a face; if the video frame data contains a face, calculating the proportion of the size of the face area in the video frame data; judging whether the proportion of the size of the face area in the video frame data is greater than or equal to a first preset value; if the proportion of the size of the face area in the video frame data is greater than or equal to the first preset value, determining that the recommended video mode is portrait mode, and performing video shooting based on the portrait mode; if the proportion of the size of the face area in the video frame data is less than the first preset value, judging whether the proportion of the size of the face area in the video frame data is less than or equal to a second preset value, the second preset value being less than the first preset value; if the proportion of the size of the face area in the video frame data is less than or equal to the second preset value, determining that the recommended video mode is protagonist mode, and performing video shooting based on the protagonist mode. Through the above technical solution, when shooting portrait videos, video mode recommendations can be made based on the face ratio. When the face ratio is large, it is recommended to shoot the video in portrait mode, which effectively optimizes the display effect of the portrait video. When the face ratio is small, it is recommended to shoot the video in protagonist mode, which effectively optimizes the display effect of the protagonist portrait.

[0005] In a possible implementation, the calculating the proportion of the size of the face region in the video frame data includes: marking the face region identified in the video frame data with a rectangular frame; determining the size of the face region based on the rectangular frame; and calculating the ratio between the size of the face region and the size of the video frame image to obtain the proportion of the size of the face region in the video frame data. Through the above technical solution, the size ratio of the face region can be accurately calculated based on the rectangular frame marking the face region.

[0006] In a possible implementation, determining the size of the face region based on the rectangular frame includes: determining the width of the rectangular frame identifying the face region in the video frame image as the width of the face region, and determining the height of the rectangular frame as the height of the face region. Through the above technical solution, the width and height of the face region can be accurately determined based on the size of the rectangular frame identifying the face region.

[0007] In a possible implementation, the calculating the ratio between the size of the face region and the size of the video frame image includes: calculating the ratio between the width value of the face region and the width value of the video frame image. Through the above technical solution, the size ratio of the face region can be calculated quickly and accurately.

[0008] In a possible implementation, the calculating the ratio between the size of the face region and the size of the video frame image includes: calculating the ratio between the height value of the face region and the height value of the video frame image. Through the above technical solution, the size ratio of the face region can be calculated quickly and accurately.

[0009] In a possible implementation, the calculating the ratio between the size of the face region and the size of the video frame image includes: calculating the ratio between the area of ​​the face region and the area of ​​the video frame image. Through the above technical solution, the size ratio of the face region can be calculated quickly and accurately.

[0010] In a possible implementation, the identifying whether the video frame data contains a face includes: performing format conversion on each video frame image in the video frame data to obtain a video stream; performing face recognition on each video frame image in the video stream to determine whether the video frame data contains a face; if a preset number of consecutive video frame images are identified to contain a face, determining that the video frame data contains a face. Through the above technical solution, it is possible to accurately identify whether the video frame data contains a face.

[0011] In a possible implementation, the video shooting based on the portrait mode includes: blurring the video frame data shot by the camera. Through the above technical solution, when the size ratio of the face area is large, the portrait can be highlighted and the display effect of the portrait can be optimized.

[0012] In a possible implementation, the blurring of the video frame data captured by the camera includes: performing a portrait cutout on the video frame image to extract the portrait area in the video frame image; blurring the background area of ​​the video frame image; and fusing the extracted portrait area with the blurred background area. Through the above technical solution, the background blurring of the portrait video can be accurately performed, thereby highlighting the portrait and optimizing the display effect of the portrait.

[0013] In a possible implementation, the blurring of the background region of the video frame image includes: performing Gaussian blurring on the background region to obtain the blurred background region. The above technical solution can improve the efficiency of background blurring.

[0014] In a possible implementation, the video shooting based on the protagonist mode includes: shooting a panoramic video and a protagonist portrait video; and displaying the video frame data of the protagonist portrait video in the video frame data of the panoramic video in the form of picture-in-picture. Through the above technical solution, when the size ratio of the face area in the portrait video is small, the portrait video can be enlarged and displayed, effectively optimizing the display effect of the portrait video.

[0015] In a second aspect, the present application provides an electronic device, comprising a memory and a processor: wherein the memory is used to store program instructions; the processor is used to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device executes the above-mentioned video shooting method.

[0016] In a third aspect, the present application provides a chip coupled to a memory in an electronic device, wherein the chip is used to control the electronic device to execute the above-mentioned video shooting method.

[0017] In a fourth aspect, the present application provides a computer storage medium, wherein the computer storage medium stores program instructions, and when the program instructions are executed on an electronic device, the electronic device executes the above-mentioned video shooting method.

[0018] In addition, the technical effects brought about by the second to fourth aspects can be found in the descriptions related to the methods of each design in the above method part, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the interface of a camera application of an electronic device provided in one embodiment of the present application.

[0020] Figure 2 This is another interface diagram of a camera application of an electronic device provided in an embodiment of the present application.

[0021] Figure 3 It is a software architecture diagram of an electronic device provided in one embodiment of the present application.

[0022] Figure 4 It is a flow chart of a video shooting method provided in one embodiment of the present application.

[0023] Figure 5 Schematic diagram of the architecture of a video shooting system provided in one embodiment of the present application.

[0024] Figure 6 This is an effect diagram of recognizing a facial image using a cascade classifier provided in an embodiment of the present application.

[0025] Figure 7 This is a flowchart for calculating the proportion of the size of the face area in the video frame data provided by an embodiment of the present application.

[0026] Figure 8 This is a flowchart of blurring video frame data captured by a camera provided by an embodiment of the present application.

[0027] Fig. 9 It is a schematic diagram of the architecture of a video shooting system provided in another embodiment of the present application.

[0028] Fig.10 This is a flowchart of a video shooting method provided by another embodiment of the present application.

[0029] Fig.11 This is a flowchart of a video shooting method provided by another embodiment of the present application.

[0030] Fig.12 This is a partial flow chart of a video shooting method provided in another embodiment of the present application.

[0031] Fig.13 This is a partial flow chart of a video shooting method provided in another embodiment of the present application.

[0032] Fig.14 This is a partial flow chart of a video shooting method provided in another embodiment of the present application.

[0033] Fig.15 This is a partial flow chart of a video shooting method provided in another embodiment of the present application.

[0034] Fig.16This is a flowchart of a video shooting method provided by another embodiment of the present application.

[0035] Fig.17 It is a schematic diagram of decision factors for intelligent scene detection provided in one embodiment of the present application.

[0036] Fig.18 It is a schematic diagram of video specifications of a video mode provided in an embodiment of the present application.

[0037] Fig.19 This is a flowchart of a video shooting method provided by another embodiment of the present application.

[0038] Fig. 20 This is a hardware architecture diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0039] The terms "first" and "second" involved in the embodiments of the present application are only used for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, 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 the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.

[0041] The user interface (UI) in the embodiments of the present application is a medium interface for interaction and information exchange between an application or operating system and a user, and can realize the conversion between the internal form of information and the form acceptable to the user. The user interface of an application is a source code written in a specific computer language such as JAVA and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that the user can recognize, such as pictures, text, buttons and other controls. Controls are the basic elements of the user interface. Typical controls include buttons, widgets, toolbars, menu bars, text boxes, scroll bars, images and text. The properties and contents of controls in the interface are defined by tags or nodes, such as XML through <textview> 、 <imgview> 、 <videoview>The controls contained in the interface are specified by nodes such as <head> and <body>. A node corresponds to a control or attribute in the interface. After being parsed and rendered, the node is presented as user-visible content. In addition, many applications, such as hybrid applications, usually also contain web pages in their interfaces. A web page, also known as a page, can be understood as a special control embedded in the application interface. A web page is source code written in a specific computer language, such as hypertext markup language (HTML), cascading style sheets (CSS), JAVA scripts (JavaScript, JS), etc. The web page source code can be loaded and displayed as user-recognizable content by a browser or a web page display component with similar functions to a browser. The specific content contained in a web page is also defined by tags or nodes in the web page source code. For example, HTML is defined by <body>. 、 、 <video> 、 <canvas>To define the elements and attributes of a web page.

[0042] The most common form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operation that is displayed in a graphical manner. It can be an icon, window, control or other interface element displayed on the display screen of an electronic device.

[0043] In the absence of conflict, the following embodiments and features of the embodiments may be combined with each other.

[0044] With the development of terminal technology, users have an increasing demand for video shooting functions in electronic devices. At present, electronic devices can set a variety of video modes according to different shooting scenes for users to choose and shoot videos. However, in actual use, users may not be sure of the current shooting scene, nor do they know which video mode to choose, or even if they are sure of the shooting scene, they do not know how to choose the corresponding video mode. For example, when shooting a video that includes a portrait, the user may choose the portrait mode so that the electronic device can process the portrait in the video. However, when the portrait is far away from the electronic device, the proportion of the face in the shooting interface may be small. Even if the portrait is processed, the optimization effect of the portrait may not be good, resulting in poor shooting effect of the portrait video, thereby affecting the user experience.

[0045] In order to avoid poor portrait video shooting effects due to the mismatch between the video mode selected by the user and the portrait when shooting a portrait video scene, an embodiment of the present application provides a video shooting method. When shooting a portrait video, a video mode can be recommended based on the face ratio, thereby automatically generating a portrait video with better effect, adapting to the user's portrait video shooting needs, and effectively improving the user experience.

[0046] In order to better understand the video shooting method provided in the embodiment of the present application, Figure 1 , Figure 2 The application scenario of the video shooting method of the embodiment of the present application is described.

[0047] See also Figure 1 As shown, when a user opens the camera application of an electronic device and selects recording, that is, shooting a video, the electronic device displays preview video frame data on the shooting interface of the camera application. When there is a person within the shooting range of the camera, the preview video frame data will also include the person's portrait. Figure 1 The portrait in the preview interface occupies a smaller proportion.

[0048] The electronic device provides a video mode selection control on the preview interface of the camera application. When the user triggers the video mode selection control, the electronic device provides controls corresponding to multiple video modes for the user to choose from. The user can trigger the control to select the corresponding video mode, thereby optimizing the preview video frame data and the captured video.

[0049] See also Figure 2 As shown, when the user triggers the control corresponding to the portrait mode, the electronic device automatically processes the portrait in the preview video frame data, such as beautification and background blurring. However, since the proportion of the portrait in the preview interface is small, it is not easy to see the beautification effect, and the background blurring cannot effectively highlight the portrait subject, resulting in poor shooting effect of the portrait video, thus affecting the user experience.

[0050] See also Figure 3 As shown, it is a software architecture diagram of the electronic device provided in the embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. For example, the Android system is divided into four layers, from top to bottom, respectively, the application layer 101, the framework layer 102, the Android runtime (Androidruntime) and the system library 103, the hardware abstraction layer 104, the kernel layer 105, and the hardware layer 106.

[0051] The application layer can include a series of application packages. For example, an application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, device control service, etc.

[0052] The framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.

[0053] Among them, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for electronic devices. For example, the management of call status (including connected, hung up, etc.). The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of an icon or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0054] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system. The core library contains two parts: one is the function that the Java language needs to call, and the other is the Android core library.

[0055] The application layer and framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0056] The system library may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as OpenGL ES), a 2D graphics engine (such as SGL), etc.

[0057] Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of multiple commonly used audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.

[0058] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0059] The kernel layer is the core of the operating system of an electronic device. It is the first layer of software expansion based on hardware. It provides the most basic functions of the operating system and is the basis for the operation of the operating system. It is responsible for managing the system's processes, memory, device drivers, files, and network systems, and determines the performance and stability of the system. For example, the kernel can determine the operating time of an application on a certain part of the hardware.

[0060] The kernel layer includes programs that are closely related to the hardware, such as interrupt handlers, device drivers, etc. It also includes basic, common, and high-frequency modules, such as clock management modules, process scheduling modules, etc. It also includes key data structures. The kernel layer can be set in the processor or solidified in the internal memory.

[0061] The hardware layer includes multiple hardware devices of the electronic device, such as cameras, display screens, etc.

[0062] See also Figure 4 FIG. 1 is a flowchart of a video shooting method provided by an embodiment of the present application. The method is applied in an electronic device, and the video shooting method includes:

[0063] S101, obtaining video frame data captured by a camera, and identifying whether the video frame data contains a face. If the video frame data contains a face, the process proceeds to S102; if the video frame data does not contain a face, the process continues to S101.

[0064] like Figure 3 As shown, in one embodiment of the present application, the hardware layer 106 includes an image processor 1061, and the image processor 1061 includes, but is not limited to, an image front end (Image Front End, IFE) 1062 and an image processing engine (Image Processing Engine, IPE) 1063. The image processor 1061 communicates with the camera 193 via the mobile industry processor interface (Mobile Industry Processor Interface, MIPI). The camera 193 includes, but is not limited to, a lens and an image sensor. The lens is used to collect light signals within the shooting range of the camera, and the image sensor is used to convert the light signals collected by the lens into electrical signals to obtain image data or video frame data. Among them, the image data obtained by the image sensor is a RAW image, and the video frame data obtained by the image sensor is a RAW video frame image.

[0065] See also Figure 5 FIG. 1 is a schematic diagram of the architecture of a video shooting system provided by an embodiment of the present application. The video shooting system 10 includes, but is not limited to, an image front end 1062 , an image processing engine 1063 , a mode switching module 11 , and an out-of-focus processing module 12 .

[0066] In one embodiment of the present application, obtaining video frame data captured by a camera and identifying whether the video frame data contains a face includes: in response to a preset operation of a user, obtaining the video frame data captured by the camera, performing format conversion on the video frame data captured by the camera to obtain a first video stream, performing scene analysis on the first video stream, and identifying whether the video frame data contains a face. The preset operation of the user may be an operation of opening a camera application, an operation of opening a camera application and opening a video function, or an operation of opening a camera application and triggering video capture.

[0067] Specifically, the image front end performs format conversion on the video frame data captured by the camera to obtain a first video stream. In one embodiment of the present application, the video frame data captured by the camera includes multiple video frame images, and the video frame images initially captured by the camera are in RAW format. The image front end performs format conversion on each RAW video frame image in the video frame data to obtain a video frame image in BMP (Bitmap) format, obtains a first video stream, and transmits the first video stream to the image processing engine. Among them, the first video stream is a tiny stream.

[0068] In one embodiment of the present application, a scene recognition module is running in the image processing engine. After the image processing engine receives the first video stream, the scene recognition module uses an AI scene detection algorithm to identify the scene in the first video stream and determines whether the video frame data contains a face. Specifically, the scene recognition module performs face recognition on each video frame image in the first video stream to determine whether the video frame data contains a face. If a preset number of consecutive video frame images are identified to contain a face, it is determined that the video frame data contains a face; if a preset number of consecutive video frame images are not identified to contain a face, it is determined that the video frame data does not contain a face. The preset number is 5. In other embodiments, the preset number can also be set to other values ​​as required.

[0069] In one embodiment of the present application, the scene recognition module uses an AI scene detection algorithm to identify the scene in the first video stream, and judging whether the video frame data contains a face includes: the scene recognition module uses a cascade classifier to identify the scene in the first video stream, and judging whether the video frame data contains a face. The cascade classifier is formed by cascading multiple strong classifiers, and each strong classifier is formed by a certain number of weak classifiers through the ADABOOST algorithm (an algorithm that generates a final strong classifier by iterating weak classifiers). Among them, the weak classifier is used to extract the Harr-like rectangular feature of the image, and the rectangular feature refers to a rectangle with a black area and a white area, which may include the original rectangular feature and the extended rectangular feature. Specifically, any rectangle is selected and placed on the video frame image, and then the pixel sum of the white area is subtracted from the pixel sum of the black area, and the value obtained is the feature value of the rectangular feature. If the rectangular feature is placed in the face area and the non-face area of ​​the video frame image, the calculated feature value is different, so it can be judged based on the feature value of the rectangular feature whether the area where the rectangular feature is placed in the video frame image is the face area, and then judge whether the video frame image contains a face.

[0070] If the face region can be identified in the video frame image through the cascade classifier, it is determined that the video frame image contains a face. If the face region cannot be identified in the video frame image through the cascade classifier, it is determined that the video frame image does not contain a face. If a preset number of consecutive video frame images contain a face, it is determined that the video frame data captured by the camera contains a face. Figure 6 As shown, it is an effect diagram of recognizing a face image using a cascade classifier provided in an embodiment of the present application, and the rectangular frame portion is the face area.

[0071] In other embodiments, it is also possible to detect whether a face is included in a video frame image by using face detection methods such as face detection based on template matching, face detection based on appearance shape, face detection based on neural network, face detection based on feature, and face detection based on skin color.

[0072] S102, calculating the proportion of the size of the face area in the video frame data.

[0073] In one embodiment of the present application, if the video frame data contains a human face, the proportion of the size of the facial area corresponding to the human face in the video frame data is calculated; if the video frame data contains multiple faces, the proportion of the size of the facial areas corresponding to all human faces in the video frame data is calculated.

[0074] In one embodiment of the present application, the detailed process of calculating the proportion of the size of the face area in the video frame data is as follows: Figure 7 As shown, specifically including:

[0075] S1021: Use a rectangular frame to mark the face area recognized in the video frame data.

[0076] In one embodiment of the present application, after the scene recognition module recognizes that the video frame data captured by the camera contains a face, it also uses a rectangular frame to mark the face area recognized in the video frame data. The rectangular frame can be the smallest rectangle that surrounds the face area.

[0077] Specifically, during the face detection process, the scene recognition module simultaneously calculates the face coordinates and determines the minimum rectangular frame that includes the face area based on the coordinates of the top, bottom, left, and right endpoints of the face area. The lateral edge of the minimum rectangular frame extends in the horizontal direction, and the longitudinal edge extends in the vertical direction.

[0078] S1022: Determine the size of the face region based on the rectangular frame.

[0079] In one embodiment of the present application, the size of the face region may include a width value w, a height value h, and an area s of the face region, where the area s is the product of the width value w and the height value h, and the units of the width value, the height value, and the area are all the number of pixels. Determining the size of the face region based on the rectangular frame includes: determining the width value of the rectangular frame identifying the face region in the video frame image as the width value of the face region, and determining the height value of the rectangular frame as the height value of the face region.

[0080] S1023, calculating the ratio between the size of the face region and the size of the video frame image, and obtaining the ratio of the size of the face region in the video frame data.

[0081] In one embodiment of the present application, the size of the video frame image may include a width value W, a height value H, and an area S of the video frame image, where the area S is the product of the width value W and the height value H, and the width value W, the height value H, and the area S of the video frame image are all preset values, the width value W is the number of pixels at the horizontal edge of the video frame image, the height value H is the number of pixels at the vertical edge of the video frame image, and the area S is the number of pixels of the video frame image. For example, if the resolution of the video frame image is 640*480, the number of pixels at the horizontal edge of the video frame image is 640, and the number of pixels at the vertical edge of the video frame image is 480, then the number of pixels of the video frame image is 307200.

[0082] In one embodiment of the present application, calculating the ratio between the size of the face region and the size of the video frame image includes: calculating the ratio between the width value of the face region and the width value of the video frame image. For example, if the width value of the face region is 400 and the width value of the video frame image is 640, then the ratio R between the width value of the face region and the width value of the video frame image is w =400 / 640=0.625.

[0083] In another embodiment of the present application, calculating the ratio between the size of the face region and the size of the video frame image includes: calculating the ratio between the height value of the face region and the height value of the video frame image. For example, if the height value of the face region is 240 and the width value of the video frame image is 480, then the ratio R between the width value of the face region and the width value of the video frame image is h =240 / 480=0.5.

[0084] In another embodiment of the present application, calculating the ratio between the size of the face region and the size of the video frame image includes: calculating the ratio between the area of ​​the face region and the area of ​​the video frame image. For example, if the area of ​​the face region is 10500 and the area of ​​the video frame image is 307200, then the ratio R between the width value of the face region and the width value of the video frame image is s =10500 / 307200=0.34.

[0085] S103, determining whether the proportion of the size of the face area in the video frame data is greater than or equal to a first preset value. If the proportion of the size of the face area in the video frame data is greater than or equal to the first preset value, the process proceeds to S104; if the proportion of the size of the face area in the video frame data is less than the first preset value, the process proceeds to S105.

[0086] In one embodiment of the present application, the first preset value is 1 / 3. In other embodiments, the first preset value can also be set to other values ​​according to requirements.

[0087] In another embodiment of the present application, it is determined whether the proportion of the size of the face area in a continuous preset number of video frame images in the video frame data is greater than or equal to a first preset value. If the proportion of the size of the face area in a continuous preset number of video frame images in the video frame data is greater than or equal to the first preset value, the process enters S104.

[0088] In another embodiment of the present application, it is determined whether the number of faces in a continuous preset number of video frame images is one, and whether the proportion of the size of the face area in the continuous preset number of video frame images in the video frame data is greater than or equal to a first preset value. If the number of faces in the continuous preset number of video frame images is one, and the proportion of the size of the face area in the continuous preset number of video frame images in the video frame data is greater than or equal to the first preset value, the process enters S104.

[0089] S104: Determine that the recommended video mode is the portrait mode, and shoot a video based on the portrait mode.

[0090] like Figure 5 As shown, in one embodiment of the present application, after making a recommendation decision and determining that the recommended video mode is portrait mode, a prompt control is displayed on the camera application interface, and the text "Portrait mode is recommended" is displayed on the prompt control. In response to the user triggering the prompt control, the mode switching module switches the current video mode to portrait mode, and performs video shooting based on portrait mode.

[0091] In one embodiment of the present application, performing video shooting based on the portrait mode includes: switching to a lens with the largest aperture to shoot the video, or increasing the aperture of the lens currently shooting the video to a maximum value.

[0092] In another embodiment of the present application, video shooting based on the portrait mode includes: blurring the video frame data shot by the camera, and displaying the video frame data after the portrait blurring process on the display screen. Specifically, the camera transmits the captured video frame data to the image front end, and the image front end performs format conversion on the video frame data, converts the RAW format video frame data into YUV format video frame data, generates a second video stream, and transmits the second video stream to the image processing engine, the second video stream is a preview stream, and the image processing engine blurs the video frame image in the second video stream through the out-of-focus processing module, and displays the blurred video frame data on the display screen.

[0093] In one embodiment of the present application, the detailed process of blurring the video frame data captured by the camera is as follows: Figure 8 As shown, specifically including:

[0094] S1041, performing portrait cutout on the video frame image to extract the portrait area in the video frame image.

[0095] In one embodiment of the present application, blur processing is implemented by an out-of-focus processing module based on a bokeh (background blur) algorithm. Performing portrait cutout on a video frame image and extracting a portrait area in the video frame image includes: inputting the video frame image into a portrait cutout model, and extracting the portrait area in the video frame image through the portrait cutout model. Among them, the portrait cutout model can be FCN (Fully Convolutional Networks), a semantic segmentation network SegNet, and a dense prediction network Unet.

[0096] S1042: blur the background area of ​​the video frame image.

[0097] In one embodiment of the present application, the background area of ​​the video frame image is the area in the video frame image except the portrait area. Blurring the background area in the video frame image includes: performing Gaussian blur processing on the background area to obtain a blurred background area.

[0098] Specifically, performing Gaussian blur processing on the background area includes: presetting the mean and standard deviation of a two-dimensional Gaussian distribution function, dividing the background area into a plurality of n*n preset areas, inputting the coordinates of each pixel point in each n*n preset area into a two-dimensional Gaussian distribution function, obtaining the output value of the two-dimensional Gaussian distribution function, and dividing the output value corresponding to each pixel point by the sum of the output values ​​corresponding to all pixels points in the preset area, obtaining the weight of each pixel point in the preset area, multiplying the RGB three-channel pixel value of the pixel point by the weight respectively, obtaining the pixel value after Gaussian blur processing, replacing the initial pixel value of the pixel point with the pixel value after Gaussian blur processing, obtaining the pixel point after Gaussian blur processing, and determining the image composed of the pixel points after Gaussian blur processing in the plurality of n*n preset areas as the video frame image after blur processing. Wherein, n is the blur radius, and the value can be any positive integer. Optionally, the mean value of the two-dimensional Gaussian distribution function is 0, and the standard deviation is 1.5.

[0099] S1043, merging the extracted portrait area with the blurred background area.

[0100] In one embodiment of the present application, the extracted portrait region is placed at an initial portrait position, and the extracted portrait region and the blurred background region are merged so that the portrait region and the blurred background region are fused.

[0101] S105, determine whether the proportion of the size of the face area in the video frame data is less than or equal to the second preset value, and the second preset value is less than the first preset value. If the proportion of the size of the face area in the video frame data is less than or equal to the second preset value, the process enters S106; if the proportion of the size of the face area in the video frame data is greater than the second preset value, the process returns to S101. Among them, the second preset value is 1 / 5. In other embodiments, the second preset value can also be set to other values ​​according to requirements.

[0102] In another embodiment of the present application, it is determined whether the proportion of the size of the face area in a continuous preset number of video frame images in the video frame data is less than or equal to a second preset value. If the proportion of the size of the face area in a continuous preset number of video frame images in the video frame data is less than or equal to the second preset value, the process enters S106.

[0103] In another embodiment of the present application, it is determined whether the number of faces in a continuous preset number of video frame images is one, and whether the proportion of the size of the face area in the continuous preset number of video frame images in the video frame data is less than or equal to a second preset value. If the number of faces in the continuous preset number of video frame images is multiple, and the proportion of the size of the face area in the continuous preset number of video frame images in the video frame data is less than or equal to the second preset value, the process enters S106.

[0104] S106: Determine that the recommended video mode is the protagonist mode, and shoot the video based on the protagonist mode.

[0105] In one embodiment of the present application, after making a recommendation decision and determining that the recommended video mode is the protagonist mode, a prompt control is displayed on the camera application interface, and the text "Recommend using the protagonist mode" is displayed on the prompt control. In response to the user triggering the prompt control, the mode switching module switches the current video mode to the protagonist mode, and performs video shooting based on the protagonist mode. The protagonist is a portrait corresponding to the focus position, and the focus position is determined based on the user's touch selection.

[0106] In the protagonist mode, the shooting interface simultaneously displays the portrait video frame data and the panoramic video frame data, and the portrait video frame data and the panoramic video frame data are superimposed and displayed in the form of picture-in-picture. In one embodiment of the present application, video shooting based on the protagonist mode includes: controlling one camera to shoot the protagonist portrait video, controlling another camera to shoot the panoramic video, displaying the video frame data of the panoramic video on the shooting interface, and superimposing the video frame data of the portrait video on the video frame data of the panoramic video in the form of picture-in-picture. Among them, the camera for shooting the protagonist portrait video is the main camera or the telephoto camera (the camera with the longest focal length), which can track and shoot the protagonist, and the camera for shooting the panoramic video is a wide-angle camera. In other embodiments, the camera for shooting the portrait video and the panoramic video can also be the same camera, and the portrait portion of the protagonist in the panoramic video frame data shot by the camera is intercepted and enlarged, and displayed in the form of picture-in-picture.

[0107] Specifically, see Fig. 9 As shown, the camera transmits the captured video frame data to the image front end, which first converts the video frame data into a first video stream (tiny stream), and uses an AI scene detection algorithm to perform scene analysis on the first video stream. If the scene analysis result shows that the proportion of the size of the face area in the video frame data is less than or equal to the second preset value, a recommendation decision for the protagonist mode is made according to the scene analysis result, and the video mode is switched to the protagonist mode in response to the user operation. After the video mode is switched to the protagonist mode, the image front end converts the video frame data captured by the camera into a second video stream (preview stream), and transmits the second video stream to the image processing engine, which optimizes the second video stream, such as anti-shake, noise reduction, color correction, etc. After the image front end converts the video frame format, it also intercepts the protagonist portrait video frame data in the video frame data, amplifies the protagonist portrait video frame data, for example, amplifies it by one time, and generates a third video stream, which is a video stream for enlarging the tracking subject. The image front end transmits the third video stream to the image processing engine, and the image processing engine optimizes the third video stream, such as anti-shake, noise reduction, color correction, etc. The image processing engine splices the processed second video stream and the third video stream, and displays the spliced ​​video stream on the display screen, so that the second video stream is displayed completely and the third video stream is displayed in a picture-in-picture format.

[0108] See also Fig.10 FIG. 2 is a flowchart of a video shooting method provided by another embodiment of the present application. The method is applied in an electronic device, and the video shooting method includes:

[0109] S201, obtaining video frame data captured by a camera, and identifying whether the video frame data contains a face. If the video frame data contains a face, the process proceeds to S202; if the video frame data does not contain a face, the process proceeds to S206.

[0110] S202, calculating the proportion of the size of the face area in the video frame data.

[0111] S203, determine whether the proportion of the size of the face area in the video frame data is greater than or equal to a first preset value. If the proportion of the size of the face area in the video frame data is greater than or equal to the first preset value, the process enters S204; if the proportion of the size of the face area in the video frame data is less than the first preset value, the process enters S205.

[0112] S204: Determine that the recommended video mode is the portrait mode, and shoot a video based on the portrait mode.

[0113] S205, determining whether the proportion of the size of the face region in the video frame data is less than or equal to a second preset value, and the second preset value is less than the first preset value. If the proportion of the size of the face region in the video frame data is less than or equal to the second preset value, the process proceeds to S206; if the proportion of the size of the face region in the video frame data is greater than the second preset value, the process proceeds to S207.

[0114] S206: Determine that the recommended video mode is the protagonist mode, and shoot the video based on the protagonist mode.

[0115] S207, identifying whether the scene information of the video frame data is a night scene. If the scene information of the video frame data is a night scene, the process proceeds to S208; if the scene information of the video frame data is not a night scene, the process returns to S201.

[0116] In one embodiment of the present application, identifying whether the scene information of the video frame data is a night scene includes: the scene recognition module obtains a preset number of consecutive video frame images, obtains the brightness information luxIndex of each video frame image, and determines whether the brightness information luxIndex of the preset number of consecutive video frame images is less than or equal to the preset brightness. If the brightness information luxIndex of the preset number of consecutive video frame images is less than or equal to the preset brightness, it means that the light brightness of the current shooting scene is dark, and the scene information of the video frame data is determined to be a night scene; if the brightness information of any video frame image is greater than the preset brightness, it means that the light brightness of the current shooting scene is bright, and the scene information of the video frame data is determined not to be a night scene. Optionally, the preset number is 5.

[0117] S208: Determine that the recommended video mode is the night scene mode, and shoot the video based on the night scene mode.

[0118] In one embodiment of the present application, after making a recommendation decision and determining that the recommended video mode is the night mode, a prompt control is displayed on the camera application interface, and the text "Night mode is recommended" is displayed on the prompt control. In response to the user triggering the prompt control, the mode switching module switches the current video mode to the night mode, and performs video shooting based on the night mode.

[0119] See also Fig.11 FIG. 2 is a flowchart of a video shooting method provided by another embodiment of the present application. The method is applied in an electronic device, and the video shooting method includes:

[0120] S301, obtaining video frame data captured by a camera, and identifying whether the video frame data contains a face. If the video frame data contains a face, the process proceeds to S302; if the video frame data does not contain a face, the process proceeds to S307.

[0121] S302, calculating the proportion of the size of the face area in the video frame data.

[0122] S303, determine whether the proportion of the size of the face area in the video frame data is greater than or equal to a first preset value. If the proportion of the size of the face area in the video frame data is greater than or equal to the first preset value, the process enters S304; if the proportion of the size of the face area in the video frame data is less than the first preset value, the process enters S305.

[0123] S304: Determine that the recommended video mode is the portrait mode, and shoot a video based on the portrait mode.

[0124] S305, determining whether the proportion of the size of the face region in the video frame data is less than or equal to a second preset value, and the second preset value is less than the first preset value. If the proportion of the size of the face region in the video frame data is less than or equal to the second preset value, the process proceeds to S306; if the proportion of the size of the face region in the video frame data is greater than the second preset value, the process proceeds to S307.

[0125] S306: Determine that the recommended video mode is the protagonist mode, and shoot the video based on the protagonist mode.

[0126] S307, identifying whether the scene information of the video frame data is a night scene. If the scene information of the video frame data is a night scene, the process proceeds to S308; if the scene information of the video frame data is not a night scene, the process proceeds to S309.

[0127] S308: Determine that the recommended video mode is the night scene mode, and shoot the video based on the night scene mode.

[0128] S309, identifying whether the scene information of the video frame data is a high dynamic range (HDR) scene. If the scene information of the video frame data is a HDR scene, the process proceeds to S310; if the scene information of the video frame data is not a HDR scene, the process returns to S301.

[0129] In one embodiment of the present application, identifying whether the scene information of the video frame data is a high dynamic range scene includes: the scene recognition module obtains a preset number of consecutive video frame images in the video frame data, obtains the dynamic range values ​​drValue of the preset number of consecutive video frame images, and determines whether the dynamic range values ​​drValue of the preset number of consecutive video frame images are greater than or equal to the preset dynamic range value. If the dynamic range values ​​drValue of the preset number of consecutive video frame images are greater than or equal to the preset dynamic range value, it is determined that the scene information of the video frame data is a high dynamic range scene; if the dynamic range value drValue of any video frame image is less than the preset dynamic range value, it is determined that the scene information of the video frame data is not a high dynamic range scene. In one embodiment of the present application, the dynamic range value is the ratio between the highest brightness and the lowest brightness in the image. Optionally, the preset dynamic range value is 50.

[0130] S310: Determine that the recommended video mode is a high dynamic range mode, and shoot a video based on the high dynamic range mode.

[0131] In one embodiment of the present application, after making a recommendation decision and determining that the recommended video mode is the high dynamic range mode, a prompt control is displayed on the camera application interface, and the text "HDR mode is recommended" is displayed on the prompt control. In response to the user triggering the prompt control, the mode switching module switches the current video mode to the high dynamic range mode, and performs video shooting based on the high dynamic range mode.

[0132] See also Figure 12-13 FIG. 2 is a flowchart of a video shooting method provided by another embodiment of the present application. The method is applied in an electronic device, and the video shooting method includes:

[0133] S401, obtaining video frame data captured by a camera, and identifying whether the video frame data contains a face. If the video frame data contains a face, the process proceeds to S402; if the video frame data does not contain a face, the process proceeds to S407.

[0134] S402, calculating the proportion of the size of the face area in the video frame data.

[0135] S403, determine whether the proportion of the size of the face area in the video frame data is greater than or equal to a first preset value. If the proportion of the size of the face area in the video frame data is greater than or equal to the first preset value, the process proceeds to S404; if the proportion of the size of the face area in the video frame data is less than the first preset value, the process proceeds to S405.

[0136] S404: Determine that the recommended video mode is the portrait mode, and shoot a video based on the portrait mode.

[0137] S405, determining whether the proportion of the size of the face region in the video frame data is less than or equal to a second preset value, and the second preset value is less than the first preset value. If the proportion of the size of the face region in the video frame data is less than or equal to the second preset value, the process proceeds to S406; if the proportion of the size of the face region in the video frame data is greater than the second preset value, the process proceeds to S407.

[0138] S406: Determine that the recommended video mode is the protagonist mode, and shoot the video based on the protagonist mode.

[0139] S407, identifying whether the scene information of the video frame data is a night scene. If the scene information of the video frame data is a night scene, the process proceeds to S408; if the scene information of the video frame data is not a night scene, the process proceeds to S409.

[0140] S408: Determine that the recommended video mode is the night scene mode, and shoot the video based on the night scene mode.

[0141] S409, identifying whether the scene information of the video frame data is a high dynamic range scene. If the scene information of the video frame data is a high dynamic range scene, the process proceeds to S410; if the scene information of the video frame data is not a high dynamic range scene, the process proceeds to S411.

[0142] S410: Determine that the recommended video mode is a high dynamic range mode, and shoot a video based on the high dynamic range mode.

[0143] S411, identifying whether the scene information of the video frame data is a macro scene. If the scene information of the preview stream is a macro scene, the process proceeds to S412; if the scene information of the video frame data is not a macro scene, the process returns to S401.

[0144] In one embodiment of the present application, identifying whether the scene information of the video frame data is a macro scene includes: a scene recognition module determines whether the scene information of the video frame data is a macro scene based on the movement data vcmCode of the camera voice coil motor, the focus status focusStatus of the camera and the calibration data calibData of the camera. Specifically, the scene recognition module obtains the movement data vcmCode of the camera voice coil motor, the focus status focusStatus of the camera and the calibration data calibData of the camera, and determines whether the focus status focusStatus of the camera is successful. If the focus status focusStatus of the camera is unsuccessful, it is determined whether the movement data vcmCode of the camera voice coil motor is greater than or equal to the preset movement data. If the movement data vcmCode of the camera voice coil motor is greater than or equal to the preset movement data, it is determined whether the calibration data calibData of the camera is normal. If the calibration data calibData of the camera is normal, when the camera fails to focus, the movement distance of the camera is also sufficient, and the calibration data of the camera is normal, it means that the camera may not be able to focus due to the focus distance, and the scene information of the video frame data is determined to be a macro scene; if the focus status focusStatus of the camera is successful, or the movement data vcmCode of the camera voice coil motor is less than the preset movement data, or the calibration data calibData of the camera is abnormal, it is determined that the scene information of the video frame data is not a macro scene. Optionally, the preset movement data is the movement step length of 10 voice coil motors.

[0145] S412: Determine that the recommended video mode is the macro mode, and shoot the video based on the macro mode.

[0146] In one embodiment of the present application, after making a recommendation decision and determining that the recommended video mode is macro mode, a prompt control is displayed on the camera application interface, and the text "Macro mode is recommended" is displayed on the prompt control. In response to the user triggering the prompt control, the mode switching module switches the current video mode to macro mode, and performs video shooting based on the macro mode.

[0147] See also Figure 14-15 FIG. 2 is a flowchart of a video shooting method provided by another embodiment of the present application. The method is applied in an electronic device, and the video shooting method includes:

[0148] S501, obtaining video frame data captured by a camera, and identifying whether the video frame data contains a face. If the video frame data contains a face, the process proceeds to S502; if the video frame data does not contain a face, the process proceeds to S506.

[0149] S502, calculating the proportion of the size of the face area in the video frame data.

[0150] S503, determine whether the proportion of the size of the face area in the video frame data is greater than or equal to a first preset value. If the proportion of the size of the face area in the video frame data is greater than or equal to the first preset value, the process proceeds to S504; if the proportion of the size of the face area in the video frame data is less than the first preset value, the process proceeds to S505.

[0151] S504: Determine that the recommended video mode is the portrait mode, and shoot a video based on the portrait mode.

[0152] S505, determine whether the proportion of the size of the face area in the video frame data is less than or equal to the second preset value, and the second preset value is less than the first preset value. If the proportion of the size of the face area in the video frame data is less than or equal to the second preset value, the process enters S506; if the proportion of the size of the face area in the video frame data is greater than the second preset value, the process enters S507.

[0153] S506: Determine that the recommended video mode is the protagonist mode, and shoot the video based on the protagonist mode.

[0154] S507, identifying whether the scene information of the video frame data is a night scene. If the scene information of the video frame data is a night scene, the process proceeds to S508; if the scene information of the video frame data is not a night scene, the process proceeds to S509.

[0155] S508: Determine that the recommended video mode is the night scene mode, and shoot the video based on the night scene mode.

[0156] S509, identifying whether the scene information of the video frame data is a high dynamic range scene. If the scene information of the video frame data is a high dynamic range scene, the process proceeds to S510; if the scene information of the preview stream is not a high dynamic range scene, the process proceeds to S511.

[0157] S510: Determine that the recommended video mode is a high dynamic range mode, and shoot a video based on the high dynamic range mode.

[0158] S511, identifying whether the scene information of the video frame data is a macro scene. If the scene information of the video frame data is a macro scene, the process proceeds to S512; if the scene information of the video frame data is not a macro scene, the process proceeds to S513.

[0159] In one embodiment of the present application, identifying whether the scene information of the video frame data is a macro scene includes: a scene recognition module determines whether the scene information of the video frame data is a macro scene based on the movement data vcmCode of the camera voice coil motor, the focus status focusStatus of the camera and the calibration data calibData of the camera. Specifically, the scene recognition module obtains the movement data vcmCode of the camera voice coil motor, the focus status focusStatus of the camera and the calibration data calibData of the camera, and determines whether the focus status focusStatus of the camera is successful. If the focus status focusStatus of the camera is unsuccessful, it is determined whether the movement data vcmCode of the camera voice coil motor is greater than or equal to the preset movement data. If the movement data vcmCode of the camera voice coil motor is greater than or equal to the preset movement data, it is determined whether the calibration data calibData of the camera is normal. If the calibration data calibData of the camera is normal, when the camera fails to focus, the movement distance of the camera is also sufficient, and the calibration data of the camera is normal, it means that the camera may not be able to focus due to the focus distance, and the scene information of the video frame data is determined to be a macro scene; if the focus status focusStatus of the camera is successful, or the movement data vcmCode of the camera voice coil motor is less than the preset movement data, or the calibration data calibData of the camera is abnormal, it is determined that the scene information of the video frame data is not a macro scene. Optionally, the preset movement data is the movement step length of 10 voice coil motors.

[0160] S512: Determine that the recommended video mode is the macro mode, and shoot a video based on the macro mode.

[0161] S513, identifying whether the scene information of the video frame data is a multi-camera scene. If the scene information of the video frame data is a multi-camera scene, the process proceeds to S514; if the scene information of the video frame data is not a multi-camera scene, the process returns to S501.

[0162] In one embodiment of the present application, identifying whether the scene information of the video frame data is a macro scene includes: the scene recognition module obtains a preset number of consecutive video frame images in the video frame data, identifies whether the consecutive preset number of video frame images contain pets, and if the consecutive preset number of video frame images contain pets, determines that the scene information of the video frame data is a multi-lens scene; if any video frame image does not contain a pet, determines that the scene information of the video frame data is not a multi-lens scene. That is, the scene recognition module determines that the scene information of the video frame data is a multi-lens scene based on the scene analysis result aiScencDetResult that the consecutive preset number of video frame images contain pets.

[0163] S514: Determine that the recommended video mode is the multi-lens mode, and shoot the video based on the multi-lens mode.

[0164] In one embodiment of the present application, after making a recommendation decision and determining that the recommended video mode is the multi-lens mode, a prompt control is displayed on the camera application interface, and the text "Multi-lens mode is recommended" is displayed on the prompt control. In response to the user triggering the prompt control, the mode switching module switches the current video mode to the multi-lens mode, and performs video shooting based on the multi-lens mode.

[0165] The embodiment of the present application provides an overall solution that supports intelligent scene detection and video mode recommendation in the normal recording mode. The typical user scenarios can be identified based on the currently supported video modes. That is, in the normal recording mode, the typical scene detection logic is turned on, and after the typical scene is detected, the corresponding optimal video mode is recommended to the user.

[0166] The currently supported video modes include HDR mode, portrait mode, protagonist mode, night scene mode, macro mode, and multi-lens mode. The specific solutions include: entering the normal video preview interface, turning on Master AI (intelligent shooting assistant) by default, performing intelligent scene detection, and popping up a recommendation dialog box based on the scene detection results. After the user clicks to select a mode, they will enter the corresponding video mode. After entering the selected video mode, scene detection is no longer supported. To exit the current mode: manually cross out the icon of the current mode or click record. After completing the recording, it will automatically return to the normal video mode and start a new round of scene detection.

[0167] See also Fig.16 , which is a flow chart of a video shooting method provided in another embodiment of the present application.

[0168] S601, enter normal video recording mode.

[0169] S602, determine whether Master AI is enabled. If Master AI is not enabled, the process proceeds to S603; if Master AI is enabled, the process proceeds to S604.

[0170] S603, maintaining the video mode as the normal video recording mode.

[0171] S604, Master AI performs shooting scene recognition.

[0172] S605, determine whether there is a matching scene. If there is a matching scene, the process goes to S606; if there is no matching scene, the process goes to S603.

[0173] S606, making a decision recommendation for the video mode based on the identified matching scene. The decision recommendation process specifically includes: S607, detecting an HDR scene and stabilizing a certain number of frames. S608, switching the video mode to HDR mode. S609, detecting a night scene and stabilizing a certain number of frames. S610, switching the video mode to night mode. S611, detecting a single person, with a face ratio greater than or equal to 1 / 3, and stabilizing a certain number of frames. S612, switching the video mode to portrait mode, turning on the blur function. S613, detecting multiple people, with a maximum face ratio less than or equal to 1 / 5, and stabilizing a certain number of frames. S614, switching the video mode to protagonist mode. S615, detecting a pet, and stabilizing a certain number of frames. S616, switching the video mode to multi-lens mode. S617, detecting a macro scene, and stabilizing a certain number of frames. S618, switching the video mode to macro mode. When the current video mode is manually turned off, S619, entering the normal recording mode.

[0174] See also Fig.17 As shown in the figure, it is the decision factor for Master AI to perform intelligent scene detection. Fig.18 The following are the video specifications for each video mode.

[0175] See also Fig.19 , which is a flow chart of a video shooting method provided in another embodiment of the present application.

[0176] S701, input video frame data.

[0177] S702: Output a video mode to be recommended according to the decision factor.

[0178] S703, determining whether the current camera meets the zoom capability required by the video mode to be recommended. If the current camera meets the zoom capability required by the video mode to be recommended, the process proceeds to S704; if the current camera does not meet the zoom capability required by the video mode to be recommended, the process returns to S701.

[0179] In one embodiment of the present application, if the zoom ratio range of the current camera meets the zoom specification required by the video mode to be recommended, it is determined that the current camera meets the zoom capability required by the video mode to be recommended; if the zoom ratio range of the current camera does not meet the zoom specification required by the video mode to be recommended, it is determined that the current camera does not meet the zoom capability required by the video mode to be recommended. Fig.18 As shown, the zoom specification of the portrait mode is 1x-2x (1 times - 2 times), and the zoom ratio range of the current camera is 1x-4x, so it is determined that the zoom ratio range of the current camera meets the zoom specification required by the portrait mode.

[0180] S704: Determine the recommended video mode. That is, determine the output video mode as the recommended video mode.

[0181] The main differences between this solution and the intelligent scene recognition for photos are: 1) For photo Master AI, as long as a face is recognized and the scene priority conditions are met, it will enter portrait blur; for video Master AI, different modes will be entered according to the size of the face. Scenes with faces larger than 1 / 3 will enter portrait blur mode, and scenes with faces smaller than 1 / 5 will enter protagonist mode. 2) There are differences in the implementation methods: For photo Master AI to enter portrait blur, it just adds blur and beauty algorithms to the ordinary photo link; for video Master AI, a mode jump will be performed, jumping into portrait mode (video blur) and protagonist mode.

[0182] The present application also provides an electronic device 100. Fig. 20 As shown, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device 100.

[0183] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0184] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0185] 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 processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0186] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0187] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0188] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an Inter-integrated Circuit (I2C) interface, an Inter-integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General-Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface, etc.

[0189] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface to realize the touch function of the electronic device 100.

[0190] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0191] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0192] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0193] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to realize the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the electronic device 100.

[0194] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0195] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices 100, such as AR devices, etc.

[0196] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0197] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.

[0198] 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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

[0200] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0201] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0202] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0203] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0204] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include Global System For Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a Global Positioning System (GPS), a Global Navigation Satellite System (GLONASS), a Beidou Navigation Satellite System (BDS), a Quasi-Zenith Satellite System (QZSS) and / or a Satellite Based Augmentation System (SBAS).

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

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

[0207] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0208] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0209] 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 passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0210] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0211] The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0212] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0213] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0214] Random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.;

[0215] Non-volatile memory may include disk storage devices and flash memory.

[0216] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle. It can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level. It can be divided into universal flash storage (UFS), embedded Multi Media Card (eMMC), etc. according to the storage specification.

[0217] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0218] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0219] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0220] The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 110. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 110, the screen display detection method executed on the electronic device 100 in the above embodiment can be implemented to implement the screen display detection function of the electronic device 100.

[0221] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0222] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0223] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0224] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0225] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by putting his mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to realize collection of sound signals, noise reduction, identification of sound source, realization of directional recording function, etc.

[0226] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm Open Mobile Terminal Platform (OMTP) standard interface or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.

[0227] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0228] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0229] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0230] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100. An embodiment of the present application further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on the electronic device 100, the electronic device 100 executes the above-mentioned related method steps to implement the video shooting method in the above-mentioned embodiment.

[0231] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the video shooting method in the above-mentioned embodiment.

[0232] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the video shooting method in the above-mentioned method embodiments.

[0233] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.

[0234] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0235] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0236] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0237] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0238] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0239] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.< / canvas> < / video> < / videoview> < / imgview> < / textview>

Claims

1. A video shooting method, characterized in that: The method comprises: In response to a first operation of the user on the camera application, a first interface is displayed, where the first interface includes a first video, and the first video is video frame data captured by the camera; Identify scene information corresponding to the video frame data, and switch to display a second interface, where the second interface displays a first video and a first control, where the first control corresponds to a first video mode; In response to a second operation of the user on the first control, the video mode is switched to the first video mode, and a third interface is displayed, where the third interface includes a second video, and the second video is shot using the first video mode; If the video frame data includes a human face, calculating the proportion of the size of the human face area in the video frame image; If the proportion of the size of the face area in the video frame image is less than or equal to a second preset value, the first video mode is determined as the protagonist mode, and the displaying of the third interface includes: The video frame data is converted into a second video stream, the video frame data of the protagonist's portrait in the video frame data is intercepted and enlarged to obtain a third video stream, the second video stream and the third video stream are spliced ​​to obtain the second video, and the third video stream is displayed in the second video in the form of picture-in-picture.

2. The video shooting method according to claim 1, characterized in that: The method further comprises: If the proportion of the size of the face area in the video frame data is greater than or equal to a first preset value, it is determined that the scene information corresponding to the video frame data is a blurred scene, and the second preset value is less than the first preset value.

3. The video shooting method according to claim 2, characterized in that: The method further comprises: The first video mode corresponding to the blurred scene is determined to be a portrait mode, and the second video is obtained by shooting using the portrait mode.

4. The video shooting method according to claim 2, wherein: The identifying the scene information corresponding to the video frame data also includes: Acquire a preset number of consecutive video frame images from the video frame data, and acquire brightness information of each video frame image; If the brightness information of the continuous preset number of video frame images is less than or equal to the preset brightness, it is determined that the scene information corresponding to the video frame data is a night scene.

5. The video shooting method according to claim 4, characterized in that: The method further comprises: Determine the third video mode corresponding to the night scene as the night scene mode; The second interface displays the first video and a third control, and the third control corresponds to the third video mode; In response to the user's second operation on the third control, the video mode is switched to the third video mode, and the third interface is switched to display. The third interface includes a fourth video, and the fourth video is shot using the third video mode.

6. The video shooting method according to claim 4, characterized in that: The identifying the scene information corresponding to the video frame data also includes: Obtaining a preset number of continuous video frame images from the video frame data, and obtaining a dynamic range value of each video frame image; If the dynamic range values ​​of the continuous preset number of video frame images are greater than or equal to the preset dynamic range value, it is determined that the scene information corresponding to the video frame data is a high dynamic range scene.

7. The video shooting method according to claim 6, characterized in that: The method further comprises: Determining a fourth video mode corresponding to the high dynamic range scene as a high dynamic range mode; The second interface displays the first video and a fourth control, and the fourth control corresponds to the fourth video mode; In response to the user's second operation on the fourth control, the video mode is switched to the fourth video mode, and the third interface is switched to display, the third interface includes a fifth video, and the fifth video is shot using the fourth video mode.

8. The video shooting method according to claim 6, characterized in that: The identifying the scene information corresponding to the video frame data also includes: Obtaining movement data, focus status and correction data of the voice coil motor of the camera; If the movement data of the voice coil motor of the camera is greater than or equal to the preset movement data, the calibration data of the camera is normal and the focus state of the camera is failed, it is determined that the scene information corresponding to the video frame data is a macro scene.

9. The video shooting method according to claim 8, characterized in that: The method further comprises: Determine the fifth video mode corresponding to the macro scene as the macro mode; The second interface displays the first video and a fifth control, and the fifth control corresponds to the fifth video mode; In response to the user's second operation on the fifth control, the video mode is switched to the fifth video mode, and the third interface is switched to display, the third interface includes a sixth video, and the sixth video is shot using the fifth video mode.

10. The video shooting method according to claim 8, characterized in that: The identifying the scene information corresponding to the video frame data also includes: A preset number of consecutive video frame images are obtained from the video frame data, and if the preset number of consecutive video frame images include pets, it is determined that the scene information corresponding to the video frame data is a multi-lens scene.

11. The video shooting method according to claim 10, characterized in that: The method further comprises: Determine a sixth video mode corresponding to the multi-camera scene as the multi-camera mode; The second interface displays the first video and a sixth control, and the sixth control corresponds to the sixth video mode; In response to the user's second operation on the sixth control, the video mode is switched to the sixth video mode, and the third interface is switched to display, where the third interface includes a seventh video, and the seventh video is shot using the sixth video mode.

12. The video shooting method according to claim 1, characterized in that: The method further comprises: Determining whether the camera meets the zoom capability required by the first video mode; If the camera meets the zoom capability required by the first video mode, the first control is displayed on the second interface.

13. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein: The memory is used to store program instructions; The processor is used to read and execute the program instructions stored in the memory. When the program instructions are executed by the processor, the electronic device executes the video shooting method according to any one of claims 1 to 12.

14. A chip coupled to a memory in an electronic device, characterized in that: The chip is used to control the electronic device to execute the video shooting method according to any one of claims 1 to 12.

15. A computer storage medium, characterized in that The computer storage medium stores program instructions, and when the program instructions are executed on an electronic device, the electronic device executes the video shooting method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method and device for automatically setting shooting mode

    CN103024165A

  • Iimage display in three dimensional image capturing means used in two dimensional capture mode

    CN103907338A

  • Video acquisition method and electronic equipment

    CN112532859A

  • Image processing method and device, electronic equipment and storage medium

    CN113313626A

  • Methods and systems for auto-zoom based adaptive video streaming

    US20170302719A1