Video shooting method, electronic device, and computer-readable storage medium
By using artificial intelligence to identify the semantic categories and priorities in preview images, suitable LUT templates are automatically recommended, solving the problem of convenience for users when selecting video shooting scenes and improving video recording effects and user experience.
Patent Information
- Application Number
- CN202210177871.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-02-24
AI Technical Summary
When selecting video shooting scenarios, users often find it difficult to conveniently choose suitable LUT templates, which affects the video recording quality.
By using artificial intelligence to identify the semantic categories and priorities in the preview image, suitable LUT templates are automatically recommended and the recommended information is displayed on the camera preview interface.
It enhances the cinematic feel of video recordings, meets users' needs for convenient use of suitable LUT templates, and improves the user experience.
Smart Images

Figure CN116709002B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a video shooting method, an electronic device and a computer readable storage medium. BACKGROUND
[0002] At present, more and more users are used to using electronic devices to record videos and record the details of life.
[0003] Many electronic devices support video recording in a movie mode. In the movie mode, a plurality of sets of different movie style color look up table (LUT) templates can be presented for user selection. The different style LUT templates preset by the camera system are suitable for different scenes, and when a video is shot using a suitable style LUT template, a more professional movie effect can be obtained.
[0004] However, the above-mentioned video shooting method requires the user to select a LUT template according to personal experience. For users who are not skilled in using LUTs, it is not easy to select a suitable style LUT template when recording a video in the face of different shooting scenes, which will affect the video recording effect, and thus cannot meet the user's demand for conveniently recording a video using a suitable LUT. SUMMARY
[0005] The present application provides a video shooting method, an electronic device and a computer readable storage medium, which aims to meet the user's demand for conveniently recording a video using a suitable LUT.
[0006] In order to achieve the above-mentioned purpose, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a video shooting method, which comprises: in response to an operation of a user selecting a movie mode, displaying a camera preview interface in the movie mode; in a case where an artificial intelligence (AI) recommendation function in the movie mode is turned on, identifying an object in a preview image; and in a case where the preview image includes a first object, superimposing and displaying a first LUT template on the preview image displayed in the camera preview interface.
[0008] By the scheme, the semantic categories in the preview image can be automatically and intelligently identified, and the LUT template suitable for the current shooting scene can be matched according to the multiple semantic categories in the preview image and the priority of the multiple semantic categories, and the matched LUT template is used to process the preview image, and then the processed preview image and the LUT recommendation information are displayed on the camera preview interface, the LUT template currently recommended by the electronic device is prompted through the LUT recommendation information, and the user can consider using the recommended LUT template in the video recording process, instead of only manually selecting by the user himself, so that the video shooting method provided in the application can meet the needs of the user who wants to conveniently use the appropriate LUT to record the video.
[0009] In some possible implementation ways, the method further includes: in a case where it is identified that the preview image further includes a second object and the priority of the second object is higher than the priority of the first object, displaying a second LUT template on the preview image displayed on the camera preview interface.
[0010] In the case where it is identified that the preview image includes the first object, a first LUT template matched with the first object can be found from the plurality of LUT templates preset by the system. Alternatively, in the case where it is identified that the preview image further includes a second object and the priority of the second object is higher than the priority of the first object, a second LUT template matched with the second object can be found from the plurality of LUT templates preset by the system.
[0011] In some possible implementation ways, the system is preset with a priority rule and a LUT recommendation strategy, the preset priority rule defines the priority of different semantic categories, and the preset LUT recommendation strategy defines the LUT template corresponding to different semantic categories.
[0012] Optionally, the method can further include: in a case where the semantic categories in the preview image include a first object and a second object, determining the priority of the first object and the priority of the second object according to the preset priority rule; and determining a LUT template corresponding to the second object according to the preset LUT recommendation strategy, if the priority of the second object is higher than the priority of the first object. The LUT template corresponding to the second object is a second LUT template.
[0013] Here, two objects in the preview image are taken as an example for example description. In actual implementation, more objects can be contained in the preview image.
[0014] The scheme can perform semantic recognition on the preview image. After recognizing that the preview image contains one or more semantic categories, the scheme determines a semantic category with the highest priority among the one or more semantic categories. In this way, the main subject in the current shooting scene can be more accurately determined, and the LUT template suitable for the current shooting scene can be more accurately recommended.
[0015] In some possible implementation manners, the preview image contains a foreground, a subject, and a background, and the foreground, the subject, and the background correspond to different semantic categories respectively; and the priority of the semantic categories from high to low is: the subject, the foreground, and the background.
[0016] The one or more semantic categories can include at least one of the following: a portrait, an environmental atmosphere, an animal / still life, and a landscape. It can be understood that the semantic categories are exemplarily listed, and other arbitrary possible semantic categories can also be included in actual implementation.
[0017] In some possible implementation manners, the preset priority rule can define that the priority of the different semantic categories from high to low is: the portrait, the environmental atmosphere, the animal / still life, and the landscape. It can be understood that the priority definition rule of the semantic categories is exemplarily listed, and the priority of each semantic category can also be defined according to actual use requirements in actual implementation.
[0018] In some possible implementation manners, the method can further include:
[0019] When the preview image includes the subject, the foreground, and the background, the first LUT template is determined according to the semantic category corresponding to the subject.
[0020] Or, when the preview image contains the foreground but does not contain the subject, the first LUT template is determined according to the semantic category corresponding to the foreground.
[0021] Or, when the preview image contains the background but does not contain the subject and the foreground, the first LUT template is determined according to the semantic category corresponding to the background.
[0022] In some possible implementation manners, when the preview image includes the portrait and the portrait is the subject (for example, the first object is the portrait), the first LUT template is the LUT template corresponding to the portrait. It can be understood that when the portrait is the subject of the preview image, the portrait is the main subject in the current shooting scene, and therefore the LUT template matched with the portrait can be automatically recommended, so that the video recording based on the LUT template can improve the film feeling of the video recording.
[0023] In some possible implementation manners, when the one or more semantic categories contain a portrait, the semantic category with the highest priority is determined to be the portrait; or when the one or more semantic categories contain an environmental atmosphere but do not contain a portrait, the semantic category with the highest priority is determined to be the environmental atmosphere; or when the one or more semantic categories contain an animal / still object but do not contain a portrait and an environmental atmosphere, the semantic category with the highest priority is determined to be the animal / still object; or when the one or more semantic categories contain a landscape but do not contain a portrait, an environmental atmosphere, and an animal / still object, the semantic category with the highest priority is determined to be the landscape.
[0024] In the video shooting process, the scene brightness (or referred to as the environmental brightness) sometimes has a greater impact on the display effect of the video picture, for example, the light of the night, the daytime outdoor, and the daytime indoor has a more obvious impact on the display effect of the video picture, and therefore the influence of the scene brightness can also be considered in the process of AI recommendation of the LUT template.
[0025] In some possible implementation manners, a first LUT template matched with the shooting scene can be searched from a plurality of LUT templates preset by the system according to the identification result and scene brightness information, where the scene brightness information is used to indicate the brightness level of the shooting scene.
[0026] In the AI recommendation algorithm of the embodiments of the present application, the priority of the LUT template recommendation can be defined according to the scene recognition elements and the scene brightness.
[0027] In this way, in the process of AI recommendation of the LUT template, the LUT template is matched by combining the semantic identification result of the preview image and the brightness information of the current shooting scene, and therefore the LUT template matched in this way is more in line with the current shooting scene, and therefore the video recording based on the matched LUT template can greatly improve the movie feeling of the video recording.
[0028] In some possible implementation manners, the method further includes: determining the scene brightness information according to the preview image, the light sensing data collected by the sensor, and preset metering table data.
[0029] In some possible implementation manners, the light sensing data collected by the sensor includes at least one of the following: an aperture value, a shutter value, and a light sensitivity value.
[0030] In some possible implementation manners, the preset metering table data can include a plurality of groups of exposure parameters, and each group of exposure parameters in the plurality of groups of exposure parameters corresponds to a brightness level.
[0031] In some possible implementation manners, each group of exposure parameters in the plurality of groups of exposure parameters can include at least one of the following: an aperture value, a shutter value, a light sensitivity value, and an exposure value.
[0032] The determining the scene brightness information according to the preview image, the photosensitive data collected by the sensor, and the preset metering table data includes: comparing the photosensitive data collected by the sensor with the preset metering table data when the preview image is collected; finding a first set of exposure parameters matched with the photosensitive data collected by the sensor in the preset metering table data, the first set of exposure parameters corresponding to a target brightness level; and generating scene brightness information according to the target brightness level, the scene brightness information being used to indicate that the brightness level of a current shooting scene is the target brightness level.
[0033] In the embodiments of the present application, scene brightnesses of different levels can be taken as reference factors for LUT recommendation; for scene brightnesses of different levels, corresponding LUT recommendation strategies are different. Optionally, the scene brightnesses can be classified according to the requirement of fineness or the requirement of adaptation degree with LUT templates.
[0034] In some possible implementation manners, the target brightness level is a first brightness level, a second brightness level, or a third brightness level; wherein the first brightness level, the second brightness level, and the third brightness level each correspond to brightness values that are sequentially increased.
[0035] Exemplarily, in the embodiments of the present application, the scene brightness can be classified into three levels as follows: low brightness, medium brightness, and high brightness. Specifically, if the scene brightness≤L1, the scene brightness can be considered as low brightness. If L1
[0036] Exemplarily, L1 can be taken as 50 Lux, and L2 can be taken as 600 Lux.
[0037] It can be understood that the values of L1 and L2 are exemplary descriptions, and in actual implementation, the values can be set according to actual use requirements, and the embodiments of the present application are not limited.
[0038] The priority of the scene brightness information is lower than the priority of each semantic category.
[0039] In some possible implementation manners, the first brightness level, the second brightness level, and the third brightness level correspond to different LUT templates respectively. The method further includes: according to the scene brightness information, finding an LUT template matched with the target brightness level from a plurality of LUT templates preset by a system.
[0040] In some possible implementation manners, the method further includes: capturing the preview image by using the camera, and performing face detection on the preview image; if the preview image contains a face feature, selecting a LUT template corresponding to a portrait semantic category in a plurality of LUT templates preset by the system.
[0041] In some possible implementation manners, in a case where the preview image contains a single face feature, if a face frame corresponding to the single face feature is within a preset area and a proportion of the face frame in the preview image is greater than or equal to a preset proportion threshold, it is determined that the preview image contains a portrait semantic category.
[0042] Alternatively, in a case where the preview image contains a plurality of face features, if a maximum face frame is within the preset area and a proportion of the maximum face frame in the preview image is greater than or equal to the preset proportion threshold, it is determined that the preview image contains a portrait semantic category; the maximum face frame is a face detection frame with a maximum area in a plurality of face detection frames corresponding to the plurality of face features.
[0043] In some possible implementation manners, the method further includes: in a case where an AI recommendation function of the movie mode is in an enabled state, obtaining the preview image, the preview image being an image preview stream including one or more frames of images; the AI recommendation function is used to intelligently identify a shooting scene and intelligently recommend a LUT tone matching the shooting scene.
[0044] In some possible implementation manners, the method further includes: the system defaults the AI recommendation function of the movie mode to the enabled state.
[0045] In some possible implementation manners, the camera preview interface in the movie mode includes a setting option, which is used to trigger a related function (for example, the AI recommendation function) of the movie mode to be set.
[0046] In this case, after the camera preview interface in the movie mode is displayed, the method further includes: when receiving an operation of the user on the setting option, displaying a setting interface corresponding to the movie mode, the setting interface including an AI movie tone option; and when receiving an operation of the user switching a switch button corresponding to the AI movie tone option from off to on, enabling the AI recommendation function.
[0047] In some possible implementation manners, the camera preview interface in the movie mode includes a movie shutter control. After the first LUT template is superimposed on the preview image displayed in the camera preview interface, the method further includes: starting to record a video when an operation of the movie shutter control by the user is received, and updating the movie shutter control to be displayed as a stop shooting control; and shooting a target video when an operation of the stop shooting control by the user is received, the target video having a filter effect corresponding to the first LUT template.
[0048] In some possible implementation manners, before the camera preview interface in the movie mode is displayed, the method further includes: displaying a camera preview interface in a default working mode, the camera preview interface in the default working mode including a movie mode option.
[0049] In some possible implementation manners, the operation of displaying the camera preview interface in the movie mode in response to the user selecting the movie mode includes: updating the camera preview interface in the default working mode to be displayed as the camera preview interface in the movie mode when an operation of the movie mode option by the user is received.
[0050] In some possible implementation manners, the camera preview interface in the default working mode is displayed by: displaying the camera preview interface in the default working mode when an operation of starting a camera application by the user is received.
[0051] In some possible implementation manners, when the first LUT template is superimposed on the preview image displayed in the camera preview interface, the method further includes: displaying first LUT recommendation information, the first LUT recommendation information being used to indicate that the first LUT template has been applied on the preview image.
[0052] In some possible implementation manners, the first LUT recommendation information can include a cancel control. Correspondingly, after the first LUT recommendation information is displayed, the method can further include: canceling the superimposition of the first LUT template on the preview image and canceling the display of the first LUT recommendation information when an operation of the cancel control by the user is received.
[0053] In a second aspect, the present application provides a video shooting device, which includes units for executing the method in the first aspect. The device can correspond to the method described in the first aspect, and the related description of the units in the device can refer to the description of the first aspect. For brevity, the description is not repeated here.
[0054] The method described in the first aspect can be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, and the like.
[0055] In a third aspect, the present application provides an electronic device, which includes a processor, and a memory coupled to the processor, the memory being configured to store a computer program or instructions, and the processor being configured to execute the computer program or instructions stored in the memory, so that the method in the first aspect is executed. For example, the processor is configured to execute the computer program or instructions stored in the memory, so that the apparatus executes the method in the first aspect.
[0056] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program (also referred to as instructions or code) for implementing the method in the first aspect. For example, when the computer program is executed by a computer, the computer can execute the method in the first aspect.
[0057] In a fifth aspect, the present application provides a chip, which includes a processor. The processor is configured to read and execute a computer program stored in a memory, so as to execute the method in the first aspect and any possible implementation manner thereof. Optionally, the chip further includes the memory, and the memory is connected to the processor by a circuit or a wire.
[0058] In a sixth aspect, the present application provides a chip system, which includes a processor. The processor is configured to read and execute a computer program stored in a memory, so as to execute the method in the first aspect and any possible implementation manner thereof. Optionally, the chip system further includes the memory, and the memory is connected to the processor by a circuit or a wire.
[0059] In a seventh aspect, the present application provides a computer program product, which includes a computer program (also referred to as instructions or code). When the computer program is executed by a computer, the computer implements the method in the first aspect.
[0060] It can be understood that the beneficial effects of the second aspect to the seventh aspect can be referred to the related description in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0061] Figure 1 The image processed by different LUT templates disclosed in the embodiments of the present application is shown in the schematic diagram;
[0062] Figure 2 The interface schematic diagram of the mobile phone entering the movie mode disclosed in the embodiments of the present application is shown in the schematic diagram;
[0063] Figure 3An interface schematic diagram in a scenario where a user manually selects a LUT template according to an embodiment of the present application;
[0064] Figure 4 A structural schematic diagram of an electronic device according to an embodiment of the present application;
[0065] Figure 5 A software structural block diagram of an electronic device according to an embodiment of the present application;
[0066] Figure 6 A schematic diagram of semantic recognition for different scene images according to an embodiment of the present application;
[0067] Figure 7 A flowchart of a LUT recommendation algorithm combining image semantic information and ambient brightness according to an embodiment of the present application;
[0068] Figure 8 A schematic diagram of a LUT recommendation algorithm combining image semantic information and ambient brightness according to different priorities according to an embodiment of the present application;
[0069] Figure 9 A schematic block diagram of a face recognition algorithm used in a video shooting method according to an embodiment of the present application;
[0070] Figure 10 An interface schematic diagram of a face recognition algorithm used in a video shooting method according to an embodiment of the present application;
[0071] Figure 11 A flowchart of a video shooting method according to an embodiment of the present application;
[0072] Figure 12 Another interface schematic diagram of a mobile phone entering a movie mode according to an embodiment of the present application;
[0073] Figure 13 An interface schematic diagram of an AI setting item being turned on according to an embodiment of the present application;
[0074] Figure 14 A schematic diagram of semantic segmentation and recognition according to an embodiment of the present application;
[0075] Figure 15 An interface schematic diagram of LUT recommendation information being canceled according to an embodiment of the present application;
[0076] Figure 16 An interface schematic diagram when recording a video in a movie mode according to an embodiment of the present application;
[0077] Figure 17 A structural schematic diagram of a video shooting device according to an embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0079] At present, many electronic devices support video shooting in a movie mode. In the movie mode, a plurality of sets of LUT templates of different film feeling styles can be presented for user selection. The LUT templates of different styles are suitable for different scenes, and when a video is shot by using a LUT template of a suitable style, a relatively professional film feeling picture effect can be obtained. This shooting mode requires a user to select a LUT template according to personal experience. That is, the user can only select the most suitable LUT template for video shooting by manually selecting different LUT templates. However, for ordinary users who do not have professional color grading ability, it is not easy to select a LUT template of a suitable style in the face of different shooting scenes in the shooting process, and thus the video shooting effect is affected, and thus the demand of the user for conveniently using a suitable LUT template for recording cannot be met.
[0080] In view of the above problems, the present application provides a video shooting method and an electronic device. When the electronic device is in a movie mode of a camera, after an artificial intelligence (AI) recommendation function is turned on, a semantic category in a preview image can be automatically and intelligently recognized, and a LUT template suitable for a current shooting scene can be determined according to a plurality of semantic categories in the preview image and a priority of each semantic category. Then, the LUT template (as a target recommended LUT) is applied to the preview image, and the preview image with a LUT filter effect is displayed in a camera preview interface of the movie mode. Since the present application can automatically recommend a LUT template suitable for a current shooting scene for a user according to a semantic category with the highest priority in a preview image, and apply the recommended LUT template to the preview image, the preview image presents a LUT filter effect suitable for the current shooting scene, so that manual selection of the user is not required, and thus the demand of the user for conveniently using a suitable LUT template for recording a video can be met.
[0081] Before introducing the embodiments of the video shooting method and the electronic device provided in the present application, the following terms to be mentioned in the following description are first explained. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more, for example, a plurality of processing units means two or more processing units, and the like; a plurality of elements means two or more elements, and the like.
[0082] The terms "first" and "second" and the like in the description and claims herein are used to distinguish different objects, rather than to describe a specific order. When the present application refers to the ordinal terms "first" or "second" and the like, unless it indeed expresses the meaning of order according to the context, it should be understood as merely for distinction.
[0083] The term "and / or" herein is a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The symbol " / " herein represents an or relationship of associated objects, for example, A / B represents A or B.
[0084] In the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or having more advantages than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.
[0085] In order to facilitate understanding of the embodiments of the present application, the following explains some terms of the embodiments of the present application, so as to facilitate understanding by those skilled in the art.
[0086] 1) User experience (UX): also referred to as UX characteristics, refers to the user's experience when using the electronic device in the shooting process.
[0087] 2) Movie mode: refers to a mode of recording video by the electronic device, that is, a special mode in the video recording mode. In the embodiments of the present application, the movie mode includes the LUT function, when recording video through the movie mode, different LUT effects can be used, which can make the recorded video have the quality of a movie. In addition, the movie mode can also include other modes of recording video, such as 4K high-dynamic range (HDR) function and slow-motion recording function.
[0088] 3) LUT (look up table, color lookup table): can also be referred to as a LUT file or LUT parameters, is a kind of color conversion template, such as can be a kind of red blue green (red green blue, RGB) mapping table. LUT can actually sample the pixel gray value after a certain transformation (such as threshold, inversion, contrast adjustment and linear transformation, etc.), becomes another corresponding gray value, so as to highlight the useful information of the image, enhance the light contrast of the image.
[0089] It can be understood that an image includes a large number of pixels, each pixel is represented by RGB values. The display screen of the electronic device can display the image according to the RGB values of each pixel in the image. That is, these RGB values will indicate how the display screen emits light to mix a variety of colors to present to the user.
[0090] The LUT is a mapping table of RGB, which is used to represent the corresponding relationship between the RGB values before and after adjustment. For example, please refer to Table 1, which shows an example of a LUT mapping table.
[0091] Table 1
[0092]
[0093] When the original RGB value is (14, 22, 24), the output RGB value is (6, 9, 4) after mapping by the LUT shown in Table 1. When the original RGB value is (61, 34, 67), the output RGB value is (66, 17, 47) after mapping by the LUT shown in Table 1. When the original RGB value is (94, 14, 171), the output RGB value is (117, 82, 187) after mapping by the LUT shown in Table 1. When the original RGB value is (241, 216, 222), the output RGB value is (255, 247, 243) after mapping by the LUT shown in Table 1.
[0094] It should be noted that when different LUTs are used to process the same image, different style image effects can be obtained, that is, the image can be processed into different filter effects. For example, Figure 1 LUT1, LUT2 and LUT3 shown in are different color lookup tables, which can process the image into different filter effects. The original image 100 collected by the camera is processed by the filter using LUT1, and the image 101 shown in Figure 1 can be obtained. The original image 100 collected by the camera is processed by the filter using LUT2, and the image 102 shown in Figure 1 can be obtained. The original image 100 collected by the camera is processed by the filter using LUT3, and the image 103 shown in Figure 1The images 101, 102 and 103 shown in the image 103. The contrast Figure 1 The images 101, 102 and 103 shown in the image 103. The contrast
[0095] It can be understood that the embodiments of the present application do not limit the name related to the LUT function, and in other embodiments of the present application, the LUT can also be expressed as LUT template, LUT filter, tone, palette, etc., and the embodiments of the present application do not limit this.
[0096] 4) Image segmentation: is a very important task in computer vision, and the goal is to classify each pixel point in the image, that is, a pixel-level classification task. For example, the task of ordinary segmentation is to separate the pixel regions belonging to different objects, that is, object detection. The task of semantic segmentation is to classify the semantics of each region in the image on the basis of ordinary segmentation, that is, to determine the respective categories of all objects in the picture.
[0097] Specific to the scheme of the present application, it mainly relates to semantic segmentation, which will be described in combination with semantic segmentation and recognition. Since an image is composed of many pixels, semantic segmentation can be understood as grouping or segmenting pixels according to different semantic meanings expressed in the image. Through image semantic segmentation, the content in the image can be automatically segmented and recognized, so as to recognize the semantic categories in the image, such as portraits, green plants, buildings, etc.
[0098] 5) User interface (user interface, UI): is the medium interface for interaction and information exchange between application programs or operating systems and users, which realizes the conversion between internal forms and user-acceptable forms of information. The user interface is the source code written in specific computer languages such as Java and extensible markup language (extensible markup language, XML), and the interface source code is parsed and rendered on the electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is graphic user interface (graphic user interface, GUI), which refers to the user interface related to computer operation displayed in a graphical manner. Illustratively, the GUI can include various visual interface elements displayed in the display screen of the electronic device; for example, various visual interface elements can include text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars and / or navigation bars, etc.
[0099] Specifically, in this application's solution, the GUI may include a camera preview interface displayed on the screen, working mode controls, LUT controls, AI settings, LUT recommendation information, and shooting controls. Users can interact with the interface elements in the GUI to trigger the electronic device to execute the function corresponding to the selected interface element.
[0100] The following is a combination of... Figure 2 and Figure 3 This example illustrates the process of an electronic device recording video in movie mode.
[0101] Electronic devices, such as mobile phones, Figure 2 As shown in (a), when a user needs to record video using their phone, the user operates the "Camera" app icon 201 on the phone's home screen, and the phone displays as shown in (a). Figure 2 Interface 202 is shown in (b). Interface 202 is a preview interface for the phone's "photo" mode. The working mode controls 2021 in interface 202 may include: "photo" mode, "portrait" mode, "video" mode, "movie" mode, and "professional" mode. In response to the user selecting "movie" mode 203, the phone displays as shown... Figure 2 Interface 204 is shown in (c). Interface 204 is the preview interface before recording video in movie mode. In interface 204, the phone displays a prompt message 205: "Landscape shooting provides a more cinematic feel," prompting the user to adjust the phone to landscape mode before recording video. Then, when the user adjusts the phone to landscape mode, the phone displays as follows... Figure 2 Interface 204 is shown in (d). This interface 204 is the preview interface before recording video when the phone is in landscape mode.
[0102] like Figure 2 As shown in (d), interface 204 may include a shooting control 206, a LUT control 207, a 4K HDR control 208, a slow-motion control 209, and a settings control 210; it may also include other controls, such as a flash control. The shooting control 206 is a virtual shutter button; the user can trigger the phone to start shooting by operating the shooting control 206. Both the 4K HDR control 208 and the slow-motion control 209 are set to off by default; the user can trigger the phone to activate the function corresponding to the operated control by operating either the 4K HDR control 208 or the slow-motion control 209.
[0103] like Figure 3As shown in (a), in response to the user's operation on the LUT control 207, the mobile phone enables the LUT function and displays the LUT template bar 211 on the interface 204. The LUT template bar 211 includes multiple LUT templates pre-set by the system, such as LUT1, LUT2, LUT3, ..., LUT6, for the user to select.
[0104] In some embodiments, such as Figure 3 As shown in (a) and (b), in response to a user's action on LUT1 in LUT template bar 211 (e.g., clicking to select), the pre-recording preview interface displayed on interface 204 is processed to have the following characteristics: Figure 3 The LUT1 filter effect is shown in (b). If the user is satisfied with the LUT1 filter effect, they can use the shooting control 206 to record video in movie mode using the LUT1 filter effect. The recorded video will then display the LUT1 filter effect.
[0105] If the user is not satisfied with the filter effect of LUT1, they can switch the LUT filter effect by operating any other LUT template in the LUT template bar 211.
[0106] In other embodiments, such as Figure 3 As shown in (c) and (d), in response to the user's operation on LUT2 in LUT template bar 211, the preview interface before recording displayed on interface 204 is processed to have the following characteristics: Figure 3 The LUT2 filter effect is shown in (d). If the user is satisfied with the LUT2 filter effect, they can use the shooting control 206 to record video in movie mode using the LUT2 filter effect. The recorded video will then display the LUT2 filter effect.
[0107] As the aforementioned shooting effect processing scheme shows, when users set shooting effects in Movie mode, they mainly do so by manually selecting different LUT filters from the LUT template, previewing the processing effects of different LUT filters on the interface, and then selecting a suitable LUT filter to record video in Movie mode. For users, selecting a suitable LUT filter for the current shooting scene relies solely on their own experience to manually choose the appropriate LUT filter. The process of processing shooting effects in Movie mode is not convenient, especially for users who are not proficient in using LUT filters, making the process more difficult and resulting in a less than ideal user experience.
[0108] The video shooting method provided in this application solves the aforementioned problems of insufficient intelligence and inconvenience in video recording. In this solution, the semantic categories in the preview image are automatically and intelligently identified. Based on multiple semantic categories and their priorities, a suitable LUT template for the current shooting scene is determined. The determined LUT template is then used to process the preview image, adding a filter effect corresponding to the LUT template. The processed preview image and LUT recommendation information are then displayed on the camera preview interface. This LUT recommendation information prompts the electronic device to use the currently recommended LUT template, allowing the user to consider using it during video recording instead of manually selecting it. Therefore, the video shooting method provided in this application can meet the user's need for conveniently using suitable LUT filters to record videos.
[0109] The video shooting method proposed in this application can be applied to electronic devices with cameras, such as mobile phones, tablets, desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices, and smartwatches.
[0110] The video shooting method proposed in this application can be applied to, for example... Figure 4 The electronic device shown. For example... Figure 4 The diagram shown is a structural schematic of an electronic device. The electronic device may include: a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, antenna 1, antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, a headphone jack 370D, a sensor module 380, buttons 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc.
[0111] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0112] The processor 310 can include one or more processing units, for example: the processor 310 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0113] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.
[0114] The memory can also be provided in the processor 310, for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory can save instructions or data that the processor 310 has just used or repeatedly uses. If the processor 310 needs to use the instructions or data again, it can directly call from the memory. Avoiding repeated access, reducing the waiting time of the processor 310, thus improving the efficiency of the system.
[0115] In some embodiments, the processor 310 can include one or more interfaces. The interfaces can 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. For example, in the embodiments of the present application, the processor can be configured to execute any of the video shooting methods proposed in the present application.
[0116] It can be understood that the interface connection relationship between the modules shown in the embodiments is only illustrative and does not constitute a limitation on the structure of the electronic device. In other embodiments, the electronic device can also use different interface connection modes or combinations of multiple interface connection modes in the above embodiments.
[0117] The electronic device can realize the display function through the GPU, the display screen 394, and the application processor, etc. The GPU is a microprocessor for image processing, connected with the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 can include one or more GPUs that execute program instructions to generate or change display information.
[0118] The display screen 394 is configured to display images, videos, and the like. The display screen 394 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 (AMOLED), a flex light-emitting diode (FLED), a Mini-LED, a Micro-OLED, a quantum dot light emitting diode (QLED), or the like.
[0119] The electronic device can implement the photographing function through the ISP, the camera 393, the video codec, the GPU, the display screen 394, and the application processor, and the like.
[0120] The ISP is configured to process the data fed back by the camera 393. For example, when taking a photo, the shutter is opened, 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 the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 393.
[0121] The camera 393 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a 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 light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it 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 a standard RGB, YUV, or the like format image signal. In some embodiments, the electronic device can include one or N cameras 393, where N is a positive integer greater than 1.
[0122] The digital signal processor is configured to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device selects a frequency point, the digital signal processor is configured to perform Fourier transform on the frequency point energy, and the like.
[0123] A video codec is used to compress or decompress digital video. An electronic device can support one or more video codecs. In this way, the electronic device can play or record videos in a variety of encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, and so on.
[0124] An NPU is a neural-network (NN) computing processor. By drawing on the structure of a biological neural network, such as the transmission mode between human brain neurons, the NPU can quickly process input information and can also constantly self-learn. Through the NPU, the electronic device can implement intelligent cognitive applications, such as image recognition, face recognition, voice recognition, text understanding, and so on.
[0125] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function. For example, files recorded, such as videos, are saved in the external memory card.
[0126] The internal memory 321 can be used to store computer executable program code, which includes instructions. The processor 310 executes various function applications and data processing of the electronic device by running the instructions stored in the internal memory 321. For example, in the embodiments of the present application, the processor 310 can execute the instructions stored in the internal memory 321, and the internal memory 321 can include a storage program area and a storage data area.
[0127] The storage program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, and so on), and the like. The storage data area can store data created in the use process of the electronic device (such as audio data, a phone book, and the like), and the like. In addition, the internal memory 321 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0128] The keys 390 include a power-on key, a volume key, and the like. The keys 390 can be mechanical keys. The keys 390 can also be touch keys. The motor 391 can generate a vibration prompt. The motor 391 can be used for incoming call vibration prompts and also for touch vibration feedback. The indicator 392 can be an indicator light and can be used to indicate a charging state, a power change, and also to indicate a message, a missed call, a notification, and the like. The SIM card interface 395 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 395 to achieve contact and separation with the electronic device. The electronic device can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 395 can support a Nano SIM card, a Micro SIM card, a SIM card, and the like.
[0129] The methods in the following embodiments can be implemented in an electronic device with the hardware structure described above. The following embodiments take a mobile phone as an example of the electronic device described above to specifically describe the technical solutions provided in the embodiments of the present application.
[0130] In addition, an operating system runs on the above-described components. For example, an iOS operating system, an Android open source operating system, a Windows operating system, and the like. Application programs can be installed and run on the operating system.
[0131] Figure 5 is a schematic block diagram of a software architecture adopted by the electronic device of the embodiments of the present application. The implementation of the video shooting method provided in the embodiments of the present application will be exemplarily described below in combination with the software architecture shown in Figure 5
[0132] It can be understood that the layered architecture divides software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system can include an application layer (application, APP), a framework layer (framework, FWK), a hardware abstraction layer (hardware abstraction layer, HAL), and a kernel layer (kernel).
[0133] Exemplarily, the application layer described above can include a user interface (user interface, UI) layer and a logic layer. As shown in Figure 5 The UI layer includes a camera, a gallery, and other applications. Among them, the camera includes a LUT control, a 4K HDR control, an AI setting item, a working mode control, a camera preview interface, and LUT recommendation information. The logic layer includes a LUT template module, an AI recommendation module, an encoding module, a LUT logic control module, an HDR module, and a configuration library, and the like.
[0134] The aforementioned framework layer provides an application programming interface (API) and programming services to the application layer. The framework layer includes some predefined functions. The framework layer provides these programming services to the application layer for invocation through the API interface. It should be noted that, in this embodiment, the programming service may be, for example, a camera service. In some embodiments, such as... Figure 5 As shown, the framework layer includes a camera service framework and a media framework. The media framework includes an encoder.
[0135] The aforementioned hardware abstraction layer acts as a bridge between software and hardware, abstracting hardware and providing a virtual hardware platform for the operating system. For example, such as... Figure 5 As shown, the hardware abstraction layer includes the camera interface.
[0136] The aforementioned kernel layer provides the underlying drivers for various hardware components of the mobile phone. For example, such as... Figure 5 As shown, the kernel layer includes a camera driver module. This camera driver module can be used for both the camera driver and the display driver.
[0137] It is understood that the mobile phone also includes a hardware layer based on the aforementioned software architecture, and this hardware layer includes various hardware components. For example, such as... Figure 5 As shown, the hardware layer includes a camera and a display screen for implementing video recording.
[0138] Next, combined Figure 6 The hardware and software architecture diagram shown illustrates the technical solution of an embodiment of this application.
[0139] In this embodiment, when the user selects the "Movie" mode via the working mode control and triggers the AI recommendation function, the AI recommendation function of the LUT filter is enabled. The AI recommendation module calls the camera interface to obtain the scene parameters of the preview image from the camera driver module. In some embodiments, the scene parameters of the preview image may include semantic category information (or semantic information). In some embodiments, the scene parameters of the preview image may include semantic category information and brightness information. For ease of explanation, the following example illustrates that the scene parameters of the preview image include semantic category information.
[0140] Further, the camera driving module drives the camera in the hardware layer to capture a preview image. The hardware layer reports the preview image captured by the camera to the camera driving module. The camera driving module calls the camera interface of the hardware abstraction layer, uses the image semantic segmentation and recognition algorithm to perform AI semantic recognition on the preview image, and obtains semantic category information of the preview image. The semantic category information of the preview image is used to indicate a semantic category in the preview image. The camera driving module calls the camera interface of the hardware abstraction layer and reports the semantic category information of the preview image to the AI recommendation module.
[0141] Further, the AI recommendation module receives the semantic category information of the preview image reported by the camera driving module. The AI recommendation module adopts a system-pre-stored AI recommendation algorithm to determine a LUT template corresponding to or matching the semantic category information of the preview image (the determined LUT template is referred to as a target recommendation LUT) according to the semantic category information of the preview image, and then sends an identifier of the target recommendation LUT to the LUT logic control module.
[0142] Further, the LUT logic control module receives the identifier of the target recommendation LUT, calls the camera interface of the hardware abstraction layer to send the identifier of the target recommendation LUT to the camera driving module, and instructs the camera driving module to process the preview image by using the target recommendation LUT corresponding to the identifier of the target recommendation LUT. Accordingly, the camera driving module processes the preview image into a preview image with a filter effect of the target recommendation LUT, and then the camera driving module calls the camera interface of the hardware abstraction layer to display the processed preview image and the LUT recommendation information on the display screen, so that the display screen displays the processed preview image and the LUT recommendation information on the camera preview interface. The LUT recommendation information is used to prompt the user that the electronic device currently recommends using the LUT template.
[0143] In some embodiments, the LUT logic control module can control the display and hiding of the LUT recommendation information and whether to recommend the LUT template to the user according to an AI recommendation strategy or a LUT recommendation rule.
[0144] In some embodiments, in response to a cancel operation of the LUT recommendation information by the user, the LUT logic control module can control the LUT recommendation information not to be displayed on the camera preview interface, that is, the LUT recommendation information is hidden. In some embodiments, in response to the cancel operation of the LUT recommendation information by the user, the AI recommendation module can stop matching the scene parameters of the preview image with the LUT template.
[0145] In some embodiments, the AI recommendation module can identify a LUT matching the scene of the preview image through an AI model. Illustratively, the scene parameters of the preview image can be input into the AI model, and the AI model outputs a LUT corresponding to the scene parameters, i.e., the target recommended LUT. Wherein, the AI model can be any machine model used to identify the preview image. For example, the AI model can be any of the following neural network models: VGG-net, Resnet and Lenet.
[0146] It should be noted that the interaction process between the above various modules can refer to the related part of the video shooting method of the embodiments of the present application, which will not be described here.
[0147] The video shooting method proposed by the embodiments of the present application will be described in detail below. It should be noted that in the video shooting method provided by the embodiments of the present application, the process of using the AI recommendation module to use the AI recommendation algorithm to match the LUT template suitable for the current shooting scene according to the semantic category information of the preview image, and recommend the matched LUT template as the target recommended LUT to the user. In order to make the description of the embodiments of the present application more clear, first introduce several possible AI recommendation algorithms given by the embodiments of the present application, and the possible implementation way of the AI recommendation module to determine the target recommended LUT by executing the AI recommendation algorithm, and then combine the flow chart and interface diagram to comprehensively describe the video shooting method proposed by the embodiments of the present application.
[0148] AI recommendation algorithm one: determining the target recommended LUT according to the scene recognition element (semantic category) with the highest priority in the preview image.
[0149] In the actual shooting process, the preview image is usually related to the picture that the user wants to shoot and express, and the picture visual expression elements of the preview image usually include subject, accompanying body, foreground, background, etc. That is, the preview image usually includes semantic categories such as subject, accompanying body, foreground, background, i.e., scene recognition elements.
[0150] Illustratively, in the preview image shown in (a) of FIG. 1, Figure 6 In the preview image shown in (a) of FIG. 1, Figure 6 In the preview image shown in (b) of FIG. 1, Figure 6 In the preview image shown in (c) of FIG. 1, Figure 6 In the preview image shown in (d) of FIG. 1,
[0151] In some embodiments, the matching relationship between the semantic categories and the LUT templates, i.e., one-to-one correspondence between the semantic categories and the LUT templates, can be preconfigured in the AI recommendation module, and each semantic category corresponds to one LUT template. The AI recommendation module can also preconfigure the corresponding relationship between the semantic categories and the priorities, i.e., different semantic categories have different priorities.
[0152] In the embodiments of the present application, the matching relationship between the semantic categories and the LUT templates and the corresponding relationship between the semantic categories and the priorities pre-stored by the system can be collectively referred to as an AI recommendation algorithm, or can be referred to as an AI recommendation strategy or a LUT recommendation rule. The AI recommendation module can determine the LUT template suitable for the current shooting scene according to the semantic category information of the preview image by executing the AI recommendation algorithm, and recommend it to the user.
[0153] Specifically, in the present application, the AI recommendation module first determines various semantic categories in the preview image according to the semantic category information of the preview image. Then, according to the corresponding relationship between the semantic categories and the priorities, the priorities corresponding to various semantic categories in the preview image are determined, and the semantic category with the highest priority (referred to as the target semantic category) among various semantic categories is determined. Then, according to the target semantic category of the preview image, the LUT template matched with the target semantic category of the preview image is found from the preconfigured matching relationship between the semantic categories and the LUT templates, and is taken as the target recommended LUT.
[0154] Exemplarily, Table 2 below exemplarily shows the one-to-one correspondence between the semantic categories and the LUT templates, and one semantic category can correspond to one LUT template. As shown in Table 2, the semantic categories can include portrait, sunrise / sunset, fireworks, cat / dog, food, green plants / flowers, architecture, snow, beach, and blue sky, and the LUT templates corresponding to these semantic categories are LUT1, LUT2, LUT3, LUT4, LUT5, LUT6, LUT7, LUT8, LUT9, and LUT10, respectively.
[0155] In the embodiments of the present application, different semantic categories can be classified according to certain rules. For example, different semantic categories can be classified according to elements such as subjects, accompanying bodies, and backgrounds in the scene.
[0156] Exemplarily, as shown in Table 2, one or more human images can be set as a category as foreground subjects in a shooting scene. For the semantic categories of sunrise / sunset and fireworks, it can be considered as a special atmosphere in the shooting scene, which is used to express a specific atmosphere. For the semantic categories of cat / dog, food, green plants / flowers, and building classification, it can be considered as a non-human subject in the shooting scene. For the semantic categories of snow, beach, and blue sky, it can be considered as a background in the shooting scene.
[0157] Table 2
[0158]
[0159] It can be understood that the above classification is exemplarily described, and in actual implementation, different semantic categories can be classified according to other arbitrary possible rules. The specific implementation can be determined according to actual use requirements, and the embodiments of the present application are not limited.
[0160] Optionally, in the embodiments of the present application, the corresponding priority can be set for each category of semantic categories. Since the priority is set for each category, the priority can be referred to as a first-level priority. Exemplarily, Table 2 exemplarily shows the priority setting rule of the semantic categories.
[0161] Exemplarily, as shown in Table 2, for the four categories of human image subjects, environmental atmosphere, non-human image subjects, and background, the priorities are arranged from high to low. Among them, the first-level priority of the human image subject is marked as 1, which has the highest priority; the first-level priority of the environmental atmosphere is marked as 2; the first-level priority of the non-human image subject is marked as 3; and the first-level priority of the background is marked as 4, which has the lowest priority.
[0162] Optionally, in the embodiments of the present application, for a plurality of semantic categories in each category, the corresponding priority of each can be set according to actual needs. Since the priority is set for different semantic categories in each category, the priority can be referred to as a second-level priority. For example, for the category of animals / still objects, the priority of animals can be defined to be higher than that of still objects. For example, assuming that the preview image includes a dog and green plants / flowers, it can be determined that the priority of the dog is higher than that of the green plants / flowers.
[0163] Exemplarily, as shown in Table 2, since the human image subject is a category alone, it has no second-level priority. For sunrise / sunset and fireworks, the second-level priorities are marked as 1 and 2 respectively, which means that the priority of sunrise / sunset is higher than that of fireworks. For cat / dog, food, green plants / flowers, and building, the second-level priorities are marked as 1, 2, 3, and 4 respectively, which means that the priorities are arranged from high to low.
[0164] In this way, in the case where multiple semantic categories are included in the preview image, the semantic category with the highest priority among the multiple semantic categories can be determined according to the priorities of the multiple semantic categories.
[0165] In some embodiments, in the case where one semantic category is included in the preview image, the LUT template corresponding to the semantic category can be determined according to the LUT recommendation rule. For example, assuming that only buildings are included in the preview image, the LUT template corresponding to buildings, i.e., LUT7, can be directly recommended according to the LUT recommendation rule shown in Table 2.
[0166] In other embodiments, in the case where multiple semantic categories are included in the preview image, the semantic category with the highest priority among the multiple semantic categories can be determined first, and then the LUT template corresponding to the semantic category with the highest priority can be determined according to the LUT recommendation rule.
[0167] For example, assuming that the semantic categories in the preview image include portraits and food, the semantic category with the highest priority among the multiple semantic categories of portraits and food can be determined to be portraits according to the priority setting rule shown in Table 2. Then, the LUT template corresponding to portraits, i.e., LUT1, can be recommended according to the LUT recommendation rule shown in Table 2.
[0168] For example, assuming that the semantic categories in the preview image include buildings, fireworks, and portraits, the semantic category with the highest priority among the multiple semantic categories of buildings, fireworks, and portraits can be determined to be portraits according to the priority setting rule shown in Table 2. Then, the LUT template corresponding to portraits, i.e., LUT1, can be recommended according to the LUT recommendation rule shown in Table 2.
[0169] For example, assuming that the semantic categories in the preview image include cats, green plants, and food (e.g., coffee, bread, etc.), the semantic category with the highest priority among the multiple semantic categories of cats, green plants, and food can be determined to be cats according to the priority setting rule shown in Table 2. Then, the LUT template corresponding to cats, i.e., LUT4, can be recommended according to the LUT recommendation rule shown in Table 2.
[0170] It should be noted that in the process of identifying picture elements, the priorities of picture elements and subjects can be distinguished and selected according to visual expression or photographer composition.
[0171] In some embodiments, the picture scene elements and subjects can be identified by a region of interest (ROI) identification algorithm. Specifically, the subject of the region of interest in the preview image is calculated first, and then the LUT recommendation is made in combination with the background or brightness features. For example, a dog and a person are identified in the preview image, where the dog is running happily and the person is reading quietly. In this case, using the ROI identification algorithm, it can be determined that the region of interest in the preview image is the moving dog, and the dog can be used as the identified subject for LUT recommendation.
[0172] The above describes a possible implementation manner of the AI recommendation module of the embodiments of the present application determining the target recommended LUT according to the semantic category information of the preview image as a scene parameter. Alternatively, in the embodiments of the present application, the AI recommendation module can also determine the LUT template suitable for the current shooting scene according to the semantic category information of the preview image and scene brightness information and other scene parameters, which can improve the accuracy of the intelligent recommended LUT template. The following describes a possible implementation manner of the AI recommendation module determining the target recommended LUT according to the semantic category information and brightness information of the preview image.
[0173] It should be noted that the preview image not processed by the LUT mentioned in the embodiments of the present application can be referred to as an original preview image. The semantic category information of the preview image can be a scene parameter obtained by AI identification of the original preview image. The scene brightness information of the preview image can be a scene parameter determined in combination with the image brightness information of the original preview image after exposure and the ambient light brightness information collected by the ambient light sensor.
[0174] AI recommendation algorithm two: determining the target recommended LUT according to the scene recognition elements (semantic category) and scene brightness of the preview image.
[0175] During shooting, the scene brightness (or ambient brightness) sometimes has a greater impact on the display effect of the video picture, for example, the light of night, daytime outdoor, and daytime indoor has a more obvious impact on the display effect of the video picture.
[0176] In the embodiments of the present application, different levels of scene brightness can be used as reference factors for LUT recommendation; the corresponding LUT recommendation strategies are different for different levels of scene brightness. Alternatively, the scene brightness can be classified according to the requirement of precision or the requirement of LUT template adaptation degree.
[0177] Exemplarily, in the embodiments of the present application, the scene brightness can be divided into three levels as follows: low brightness, medium brightness, and high brightness. Specifically, if the scene brightness is less than or equal to L1, the scene brightness can be considered as low brightness. If L1 is less than the scene brightness and the scene brightness is less than or equal to L2, the scene brightness can be considered as medium brightness. If the scene brightness is greater than L2, the scene brightness can be considered as high brightness.
[0178] Exemplarily, L1 can be 50 Lux, and L2 can be 600 Lux.
[0179] It can be understood that the values of L1 and L2 are exemplary and can be set according to actual use requirements in actual implementation, which is not limited in the embodiments of the present application.
[0180] It should be noted that the classification of the scene brightness is exemplary and the scene brightness in the embodiments of the present application includes but is not limited to the above-mentioned division levels. Other possible division levels can also be included in actual implementation, which can be determined according to actual use requirements, and is not limited in the embodiments of the present application. In order to facilitate description, the scene brightness is divided into low brightness, medium brightness, and high brightness in the following embodiments, which is exemplarily described.
[0181] Figure 7 A schematic block diagram of determining a target recommended LUT according to the semantic category and the scene brightness of a preview image is shown. As shown in the figure, Figure 7 the electronic device includes a semantic recognition module and a brightness calculation module. On the one hand, the semantic recognition module performs semantic recognition on the image preview stream (including one or more preview images) to obtain image semantic information, which is used to indicate the semantic category. On the other hand, the brightness calculation module can calculate the scene brightness according to the image preview stream, the sensor light sensing information (used to indicate the ambient light brightness of the current shooting scene), and the preset light meter, and then determine the brightness level (referred to as scene brightness level) corresponding to the scene brightness. Based on the system preset LUT recommendation algorithm, the LUT template suitable for the current shooting scene is determined according to the image semantic information and the scene brightness level, and then the filter effect of the recommended LUT template is displayed in the preview interface of the display screen.
[0182] In the embodiments of the present application, the calculation and classification of the actual scene brightness can be completed by the camera system of the electronic device. By combining the image preview stream, the sensor light sensing information, and the preset light meter, a more accurate scene brightness can be determined, and thus the classification of the scene brightness level (such as low brightness, medium brightness, and high brightness) will also be more accurate. The sensor light sensing information includes but is not limited to exposure time, ISO, aperture, and the like. An exposure module is usually provided in the camera system of a mobile phone, and in the actual shooting process, the exposure module can automatically control the exposure parameters of the camera according to the scene brightness.
[0183] The setting of the light meter is explained as follows: it is usually necessary to calibrate the camera system in advance, for example, to set corresponding index values for different light box brightness, thereby establishing a set of exposure parameters including aperture Av, shutter Tv, sensitivity Sv, exposure value AEtarget, etc. The exposure parameters can be recorded as M(index_i, Av_i, Tv_i, Sv_i, AEtarget_i). The exposure parameters M in the light meter can be pre-stored in the camera system.
[0184] Exemplarily, three sets of exposure parameters in the light meter are exemplarily given as follows:
[0185] M(0, 1, 17, 100, 20); M(1, 1, 33, 100, 20); M(2, 1, 33, 200, 20).
[0186] Exemplarily, the detection and calculation of the scene brightness can be achieved by the following operations: when the camera system collects an image preview stream of a certain actual scene through the camera, the camera system will perform light metering on the ambient light, output a set of initial exposure parameters (Av_0, Tv_0, Sv_0), and obtain a set of exposure parameters M(index_j, Av_j, Tv_j, Sv_j, AEtarget_j) through calculation and comparison with the light meter, from which the index_j value corresponding to the actual scene brightness can be obtained. Further, the index_j value can be input into the brightness calculation module, which can determine the brightness classification interval (for example, high brightness, medium brightness, low brightness) of the actual environment as a reference factor for the LUT recommendation through the preset corresponding relationship between the index value and the scene brightness.
[0187] For example, it is assumed that the low brightness level is preset as index < 20 Lux, the medium brightness level is preset as 20 Lux ≤ index ≤ 600 Lux, and the high brightness level is preset as index > 600 Lux; the preset light meter includes the above-mentioned three sets of exposure parameters. When a user shoots a scene in a movie mode through a mobile phone, the camera system will output a set of initial values, for example, (1, 33, 100), at this time, through calculation (including but not limited to weighted average method, etc.) and comparison with the above-mentioned light meter, the exposure parameter M(1, 1, 33, 100, 20) closest to the initial value is found from the above-mentioned light meter, so that the index value is determined as 1 based on the exposure parameter M(1, 1, 33, 100, 20), and then the brightness level corresponding to the index is determined as the low brightness level according to the above-mentioned brightness level division strategy.
[0188] The value or setting range of index is exemplarily illustrated, and in actual implementation, the value or setting range of index can be set according to actual use requirements, and the embodiments of the present application are not limited.
[0189] Optionally, in the AI recommendation algorithm of the embodiments of the present application, the priority of LUT template recommendation can be defined according to two dimensions of scene recognition elements and scene brightness. Exemplarily, Table 3 below exemplarily shows an AI recommendation strategy considering scene brightness and semantic category comprehensively.
[0190] As shown in the AI recommendation strategy in Table 3, scene brightness is also considered on the basis of Table 2. Optionally, the priority of scene brightness can be set to be lower than the respective priorities of the above-mentioned portrait subject, accompanying body, non-portrait subject and background. Exemplarily, as shown in Table 3, scene brightness is divided into scene brightness 1 (low brightness), scene brightness 2 (medium brightness) and scene brightness 3 (high brightness). Among them, in the AI recommendation strategy, scene brightness 1 (low brightness) corresponds to LUT11, scene brightness 2 (medium brightness) corresponds to LUT12, and scene brightness 3 (high brightness) corresponds to LUT13.
[0191] Optionally, in the embodiments of the present application, according to the particularity of the film style LUT, a special combination of scene recognition elements and scene brightness can be set in advance, corresponding to one LUT template. In actual application, scene recognition can be completed through scene recognition elements and scene brightness, and the LUT template suitable for the current shooting scene can be recommended.
[0192] Exemplarily, as shown in Table 3, special combination 1 (building + scene brightness 1) corresponds to LUT14. Special combination 2: food + scene brightness 1, corresponding to LUT15. For example, in actual application, when the scene parameters of the preview image meet the special combination of (building + scene brightness 1), the AI recommendation module can intelligently recommend the LUT14 suitable for the current shooting scene; for example, LUT14 can be a LUT template of blue style (called mysterious realm), which is very suitable for modern building scenes with light in the dark night.
[0193] It should be noted that the above-mentioned special combination is exemplarily illustrated, and it can be understood that the embodiments of the present application include but are not limited to the above-mentioned special combination. In actual application, more other possible special combinations can also be preset according to actual use requirements, and the embodiments of the present application are not limited thereto.
[0194] Table 3
[0195]
[0196] Exemplarily, Figure 8An AI recommendation strategy considering scene brightness and semantic category is exemplarily shown in the form of a two-dimensional coordinate system. As shown in Figure 8 the longitudinal coordinate represents priority and the horizontal coordinate represents scene brightness. The scene recognition elements and scene brightness can be ranked in the following order from high to low priority: person (portrait subject), environmental atmosphere, animal / still life (non-portrait subject), landscape (background), and scene brightness. In this way, based on the pre-defined priority, the priority of each element in the preview image can be determined, and the LUT template corresponding to the element with the highest priority is determined as the recommended LUT template, realizing AI recommendation of the LUT template.
[0197] In the embodiments of the present application, since the proportion of scenes with portrait subjects is large when shooting with a mobile phone, and film-style LUTs have special color processing for portraits, portrait-style LUTs suitable for different portrait scenes can be pre-set as the highest priority for recommendation.
[0198] The identification strategy of the portrait scene will be described in detail below. Figure 9 As shown in Figure 9 the identification strategy flow of the portrait scene can include the following steps S401-S411.
[0199] S401, a preview image is captured by a camera.
[0200] In the embodiments of the present application, a preview image can be captured by a camera system (such as a camera), and then the scene elements in the preview image are identified, especially the subject (such as a portrait) or the region of interest in the preview image is identified.
[0201] S402, face detection is performed on the preview image.
[0202] The process of face detection can include: calling a face detection algorithm, identifying a face frame (also called a face recognition frame or a face detection frame) in the image, and returning the coordinate information of the face frame and the width w and height h of the face frame. The coordinate information of the face frame can include the left upper corner coordinate (x1, y1) or the right lower corner coordinate (x2, y2) of the face frame. For scenes with multiple faces in the image, the largest face is calculated, i.e. the left upper corner coordinate (x1, y1) of the largest face frame, the width w and height h of the largest face frame are returned. Based on the width w and height h of the face frame, the size or area of the face frame can be calculated.
[0203] In order to ensure that invalid subjects appear in the edge picture and cause strategy changes, after successful face detection, the center area of the preview image can be set. Whether the face is in the center area of the picture can be determined according to the coordinate information of the face frame. Referring to Figure 10 , Figure 10The center region of the preview image and the face frame are shown. The center region of the picture is a rectangular region with a width of W and a length of H, and four vertices of (X1, Y1), (X1, Y2), (X2, Y2), and (X2, Y1). The upper left corner coordinates of the face frame are (x1, y1), and the width w and height h of the face frame. Taking the upper left corner coordinates (x1, y1) of the face frame as an example, when the coordinate value satisfies the following conditions: X1≤x1≤X2-w, and Y2+h≤y1≤Y1, it is determined that the face enters the center region of the picture, which can be used as the shooting subject, so as to recommend the corresponding LUT according to the portrait category. It should be noted that whether it is horizontal or vertical, the center region of the picture can be customized, Figure 10 Taking the horizontal screen as an example for illustrative description.
[0204] It should be noted that this is an example of using the upper left corner coordinates of the face frame to determine whether the face enters the center region of the picture. In actual implementation, the present embodiment can also determine whether the face enters the center region of the picture according to other coordinates (such as center coordinates) of the face frame. The specific determination can be determined according to actual use requirements, and the present embodiment is not limited. For ease of description, the following directly describes the coordinates of the face frame.
[0205] S403, determine whether there is a face in the preview image.
[0206] If there is only one face in the preview image, continue to execute S404 described below. If there are multiple faces in the preview image, continue to execute S408 described below. If there is no face in the image, continue to execute S410 described below.
[0207] S404, in the case of a single face in the preview image, calculate the coordinates, height and width of the face frame.
[0208] S405, according to the coordinates, height and width of the face frame, determine whether the face frame is in the preset region and whether the proportion of the face frame to the image meets the condition.
[0209] For example, according to the coordinates of the face frame and the center region of the picture, it can be determined whether the face frame is in the center region of the picture (preset region). As shown in Figure 10 If X1≤x1≤X2-w and Y2+h≤y1≤Y1 are satisfied, it can be determined that the face frame is in the center region of the picture (preset region).
[0210] Exemplarily, if the proportion of the face frame area (w*h) to the area (W*H) of the center region of the picture is greater than or equal to a preset proportion, it can be considered that the proportion of the face frame to the image meets the condition. If the proportion of the face frame area (w*h) to the area (W*H) of the center region of the picture is less than the preset proportion, it can be considered that the proportion of the face frame to the image does not meet the condition. Exemplarily, the preset proportion can be 50%, or can be other numerical values, which can be set according to actual needs, and the embodiments of the present application are not limited.
[0211] If it is judged that the face frame is in the preset region and the proportion of the face frame to the image meets the condition, S406 described below is continued to be executed. If it is judged that the face frame is not in the preset region or the proportion of the face frame to the image does not meet the condition, S410 described below is continued to be executed.
[0212] S406, determining that the current scene is a portrait scene.
[0213] S407, recommending a LUT template suitable for a portrait.
[0214] Through the above scheme, for a portrait scene, the scene type is distinguished according to the expression of a mobile phone image, and the portrait scene strategy is selected according to the mobile phone frame, face recognition, subject recognition and other strategies, so as to ensure that the visual expression of the shot picture meets the shooting requirements.
[0215] S408, in the case that there are multiple faces in the preview image, the coordinates, width and height of each face frame are calculated.
[0216] S409, judging whether the largest face frame is in the preset region and whether the proportion of the largest face frame to the image meets the condition.
[0217] If it is judged that the largest face frame is in the preset region and the proportion of the largest face frame to the image meets the condition, S406 described above is continued to be executed. If it is judged that the largest face frame is not in the preset region or the proportion of the largest face frame to the image does not meet the condition, S410 described below is continued to be executed.
[0218] S410, determining that the current scene is a non-portrait scene.
[0219] S411, after determining that the current scene is a non-portrait scene, entering other recommendation processes.
[0220] In some embodiments, in a long shot scene, the person is only a non-main element in the scene, so it is not necessary to recommend a special portrait LUT, but a background related scene is recommended.
[0221] Optionally, LUT recommendation can be performed in the preview stage of the movie mode, and LUT recommendation is performed at a certain time interval. After starting to record a video, LUT recommendation is stopped.
[0222] Optionally, after determining that it is a non-portrait scene, the recommended LUT filter takes into account the protection of the skin color of the portrait to ensure the display effect of the portrait after adding the LUT filter.
[0223] Optionally, the reporting mechanism of the recommended LUT can be reporting once every preset time (for example, 5 seconds), and only when the recommended LUT templates of the current and previous times are different, the reporting is performed. If the recommended LUT templates of the current and previous times are the same, the reporting is not performed. In this way, frequent reporting can be avoided, and energy consumption can be reduced.
[0224] Through the scheme of the present application, when the mobile phone camera is in the movie mode and the AI recommendation function is turned on, the semantic categories in the preview image can be automatically and intelligently identified, and the LUT template suitable for the current shooting scene can be determined according to the multiple semantic categories in the preview image and the priority of each semantic category. Then, the filter of the LUT template (as the target recommended LUT) is applied to the preview image, and the preview image with the LUT filter effect is displayed in the camera preview interface of the movie mode. The scheme of the present application can automatically recommend the LUT template suitable for the current shooting scene for the user according to the semantic category with the highest priority in the preview image, and apply the recommended LUT filter effect to the preview image, so that the preview image presents the effect of the LUT filter suitable for the current shooting scene. In this way, the user does not need to manually select, and the demand of the user for conveniently using the appropriate LUT filter to record the video can be met.
[0225] The above describes in detail the AI recommendation algorithm used in the video shooting method provided by the embodiments of the present application. The video shooting method provided by the embodiments of the present application is described in more detail in combination with the flowchart shown in Figure 11
[0226] Figure 11 A flowchart of a video shooting method provided by an embodiment of the present application. Figure 11 The video shooting method shown can be applied to the electronic device mentioned above. For the convenience of description, the electronic device is taken as a mobile phone in the following description. Figure 11 The video shooting method shown can include the following steps S501-S514:
[0227] S501, in response to the operation of the user starting the first application, the display screen displays the camera preview interface in the default working mode.
[0228] The camera preview interface in the default working mode can include a preview image. The default working mode is a working mode that the first application enters by default after the first application is started. The first application is an application with a photographing function, such as a camera application provided by the system or a camera application provided by a third party. The default working mode in the first application can be set arbitrarily, for example, the "photographing" mode can be set as the default working mode. Specifically, when the user triggers the starting of the first application, the first application enters the default working mode in response to the operation of the user triggering the starting of the first application, displays the camera preview interface in the default working mode on the display screen, starts and calls the camera to collect the preview image, and displays the preview image in the camera preview interface in the default working mode.
[0229] In some embodiments, the manner of performing step S501 can be that the display screen displays the camera preview interface in the default working mode in response to the user clicking the icon of the "camera" application. The process in which the mobile phone displays the camera preview interface in the "photographing" mode on the display screen by responding to the operation of the user clicking the icon of the "camera" application can be referred to as the description of (a) and (b) in the foregoing embodiment, which is not described here again. Figure 2
[0230] It should be noted that there are many ways to respond to the operation of the user triggering the starting of the first application, for example, the operation can be that the user clicks the icon of the first application, and for another example, the operation can be that the user triggers the starting of the first application by sliding upward. It can be understood that the manner of responding to the operation of the user triggering the starting of the first application includes but is not limited to the manner proposed in the embodiments of the present application.
[0231] S502, in response to the operation of the user selecting the movie mode, the display screen displays the camera preview interface in the movie mode.
[0232] The movie mode is a kind of video recording mode, and the related description of the movie mode can be referred to as the related content of the movie mode mentioned in the foregoing embodiment, which is not described here again. The camera preview interface in the movie mode can include a preview image. In the camera preview interface in the movie mode, the displayed preview image has the processing effect of the movie mode, that is, the preview image has the texture of the movie, and the picture is more stereoscopic. In other embodiments, the preview images presented by the camera preview interfaces in different working modes also have different processing effects.
[0233] In some embodiments, the camera preview interface displayed on the display screen in step S501 further includes a working mode control. The working mode control includes a plurality of working modes such as the movie mode, and the mobile phone can display the camera preview interface in the movie mode on the display screen in response to the operation of the user selecting the movie mode by operating the movie mode in the working mode control. Specifically, refer to the foregoing description of the movie mode in the working mode control in the camera preview interface in the default working mode. Figure 2 The descriptions of (b) and (c) will not be repeated here.
[0234] In other embodiments, the display screen can directly show the camera preview interface in movie mode even when the user has not selected movie mode. For example, when the default working mode in step S501 is movie mode, the display screen can directly show the camera preview interface in movie mode in response to the user's operation of launching the first application. That is, the first application defaults to movie mode when it is launched. For example, Figure 12 As shown in (a), when a user needs to record video using their phone, the user operates the "Camera" application icon 601 on the phone's home screen, and the phone displays the corresponding information as shown in (a). Figure 12 Interface 602 is shown in (b). Interface 602 is the preview interface in the mobile phone's movie mode. That is, operating the "Camera" application icon 501 will enter movie mode by default and display the camera preview interface in movie mode.
[0235] As can be seen from the foregoing description of steps S501 to S502, there are many ways to trigger the display screen to show the camera preview interface in movie mode, including but not limited to the methods proposed in the embodiments of this application.
[0236] It should be noted that there are many ways to display the camera preview interface in movie mode on the screen. For example, by registering a preview callback in response to the user's selection of movie mode, the camera preview interface in movie mode can be displayed on the screen. In actual implementation, the different specific implementation methods of displaying the camera preview interface in movie mode on the screen do not affect the implementation of the embodiments of this application.
[0237] S503: The display screen receives user commands to activate the AI recommendation function.
[0238] For example, the camera preview interface in movie mode includes movie mode settings. When the user interacts with these settings, the display updates to show the movie mode settings interface, which includes an AI movie tone setting option. When the user presses the enable button on the AI movie tone setting (hereinafter referred to as the AI setting), the user activates the AI recommendation function.
[0239] It should be noted that this example illustrates the situation by having a user trigger the AI recommendation function. It is understood that in other embodiments, if the AI settings are enabled by default, i.e., the AI recommendation function is already enabled, the user does not need to perform the operation of triggering the AI settings.
[0240] S504. In response to the user's operation of triggering the AI recommendation function, the display screen indicates that the AI recommendation module enables the AI recommendation function.
[0241] The display screen instructs the AI recommendation module to enable the AI recommendation function through the camera interface.
[0242] S505, in response to the instruction to enable the AI recommendation function, the AI recommendation module enables the AI recommendation function and registers a preview callback with the HAL layer camera interface.
[0243] There are many ways to enable the AI recommendation function, for example, the AI recommendation function can be enabled by default, or the AI recommendation function can be enabled in response to the user's operation of starting the AI setting item. The embodiments of the present application do not limit this.
[0244] In some embodiments, when the user triggers the start of the AI setting item, the AI recommendation function of the first application is enabled. In steps S501 to S505, after the user selects the movie mode and the operation of starting the AI setting item, the first application enters the movie mode and the AI recommendation function is started, thereby triggering the AI recommendation module to register the preview callback with the HAL. The registration of the preview callback by the AI recommendation module can be understood as the registration of the callback of the preview image and the scene parameters of the preview image. Since the first application has entered the movie mode in step S502, the display screen has displayed the camera preview interface in the movie mode, i.e., the callback of the preview image has been registered, therefore the registration of the preview callback in step S505 can also be understood as the registration of the callback of the scene parameters of the preview image. In summary, steps S501 to S505 enable the first application to be in the movie mode and the state of starting the AI recommendation function, and the AI recommendation module achieves the acquisition of the scene parameters of the preview image by registering the preview callback.
[0245] For example, the user triggers the scene of enabling the AI recommendation function, which can be as shown in interface 602 in (a) of FIG. 6A, which includes a setting item 603 of the movie mode. In some embodiments, as shown in (a) of FIG. 6A, in response to the user's operation on the setting item 603, the phone displays a setting interface 604 as shown in (b) of FIG. 6A, which includes a "photo ratio" setting item, a "sound control shooting" setting item, a "smile snapshot" setting item, a "video resolution" setting item, a "video frame rate" setting item, a "movie HDR10" setting item, a "high-efficiency video format" setting item, and an "AI movie tone" setting item 605. In response to the user's starting operation on the "AI movie tone" setting item 605, the phone displays a setting interface 604 as shown in (c) of FIG. 6A, in which the "AI movie tone" setting item is opened, i.e., the phone starts the AI recommendation function. Figure 13 Figure 13 Figure 13 Figure 13
[0246] In some embodiments, the AI setting item is in a default enabled state, i.e., the AI recommendation module automatically registers the preview callback with the HAL without responding to the operation of the user triggering the enabling of the AI recommendation function. For example, the first application can be in the movie mode, and the AI setting item is in the default enabled state. Therefore, the AI recommendation module automatically triggers the registration of the preview callback with the HAL in the movie mode. That is, the AI recommendation module can also register the preview callback with the HAL in response to the operation of the user selecting the movie mode and enabling the AI setting item. Therefore, there are many triggering conditions for the AI recommendation module to register the preview callback with the HAL, and the triggering condition is not limited to the operation of the user enabling the AI setting item.
[0247] In S506, the HAL obtains the preview image and the scene parameter of the preview image, and the scene parameter includes a semantic category or includes the semantic category and scene brightness.
[0248] In the embodiments of the present application, the AI setting item is used to control whether to start the AI model to identify the preview image, i.e., whether to enable the AI recommendation function. When the AI setting item is enabled, the AI model is started to identify the preview image, and the scene parameter of the preview image is obtained.
[0249] Specifically, when the AI setting item is enabled, the AI recommendation module registers the preview callback with the interface on the HAL, so that the AI recommendation module can obtain the preview image and the scene parameter of the preview image by calling the interface on the HAL. For example, the AI recommendation module can register the preview callback with the camera interface on the HAL. After registering the preview callback, the AI recommendation module can call the camera interface to obtain the preview image and the scene parameter of the preview image from the camera driver module. The camera driver module sends the scene parameter of the preview image to the AI recommendation module by calling the camera interface. It should be noted that since steps S501 and S502 are performed, the first application is in the movie mode at this time. Therefore, after the AI recommendation module registers the preview callback, the preview image obtained by calling the interface on the HAL is the preview image in the movie mode.
[0250] When the AI setting item is disabled, the AI recommendation module does not register the preview callback with the HAL, i.e., the AI recommendation module does not have the function of obtaining the scene parameter of the preview image. The related technology of registering the callback can be referred to the description of the method of registering the callback described above, which will not be described here.
[0251] In some embodiments, the scene parameter of the preview image can be the semantic category of the preview image. For example, the semantic category can be portrait, sunrise / sunset, fireworks, cat / dog, food, green plants / flowers, buildings, snow, beaches, and blue sky, etc. The HAL can identify the semantic category with the highest priority in the preview image by using the semantic segmentation algorithm in the AI model, and determine the LUT template corresponding to the semantic category with the highest priority as the target recommendation template.
[0252] In other embodiments, the scene parameters of the preview image may include the semantic category of the preview image and the scene brightness. Scene brightness can be categorized as low brightness, medium brightness, and high brightness. HAL can use the semantic segmentation algorithm in the AI model to identify the semantic category with the highest priority in the preview image, and combine the semantic category with the scene brightness to determine the corresponding LUT template as the target recommendation template.
[0253] In this embodiment of the application, after semantic segmentation of the preview image, a semantic label map can be obtained. This semantic label map includes multiple labels, each of which represents the semantic information of the region where the label is located. That is, one label can represent one type of semantic information, and different labels represent different semantic information.
[0254] The following is combined with Figure 14 This application describes the implementation method of identifying semantic categories in preview images through semantic segmentation in the embodiments of this application. Figure 14 Image (a) shows a schematic diagram of the preview image. Figure 14 Figure (b) shows a schematic diagram of the semantic tag map corresponding to the preview image. Figure 14 Image (c) shows a preview image after semantic segmentation. For example, as shown... Figure 12 As shown in (b), the semantic labeling diagram exemplarily marks four semantic labels: 0, 1, 2, and 3; where 0 represents the semantic information of background, 1 represents the semantic information of cat, 2 represents the semantic information of tree, and 3 represents the semantic information of cloud. Figure 14 As shown in (b), these labels are located in corresponding areas of the preview image and indicate the image features of those areas. In actual implementation, the semantic information or image features of the corresponding areas can be determined based on the semantic labels marked in the preview image.
[0255] It should be noted that the above Figure 14 The semantic label diagram shown is illustrative and can be specifically determined according to actual usage requirements; this application does not limit its implementation. For example, in actual implementation, the semantic label diagram can include more semantic labels to represent more semantic segmentation category information; and semantic labels can be annotated pixel-by-pixel in the preview image to achieve more accurate image semantic segmentation. Figure 14 As shown in (a)-(c), after semantic segmentation, the original image can be identified into four semantic categories: cat, tree, cloud, and background.
[0256] S507, HAL reports the scene parameters of the preview image to the AI recommendation module.
[0257] As described in the foregoing step S505, since the AI recommendation module registers the preview callback on the HAL, the HAL reports the scene parameters of the preview image to the AI recommendation module. Then, the AI recommendation module can obtain the scene parameters of the preview image in each recommendation period, and then can match the LUT template corresponding to the preview image according to the scene parameters of the preview image.
[0258] As described in the foregoing content, after steps S501 to S507 are executed, the first application is in the movie mode and the AI recommendation function is enabled, and the AI recommendation module obtains the scene parameters of the preview image.
[0259] S508, the AI recommendation module matches the LUT template corresponding to the scene parameters as the template recommended LUT according to the scene parameters of the preview image.
[0260] In some embodiments, the HAL can send the scene parameters of the preview image to the AI recommendation module according to a preset recommendation period, and the AI recommendation module can match the LUT template corresponding to the preview image according to the latest received scene parameters of the preview image according to the preset recommendation period.
[0261] In another embodiment, the HAL can also send the scene parameters of the preview image to the AI recommendation module according to a preset recommendation period, and the AI recommendation module can match the LUT template corresponding to the preview image according to the received scene parameters of the preview image every time the scene parameters of the preview image are received.
[0262] In actual implementation, the value of the recommendation period can be set according to experience, for example, it can be set to 10 seconds (s), that is, every 10s, the LUT template matching and recommendation are performed according to the scene parameters of the preview image. For the convenience of description, the LUT template matched by the AI recommendation module and corresponding to the preview image is collectively referred to as the target recommended LUT. The target recommended LUT is the LUT template recommended by the AI recommendation module and corresponding to the scene parameters of the preview image. The process of using the AI recommendation algorithm to identify the target recommended LUT by the AI recommendation module can be referred to the foregoing related part, and will not be described here.
[0263] S509, the AI recommendation module sends the identifier of the target recommended LUT to the LUT logic control module.
[0264] The AI recommendation module sends the identifier of the target recommended LUT matched in step S508 to the LUT logic control module. That is, the identifier of the target recommended LUT obtained in each recommendation period is sent to the LUT logic control module.
[0265] The identifier of the target recommendation LUT is a unique identifier specific to that target recommendation LUT. For example, the identifier of the target recommendation LUT can be the name of the target recommendation LUT, or the label of the target recommendation LUT, etc.
[0266] The S510 and LUT logic control modules send the identifier of the target recommended LUT to the HAL.
[0267] In some embodiments, one implementation of step S510 may be that the LUT logic control module calls the camera interface on the HAL to pass the identifier of the target recommended LUT to the camera interface.
[0268] The S511 and HAL layer camera interfaces use the target recommendation LUT corresponding to the identifier of the target recommendation LUT to process the preview image.
[0269] The processed preview image is the preview image after being processed by the target recommendation LUT. After receiving the identifier of the target recommendation LUT from the LUT logic control module, the HAL processes the preview image according to the identifier of the target recommendation LUT to obtain the processed preview image. In this embodiment, the preview image processed by the target recommendation LUT can be referred to as the processed preview image.
[0270] S512 and HAL return the processed preview image to the LUT logic control module.
[0271] In some embodiments, after the camera interface on the HAL receives the identifier of the target recommended LUT issued in step S510, the camera interface sends the identifier of the target recommended LUT to the camera driver module. The camera driver module then uses the target recommended LUT to process the preview image, obtaining a processed preview image, and then returns the processed preview image to the LUT logic control module through the HAL. For example, if the target recommended LUT is LUT2, the camera driver module will process the preview image into an image with the filter effect of LUT2. It should be noted that the relevant techniques for processing the preview image using the filter corresponding to the LUT template can be found in the aforementioned description of LUTs, and will not be repeated here.
[0272] The S513 LUT logic control module instructs the display screen to show the processed preview image and LUT recommendation information on the camera preview interface in movie mode.
[0273] The LUT recommendation information is used to suggest the target recommended LUT for the processed preview image. Specifically, after receiving the processed preview image returned by the HAL, the LUT logic control module controls the display of the processed preview image and the information of the currently recommended LUT template.
[0274] The S514 displays the processed preview image and LUT recommendation information on the camera preview interface in movie mode.
[0275] In some embodiments, the LUT logic control module outputs the processed preview image and the relevant display data of the target recommended LUT to the display screen, and the display screen then displays the processed preview image and LUT recommendation information on the camera preview interface in movie mode based on the processed preview image and the relevant display data of the target recommended LUT.
[0276] In some embodiments, in response to a user triggering the activation of the AI settings, when the scene parameters of the preview image received by the AI recommendation module change, the AI recommendation module also controls the display to show a motion effect of recognizing the preview image on the camera preview interface in movie mode. The motion effect of recognizing the preview image serves to prompt the user about the scene currently being recognized in the preview image.
[0277] For example, such as Figure 15 As shown in (a), the AI recommendation module identifies the scene of the preview image and displays multiple circles of different sizes and transparency on interface 602 to indicate the scene parameters of the preview image being identified.
[0278] For example, the AI recommendation module obtains the scene parameters of the preview image through HAL and matches the LUT name as "Warm Light". That is, the target recommendation LUT name is "Warm Light". Then, if... Figure 15 As shown in (b), the camera preview interface 602 in movie mode displays a preview image processed by the "Warm Light" LUT, and also displays LUT recommendation information 606 to indicate that the currently recommended LUT is "Warm Light". The LUT recommendation information 606 can be in the form of a capsule.
[0279] It should be noted that the LUT can be named not only "Warm Light" but also other suitable names; this application does not limit the naming of the LUT. Exemplary LUT recommendations can include, for example, [examples of recommended LUTs]. Figure 15 The LUT recommendation information 606 in the image can be presented in a capsule shape, but it can also be in other shapes. Similarly, recognizing the scene animation of the preview image can be done in various ways, such as... Figure 15 Besides what is shown in (a), other forms of animation effects are also possible. It is understood that different forms of animation effects used to prompt for the recognition of preview images do not affect the implementation of the embodiments of this application. Similarly, different forms of LUT recommendation information do not affect the implementation of the embodiments of this application.
[0280] In the embodiments of the present application, the target recommended LUT is matched according to the scene parameter of the current preview image, and the processed preview image and the LUT recommendation information are displayed on the camera preview interface in the movie mode. The user is prompted to use the target recommended LUT through the LUT recommendation information, and the effect of the target recommended LUT after processing is displayed through the processed preview image for the user to refer to. The shooting experience of the user is improved, and the user can conveniently use the LUT in the movie mode.
[0281] In some embodiments, in response to the user canceling operation on the LUT recommendation information, the LUT logic control module can control the display screen to hide the LUT recommendation information, and control the AI recommendation module to end the execution of the AI recommendation algorithm. When the user cancels the LUT recommendation information, it means that the user does not need the phone to recommend the matched target recommended LUT to the user. Therefore, the LUT logic control module controls the display screen to hide the LUT recommendation information in response to the user canceling operation on the LUT recommendation information, that is, controls the display screen not to display the LUT recommendation information on the camera preview interface, and controls the AI recommendation module not to match the LUT using the scene parameter of the preview image, that is, ends the execution of the AI recommendation algorithm.
[0282] Exemplarily, as shown in (c) of FIG. 6, the LUT recommendation information displayed on the camera preview interface has a cancelable display icon X, and the LUT logic control module receives the touch or click operation of the user on the icon X; further, as shown in (d) of FIG. 6, the LUT logic control module cancels the display of the LUT recommendation information, and the preview image displayed on the camera preview interface is no longer the preview image processed by the target recommended LUT. Figure 15 Figure 15
[0283] Therefore, the user can cancel the AI recommendation by clicking the cancelable display icon on the LUT recommendation information, that is, the AI recommendation module ends the execution of the AI recommendation algorithm. In the embodiments of the present application, the LUT logic control module can control not to recommend the target recommended LUT to the user according to the user's demand, thereby improving the user's experience.
[0284] From the foregoing description, it can be known that steps S501 to S514 illustrate the process of recommending the target recommended LUT to the user when the phone is in the movie mode and the AI recommendation function is turned on.
[0285] In some embodiments, in response to the user triggering the operation of starting recording, the LUT logic control module can control the display screen to hide the LUT recommendation information, and control the AI recommendation module to pause the execution of the AI recommendation algorithm, until in response to the end of recording, the LUT logic control module controls the display screen to display the LUT recommendation information, and controls the AI recommendation module to start to resume the execution of the AI recommendation algorithm.
[0286] It can be understood that, when the LUT logic control module detects that the user triggers the operation of starting recording, in order to prevent the displayed LUT recommendation information from interfering with the user recording, the LUT logic control module controls the display screen to hide the LUT recommendation information, and during the process of starting recording, the LUT logic control module controls the AI recommendation module to pause the execution of the AI recommendation algorithm, thereby improving the running efficiency. Until the recording is finished, the display screen restores the display of the camera preview interface, at this time, the LUT logic control module continues to control the display screen to display the LUT recommendation information, and controls the AI recommendation module to start executing the AI recommendation algorithm, thereby continuing to recommend the LUT template suitable for the shooting scene to the user.
[0287] There are many ways for the LUT logic control module to control the AI recommendation module to pause the execution of the AI recommendation algorithm, for example, a pause instruction can be sent to the AI recommendation module, and the AI recommendation module can pause the execution of the AI recommendation algorithm in response to the pause instruction. There are also many ways for the LUT logic control module to control the AI recommendation module to start executing the AI recommendation algorithm again, for example, a start instruction can be sent to the AI recommendation module, and the AI recommendation module starts executing the AI recommendation algorithm again in response to the start instruction.
[0288] For example, as shown in (a) of FIG. 6, the LUT recommendation information 606 is displayed in the camera preview interface 602, when the user clicks the shooting control 607 to trigger the start of recording, in response to the user triggering the operation of starting recording, the mobile phone uses the filter of “warm light” indicated by the LUT recommendation information 606 to shoot and process. As shown in (b) of FIG. 6, during the recording process, the LUT recommendation information 606 is hidden, and there is no LUT recommendation information in the recording interface 608, and the current state of being in the recording process is displayed. Referring to (b) of FIG. 6, when the user clicks the stop shooting control 609 during the recording process, in response to the user triggering the operation of ending recording, as shown in (c) of FIG. 6, the mobile phone stops recording, and the LUT recommendation information 610 is displayed on the camera preview interface 602, and the preview image presents the filter of “warm light” indicated by the LUT recommendation information 610. Figure 16 Figure 16 As can be known from the foregoing description, the LUT logic control module can control the temporary stop of recommending LUTs to the user and the temporary stop of displaying the LUT recommendation information, and in addition to being able to control the temporary stop and restart of recommending LUTs to the user and the temporary stop and restart of displaying the LUT recommendation information by responding to the user triggering the operation of starting recording and ending recording, the LUT logic control module can also have other response modes to trigger the execution of the LUT logic control module. Figure 16 Figure 16 As can be known from the foregoing description, the LUT logic control module can control the temporary stop of recommending LUTs to the user and the temporary stop of displaying the LUT recommendation information, and in addition to being able to control the temporary stop and restart of recommending LUTs to the user and the temporary stop and restart of displaying the LUT recommendation information by responding to the user triggering the operation of starting recording and ending recording, the LUT logic control module can also have other response modes to trigger the execution of the LUT logic control module.
[0289] As can be known from the foregoing description, the LUT logic control module can control the temporary stop of recommending LUTs to the user and the temporary stop of displaying the LUT recommendation information, and in addition to being able to control the temporary stop and restart of recommending LUTs to the user and the temporary stop and restart of displaying the LUT recommendation information by responding to the user triggering the operation of starting recording and ending recording, the LUT logic control module can also have other response modes to trigger the execution of the LUT logic control module.
[0290] In some embodiments, the LUT logic control module can control the display to hide the LUT recommendation information and control the AI recommendation module to end the execution of the AI recommendation algorithm in response to the user selecting the LUT template. If the user does not want to use the target recommended LUT, the user can manually select the LUT template needed by the user, and perform the operation of selecting the LUT template on the camera preview interface in the movie mode. In response to the user selecting the LUT template, the LUT logic control module controls the display to hide the LUT recommendation information and controls the AI recommendation module to end the execution of the AI recommendation algorithm. The process and principle of the LUT logic control module controlling the display to hide the LUT recommendation information and controlling the AI recommendation module to end the execution of the AI recommendation algorithm can be referred to the relevant part of the above-mentioned embodiments.
[0291] In some cases, the user opens the LUT template bar for viewing, but does not select the LUT template in the LUT template bar, at which time the LUT template bar will automatically retract, i.e., be hidden from the camera preview interface, after the preset period of time of expansion. In order to provide a better visual experience for the user, the LUT logic control module controls the display to temporarily hide the LUT recommendation information and controls the AI recommendation module to pause the execution of the AI recommendation algorithm when the LUT template bar is expanded, and then the LUT logic control module continues to control the recommendation of the LUT to the user, i.e., controls the display to display the LUT recommendation information and controls the AI recommendation module to start the execution of the AI recommendation algorithm when the LUT template bar is retracted.
[0292] In some embodiments, in response to the user selecting the LUT template, the LUT logic control module can control the display to hide the LUT recommendation information and control the AI recommendation module to end the execution of the AI recommendation algorithm. If the user does not want to use the target recommended LUT, the user can manually select the LUT template needed by the user, and perform the operation of selecting the LUT template on the camera preview interface in the movie mode. In response to the user selecting the LUT template, the LUT logic control module controls the display to hide the LUT recommendation information and controls the AI recommendation module to end the execution of the AI recommendation algorithm. The process and principle of the LUT logic control module controlling the display to hide the LUT recommendation information and controlling the AI recommendation module to end the execution of the AI recommendation algorithm can be referred to the relevant part of the above-mentioned embodiments.
[0293] In some embodiments, in response to the user exiting the movie mode, the LUT logic control module can control the display to hide the LUT recommendation information and control the AI recommendation module to end the execution of the AI recommendation algorithm. If the user does not want to continue using the movie mode, the user can select to exit the movie mode. In response to the user exiting the movie mode, the LUT logic control module controls the display to hide the LUT recommendation information and controls the AI recommendation module to end the execution of the AI recommendation algorithm.
[0294] The operation of exiting the film mode can be an operation of switching to a working mode other than the film mode, such as a professional mode, can be an operation of directly closing the first application, can be an operation of entering a background of the mobile phone, can be an operation of starting a 4K HDR control, can be an operation of re-awakening the mobile phone after the screen is turned off, can be an operation of clearing an execution process of the first application, and the like. When the LUT logic control module detects any operation of exiting the film mode, the LUT logic control module controls the display screen to hide the LUT recommendation information and controls the AI recommendation module to end the execution of the AI recommendation algorithm.
[0295] In some embodiments, in response to an operation of the user closing the AI setting item, the LUT logic control module can control the display screen to hide the LUT recommendation information and control the AI recommendation module to end the execution of the AI recommendation algorithm. If the user does not want to use the AI recommendation function, the user can choose to close the AI setting item. As described above, the AI recommendation module needs to use the AI recommendation function to obtain the scene parameters of the preview image when executing the AI recommendation algorithm. Therefore, when the user does not use the AI recommendation function, the AI recommendation module cannot execute the AI recommendation algorithm and cannot perform LUT recommendation. Therefore, in response to the operation of the user closing the AI setting item, the LUT logic control module controls the display screen to hide the LUT recommendation information and controls the AI recommendation module to end the execution of the AI recommendation algorithm.
[0296] In other embodiments, in addition to controlling the end of the LUT recommendation to the user, the LUT logic control module can also control the first application to restore the use of a preset default LUT to display the preview image. For example, when the AI recommendation function is turned on and the LUT recommendation to the user is ended, the LUT logic control module can control the display screen to display the preview image processed by the default LUT on the camera preview interface. When the AI recommendation function is turned off and the LUT recommendation to the user is ended, the LUT logic control module continues to control the display screen to display the preview image processed by the LUT used last time on the camera preview interface.
[0297] In some embodiments, the LUT logic control module can be controlled by a pre-configured intelligent recommendation logic. For example, the intelligent recommendation rules can be pre-configured in the first application. The intelligent recommendation rules can include recommendation rules, LUT recommendation information display rules, and restoration rules. The LUT logic control module controls whether the AI recommendation module executes the AI recommendation algorithm according to the recommendation rules. The LUT logic control module can also control the display of the LUT recommendation information on the camera preview interface according to the LUT recommendation information display rules. The LUT logic control module can also control whether the preview image is restored to be processed by the default LUT according to the restoration rules.
[0298] From the foregoing, in the embodiments of the present application, when the LUT recommendation information is hidden, the AI recommendation module does not execute the AI recommendation algorithm, i.e., does not match the target recommended LUT, and does not recommend the target recommended LUT to the user, while when the LUT recommendation information is displayed, the AI recommendation algorithm is executed, and the target recommended LUT is recommended to the user.
[0299] In the embodiments of the present application, the AI logic control module matches the LUT template (target recommended LUT) corresponding to the scene parameters (semantic category and scene brightness) of the preview image according to the scene parameters (semantic category and scene brightness) of the preview image, and the processed preview image can be obtained by processing the preview image through the filter corresponding to the target recommended LUT. Further, under the control of the LUT logic control module, the display screen can be controlled to display the processed preview image and the LUT recommendation information on the camera preview interface in the movie mode. The LUT recommendation information is used to prompt the LUT template recommended to the user. By displaying the processed preview image and the LUT recommendation information on the camera preview interface, the user is recommended to use the target recommended LUT matched with the current preview image scene, and the user can consider using the target recommended LUT in the recording process, instead of manually selecting the LUT for use by the user himself / herself, thereby improving the user's experience in shooting effect processing.
[0300] In the embodiments of the present application, by using the AI scene recognition technology and the scene brightness information, the brightness, subject, accompanying body, environment and other elements in the scene are analyzed in combination with the visual expression of the subject in the picture, the picture subject is distinguished, and the identified objects are prioritized, the movie style LUT is recommended and applied in a targeted manner, and a LUT template that is more suitable for the image expression style can be recommended, so that ordinary users can also shoot ideal movie video.
[0301] Through the scheme of the present application, when the electronic device is in the movie mode of the camera and the AI recommendation function is turned on, the semantic category in the preview image can be automatically and intelligently recognized, and the LUT template suitable for the current shooting scene can be determined according to the multiple semantic categories in the preview image and the priority of each semantic category, and then the filter of the LUT template (as the target recommended LUT) is applied to the preview image, and the preview image with the LUT filter effect is displayed in the camera preview interface in the movie mode. Since the scheme of the present application can automatically recommend the LUT template suitable for the current shooting scene for the user according to the semantic category with the highest priority in the preview image, and apply the recommended LUT filter effect to the preview image, so that the preview image presents the effect of the LUT filter suitable for the current shooting scene, so the user does not need to manually select, and thus the demand of the user for conveniently using the appropriate LUT filter to record the video can be met.
[0302] It should be noted that, in the embodiments of the present application, "greater than" can be replaced by "greater than or equal to", "less than or equal to" can be replaced by "less than", or "greater than or equal to" can be replaced by "greater than", and "less than" can be replaced by "less than or equal to".
[0303] The various embodiments described herein can be independent solutions or combined according to inherent logic, and all fall within the protection scope of the present application.
[0304] It can be understood that the methods and operations realized by the electronic device in each of the above method embodiments can also be realized by components (such as chips or circuits) that can be used in the electronic device.
[0305] The above describes the method embodiments provided by the present application, and the following describes the device embodiments provided by the present application. It should be understood that the description of the device embodiments corresponds to the description of the method embodiments, and therefore, the content not described in detail can be referred to the above method embodiments, and for brevity, will not be described here.
[0306] The above mainly describes the solutions provided by the embodiments of the present application from the perspective of method steps. It can be understood that, in order to realize the above functions, the electronic device implementing the method contains the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the protection scope of the present application.
[0307] The embodiments of the present application can divide the electronic device into functional modules according to the above method examples, for example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be realized in the form of hardware or software functional module. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division. When actually implemented, there can be other feasible division manners. The following takes dividing each functional module according to each function as an example for description.
[0308] Figure 17A schematic block diagram of a video shooting device 800 is provided in the embodiments of the present application. The device 800 can be used to perform the actions performed by the electronic device in the above method embodiments. The device 800 includes a sensor unit 810, a display unit 820, an image acquisition unit 830 and a processing unit 840.
[0309] The sensor unit 810 is configured to detect a touch or press operation of a user on the electronic device.
[0310] The display unit 820 is configured to display a camera preview interface in a default working mode when the detection unit 810 receives an operation of the user triggering the opening of the camera application, and the camera preview interface in the default working mode includes a movie mode option.
[0311] The display unit 820 is further configured to update and display the camera preview interface in the default working mode to a camera preview interface in a movie mode when the detection unit 810 receives an operation of the user on the movie mode option.
[0312] The image acquisition unit 830 is configured to acquire a preview image.
[0313] The processing unit 840 is configured to determine a first scene parameter according to the preview image acquired by the image acquisition unit 830, the first scene parameter including a semantic category with the highest priority in the preview image, and determine a LUT filter effect matched with the first scene parameter according to the first scene parameter.
[0314] The display unit 820 is further configured to add the LUT filter effect determined by the processing unit 840 to the preview image displayed in the camera preview interface.
[0315] In some possible implementation manners, the first scene parameter further includes scene brightness information. In some possible implementation manners, the LUT template matched with the shooting scene can be searched from a plurality of LUT templates preset by the system according to the recognition result and the scene brightness information.
[0316] According to the scheme of the present application, the semantic category in the preview image can be automatically and intelligently recognized, and the LUT template suitable for the current shooting scene can be matched according to the multiple semantic categories in the preview image and the priorities thereof, and the matched LUT template is used to process the preview image, and then the processed preview image and LUT recommendation information are displayed in the camera preview interface. The LUT recommendation information prompts the LUT template currently recommended by the electronic device, and the user can consider using the recommended LUT template in the video recording process, instead of manually selecting by the user himself / herself. Therefore, the video shooting method provided in the present application can meet the demand of the user for conveniently using the appropriate LUT to record the video.
[0317] The apparatus 800 according to the embodiments of the present application can correspond to performing the methods described in the embodiments of the present application, and the above and other operations and / or functions of the units in the apparatus 800 are respectively for implementing the corresponding flows of the methods, and for brevity, will not be repeated here.
[0318] Optionally, in some embodiments, the present application provides a chip coupled with a memory, the chip being configured to read and execute computer programs or instructions stored in the memory to perform the methods in the above embodiments.
[0319] Optionally, in some embodiments, the present application provides an electronic device including a chip configured to read and execute computer programs or instructions stored in a memory so that the methods in the embodiments are performed.
[0320] Optionally, in some embodiments, the present application further provides a computer readable storage medium storing program codes, which, when executed on a computer, cause the computer to perform the methods in the above embodiments.
[0321] Optionally, in some embodiments, the present application further provides a computer program product including computer program codes, which, when executed on a computer, cause the computer to perform the methods in the above embodiments.
[0322] In the embodiments of the present application, the electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer can include a central processing unit (CPU), a memory management unit (MMU), a memory (also referred to as main memory), and the like. The operating system of the operating system layer can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system, etc. The application layer can include browsers, address books, word processing software, instant messaging software, and the like.
[0323] The embodiments of the present application do not particularly limit the specific structure of the execution subject of the method provided by the embodiments of the present application, as long as it can communicate according to the method provided by the embodiments of the present application by running the program in which the code of the method provided by the embodiments of the present application is recorded. For example, the execution subject of the method provided by the embodiments of the present application can be an electronic device, or a functional module in the electronic device that can call and execute a program.
[0324] The various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" can include, without being limited to, wireless channels and various other media capable of storing, containing, and / or carrying instruction(s) and / or data.
[0325] Those skilled in the art can clearly understand that the units and steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0326] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0327] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0328] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. can be located in one place or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment. In addition, the functional units in each embodiment of the present application can be integrated into one unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0329] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, or the parts that essentially contribute to the prior art, or parts of the technical solutions, can be embodied in the form of a computer software product stored in a storage medium, and the computer software product includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium can include, but is not limited to, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media that can store program codes.
[0330] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0331] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A video shooting method, characterized in that, include: In response to the user selecting movie mode, the camera preview interface in movie mode is displayed; With the AI recommendation function enabled in movie mode, objects in the preview images are identified; Identify objects of all semantic categories in the preview image; objects of different preset semantic categories correspond to different LUT templates. Obtain the current scene brightness information; different preset scene brightness information corresponds to different LUT templates. Obtain the combination item formed by each object and the current scene brightness information; different preset combination items correspond to different LUT templates. The target recommended LUT template is determined from the objects in the preview image, the current scene brightness information, and the LUT templates corresponding to each of the combined items, according to a preset priority rule; The target recommended LUT template is overlaid on the preview image.
2. The method according to claim 1, characterized in that, The preset priority rules include: the priority of preset combination items is higher than the priority of objects; the priority of objects is higher than the priority of scene brightness information; and the priority of objects located within the region of interest is higher than the priority of objects located outside the region of interest; objects of different semantic categories located within the region of interest correspond to different priorities. The step of determining the target recommended LUT template from the objects in the preview image, the current scene brightness information, and the LUT templates corresponding to each of the combined items, according to a preset priority rule, includes: According to the preset priority rules, the objects in the preview image, the current scene brightness information, and the LUT templates corresponding to each combination item are arranged in order of priority from high to low. The LUT template with the highest priority is determined as the target recommended LUT template.
3. The method according to claim 2, characterized in that, The step of determining the target recommended LUT template from the objects in the preview image, the current scene brightness information, and the LUT templates corresponding to each of the combined items includes: Based on whether each object in the preview image is located in the region of interest, the objects in the preview image that have a preset semantic category are arranged from high to low priority. If the object in the preview image located in the region of interest and the first combination of the current scene brightness information match the preset combination, then the LUT template corresponding to the preset combination is determined as the target recommended LUT template; If the first combination does not conform to the preset combination, then the LUT template corresponding to the object located in the region of interest in the preview image is determined as the target recommended LUT template.
4. The method according to claim 3, characterized in that, The method further includes: If the preview image does not contain an object of the preset semantic category, the LUT template corresponding to the current scene brightness information is determined as the target recommended LUT template.
5. The method according to claim 1, characterized in that, The preview image includes a foreground, a subject, and a background, with the foreground, subject, and background corresponding to objects of different semantic categories. Among them, objects of different preset semantic categories are arranged from high to low priority according to the subject, foreground, and background.
6. The method according to claim 1, characterized in that, Objects of different preset semantic categories are arranged from high to low according to preset first-level and second-level priorities; The objects in the preview image are categorized into four main types: human subjects, environmental atmosphere, non-human subjects, and landscapes. The first-level priority, from highest to lowest, is as follows: human subjects, environmental atmosphere, non-human subjects, and landscapes. The non-human subjects include animals and / or still life. Within each major category, different semantic categories are arranged according to the aforementioned secondary priority.
7. The method according to claim 1, characterized in that, The method further includes: The scene brightness information is determined based on the preview image, the light-sensitive data collected by the sensor, and the preset light meter data; wherein, the scene brightness information is used to indicate the brightness level of the shooting scene.
8. The method according to claim 7, characterized in that, The preset light meter data includes multiple sets of exposure parameters, and each set of exposure parameters corresponds to a brightness level; The step of determining the scene brightness information based on the preview image, the photosensitive data collected by the sensor, and the preset photometer data includes: When acquiring the preview image, the photosensitive data acquired by the sensor is compared with the preset photometer data; The first set of exposure parameters that matches the photosensitive data collected by the sensor is found in the preset photometer data. The first set of exposure parameters corresponds to the target brightness level. Scene brightness information is generated based on the target brightness level, and the scene brightness information is used to indicate that the brightness level of the current shooting scene is the target brightness level.
9. The method according to claim 8, characterized in that, Each of the multiple sets of exposure parameters includes at least one of the following: aperture value, shutter speed value, ISO value, and exposure value; The light-sensitive data collected by the sensor includes at least one of the following: aperture value, shutter speed value, and ISO value.
10. The method according to claim 8, characterized in that, The target brightness level is a first brightness level, a second brightness level, or a third brightness level; wherein the brightness values corresponding to the first brightness level, the second brightness level, and the third brightness level increase sequentially.
11. The method according to claim 10, characterized in that, The first brightness level, the second brightness level, and the third brightness level each correspond to different LUT templates; The method further includes: Based on the scene brightness information, a LUT template matching the target brightness level is searched from multiple preset LUT templates in the system.
12. The method according to any one of claims 1 to 11, characterized in that, The method further includes: The preview image is captured by a camera, and face detection is performed on the preview image; If the preview image contains facial features, then obtain the LUT template corresponding to the facial semantic category from multiple preset LUT templates.
13. The method according to claim 12, characterized in that, The method further includes: If the preview image contains a single facial feature, and the bounding box corresponding to the single facial feature is within a preset area and the proportion of the bounding box to the preview image is greater than or equal to a preset proportion threshold, then the preview image is determined to contain a human image semantic category; or, If the preview image contains multiple facial features, and the largest face bounding box is within the preset area and the proportion of the largest face bounding box to the preview image is greater than or equal to the preset proportion threshold, then the preview image is determined to contain a human image semantic category; wherein, the largest face bounding box is the largest face detection box among the multiple face bounding boxes corresponding to each of the multiple facial features.
14. The method according to any one of claims 1 to 11, characterized in that, The method further includes: With the AI recommendation function in movie mode enabled, the preview image is acquired, and the preview image is an image preview stream including one or more frames. The AI recommendation function is used to intelligently identify shooting scenes and intelligently recommend LUT tones that match the shooting scenes.
15. The method according to any one of claims 1 to 11, characterized in that, The method further includes: The system defaults to having the AI recommendation function for the movie mode enabled.
16. The method according to any one of claims 1 to 11, characterized in that, The camera preview interface in the movie mode includes settings options; After displaying the camera preview interface in movie mode, the method further includes: When a user's operation on the settings options is received, the settings interface corresponding to the movie mode is displayed, and the settings interface includes the AI movie tone option; When the user switches the switch corresponding to the AI movie color tone option from off to on, the AI recommendation function is activated.
17. The method according to any one of claims 1 to 11, characterized in that, The camera preview interface in the movie mode includes a movie shutter control; The method further includes, after overlaying the target recommended LUT template onto the preview image: When a user's operation on the movie shutter control is received, video recording begins, and the movie shutter control is updated to display as a stop shooting control; When the user's operation to stop shooting is received, the target video is captured, and the target video has the filter effect corresponding to the target recommended LUT template.
18. The method according to any one of claims 1 to 11, characterized in that, Before displaying the camera preview interface in movie mode, the method further includes: displaying the camera preview interface in default working mode, wherein the camera preview interface in default working mode includes a movie mode option; The step of responding to the user's selection of movie mode and displaying the camera preview interface in movie mode includes: when the user's operation on the movie mode option is received, updating the camera preview interface in the default working mode to the camera preview interface in movie mode.
19. The method according to claim 18, characterized in that, The display of the camera preview interface in the default working mode includes: displaying the camera preview interface in the default working mode when the user triggers the operation to open the camera application.
20. The method according to any one of claims 1 to 11, characterized in that, When the target recommended LUT template is overlaid on the preview image, the method further includes: Display first LUT recommendation information, which indicates that the target recommended LUT template has been applied to the preview image.
21. The method according to claim 20, characterized in that, The first LUT recommendation information includes a cancel control; after displaying the first LUT recommendation information, the method further includes: When the user's operation on the cancel control is received, the target recommended LUT template superimposed on the preview image is canceled, and the first LUT recommendation information is not displayed.
22. An electronic device, characterized in that, The device includes a processor coupled to a memory, the processor being configured to execute a computer program or instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1 to 21.
23. A chip, characterized in that, The chip is coupled to a memory, and the chip is used to read and execute a computer program stored in the memory to implement the method as described in any one of claims 1 to 21.
24. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 21.
Citation Information
Patent Citations
Method and device for automatically setting shooting mode
CN103024165A
Flash light control method and control system based on intelligent terminal
CN107888842A
Intelligent assistant control method and terminal device
CN111630836A
Video recording method, electronic equipment and computer readable storage medium
CN113965694A