Recommendation method of shooting mode and electronic equipment
By combining metadata from the image sensor and other sensors to identify the shooting scene, the system recommends shooting modes that match the current scene, solving the problem of users having difficulty choosing the appropriate mode and improving image quality and user experience.
Patent Information
- Application Number
- CN202411097932.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2026-02-17
AI Technical Summary
Users may have difficulty determining the appropriate shooting mode for the current shooting scene, resulting in poor image quality.
By combining image information collected by the image sensor with metadata from the ambient light sensor and gyroscope sensor, the system identifies the characteristics of the shooting scene, recommends a shooting mode that matches the current scene, and displays the corresponding controls in the preview interface to switch to the target shooting mode.
It improves image quality in various shooting scenarios, ensures that the recommended mode matches the current scene, and enhances user experience and image success rate.
Smart Images

Figure CN121547686A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminals, and more specifically, to a method and electronic device for recommending a shooting mode. Background Technology
[0002] With the rapid development of terminal technology, electronic devices have introduced various shooting modes adapted to different shooting scenarios in order to provide users with better shooting functions and experiences; for example, portrait mode, night mode, and high dynamic range (HDR) mode. Users can now switch between shooting modes according to their own shooting needs.
[0003] However, most users lack relevant professional shooting experience, meaning they cannot determine the shooting mode that matches the current shooting scene.
[0004] Therefore, how to ensure that recommended shooting modes that match the shooting scene are recommended to users in more shooting scenarios has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a method and electronic device for recommending shooting modes, which can recommend target shooting modes that match the shooting scene to the user in more shooting scenarios, thereby improving the quality of captured images.
[0006] Firstly, it provides a method for recommending shooting modes, including:
[0007] In response to a first operation on a camera application in an electronic device, a first preview interface is displayed; wherein the first preview interface displays a first image, which is an image captured by a first sensor in the electronic device;
[0008] Based on the first image and the target metadata of the electronic device, the target shooting mode is determined; wherein, the target metadata of the electronic device is the metadata of the second sensor in the electronic device when the first image is acquired; the target shooting mode is used to indicate the shooting mode that matches the current shooting scene;
[0009] The first control is displayed in the first preview interface; the first control is used to trigger the electronic device to take a picture using the target shooting mode;
[0010] In response to a second operation on the first control, a second preview interface is displayed; wherein, the second preview interface displays a second image, which is an image obtained by processing the image currently acquired by the first sensor using the target shooting mode.
[0011] In the above scheme, in response to a click operation on the camera application in the electronic device, the camera application displays a photo preview interface; the photo preview interface displays a preview image captured by the first sensor (e.g., an image sensor) in the default photo mode; based on the preview image and the target metadata of the second sensor (e.g., an ambient light sensor or a gyroscope sensor) when the electronic device captured the preview image, a target shooting mode matching the current shooting scene is jointly determined; after determining the target shooting mode, to facilitate guiding the user to activate the target shooting mode of the camera, a control for the target shooting mode is displayed in the photo preview interface; in response to the user's click operation on the control for the target shooting mode, the camera application switches to the target shooting mode, processes the image currently captured by the first sensor using the algorithm corresponding to the target shooting mode, and generates a preview image of the target shooting mode; the preview image of the target shooting mode is displayed in the preview interface of the target shooting mode.
[0012] It should be noted that the metadata of the electronic device is used to indicate the metadata of the hardware in the electronic device other than the image sensor when the electronic device acquires the first image. For example, the metadata is the metadata of the second sensor in the electronic device. The second sensor includes a sensor for detecting the scene brightness of the shooting scene and a sensor for detecting the amount of movement of the electronic device; wherein, the sensor for detecting the scene brightness of the shooting scene includes: an ambient light sensor or other sensors; the sensor for detecting the amount of movement of the electronic device includes: a gyroscope sensor or an accelerometer sensor.
[0013] In one implementation, the first preview interface is the camera application's photo preview interface; for example, such as Figure 2 As shown in (b) above; or, in one implementation, the first preview interface is the video preview interface of the camera application. For example, in a photo-taking scenario, the first image may refer to the image generated by the image sensor after processing the acquired raw image using a default photo-taking algorithm.
[0014] In one implementation, the first operation can be found later. Figure 10 The relevant descriptions of S201 will not be repeated here.
[0015] It should be noted that the target shooting mode is used to indicate the shooting mode recommended by the electronic device 100 that matches the current shooting scene; different recommended shooting modes are displayed in the electronic device 100 depending on the current shooting scene. The metadata of the electronic device corresponds one-to-one with the images acquired in real time by the image sensor; that is, acquiring one frame of image can correspond to the metadata of a second sensor in the electronic device. Optionally, the metadata can be referred to later. Figure 10 The relevant description of step one in S204.
[0016] In the embodiments of this application, when determining the target shooting mode matching the current shooting scene, the target shooting mode is jointly determined by the first image and the metadata of the electronic device. The first image includes image information of the shooting scene, and the target metadata of the electronic device includes other information about the shooting scene besides the image information; for example, metadata of other sensors in the shooting scene besides the image sensor. By combining the first image and the target metadata of the electronic device, it is ensured that the electronic device can acquire more perceptual information about the shooting scene. With more perceptual information about the shooting scene, the electronic device can identify more shooting scenes. Furthermore, among these more shooting scenes, a target recommendation mode matching the current shooting scene is recommended to the user, thereby improving the quality of the captured image.
[0017] In conjunction with the first aspect, in some implementations of the first aspect, the target metadata includes first metadata and second metadata; based on the first image and the target metadata of the electronic device, the target shooting mode is determined, including:
[0018] Based on the first metadata, the scene brightness of the shooting scene where the electronic device is located is determined; wherein, the first metadata is used to indicate the scene brightness of the shooting scene;
[0019] If the scene identifier of the first image is a stage scene, the shooting scene includes a face area or a human body area, and the scene brightness is less than or equal to the first preset brightness threshold, the target shooting mode is determined to be stage mode.
[0020] If the motion of the subject in the shooting scene is detected to be greater than the preset motion amount, the scene brightness is greater than the first preset brightness threshold, and the second metadata indicates that the movement of the electronic device is less than the preset movement amount, the target shooting mode is determined to be a motion mode.
[0021] In one implementation, the method for determining the target shooting mode as stage mode will be discussed later. Figure 10 The following describes the implementation method one for the S205. The implementation method for determining the target shooting mode as sports mode will be discussed later. Figure 10 The relevant description of the second implementation method of S205.
[0022] In another implementation, the target shooting mode can be any of the above-mentioned stage mode and sports mode, including other photo or video modes; see below for implementation details. Figure 10 The relevant description of S205.
[0023] In the above scheme, the target metadata of the electronic device includes first metadata and second metadata. The first metadata indicates the scene brightness of the shooting scene; the second metadata indicates the amount of movement of the electronic device. Through the first metadata in the electronic device (e.g., metadata from an ambient light sensor), the scene brightness of the shooting scene can be identified. If the scene of the first image is identified as a stage scene, a face or human body area appears in the shooting scene, and the scene brightness of the shooting scene is a low-light scene, the current shooting scene is determined to be a stage shooting scene; that is, the target recommended mode matching the current shooting scene is determined to be stage mode. If the first image is detected to include a moving shooting object, the shooting scene is a non-low-light scene, and the second metadata of the electronic device (e.g., metadata from a gyroscope sensor; or metadata from an accelerometer sensor) indicates that the amount of movement of the electronic device is small, the current shooting scene is determined to be a running shooting scene; that is, the target shooting mode matching the current shooting scene is determined to be motion mode.
[0024] In the embodiments of this application, the triggering conditions for the electronic device to enter stage mode and motion mode are determined by combining the scene characteristics of stage scenes and motion scenes. When determining the triggering conditions, the current shooting scene is jointly identified based on the detection results of image content and the target metadata of the electronic device, thereby determining the target shooting mode matching the current shooting scene. Compared with identifying the current shooting scene based solely on image content information, the above scheme enables the electronic device to acquire more scene perception information by using the first image (data from the first sensor) and the target metadata of the second sensor in the electronic device; therefore, it can identify more shooting scenes; ensuring that in more shooting scenes, the target shooting mode matching the shooting scene can be recommended to the user.
[0025] In one implementation, scene detection, motion detection, and target object detection can be performed on the first image to obtain the detection result of the first image; wherein, target object detection includes face detection or human body detection; the detection result of the first image is combined with the target metadata of the second sensor in the electronic device to jointly determine the target shooting mode of the camera application. Optionally, the above implementation method is described in detail below. Figure 10 The relevant description of S204.
[0026] In conjunction with the first aspect, some implementations of the first aspect, if the target shooting mode is stage mode, also include:
[0027] The first icon is displayed in the second preview interface; the first icon is used to indicate stage mode.
[0028] In the above solution, when a stage shooting scene is detected as the current shooting scene, a stage mode prompt control is displayed in the current preview interface of the camera application; upon detecting a user's click on the stage mode prompt control, the camera application switches to stage mode and displays a stage mode preview interface. In the stage mode preview interface, a stage mode icon is displayed to indicate to the user that the camera application is currently in stage mode.
[0029] In one implementation, if the target shooting mode is stage mode, then the second preview interface is as follows: Figure 2 As shown in (c); the first icon can refer to the stage mode icon.
[0030] In the embodiments of this application, after the stage mode is triggered, an icon (e.g., a tag) of the stage mode is displayed in the preview interface of the stage mode; by displaying the icon of the stage mode in the preview interface of the stage mode, it is easy for users to perceive the current shooting mode of the camera application.
[0031] In conjunction with the first aspect, in some implementations of the first aspect, the first icon includes a second control, and also includes:
[0032] A third operation on the second control was detected;
[0033] In response to the third action, the electronic device exits stage mode.
[0034] In the above solution, when a stage shooting scene is detected, a stage mode prompt control is displayed in the current preview interface of the camera application. Upon detecting a user's click on the stage mode prompt control, the camera application switches to stage mode and displays a stage mode preview interface. The stage mode preview interface displays a stage mode icon to indicate to the user that the camera application is currently in stage mode; additionally, the stage mode icon includes an exit control. Upon detecting a click on the stage mode exit control, the camera application exits stage mode and switches back to the default shooting mode. For example, in a photo shooting scenario, upon detecting a click on the stage mode exit control, the camera application exits stage mode and displays a preview interface for the default photo shooting mode; in a video recording scenario, upon detecting a click on the stage mode exit control, the camera application exits stage mode and displays a preview interface for the default video recording mode.
[0035] In one implementation, the second control can refer to, for example: Figure 2 The "×" in control 27 of the stage mode shown in (c); as Figure 2 As shown in (d), if a click on “×” is detected, the camera application of electronic device 100 exits stage mode.
[0036] In embodiments of this application, the stage mode icon further includes a second control, namely, an exit control for the stage mode. When a user needs to exit the stage mode, they can click the exit control to quickly exit the stage mode, improving user convenience. In the above solution, the second control facilitates a quick and convenient exit from the stage mode when the user wishes to do so.
[0037] In conjunction with the first aspect, some implementations of the first aspect, if the target shooting mode is stage mode, also include:
[0038] Determine the target brightness value of the target region in the currently acquired image; where the target brightness value represents the average brightness of the target region; the target region is a face region or a human body region;
[0039] Based on the target brightness value and the preset stage brightness value, the currently acquired image is underexposed to generate a second image.
[0040] In the above scheme, when the target shooting mode is stage mode, i.e., the shooting scene is a stage shooting scene, the average brightness of the face or human body area in the image currently acquired by the first sensor is compared with a preset stage brightness value. Based on the comparison result, the degree of exposure reduction processing for the currently acquired image is determined. Based on the degree of exposure reduction, the currently acquired image is processed to reduce exposure, generating a second image. In the embodiments of this application, since stage scenes usually have relatively complex lighting environments with the influence of stage light; when shooting the stage and the people on the stage, it is usually a high-contrast environment, i.e., the people and the scene are highlight areas while the background area of the stage is a relatively dark area; when using ordinary automatic exposure algorithms to process the captured images of stage scenes, it may cause overexposure or color cast problems for the people in the stage image area; therefore, in order to solve the problem of overexposure or color cast in stage scenes, the average brightness of the face or human body area can be compared with the preset stage brightness value to reduce the exposure of the currently acquired image in the stage scene, thereby improving the image quality of the captured image in the stage scene.
[0041] In conjunction with the first aspect, in certain implementations of the first aspect, based on the target brightness value and the preset stage brightness value, the currently acquired image is underexposed to generate a second image, including:
[0042] If the ratio of the target brightness value to the preset stage brightness value is greater than the first brightness ratio threshold, the current image is down-exposed using the first preset value to generate a second image;
[0043] If the ratio of the target brightness value to the preset stage brightness value is greater than the second brightness ratio threshold, the currently acquired image is down-exposed using the second preset value to generate a second image;
[0044] If the ratio of the target brightness value to the preset stage brightness value is greater than the third brightness ratio threshold, the third preset value is used to reduce the exposure of the currently acquired image to generate a second image;
[0045] Among them, the first brightness ratio threshold is greater than the second brightness ratio threshold, and the second brightness ratio threshold is greater than the third brightness ratio threshold; the first preset value is greater than the second preset value, and the second preset value is greater than the third preset value.
[0046] In the above scheme, if the ratio of the average brightness of the face or human body region in the currently acquired image by the image sensor to the preset stage brightness is greater than 1.3, the currently acquired image is de-exposed using the de-exposure reduction corresponding to index value 30. If the ratio is greater than 1.2, the image is de-exposed using the de-exposure reduction corresponding to index value 20. If the ratio is greater than 1.1, the image is de-exposed using the de-exposure reduction corresponding to index value 10. If the ratio is less than or equal to 1.1, the image is de-exposed using the de-exposure reduction corresponding to index value 5.
[0047] It should be understood that the 30, 20, and 10 mentioned above represent index values; these index values are the indexes of the exposure table; the larger the index value, the lower the brightness of the current shooting scene; the smaller the index value, the higher the brightness of the current shooting scene.
[0048] Optionally, the aforementioned brightness value can also be replaced with the illuminance of the shooting scene, and the above-mentioned step-by-step exposure reduction processing is performed by using the ratio of the illuminance of the target area of the currently acquired image to the preset stage illuminance. Similar to the above-described step-by-step exposure reduction processing, this application will not elaborate further.
[0049] In one implementation, the above implementation can be found in the following sections. Figure 10 The description of the process of gradually reducing exposure in stage scenes in S208.
[0050] In the embodiments of this application, after the camera application switches to stage mode, when performing exposure reduction processing on the image currently acquired by the image sensor, a step-by-step exposure reduction process can be adopted; that is, the degree of exposure reduction is determined based on the ratio of the target brightness value to the preset stage brightness value. Since the step-by-step exposure reduction process can accurately determine the degree of exposure reduction based on the average brightness of the face or human body region in the image, the effect of exposure reduction processing can be improved through step-by-step exposure reduction processing; thus, the image quality of the captured image can be improved.
[0051] In conjunction with the first aspect, in some implementations of the first aspect, a third control is displayed in the first preview interface, and the third control is in a closed state; wherein, the third control is used to control the motion mode to be turned on or off.
[0052] In response to a second operation on the first control, a second preview interface is displayed, including:
[0053] If the target shooting mode is sports mode, in response to the second operation on the first control, the second preview interface is displayed; wherein, the third control is displayed in the second preview interface, and the third control is in the open state.
[0054] In the above scheme, when the current shooting scene is a motion shooting scene, that is, when the target shooting mode matching the current shooting scene is motion mode, a preview interface for motion mode is displayed. The preview interface displays motion controls, which are used to assist in turning motion mode on and off. Before entering motion mode, the motion controls in the preview interface are in a closed state. After entering motion mode, the motion controls in the preview interface automatically turn on; no user operation is required.
[0055] In one implementation, the first preview interface is as follows: Figure 2 As shown in (b), the third control is the snapshot control 18; in the first preview interface, the third control is in the off state; if the target shooting mode is sports mode, in response to the user's second operation on the first control, such as... Figure 7 As shown in (b) of the diagram; as displayed in the diagram. Figure 7 The second preview interface is shown in (c); in the second preview interface, the third control, namely the snapshot control 18, is in the open state.
[0056] In the embodiments of this application, when a second operation on the first control is detected, it indicates that the user has a need to enable the motion mode in the camera application. At this time, the motion mode control in the preview interface of the motion mode can be automatically enabled; by controlling the motion mode control to be automatically enabled, user operations can be reduced and the user's shooting experience can be improved.
[0057] In conjunction with the first aspect, in some implementations of the first aspect, the first metadata includes data acquired by an ambient light sensor; and / or, the second metadata includes data acquired by a gyroscope sensor.
[0058] In the above scheme, the first sensor of the electronic device is an image sensor; the second sensor in the electronic device includes a sensor for detecting the scene brightness of the shooting scene and a sensor for detecting the amount of movement of the electronic device. The first data is metadata of the sensor for detecting the scene brightness of the shooting scene. The second metadata is metadata of the sensor for detecting the amount of movement of the electronic device. For example, the first metadata is metadata of the ambient light sensor when the image sensor acquires the first image. The second metadata is metadata of the gyroscope sensor in the electronic device when the image sensor acquires the first image. Alternatively, the second metadata is metadata of the accelerometer sensor in the electronic device when the image sensor acquires the first image.
[0059] In the embodiments of this application, when the image sensor acquires the first image, a second sensor (i.e., a sensor other than the image sensor) in the electronic device can detect the scene brightness and the movement of the electronic device. This ensures that the electronic device can acquire more perceptual information about the shooting scene. With more perceptual information about the shooting scene, the electronic device can identify more shooting scenes. Furthermore, among these more shooting scenes, a target recommendation mode matching the current shooting scene is recommended to the user, thereby improving the quality of the captured image.
[0060] In conjunction with the first aspect, in some implementations of the first aspect, if the first image is the i-th frame image; based on the first image and the target metadata of the electronic device, the target shooting mode is determined, including:
[0061] Obtain the shooting modes corresponding to the n frames from the (i-1)th frame to the inth frame preceding the i-th frame; where the shooting mode of the n-th frame is obtained based on the n-th frame and the target metadata corresponding to the n-th frame.
[0062] Based on the target metadata corresponding to the i-th frame image, the initial shooting mode of the i-th frame image is obtained;
[0063] Based on the shooting modes corresponding to n frames and the initial shooting mode of the i-th frame, the target shooting mode of the i-th frame is determined.
[0064] In the above scheme, when determining the shooting mode of the i-th frame image, target detection processing such as scene detection, target object detection, and motion detection is performed on the i-th frame image to obtain the detection result of the i-th frame image; based on the detection result of the i-th frame image and the target metadata of the i-th frame image collected by the electronic device, the identifier of the initial shooting mode of the i-th frame image is obtained; the identifier of the initial shooting mode of the i-th frame image is weighted and processed with the identifiers of the shooting modes of the n frames preceding the i-th frame image to obtain the identifier of the shooting mode of the i-th frame image.
[0065] In one implementation, the initial shooting mode identifier of the i-th frame image and the shooting mode identifier of the n-th frame image are weighted, and the weighting coefficients can be configured.
[0066] In another implementation, the above implementation will be discussed later. Figure 10 The relevant description of smoothing processing in S205.
[0067] In the embodiments of this application, the target shooting mode of the i-th frame image is determined based on the shooting mode identifiers corresponding to the n-frame images and the shooting mode identifier of the i-th frame image; this can avoid the problem of the shooting mode label shaking between two or more scenes due to instability; by determining the shooting mode identifier of the i-th frame image by comparing it with the shooting mode identifiers of the n-frame images preceding the i-th frame image, the stability of the target shooting mode identifier of the i-th frame image can be ensured to a certain extent; thus improving the shooting stability of the camera application.
[0068] In conjunction with the first aspect, some implementations of the first aspect also include:
[0069] If the target shooting mode of the i-th frame is the first shooting mode and the target shooting mode of the (i-1)-th frame is the second shooting mode, determine the cumulative number of times the first shooting mode is used; where the first shooting mode and the second shooting mode are different.
[0070] If the cumulative number of attempts exceeds a preset threshold, the current target shooting mode of the camera application is determined to be the first shooting mode.
[0071] In the above scheme, when determining whether to switch to the target shooting mode of the i-th frame image, it is necessary to detect whether the target shooting mode of the (i-1)-th frame image is the same as that of the i-th frame image; if the target shooting mode of the i-th frame image is not the same as that of the (i-1)-th frame image, the cumulative number of times the target shooting mode corresponding to the i-th frame image is detected; if the cumulative number is greater than a preset threshold, the camera application is controlled to switch to the target shooting mode of the i-th frame image; if the cumulative number is less than or equal to the preset threshold, the camera application does not switch to shooting.
[0072] In one implementation, the scene label information (Scene_ID) of the 4th frame image object is label 3, and the label of the previous 3 frames is 2. Therefore, the electronic device 100 will not switch to the shooting mode corresponding to label 3 at present. When the labels of consecutive preset frames are all label 3, the electronic device 100 will switch the camera application's shooting mode to the shooting mode corresponding to label 3. In the embodiments of this application, the shooting mode is switched when the cumulative number of times the first shooting mode is greater than a preset threshold. In other words, when the cumulative number of times the first shooting mode is used in the i-th frame image reaches the preset threshold, the camera application switches to the first shooting mode. Through the above method, since the camera application is controlled to switch shooting modes when the cumulative number of times the first shooting mode is greater than the preset threshold, a smooth switching of shooting modes can be performed when the shooting scene changes. This avoids the recommended shooting mode from jittering between multiple shooting scenes when the shooting scene changes, ensuring the stability of the recommended shooting mode.
[0073] In conjunction with the first aspect, in certain implementations of the first aspect, the first control is displayed in the first preview interface, including:
[0074] The first control is displayed in the first preview interface using target animation effects; or...
[0075] The first prompt box is displayed in the first preview interface; the first prompt box includes prompt information about the first control and the function corresponding to the first control.
[0076] In the above solution, when displaying the target shooting mode prompt control in the preview interface, one implementation method is to display the target shooting mode prompt control statically in the preview interface; prompting and guiding the user to activate the target shooting mode; for example, Figure 3 As shown. Another implementation method is to display a prompt control for the target shooting mode in the preview interface using animation effects, prompting and guiding the user to activate the target shooting mode.
[0077] In one implementation, the display method of the target animation will be discussed later. Figure 4 (a) to Figure 4 The relevant description of (c) in the text.
[0078] In another implementation, the first prompt box is as follows: Figure 3 The first prompt control 26 shown in (a) displays prompt information related to the function corresponding to the first prompt control, such as "Try stage mode".
[0079] In the embodiments of this application, the first control is displayed through a target animation effect or a prompt box, making it easier for the user to notice the first control. The first control can prompt and guide the user to activate a target shooting mode that matches the current shooting scene; after activating the target shooting mode, the image quality of the captured image is improved.
[0080] In conjunction with the first aspect, some implementations of the first aspect also include:
[0081] If no second operation on the first control is detected, the first preview interface is displayed.
[0082] In the above scheme, in response to a click operation on the camera application in the electronic device, the camera application displays a photo preview interface; the photo preview interface displays a preview image of the default photo shooting mode; based on the preview image and the target metadata when the electronic device captured the preview image, a target shooting mode matching the current shooting scene is jointly determined; after determining the target shooting mode, in order to facilitate guiding the user to turn on the target shooting mode of the camera, a control for the target shooting mode is displayed in the photo preview interface; if no user operation on the control for the target shooting mode is detected, the camera application does not switch shooting modes and displays the photo preview interface.
[0083] In one implementation, as Figure 3 If no first operation (e.g., click) by the user is detected on the first prompt control 26 in the user interface shown in (a), then the camera application displays a preview of the current shooting mode; for example, as Figure 3 As shown in (a), the preview interface for the photo-taking mode is displayed.
[0084] In another implementation, if no first operation on the first prompt control 26 is detected after a preset time, then... Figure 3 The first prompt control 26 may not be displayed in the user interface shown in (a); it can be understood that the first prompt control 26 disappears from the user interface if no first operation is detected after the preset display time.
[0085] In the embodiments of this application, if no second operation by the user on the first control is detected, it means that the user does not currently have a need to enable the target shooting mode; if the user does not have a need to enable the target shooting mode, the electronic device will not switch to the target shooting mode and will still use the current shooting mode to shoot; thus ensuring that the user's needs are met.
[0086] In conjunction with the first aspect, in some implementations of the first aspect, the first preview interface is a photo preview interface, or the first preview interface is a video preview interface.
[0087] In the above scheme, in the photo-taking scenario, in response to a click operation on the camera application on the electronic device, the camera application displays a photo preview interface; in the photo preview interface, a prompt control for the target shooting mode is displayed, prompting and guiding the user to activate the target photo mode for the shooting scenario. In the video recording scenario, the camera application displays a video recording preview interface; in the video recording preview interface, a prompt control for the target video recording mode is displayed, prompting and guiding the user to activate the target video recording mode for the shooting scenario.
[0088] In the embodiments of this application, the above-mentioned method for recommending shooting modes is applicable to either photo-taking or video-recording scenarios. In photo-taking scenarios, the above solution ensures that the current shooting mode matches the shooting scenario, thereby improving the image quality of the captured image. In video-recording scenarios, the above solution ensures that the current video-recording mode matches the shooting scenario, thereby improving the video quality of the recorded video.
[0089] Secondly, an electronic device is provided, comprising one or more processors, a memory, a display screen, and a first sensor and a second sensor; the memory, display screen, first sensor, and second sensor are coupled to one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, the display screen is used to display a preview interface; the first sensor is used to acquire images; and the one or more processors invoke the computer instructions to cause the electronic device to execute:
[0090] In response to a first operation on a camera application in an electronic device, a first preview interface is displayed; wherein the first preview interface displays a first image, which is an image captured by a first sensor in the electronic device;
[0091] Based on the first image and the target metadata of the electronic device, the target shooting mode is determined; wherein, the target metadata of the electronic device is the metadata of the second sensor in the electronic device when the first image is acquired; the target shooting mode is used to indicate the shooting mode that matches the current shooting scene;
[0092] The first control is displayed in the first preview interface; the first control is used to trigger the electronic device to take a picture using the target shooting mode;
[0093] In response to a second operation on the first control, a second preview interface is displayed; wherein, the second preview interface displays a second image, which is an image obtained by processing the image currently acquired by the first sensor using the target shooting mode.
[0094] In conjunction with the second aspect, in some implementations of the second aspect, the processor invokes computer instructions to cause the electronic device to perform the recommended method described in the first aspect or any possible implementation of the first aspect.
[0095] It should be understood that the extensions, limitations, explanations and descriptions of the relevant content in the first aspect above also apply to the same content in the second aspect.
[0096] Thirdly, an electronic device is provided, including a module / unit for performing the recommended method in the first aspect or any implementation thereof.
[0097] Fourthly, a chip system is provided, the chip system being applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the first aspect or any of the recommended methods in the first aspect.
[0098] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium storing computer program code, which, when executed by an electronic device, causes the electronic device to perform the recommended method of the first aspect or any implementation thereof.
[0099] In a sixth aspect, a computer program product is provided, the computer program product comprising: computer program code, which, when executed by an electronic device, causes the electronic device to perform the recommended method in the first aspect or any implementation thereof.
[0100] In the embodiments of this application, when determining the target shooting mode matching the current shooting scene, the target shooting mode is jointly determined by the first image and the target metadata of the electronic device. The first image includes image information of the shooting scene, and the target metadata of the electronic device includes other information about the shooting scene besides the image information; for example, metadata of other sensors in the shooting scene besides the image sensor. By combining the first image and the target metadata of the electronic device, it is ensured that the electronic device can acquire more perceptual information about the shooting scene. With more perceptual information about the shooting scene, the electronic device can identify more shooting scenes. Furthermore, among these more shooting scenes, more target recommendation modes matching the current shooting scene can be pushed to the user, improving the quality of the captured images. Attached Figure Description
[0101] Figure 1 This is a schematic diagram of an example stage shooting scene listed in the embodiments of this application;
[0102] Figure 2 This is a schematic diagram of an example of a user interface for enabling a smart control provided in an embodiment of this application;
[0103] Figure 3 This is a schematic diagram of a user interface for a recommended shooting mode provided in an embodiment of this application;
[0104] Figure 4 This is a schematic diagram of a user interface for another recommended shooting mode provided in the embodiments of this application;
[0105] Figure 5 This is a schematic diagram illustrating an example of adding a stage mode to a camera application, provided in an embodiment of this application.
[0106] Figure 6 This is a schematic diagram of an example of a motion shooting scene provided in an embodiment of this application;
[0107] Figure 7 This is a schematic diagram of a user interface for another example of a recommended shooting mode provided in an embodiment of this application;
[0108] Figure 8 This is a schematic diagram of an example HDR shooting scene provided in an embodiment of this application;
[0109] Figure 9 This is a schematic diagram of a user interface for another example of a recommended shooting mode provided in the embodiments of this application;
[0110] Figure 10 This is a schematic flowchart illustrating a recommended shooting mode method provided in an embodiment of this application;
[0111] Figure 11 This is a schematic diagram of the system structure of an electronic device 100 provided in an embodiment of this application;
[0112] Figure 12 This is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application. Detailed Implementation
[0113] In the embodiments of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "multiple" means two or more.
[0114] When running camera applications, electronic devices typically recommend shooting modes based on the image feature information of the captured images; that is, they determine the recommended shooting mode that matches the image feature information. However, image data is two-dimensional data. When using two-dimensional image data to determine the recommended shooting mode, it is usually only possible to match the recommended shooting mode for some shooting scenarios, and it is impossible to recommend shooting modes for more shooting scenarios in which the user is located. This results in the user being unable to select a shooting mode that matches the current shooting scenario, resulting in a poor success rate and poor image quality.
[0115] The shooting mode recommendation method provided in this application embodiment is applied to the camera application of electronic devices; for example, the recommendation method can be applied to recommend shooting modes that match the shooting scene when the camera is in a shooting scene; it can also be applied to recommend recording modes that match the shooting scene when the camera is in a recording scene.
[0116] The following embodiments will describe the user interface diagrams of the recommended shooting mode method provided in this application embodiment, combined with different shooting scenarios.
[0117] Shooting Scene 1: Stage Shooting Scene
[0118] Figures 1 to 5 This is a schematic diagram of an example stage shooting scene listed in the embodiments of this application.
[0119] Figure 1 A schematic diagram of a stage shooting scene is shown; the stage shooting scene includes a shooting object 1 on the stage; the electronic device 100 can display a prompt control for a recommended shooting mode; the prompt control is used to guide the user to switch to a stage shooting mode (also known as stage mode) that matches the stage shooting scene; if the user's response to the prompt control is detected, the camera application is switched to the stage shooting mode through the control corresponding to the stage shooting mode; after the electronic device 100 switches to the stage shooting mode, the user interface 1 is displayed on the electronic device 100.
[0120] It should be understood that the aforementioned user interface 1 may refer to the interface displayed after the electronic device 100 enters the stage shooting mode.
[0121] Figures 2 to 5 This application provides a user interface for a set of electronic devices that allows switching from a default shooting mode (e.g., photo mode) to a recommended shooting mode (e.g., stage shooting mode) according to an embodiment of the present application.
[0122] For example, Figure 2 Image (a) shows the main interface of electronic device 100. The main interface may include a status bar, a page indicator, a frequently used application tray, and a general application tray.
[0123] The status bar may include one or more signal strength indicators for mobile communication signals (also known as cellular signals), wireless Fidelity (Wi-Fi) signal strength indicators, battery status indicators, time indicators, etc.
[0124] Both the frequently used application tray and the general application tray are used to display application icons. Users can launch the application corresponding to that icon by clicking it.
[0125] For example, a commonly used application tray may include icons for the camera app, contacts app, phone app, and messaging app. A typical application tray may include icons for settings app, app store app, gallery app, and browser app, etc.
[0126] It should be understood that, in addition to the icons mentioned above, the main interface may also include icons of other applications, which will not be listed here. The icon of any application can be placed in the frequently used applications tray or the general applications tray.
[0127] Multiple application icons can be distributed across multiple pages. Page indicators can be used to show the positional relationship between the currently displayed page and other pages. Users can swipe left / right to browse other pages. The icons of applications in the frequently used application tray do not change with the page, i.e., they are fixed; while the icons of applications in the general application tray change with the page.
[0128] Understandable Figure 2 The user interface described in (a) and thereafter is merely an exemplary illustration of one possible user interface style for an electronic device 100, taking a mobile phone as an example, and should not be construed as limiting the embodiments of this application.
[0129] like Figure 2 As shown in (a), the electronic device 100 can detect user actions performed on the icon 11 of the camera application; for example, the user action is a click, a voice command, or other action that instructs the user to run the camera application. In response to the aforementioned user action, the electronic device 100 can run the camera application; simultaneously, the electronic device 100 can display on the screen... Figure 2 The main interface of the camera application is shown in (b) above.
[0130] It should be noted that the camera application is an application installed on the electronic device 100 that can call the camera to provide shooting services. It is not limited to the camera application; other applications capable of calling the camera to provide shooting services that can be installed on the electronic device 100 can also implement the recommended method of the shooting mode provided in this application; this application embodiment does not limit this.
[0131] Figure 2 (b) in the example shows the user interface of the electronic device 100 for turning on the camera.
[0132] like Figure 2 As shown in (b), the user interface may include a menu bar 21, a preview window, a playback control 22, a shooting control 23, and a conversion control 24.
[0133] Menu bar 21 displays multiple shooting mode options, such as Night Scene, Video, Photo, Portrait, Professional, and More. Night Scene mode is suitable for taking photos in low-light conditions, such as at night. Video mode is for recording videos. Photo mode is for taking photos in daylight. Portrait mode is for taking close-up photos of people.
[0134] The preview window can be used to display a sequence of image frames captured by the camera in real time. The image displayed in the preview window can be referred to as the original image. In this embodiment, after clicking the shooting control 23 to start taking a picture, the window used to display the image is also called the preview window.
[0135] The playback control 22 can be used to view previously captured photos or videos. Generally, the playback control 22 can display a thumbnail of a previously captured photo or a thumbnail of the first frame of a previously captured video.
[0136] The shooting control 23 can be used to receive shooting operations from the user. In photo shooting scenarios (including: photo mode, portrait mode, night scene mode, stage mode, HDR mode, and sports mode), the above shooting operations are the operations performed on the shooting control 23 to control the taking of photos. In video recording scenarios (recording mode), the above shooting operations include the operations to start recording and stop recording performed on the shooting control 23.
[0137] The switching control 24 can be used to switch the currently used camera. If the currently used camera for capturing images is the front-facing camera, upon detecting a user operation on the switching control 24, the electronic device 100 can activate the rear-facing camera to capture images in response to the operation. Conversely, if the currently used camera for capturing images is the rear-facing camera, upon detecting a user operation on the switching control 24, the electronic device 100 can activate the front-facing camera to capture images in response to the operation.
[0138] Figure 2The user interface shown in (b) also includes a settings panel. The settings panel can display multiple shooting parameter setting controls (function controls). A function control is used to set a type of camera parameter, thereby changing the image captured by the camera. For example, the settings panel can display controls such as Smart Recognition Control 12, Flash Control 13, Smart Control 14, HDR Control 15, Live Photo Control 16, and Settings Control 17. Smart Recognition Control 12 can be used to intelligently recognize the subject in the shooting scene. Flash Control 13 can be used to turn the flash on or off; Smart Control 14 can be used to enable the intelligent image processing algorithm; HDR Control 15 can be used to capture more details in shooting scenes with a large dynamic range; Live Photo Control 16 is used to enable the live image sequence function, where live photos display a few seconds of motion when viewed; Settings Control 17 can provide more controls for adjusting camera shooting parameters or image optimization parameters. Furthermore, as... Figure 2 The user interface shown in (b) also includes a snapshot control 18, a zoom control 19, and a filter control 20. The snapshot control 18 is an auxiliary switch for entering snapshot mode, assisting in controlling the activation and deactivation of the snapshot mode. When snapshot mode is activated, the electronic device can automatically capture images in the preview interface or, after the user clicks the shooting control 23, select images within a certain time period that meet the requirements. The zoom control 19 can be used to adjust the zoom level to adjust the camera's field of view. When the camera's field of view changes, the image displayed in the preview window will change accordingly. The filter control 20 can be used to select a filter style, thereby adjusting the image color.
[0139] Figure 2 As shown in (b), the image captured by the camera at a certain moment includes the subject 1 on the stage; as Figure 2 As shown in (c), the electronic device 100 can detect user operations applied to the smart control 14; in response to the user operation, it displays as shown in (c). Figure 2 The user interface shown in (d) displays a prompt message 25, which reads "AI photography is enabled".
[0140] Optionally, the above Figure 2 The prompt message 25 shown in (d) can disappear in the preset window after the preset duration is displayed.
[0141] Alternatively, in one implementation, in response to such Figure 2 (a) User interaction with the camera app icon 11 can be directly displayed as follows: Figure 2 The user interface shown in (d) is shown in the image; in other words, the intelligent photography function can also be automatically enabled when the camera application is running; this application does not limit this in any way.
[0142] In one implementation, after the electronic device 100 activates the smart control 14, it triggers the electronic device 100 to execute the recommended method for shooting modes provided in the embodiments of this application.
[0143] After the AI photography function is enabled, the electronic device 100 can execute the relevant algorithm of the shooting mode recommendation method provided in the embodiments of this application on the captured images; for example, after the electronic device 100 determines that the current recommended shooting mode is the stage shooting mode in a stage shooting scene, it can display a prompt control for the stage shooting mode on the user interface; prompting and guiding the user to enable the stage shooting mode for shooting; Figure 3 and Figure 4 The image shows two different user interfaces for displaying the "hint control".
[0144] Implementation Method 1: Display the tooltip control statically
[0145] like Figure 3 As shown in (a), when the electronic device 100 detects that the recommended shooting mode matching the stage shooting scene is the stage shooting mode, the electronic device 100 can display a first prompt control 26 in the preview window; wherein, the first prompt control 26 displays prompt information related to the function corresponding to the first prompt control, such as "Try stage mode"; Figure 3 As shown in (b), the electronic device 100 can detect user operation on the first prompt control 26; in response to the user operation, the electronic device 100 enters the stage shooting mode, processes the captured image using the relevant image processing algorithm corresponding to the stage shooting mode, and displays a preview interface of the stage shooting mode, such as... Figure 3 As shown in (c); the preview interface of the stage shooting mode includes the stage shooting mode control 27; if the electronic device 100 detects such... Figure 3 When the user operation to turn off the stage mode is shown in (d) above, the electronic device 100 enters the default shooting mode, which is displayed as shown below. Figure 2 The user interface shown in (d) is shown in the image.
[0146] Optionally, in such Figure 3 In the user interface shown in (a), if no user operation on the first prompt control 26 is detected after a preset time, the first prompt control 26 may not be displayed in the user interface; it can be understood that if no user operation is detected after the first prompt control 26 is displayed for a preset time, it will disappear from the user interface.
[0147] Implementation Method 2: Display the tooltip control using animation effects
[0148] like Figure 4As shown in (a), when the electronic device 100 detects that the recommended shooting mode matches the stage shooting scene as the stage shooting mode, the electronic device 100 can display control 28 in the preview window via animation; control 28 is used to enter the stage shooting mode; in addition, as Figure 4 As shown in (b), prompts related to the function of control 28 can also be displayed, such as "Try stage mode"; the prompts disappear after a preset duration in the preview window, and control 28 is only displayed in the preview window; if the electronic device 100 detects user operation on control 28, such as Figure 4 As shown in (c); then the electronic device 100 enters the stage shooting mode, processes the acquired image using the relevant image processing algorithm corresponding to the stage shooting mode, and displays the preview interface of the stage shooting mode, as shown in (c). Figure 4 As shown in (d); the preview interface of the stage shooting mode includes controls for the stage shooting mode; if the electronic device 100 detects a user operation to turn off the stage mode, the electronic device 100 enters the default shooting mode, i.e., displays as shown in (d); Figure 2 The user interface shown in (d) is shown in the image.
[0149] Optionally, if no user operation on control 28 is detected after a preset time, control 28 may not be displayed in the user interface; this can be understood as control 28 disappearing from the user interface after a preset time if no user operation is detected.
[0150] For example, in an embodiment of this application, a stage shooting mode is added to the shooting modes of the electronic device 100; the stage mode can be set in the more shooting modes among the multiple shooting modes of the camera application; when a user operation on the stage shooting mode in the more shooting modes is detected, the stage shooting mode can be displayed in the shooting modes in the menu bar.
[0151] For example, such as Figure 5 As shown in (a), the electronic device 100 detects a user operation for more shooting modes; in response to the user operation, it displays as shown in Figure (a). Figure 5 The user interface for more shooting modes shown in (b) includes icons for various shooting modes or shooting scenes; for example, slow motion controls, time-lapse photography controls, watermark controls, super macro controls, multi-lens recording controls, high-resolution controls, document scanning controls, short film controls, and stage controls 29; such as Figure 5 As shown in (c), the electronic device 100 detects a user operation on the stage control 29, through which the stage shooting mode can be moved from the user interface of more shooting modes to the menu bar of the camera's main interface, as shown in (c). Figure 5 As shown in (d) in the figure.
[0152] Optionally, the specific algorithm by which the aforementioned electronic device 100 determines the recommended shooting mode as stage shooting mode can be found in subsequent articles. Figure 10 Related descriptions.
[0153] Shooting Scene 2: Sports Shooting Scene
[0154] Figure 6 and Figure 7 This is a schematic diagram of an example of a motion shooting scenario listed in the embodiments of this application.
[0155] Figure 6 A schematic diagram of a motion shooting scenario is shown; the motion shooting scenario includes a shooting object 2 in motion; the electronic device 100 can display a prompt control for a recommended shooting mode; the prompt control is used to guide the user to switch to a motion shooting mode that matches the motion shooting scenario; if the user's response to the prompt control is detected, the camera application is switched to the motion shooting mode through the control corresponding to the motion shooting mode; after the electronic device 100 switches to the motion shooting mode, the user interface 2 is displayed on the electronic device 100.
[0156] After the electronic device 100 detects that the AI photography function is enabled, the electronic device 100 can execute the relevant algorithm of the shooting mode recommendation method provided in this application embodiment on the captured image; for example, after the electronic device 100 determines that the current recommended shooting mode is the sports shooting mode in a sports shooting scene, it displays as shown below. Figure 7 The user interface shown in (a) includes a second prompt control 30; wherein the second prompt control 30 displays prompt information related to the function corresponding to the second prompt control, such as "Try the sports mode"; Figure 7 As shown in (b), if the electronic device 100 detects a user operation on the second prompt control 30, the electronic device enters the motion shooting mode, processes the captured image using the corresponding image processing algorithm, and displays a preview interface of the motion shooting mode. In the preview interface of the motion shooting mode, automatic snapshot capture is initiated, such as... Figure 7 As shown in (c) in the figure.
[0157] It should be noted that when the sports shooting mode is turned off, the display status of the snapshot is as follows: Figure 7 (a) or Figure 7 As shown in (b) above; after the sports shooting mode is turned on, the display status of the snapshot is as follows: Figure 7 As shown in (c) in the figure.
[0158] Optionally, the implementation method of enabling AI photography function of electronic device 100 can be found in the relevant description of shooting scenario 1: stage shooting scenario, which will not be repeated here.
[0159] Optionally, the specific algorithm for determining the motion shooting mode by the aforementioned electronic device 100 can be found in the following sections. Figure 10 Related descriptions.
[0160] Shooting Scene 3: HDR Shooting Scene
[0161] Figure 8 and Figure 9 This is a schematic diagram illustrating an example of an HDR shooting scene listed in the embodiments of this application.
[0162] Figure 8 A schematic diagram of an HDR shooting scene is shown; the HDR shooting scene includes a shooting object 3; the electronic device 100 can display a prompt control for a recommended shooting mode; the prompt control is used to guide the user to switch to an HDR shooting mode that matches the HDR shooting scene; if the user's response to the prompt control is detected, the camera application is switched to the HDR shooting mode through the control corresponding to the HDR shooting mode; after the electronic device 100 switches to the HDR shooting mode, the user interface 3 is displayed on the electronic device 100.
[0163] After the AI photography function is enabled, the electronic device 100 can execute the relevant algorithm of the shooting mode recommendation method provided in the embodiments of this application on the captured image; for example, after the electronic device 100 determines that the current recommended shooting mode is the HDR shooting mode in the HDR shooting scene, it can display the HDR shooting mode prompt control on the user interface; prompting and guiding the user to turn on the HDR shooting mode for shooting.
[0164] In one implementation, when displaying the HDR shooting mode prompt control, the prompt control displays the message "Try HDR mode". The HDR shooting mode prompt control can be displayed statically, such as... Figure 9 As shown in (a), when the electronic device 100 detects that the recommended shooting mode matching the HDR shooting scene is the HDR shooting mode, the electronic device 100 can display a third prompt control 31 in the preview window; wherein, the first prompt control 31 displays prompt information related to the function corresponding to the third prompt control, such as "Try HDR mode"; Figure 9 As shown in (b), the electronic device 100 can detect user operation on the third prompt control 31; in response to the user operation, the electronic device 100 enters HDR shooting mode, processes the captured image using the relevant image processing algorithm corresponding to HDR shooting mode, and displays the user interface of HDR shooting mode, as shown in Figure (b). Figure 9 As shown in (c) in the figure.
[0165] In another implementation, when displaying a prompt control for the HDR shooting mode, the prompt message "Try HDR mode" is displayed in the prompt control. The prompt control for the HDR shooting mode is displayed in an animated effect manner.
[0166] It should be understood that when the prompt control for the HDR shooting mode is displayed in an animated effect manner, the prompt message in the prompt control is displayed in an animated effect manner. For example, at different moments, the prompt message is displayed character by character. For instance, at the first moment, "Auto" is displayed; at the second moment, "Auto HDR" is displayed; after the prompt message is completely displayed, the prompt message automatically disappears, and only the control is displayed in the preview interface.
[0167] Optionally, the display methods of the above HDR shooting control can refer to Implementation Method 1 and Implementation Method 2 in the stage shooting scenario; details are not described herein again.
[0168] It should be understood that the above Figures 1 to 9 The shown user interface is exemplified by the preview interface of the shooting mode in the camera application; the recommended method for the shooting mode provided in the embodiments of the present application is also applicable to the video recording mode of the camera application; the present application makes no limitation thereto.
[0169] In addition, the above Figures 1 to 9 is exemplified by the stage shooting scenario, the sports shooting scenario, and the HDR shooting scenario; the recommended method for the shooting mode provided in the embodiments of the present application is also applicable to various shooting scenarios such as the portrait shooting scenario, the night scene shooting scenario, the document scanning shooting scenario, the moon scene, the snow scene, the fireworks scene, the sunset scene, the food scene, the blue sky scene, the flower scene, the green plant scene, the macro scene, and the wide-angle scene.
[0170] Next, in combination with Figure 10 the algorithm process of the electronic device 100 when implementing the recommendation of the shooting mode is described in detail.
[0171] Figure 10 It is a schematic flowchart of a recommended method for a shooting mode provided in an embodiment of the present application. The method 200 includes S201 to S209; S201 to S209 are described in detail below.
[0172] S201. Detect an operation to start the camera application program, and in response to the operation, start the camera application program.
[0173] For example, a user can instruct the electronic device to open the camera application by clicking the "Camera" app icon; or, when the electronic device is locked, the user can instruct the electronic device to open the camera application by swiping right on the screen. Alternatively, if the electronic device is locked and the lock screen includes a camera application icon, the user can instruct the electronic device to open the camera application by clicking the icon. Or, if the electronic device is running another application that has permission to access the camera application, the user can instruct the electronic device to open the camera application by clicking the corresponding control. For example, if the electronic device is running an instant messaging application, the user can instruct the electronic device to open the camera application by selecting the camera function control, and so on.
[0174] It should be understood that the above is an example of how to open a camera application; the camera application can also be opened by voice commands or other methods; this application does not limit this in any way.
[0175] S202, Display shooting preview interface.
[0176] For example, after the camera application is opened, the electronic device can display a shooting preview interface of the default shooting mode; the shooting preview interface includes a preview image; the preview image can be an image obtained by processing the raw image data captured by the camera through the image processing algorithm corresponding to the default shooting mode.
[0177] S203. Check if the camera's intelligent shooting function is enabled. If yes, proceed to S204; otherwise, perform a loop check. For example, check if the camera's intelligent shooting function is enabled after a preset interval.
[0178] For example, enabling the smart shooting function in a camera application can refer to enabling the smart control 14 in the camera application, such as... Figure 2 As shown in (d) in the figure.
[0179] S204. Perform preprocessing on the acquired image stream.
[0180] It should be noted that, in one implementation, scene tags obtained through scene recognition can be used to match recommended shooting modes; however, scene recognition is usually an algorithm based on two-dimensional image data, which cannot effectively identify certain shooting scenarios (e.g., motion shooting scenarios) using two-dimensional image data. This results in the camera application being unable to recommend shooting modes to the user in such scenarios, preventing the camera from recommending shooting modes for more shooting scenarios, i.e., the entire shooting scenario. In another implementation, preprocessing includes acquiring metadata from the electronic device, detecting and processing the image stream, and scene recognition. By using three parallel processing algorithms, more perceptual information about the shooting scenario can be obtained. On the one hand, this ensures that the electronic device can recommend shooting modes for the entire shooting scenario, recommending more recommended shooting modes to the user; on the other hand, by using three parallel algorithms to comprehensively recommend shooting modes that match the shooting scenario, the accuracy of the recommended shooting modes can be improved.
[0181] The following describes in detail one implementation of the image stream preprocessing in S204 above, in conjunction with steps 1 to 3.
[0182] Step 1: Obtain camera metadata when the electronic device acquires the image stream.
[0183] It should be noted that camera metadata refers to additional information unrelated to the image content in the image stream. For example, metadata includes data from the camera's sensors when the electronic device acquires the image stream, and the camera's Exchangeable Image File Format (EXIF) data; among which, EXIF data includes: ISO sensitivity.
[0184] For example, the aforementioned metadata includes: data from the gyroscope sensor when the electronic device 100 acquires the image stream, illuminance information of the sensor, etc.
[0185] Step 2: Perform detection processing on the image stream to obtain the detection results.
[0186] Optionally, the images captured by the camera in the electronic device 100 are generally large in size. During detection processing, large images increase the computational cost of the electronic device 100, thereby increasing the computational load and power consumption of the electronic device 100. Therefore, after the electronic device 100 acquires the original image stream, it can perform downsampling processing on the original image stream to obtain a smaller image stream; thereby performing detection processing on the smaller image.
[0187] For example, the above detection processes include: face bounding box detection, body bounding box detection, motion information detection, and ambient brightness detection. Face detection is used to identify and locate the position of a face in an image or video; body bounding box detection is used to identify a human body in the background and mark its position with a bounding box; motion detection is used to detect whether there is a moving object in the shooting scene; and ambient brightness detection is used to detect the light intensity of the surrounding environment to understand the current brightness level.
[0188] The above detection and processing can employ existing detection and processing algorithms, and this application does not impose any limitations on them.
[0189] Step 3: Perform scene recognition on the image stream to obtain scene labels.
[0190] For example, when performing scene recognition, scene identifiers can be determined based on the feature information of images in the image stream; for instance, when the feature information of an image matches the feature conditions corresponding to a certain scene label, it can be determined that the image matches the aforementioned scene label; a scene label can be output for the image to identify the association between the image and the shooting scene.
[0191] Optionally, the relevant algorithms for scene recognition mentioned above can be any existing algorithm, and this application does not impose any restrictions on them.
[0192] S205. Based on the preprocessing results, determine the recommended shooting mode.
[0193] For example, the recommended shooting modes are described below as follows: stage shooting mode, sports shooting mode, portrait shooting mode, and HDR shooting mode.
[0194] The following section describes in detail the implementation methods for determining the recommended shooting mode based on the preprocessing results in S205, using implementation methods one through four.
[0195] Method 1: If the detection result indicates that the brightness information of the shooting scene is lower than the preset brightness threshold, the shooting object includes a face area or a human body area, and the scene label indicates a stage scene, then the recommended shooting mode is determined to be the stage shooting mode.
[0196] It should be understood that in stage scenes, the brightness information of the scene is usually relatively low; at the same time, when shooting on stage, the dark background of the stage scene often leads to overexposure of the area where the people are in the captured image.
[0197] For example, the conditions for entering the stage shooting mode are:
[0198]
[0199] Here, Lux_Index represents scene brightness information; Face_Detection_Info.face_rect represents the bounding box of the face location; Scene_Tag_Info represents the scene identifier; and Pedestrian_Detection_Info.pedestrian_rect represents the bounding box of the human body location.
[0200] It should be noted that Lux_Index is inversely proportional to the illumination of the shooting scene; the larger the Lux_Index, the lower the illumination of the scene. That is, Lux_Index > Stage_Scene_Th indicates that the shooting scene is a low-light scene.
[0201] This can be understood as follows: when the illumination meets the threshold (low-light scene), the brightness of the face and human body detection areas in the scene exceeds the threshold, i.e., overexposure occurs; then, the scene label detected by the scene is used as auxiliary information, i.e., when Scene_ID = STAGE_SCENE (i.e., the scene label detected is a stage), the current shooting scene is determined to be a stage scene; the current recommended shooting mode is stage shooting mode.
[0202] It should be understood that when the illumination meets the preset illumination threshold (e.g., in a non-dark scene), if the brightness of the face detection and human body detection areas in the shooting scene exceeds the preset brightness threshold, then overexposure occurs. Combined with the scene identification assistance of scene detection (i.e., the scene label for stage detection), the shooting scene is determined to be a stage scene. Therefore, the recommended shooting mode is the stage shooting mode that matches the stage scene.
[0203] Method 2: If the brightness of the shooting scene is lower than the preset brightness threshold, the detection result of motion information detection indicates the presence of a moving object, and the metadata indicates that the movement of the electronic device is less than the preset movement amount, then the recommended shooting mode is determined to be the motion shooting mode.
[0204] It should be understood that, under normal circumstances, if the electronic device 100 detects that the subject is moving, it may be that the subject is actually moving, or it may be that the user carrying the electronic device 100 has moved the electronic device 100 while the subject is stationary. In order to accurately identify a motion shooting scene, i.e., the subject is a moving object, in the embodiments of this application, motion information detection and gyroscope data are combined to comprehensively judge the current shooting scene. For example, if the motion information detection result is that no moving object is detected, but the gyroscope data indicates that the electronic device 100 has moved (or rotated), it means that the electronic device 100 has shaken; if the motion information detection result is that a moving object is detected, but the gyroscope data indicates that the electronic device 100 has not moved (or rotated), it means that the current shooting scene is a motion shooting scene; then the recommended shooting mode is determined to be the motion shooting mode.
[0205] It should be understood that in order to confirm the motion scene, it is necessary to describe the conditions in combination with the characteristics of the motion scene; in the motion scene, the main focus is on the movement of the subject being photographed, and the influence of the movement of the electronic device 100 should be eliminated as much as possible; based on this, the entry conditions of the motion scene, i.e. the entry conditions of the motion shooting mode, are constructed by combining the above preprocessing information.
[0206] For example, the conditions for entering the sports shooting mode are:
[0207] if(Lux_Index <Stage_Scene_Th&&Gyro_Info<Gyro_Info_Th&&Motion_Info> Motion_Info_Th);
[0208] Among them, Lux_Index represents scene brightness information, Motion_Info represents scene motion information, and Gyro_Info represents gyroscope information.
[0209] This can be understood as follows: when the illumination meets the threshold (not in low light), the motion amplitude of the gyroscope is used to determine whether the electronic device 100 is moving significantly; if the electronic device 100 is not moving significantly, the motion information based on the image is then determined to be greater than the preset threshold; if the motion information is greater than the preset threshold, it indicates that the current shooting scene is a motion scene, i.e., Scene_ID = MOTION_SCENE; and the recommended shooting mode is determined to be the motion shooting mode.
[0210] Method 3: If the proportion of the face region in the image is greater than the preset face proportion, and the scene label indicates a portrait scene, then the recommended shooting mode is determined to be the portrait shooting mode.
[0211] H_DYNAMIC_RANGE_SCENE;
[0212] It should be understood that in order to confirm a portrait scene, it is necessary to describe the conditions in combination with the characteristics of the portrait scene. In a portrait scene, the main focus is on whether there are people or the proportion of faces. Based on this, we combine the above preprocessing information and other information to construct the entry conditions of the portrait scene, that is, the entry conditions of the portrait shooting mode.
[0213] For example, the conditions for entering portrait shooting mode are:
[0214] if(Face_Detection_Info.face_rect>Face_Size_Th&&Scene_Tag_Info==Scene_Tag_Portrait);
[0215] Here, Face_Detection_Info.face_rect represents the rectangular bounding box of the face location; Scene_Tag_Info represents the scene identifier.
[0216] This can be understood as follows: in portrait shooting scenarios, the main focus is on whether there are people in the subject and the proportion of their faces. Based on this, if the face size is greater than a threshold, the scene detection also indicates that the scene is a portrait scene. This means that the current shooting scene is a portrait scene, i.e., Scene_ID = PORTRAIT_SCENE. The recommended shooting mode is determined to be the portrait shooting mode.
[0217] Implementation Method 4: If the histogram statistics or high dynamic range information in the detection results meet the preset conditions, the recommended shooting mode is determined to be HDR shooting mode.
[0218] For example, the conditions for entering HDR shooting mode are:
[0219] if((Image_Hist_Info.low_bin_cnt+Image_Hist_Info.high_bin_cnt)>Image_Hist_Stat_Th);
[0220] or
[0221] if(Dynamic_Range_Info>Dynamic_Range_Info_Th);
[0222] Here, Image_Hist_Info.low_bin_cnt represents the calculated value of the low-intensity (e.g., dark tones) portion of the histogram; Image_Hist_Info.high_bin_cnt represents the calculated value of the high-intensity (e.g., close to 255, white or very bright colors) portion of the histogram; Dynamic_Range_Info represents the dynamic range; dynamic range refers to the degree of difference between the darkest and brightest parts of an image.
[0223] This can be understood as determining whether the current shooting scene is an HDR shooting scene by using the statistical information of the histogram or the high dynamic range information in the image; for example, based on the above judgment conditions, it can be determined that the shooting scene is an HDR shooting scene, that is, Scene_ID = HIGH_DYNAMIC_RANGE_SCENE; then the recommended shooting mode is determined to be the HDR shooting mode.
[0224] It's important to note that the main issue in high dynamic range (HDR) scenes is that the user has the automatic HDR control disabled, while the shooting environment is an HDR scene. In this case, it's necessary to determine if the scene is indeed HDR based on the perceptual information of the shooting scene (e.g., histogram statistics or HDR information), and combine this with other factors such as... Figure 9 The user interface shown guides users to turn on the automatic HDR control switch, thereby achieving better dynamic range capture and improving image quality.
[0225] Optionally, when determining the recommended shooting mode, a smoothing process can be performed to save power consumption of the electronic device 100 and to achieve a smooth switching of shooting modes.
[0226] For example, considering the power consumption and computational load of the electronic device 100, the relevant detection of the preprocessing in S204 above does not need to be processed frame by frame; S204 can be executed by using a frame skipping method; for example, the above preprocessing can be performed at a frame rate of 5-10fps; that is, in 30 frames of image data per second, the above processing of S204 is performed on 5-10 frames.
[0227] Furthermore, in order to obtain scene information labels for all frames and perform smooth switching when scene labels change, avoiding the problem of label jittering between two or more scenes due to unstable detection, the following mechanism is introduced for smoothing and smooth switching.
[0228] For example, smoothing is performed in the following way:
[0229] Scene_Tag_Out(i)=weight_1*Scene_Tag(i)+...+weight_n*Scene_Tag(in);
[0230] That is, the label information of the first n labeled frames is used for weighted smoothing to obtain the label information of the current frame i; where the weights can be adjusted to control the smoothing degree and weight distribution.
[0231] For example, if the current frame is the 4th frame, and the previous 3 frames include the 1st, 2nd, and 3rd frames; where the 1st frame corresponds to label 1; the 2nd frame corresponds to label 2; and the 3rd frame corresponds to label 3; then, by weighting the label of the 4th frame with the labels of the previous 3 frames, a new label for the 4th frame is obtained. The weights in the above weighting process can be adjusted as needed.
[0232] For example, a smooth transition is handled in the following way:
[0233] Tag_Counter = 0;
[0234] if(Scene_Tag(i)==Scene_Tag_New)then Tag_Counter+=1;
[0235] else Tag_Counter = 0;
[0236] if(Tag_Counter>Counter_Th)then Scene_Tag_Out(i)=Scene_Tag_New;
[0237] else Scene_Tag_Out(i)=Scene_Tag_Cur;
[0238] That is, the new tag will only be switched to after the new tag has appeared a preset number of times (Counter_Th).
[0239] For example, if the scene label information (Scene_ID) of the 4th frame image object is label 3, and the label of the previous 3 frames is 2, then the electronic device 100 will not switch to the shooting mode corresponding to label 3 at present. When the labels of the consecutive preset frames are all label 3, the electronic device 100 will switch the shooting mode of the camera application to the shooting mode corresponding to label 3.
[0240] Table 1
[0241] Recommended shooting mode Recommended interface type zoom magnification Close method Sports shooting mode Recommended switch mode Default multiplier Click the motion control to close. Stage shooting mode Independent mode recommendation <![CDATA[1 × / 2 × / 5 × / 10 × ]]> Click "╳" to close. Portrait shooting mode Independent mode recommendation Default multiplier Switch tag off HDR shooting mode Recommended switch mode Default multiplier Click the HDR control to close.
[0242] As shown in Table 1, when the recommended shooting mode is sports shooting mode, the recommended interface type is switch mode recommendation; Figure 7 As shown, the sports shooting mode is switched on and off via the capture switch 18. The zoom level of the sports shooting mode uses the default magnification; it is turned off by clicking the sports control; for example, when the capture control 18 is in the position shown... Figure 7 The state shown in (a) indicates that the motion shooting mode is off. When the recommended shooting mode is stage shooting mode, the recommended interface type is independent mode recommendation; as shown in (a)... Figure 3 As shown, the stage shooting mode is toggled on and off via the first prompt control 26. In one implementation, the zoom level used in the stage shooting mode can be "1× / 2× / 5× / 10×"; the stage shooting mode is turned off by clicking the "╳" in the control, as shown below. Figure 3 As shown in (d) above. When the recommended shooting mode is portrait mode, the recommended interface type is independent mode recommendation; for example, portrait mode can be turned on and off by switching tags in the camera application; the zoom ratio of portrait mode uses the default ratio. When the recommended shooting mode is HDR mode, the recommended interface type is switch mode recommendation; the zoom ratio of HDR mode uses the default ratio. It is turned off using the HDR control; for example... Figure 9 (a) and Figure 9 As shown in (b), the HDR control 15 is in the off state; Figure 9 As shown in (c), the HDR control 15 is turned on.
[0243] S206, Displays a prompt control for recommended shooting modes.
[0244] For example, to make it easier for users to notice the recommended shooting mode, after determining the recommended shooting mode that matches the current shooting scene, the electronic device 100 can display a prompt control for the recommended shooting mode in the user interface. The prompt control displays prompt information related to the function corresponding to the prompt control. The purpose of the prompt information is to inform the user of the shooting mode that matches the current shooting scene and to guide the user to use the recommended shooting mode. For example, if the recommended shooting mode is "stage shooting mode", the prompt information could be "Try stage mode"; if the recommended shooting mode is "sports shooting mode", the prompt information could be "Try sports mode"; if the recommended shooting mode is "portrait mode", the prompt information could be "Try portrait mode"; if the recommended shooting mode is "HDR mode", the prompt information could be "Try HDR mode". The prompt control can automatically switch the camera application's shooting mode to the recommended shooting mode, making it easier for the user to operate.
[0245] Optionally, when displaying the tooltip control, it can be displayed using animation effects; for example, such as... Figure 4 (a) to Figure 4 As shown in (c) in the figure.
[0246] S207. Determine whether a user action on the prompt control has been detected; if yes, proceed to S208; if no, proceed to S209.
[0247] For example, the aforementioned user operation could refer to a user's click on a prompt control; for instance, such as... Figure 3 As shown in (b); or, the user's voice operation on the prompt control, or other selection operations on the prompt control.
[0248] S208, displays a preview interface for recommended shooting modes.
[0249] For example, after detecting a user interaction with the prompt control, the camera application can switch its shooting mode from the current shooting mode to the recommended shooting mode; the captured image is processed by the image processing algorithm corresponding to the recommended shooting mode, and a preview interface of the recommended shooting mode is displayed.
[0250] It should be noted that different recommended shooting modes correspond to different image processing algorithms; by combining the processing requirements of different shooting scenarios, images captured under different recommended shooting modes are processed in a targeted manner to improve image quality.
[0251] For example, when processing a stage scene (Scene_ID = STAGE_SCENE), optimization of exposure, color, and sharpness is required. Regarding exposure, the lighting environment in a stage scene is typically complex. Due to the influence of stage lighting, the environment for shooting the stage and the people on it is a high-contrast environment, meaning the people and the scene are highlight areas while the background area of the stage is relatively dark. Using ordinary automatic exposure algorithms to process stage scenes may result in overexposure or color cast in the image of the people on stage.
[0252] To address the aforementioned overexposure issue, in the embodiments of this application, when the shooting scene is determined to be a stage scene, the brightness values of face detection or human body detection in the stage scene are combined to perform stage underexposure processing.
[0253] For example, for the face information (Face_Detection_Info.face_rect) detected in the stage scene, the average brightness of the face region is calculated (Face_Lum = avg(Image(Face_Detection_Info.face_rect))); or, for the human body region information (Pedestrian_Detection_Info.pedestrian_rect) detected in the stage scene, its average brightness is calculated (Pede_Lum = avg(Image(Pedestrian_Detection_Info.pedestrian_rect))); the difference between the above average brightness and the target brightness value of the stage scene (e.g., the target face brightness value Target_Face_Lum, or the target human body brightness value Target_Pede_Lum) is determined, and gradual exposure reduction processing is performed; by gradually reducing the exposure, the image quality of the image acquired in the stage scene can be improved.
[0254] For example, the process of progressively reducing exposure based on facial brightness values is illustrated; the progressive exposure reduction process includes the following steps:
[0255] if (Face_Lum > Target_Face_Lum)
[0256] if(Face_Lum / Target_Face_Lum>Lum_Ratio_Th1)then Decrease AE by Lux_Index_Step1;
[0257] Else if(Face_Lum / Target_Face_Lum>Lum_Ratio_Th2)then Decrease AE byLux_Index_Step2;
[0258] Else if(Face_Lum / Target_Face_Lum>Lum_Ratio_Th3)then Decrease AE byLux_Index_Step3;
[0259] Else Decrease AE by Lux_Index_Step4;
[0260] Among them, Lum_Ratio represents the brightness ratio; Lux_Index is mainly related to light intensity and illuminance, and is used to represent lighting conditions or as a performance index under lighting conditions.
[0261] For example, Lum_Ratio_Th1 is 1.3; Lum_Ratio_Th2 is 1.2; Lum_Ratio_Th3 is 1.1. Lux_Index_Step1 is 30; Lux_Index_Step2 is 20; Lux_Index_Step3 is 10; Lux_Index_Step4 is 5.
[0262] It should be understood that the 30, 20, and 10 mentioned above represent index values; these index values are the indexes of the exposure table; the larger the index value, the lower the illumination of the current shooting scene; the smaller the index value, the higher the illumination of the current shooting scene.
[0263] It should be understood that the process of gradually increasing exposure based on human body brightness values is similar to that described above; it will not be repeated here.
[0264] Furthermore, for stage scenes, the AI AWB algorithm can be used to optimize the images captured in the stage scene, improving the white balance and color performance of the captured images. In addition, for telephoto stage scenes, multi-frame super-resolution synthesis and other processing can be performed to ensure the image quality of the telephoto stage scenes.
[0265] For example, for a motion scene, i.e., Scene_ID = MOTION_SCENE, any existing motion scene algorithm can be used for image processing; this application does not impose any limitations on this.
[0266] For example, for HDR scenes, i.e., Scene_ID = HIGH_DYNAMIC_RANGE_SCENE, the algorithm mainly combines high dynamic range frame output and multi-exposure high dynamic range synthesis. When the user is prompted that it is a high dynamic range scene, if the user switches, high dynamic range data acquisition and high dynamic range fusion processing are performed.
[0267] For example, for portrait scenes, i.e., Scene_ID = PORTRAIT_SCENE, the main processing algorithm for portrait mode is adopted; for example, dual-camera depth estimation and monocular depth calculation are performed to obtain the depth and perform portrait blurring and other processing; optionally, the above-mentioned image processing algorithm for portrait mode can refer to existing portrait mode processing algorithms, which will not be elaborated in this application.
[0268] S209, Displays a preview interface of the current shooting mode.
[0269] For example, if no user interaction with the prompt control for the recommended shooting mode is detected, a preview interface for the current shooting mode can be displayed; that is, the captured image stream is processed by the image processing algorithm corresponding to the current shooting mode, and the preview interface is displayed.
[0270] Optionally, S205 provides examples of recommended shooting modes: stage shooting mode, sports shooting mode, portrait shooting mode, and HDR shooting mode. The shooting mode recommendation method provided in this application embodiment is also applicable to: document scenes, night scene scenes, moon scene scenes, snow scene scenes, fireworks scene scenes, sunset scene scenes, food scene scenes, blue sky scene scenes, flower scene scenes, green plant scene scenes, macro scene scenes, and wide-angle scene scenes, etc. Examples of the detection of the above scenes are described below.
[0271] For example, document scenarios include: document scanning scenarios and document extraction scenarios; if a document scenario is detected, the recommended shooting mode is document shooting mode.
[0272] For example, the conditions for entering document capture mode are:
[0273] if(Scene_Tag_Info==Scene_Tag_Words);
[0274] Among them, Scene_Tag_Info represents the scene identifier.
[0275] This can be understood as follows: if scene detection is performed on the image and the resulting scene identifier text is obtained, then the shooting scene is determined to be a document scene, i.e., Scene_ID = WORDS_SCENE; and the recommended shooting mode is determined to be the document shooting mode.
[0276] For a document scene, i.e., Scene_ID = WORDS_SCENE, the images captured in the document scene can be processed using intelligent algorithms in electronic device 100; where intelligent algorithms can refer to, for example, Figure 2 As shown in (c), after the electronic device 100 activates the smart control 14, the electronic device 100 executes the image processing algorithm.
[0277] For example, the conditions for entering night scene shooting mode are:
[0278] if(Scene_Tag_Info==Scene_Tag_Night&&Lux_Index>Stage_Scene_Th);
[0279] Among them, Scene_Tag_Info represents the scene identifier obtained from scene recognition; Lux_Index represents the scene brightness information.
[0280] For example, if the current shooting scene is determined to be a night scene based on the scene identifier and scene brightness information, i.e., Scene_ID = NIGHT_SCENE, then the recommended shooting mode is determined to be the night scene shooting mode. For the night scene shooting mode, the image is mainly processed through relevant algorithms; these algorithms include: multi-exposure frame extraction, multi-frame noise reduction, multi-exposure fusion, AI night scene brightening, and color adjustment algorithms.
[0281] It should be noted that the algorithms used in the above-mentioned night scene shooting mode can be any existing night scene mode algorithm, and this application does not impose any restrictions on them.
[0282] For example, the conditions for entering the moon shooting mode are:
[0283] if(Scene_Tag_Info==Scene_Tag_Moon&&Lux_Index>Stage_Scene_Th&&Zoomin_Info>Zoomin_Ratio_Th);
[0284] Among them, Scene_Tag_Info represents the scene identifier obtained from scene recognition; Lux_Index represents the scene brightness information; and Zoomin_Info represents the zoom ratio.
[0285] For example, if the current shooting scene is determined to be a lunar scene based on the scene identifier, scene brightness information, and zoom ratio (i.e., Scene_ID = MOON_SCENE), then the recommended shooting mode is determined to be the lunar shooting mode. For the lunar shooting mode, clear image information is primarily obtained through underexposure processing, and AI image processing is used to supplement the details and textures of the moon.
[0286] It should be noted that the aforementioned moon shooting mode can also refer to the moon shooting scene in the default shooting mode. That is, it can also automatically activate the relevant processing algorithms for the moon scene in the default shooting mode to process the image without user operation.
[0287] It should be understood that in order to confirm a snow scene, it is necessary to describe the conditions in combination with the characteristics of the snow scene; snow scenes are usually difficult to define by other means, so they are mainly determined by the labels of scene detection.
[0288] For example, the conditions for entering the snow scene shooting mode are:
[0289] if(Scene_Tag_Info==Scene_Tag_Snow);
[0290] Among them, Scene_Tag_Info represents the scene identifier obtained from scene recognition.
[0291] For example, if the current shooting scene is determined to be a snow scene based on the scene identifier, i.e., Scene_ID = SNOW_SCENE, then the recommended shooting mode is determined to be the snow scene shooting mode. In the snow scene shooting mode, underexposure due to excessive white components causes the captured snow scene image to appear grayish; this grayish image problem is improved by adjusting the exposure to increase the exposure.
[0292] For example, by pre-setting different scene brightness information (Lux_Index) and brightness ratios under histogram distributions, and combining the current scene brightness statistics, the corresponding brightness ratios can be increased.
[0293] if(Lux_Index2>Current_Lux_Index>Lux_Index1&&Image_Hist_Info.low_bin_cnt+Image_Hist_Info.min_bin_cnt)>Image_Hist_Snow_Th1),then Increase AE byLux_Index_Step1;
[0294] if(Lux_Index3>Current_Lux_Index>Lux_Index2&&Image_Hist_Info.low_bin_cnt+Image_Hist_Info.min_bin_cnt)>Image_Hist_Snow_Th2),then Increase AE byLux_Index_Step2;
[0295] if(Lux_Index4>Current_Lux_Index>Lux_Index3&&Image_Hist_Info.low_bin_cnt+Image_Hist_Info.min_bin_cnt)>Image_Hist_Snow_Th3),then Increase AE byLux_Index_Step3;
[0296] Lux_Index_Step1 is 10; Lux_Index_Step2 is 20; and Lux_Index_Step3 is 30.
[0297] It should be understood that the 10, 20, and 30 mentioned above represent index values; these index values are the indexes of the exposure table; the larger the index value, the lower the illumination of the current shooting scene; the smaller the index value, the higher the illumination of the current shooting scene.
[0298] It should be noted that the above-mentioned snow scene shooting mode can also refer to the snow scene shooting scene in the default shooting mode. That is, it can also automatically start the relevant processing algorithms of the snow scene in the default shooting mode to process the image without user operation.
[0299] It should be understood that in order to confirm the fireworks scene, it is necessary to describe the conditions in combination with the characteristics of the fireworks scene; fireworks scenes are relatively difficult to define by other means, so they are mainly determined by the label information of scene detection and the ambient brightness Lux_Index information.
[0300] For example, the conditions for entering the fireworks shooting mode are:
[0301] if(Scene_Tag_Info==Scene_Tag_Fireworks&&Lux_Index>Stage_Scene_Th);
[0302] Among them, Scene_Tag_Info represents the scene identifier obtained from scene recognition; Lux_Index represents the scene brightness information.
[0303] For example, if the current shooting scene is determined to be a fireworks scene based on the scene identifier and scene brightness information (i.e., Scene_ID = FIREWORKS_SCENE), then the recommended shooting mode is determined to be the fireworks shooting mode. In the fireworks shooting mode, due to overexposure caused by excessive black components in the fireworks scene and insufficient brightness caused by excessive fusion in the algorithm, the captured fireworks images suffer from a grayish appearance. This grayish image problem can be improved by adjusting the exposure to increase the exposure level.
[0304] For example, by pre-setting different scene brightness information (Lux_Index) and brightness ratios under histogram distribution, and combining the current scene brightness statistics, the corresponding brightness ratio can be increased.
[0305] if(Lux_Index2>Current_Lux_Index>Lux_Index1&&Image_Hist_Info.low_bin_cnt+Image_Hist_Info.min_bin_cnt)>Image_Hist_Snow_Th1),then Decrease AE byLux_Index_Step1;
[0306] if(Lux_Index3>Current_Lux_Index>Lux_Index2&&Image_Hist_Info.low_bin_cnt+Image_Hist_Info.min_bin_cnt)>Image_Hist_Snow_Th2),then Decrease AE byLux_Index_Step2;
[0307] if(Lux_Index4>Current_Lux_Index>Lux_Index3&&Image_Hist_Info.low_bin_cnt+Image_Hist_Info.min_bin_cnt)>Image_Hist_Snow_Th3),then Decrease AE byLux_Index_Step3;
[0308] Lux_Index_Step1 is 10; Lux_Index_Step2 is 20; and Lux_Index_Step3 is 30.
[0309] It should be understood that the 10, 20, and 30 mentioned above represent index values; these index values are the indexes of the exposure table; the larger the index value, the lower the illumination of the current shooting scene; the smaller the index value, the higher the illumination of the current shooting scene.
[0310] It should be noted that the above-mentioned fireworks shooting mode can also refer to the fireworks shooting scene in the default shooting mode. That is, it can also automatically activate the relevant processing algorithms of the fireworks scene in the default shooting mode to process the image without user operation.
[0311] It should be understood that in order to confirm sunrise and sunset scenes, it is necessary to combine the characteristics of sunrise and sunset scenes to describe the conditions. Sunrise and sunset scenes are relatively difficult to define in other ways, so they are mainly determined by the label information of scene detection and the ambient brightness Lux_Index information.
[0312] For example, the conditions for entering the sunset shooting mode are:
[0313] if(Scene_Tag_Info==Scene_Tag_Fireworks&&Lux_Index <Stage_Scene_Th);
[0314] Among them, Scene_Tag_Info represents the scene identifier obtained from scene recognition; Lux_Index represents the scene brightness information.
[0315] For example, if the current shooting scene is determined to be a sunset scene (sunrise or sunset scene) based on the scene identifier and scene brightness information, i.e., Scene_ID = SUN_SET_SUN_RISE_SCENE, then the recommended shooting mode is sunset shooting mode. For sunset shooting mode, the image captured in the sunset scene can be processed using an intelligent algorithm in the electronic device 100; where the intelligent algorithm can refer to, for example... Figure 2 As shown in (c), after the electronic device 100 activates the smart control 14, the electronic device 100 executes the image processing algorithm.
[0316] It should be noted that the aforementioned sunset shooting mode can also refer to the sunset shooting scene in the default shooting mode. That is, it can also automatically activate the relevant processing algorithms for the sunset scene in the default shooting mode to process the image without user operation.
[0317] It should be understood that in order to confirm the food scene, it is necessary to describe the conditions in combination with the characteristics of the food scene; food scenes are relatively difficult to define in other ways, so they are mainly determined by the label information of scene detection.
[0318] For example, the conditions for entering the food photography mode are:
[0319] if(Scene_Tag_Info==Scene_Tag_Food);
[0320] Among them, Scene_Tag_Info represents the scene identifier obtained from scene recognition.
[0321] For example, since food scenes are relatively difficult to define in other ways, they are mainly determined by scene detection label information. If the current shooting scene is determined to be a food shooting mode based on the scene identifier, i.e., Scene_ID = FOOD_SCENE, then the recommended shooting mode is determined to be the food shooting mode. For the food shooting mode, the images captured in the food scene can be processed by the intelligent algorithm in the electronic device 100; for example, the food image can be color adjusted by the intelligent algorithm to improve the color effect of the food image; where the intelligent algorithm can refer to, for example, the food image color adjustment processing. Figure 2 As shown in (c), after the electronic device 100 activates the smart control 14, the electronic device 100 executes the image processing algorithm.
[0322] It should be noted that the aforementioned food shooting mode can also refer to the food shooting scene in the default shooting mode. That is, it can also automatically activate the relevant processing algorithms of the food scene in the default shooting mode to process the image without user operation.
[0323] Alternatively, the blue sky shooting mode, flower shooting mode, and green plant shooting mode can be processed in a similar way to the food shooting mode mentioned above.
[0324] For example, the conditions for entering the blue sky shooting mode are:
[0325] if(Scene_Tag_Info==Scene_Tag_Sky).
[0326] For example, the conditions for entering the flower shooting mode are:
[0327] if(Scene_Tag_Info==Scene_Tag_Flowers).
[0328] For example, the conditions for entering the green plant photography mode are:
[0329] if(Scene_Tag_Info==Scene_Tag_Plants).
[0330] For example, since the aforementioned blue sky scene, flower scene, and green plant scene are difficult to define using other methods, they are mainly determined by the label information from scene detection. If the current shooting scene is determined to be a blue sky scene based on the scene identifier (Scene_ID = BLUESKY_SCENE), then the recommended shooting mode is determined to be the blue sky shooting mode. If the current shooting scene is determined to be a flower scene based on the scene identifier (Scene_ID = FLOWERS_SCENE), then the recommended shooting mode is determined to be the flower shooting mode. If the current shooting scene is determined to be a green plant scene based on the scene identifier (Scene_ID = PLANTS_SCENE), then the recommended shooting mode is determined to be the green plant shooting mode.
[0331] For the aforementioned blue sky shooting mode, flower shooting mode, and green plant shooting mode, the images captured in the blue sky scene can be processed using intelligent algorithms in the electronic device 100. For example, the blue sky image can be color-adjusted using intelligent algorithms to improve its color effect; or, flower images can be color-adjusted using intelligent algorithms to improve their color effect; or, green plant images can be color-adjusted using intelligent algorithms to improve their color effect.
[0332] In one implementation, an intelligent algorithm can refer to, for example... Figure 2 As shown in (c), after the electronic device 100 activates the smart control 14, the electronic device 100 executes the image processing algorithm.
[0333] It should be noted that the aforementioned blue sky shooting mode, flower shooting mode, and green plant shooting mode can also refer to the blue sky shooting scene, flower shooting scene, and green plant shooting scene in the default shooting mode. That is, the relevant processing algorithms of the above scenes in the default shooting mode can be automatically activated to process the image without user operation.
[0334] For example, to confirm macro shooting mode and wide-angle shooting mode, embodiments of this application can also obtain distance detection information (Distance_Measure_Info).
[0335] For example, distance detection information can be obtained through laser rangefinders or autofocus algorithms.
[0336] For example, the conditions for entering macro shooting mode are:
[0337] if(Distance_Measure_Info <Macro_Dist_Th);
[0338] For example, if the current shooting scene is determined to be a macro shooting scene based on distance detection information, i.e., Scene_ID = MACRO_SCENE, then the recommended shooting mode is determined to be macro shooting mode. For macro shooting mode, the electronic device 100 can switch the shooting mode by actively switching the focal length; for example, after sensing a macro scene, it can switch to a macro camera (or a macro mode based on telephoto).
[0339] For example, the distance detection information mentioned above can be detected by a time-of-flight (TOF) sensor in the electronic device 100; for example, the TOF sensor can calculate the distance based on emitting a light pulse and measuring the time required for the light to travel from emission to return to the receiver.
[0340] For example, the conditions for entering wide-angle shooting mode are:
[0341] if(Scene_Tag_Info==Scene_Ultrawide);
[0342] Among them, Scene_Tag_Info represents the scene identifier obtained from scene recognition.
[0343] For example, if the current shooting scene is determined to be a wide-angle shooting scene based on the scene identifier, i.e., Scene_ID = UW_SCENE, then the recommended shooting mode is determined to be the wide-angle shooting mode. For the wide-angle shooting mode, the electronic device 100 can actively switch the shooting mode by switching the focal length; for example, after sensing a wide-angle scene, it switches to the wide-angle camera to take pictures.
[0344] Table 2
[0345]
[0346]
[0347] As shown in Table 2, different shooting scenarios correspond to different recommendation types. For example, stage and portrait shooting scenarios use independent mode recommendations. Sports and high dynamic range (HDR) shooting scenarios use on / off mode recommendations. Snow, fireworks, sunset, food, and blue sky shooting scenarios use scene recommendations. The recommendation logic also differs for each shooting scenario. For example, for stage shooting scenarios, the recommendation logic is: mode recommendation; based on scene detection, human detection, and exposure detection algorithms. For sports shooting scenarios, the recommendation logic is: on / off mode recommendation; based on moving object detection and electronic device movement detection. For HDR shooting scenarios, the recommendation logic is: on / off mode recommendation; based on automatic HDR information. For portrait shooting scenarios, the recommendation logic is: mode recommendation; based on face detection information. For snow and fireworks shooting scenarios, the recommendation logic is: scene detection and scene recommendation. For sunset, food, and blue sky shooting scenarios, the recommendation logic is: scene recommendation. The logic of effects and algorithms differs depending on the shooting scenario. For example, for stage shooting scenarios, the logic includes Auto Exposure (AE), color, and optimized processing logic for the configured stage scene. For motion shooting scenarios, the logic includes motion mode processing logic. For high dynamic range (HDR) shooting scenarios, the logic includes automatic HDR processing logic. For portrait shooting scenarios, the logic includes portrait mode processing logic. For snow scene shooting scenarios, the logic includes AE and PQ effects for the configured snow scene; PQ typically refers to the overall visual quality of the image or video, including color, contrast, sharpness, and other aspects. For fireworks shooting scenarios, the logic includes AE or algorithm logic for the configured fireworks scene. For sunset shooting scenarios, the logic includes both AE and algorithm logic. For food photography and blue sky photography, the logic of the effects and algorithms includes AIQ; where AIQ refers to the process of using artificial intelligence technology to optimize image quality; AIQ includes, but is not limited to, image processing algorithms such as color optimization, contrast enhancement, sharpness enhancement, and noise reduction.
[0348] Optionally, one frame of image typically corresponds to a tag information (Scene_ID) for a shooting scene; if multiple tag information is detected for one frame of image based on the above S204 and S205, the highest priority tag information corresponding to the frame of image can be determined by the priority of the tag; the highest priority tag information is used as the tag of the frame of image.
[0349] For example, the priority of scene tags from high to low is as follows: macro > portrait > stage > sports > document scanning > text extraction > food > flowers > wide-angle > sunrise and sunset > moon > night scene > green plants > blue sky.
[0350] It should be understood that the priority of the above scene tags is obtained by taking into account the detection accuracy when performing scene detection in each scene and the priority and frequency of user use.
[0351] Optionally, the priority order of the above scene tags can also be adaptively adjusted according to the user's actual usage needs.
[0352] Alternatively, in one implementation, S204 can be executed directly after S202; in other words, it can also be executed even when the camera's intelligent shooting function is not enabled. Figure 10 Recommended method for the shooting mode shown.
[0353] In the embodiments of this application, the recommended shooting mode is determined jointly based on the image acquired by the image sensor and the metadata of the target sensor (e.g., a sensor for detecting the scene brightness of the shooting scene and a sensor for detecting the movement of the electronic device) when the electronic device acquires the image. Since the acquired image includes image information, and the target metadata of the electronic device includes perceptual information of the shooting scene in addition to image information, the electronic device can acquire more perceptual information of the shooting scene based on the acquired image and the metadata of the electronic device. With more perceptual information of the shooting scene, the electronic device can accurately identify the current shooting scene. Then, a target recommendation mode matching the current shooting scene is recommended. Through the above scheme, since more perceptual information of the shooting scene can be acquired, more shooting scenes can be identified. In more shooting scenes, a recommended shooting mode matching the shooting scene can be recommended to the user. In addition, in more shooting modes, the acquired image is processed using an image processing algorithm matching the shooting mode to improve the image quality.
[0354] Figure 11 This is a schematic diagram of the system structure of an electronic device 100 provided in an embodiment of this application.
[0355] A layered architecture divides the system into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the system is divided into five layers, from top to bottom: application layer, application framework layer, hardware abstraction layer, driver layer, and hardware layer.
[0356] The application layer may include a series of application packages. In this embodiment, the application package may include a camera application.
[0357] The application framework layer provides an Application Programming Interface (API) and programming framework for applications within the application layer. The application framework layer includes some predefined functions. In this embodiment, the application framework layer may include a camera access interface and a window manager; wherein, the camera access interface may include camera management and camera devices. The camera access interface is used to provide an API and programming framework for camera applications.
[0358] The Hardware Abstraction Layer (HAL) is an interface layer located between the application framework layer and the driver layer, providing a virtual hardware platform for the operating system. In this embodiment, the HAL may include a preprocessing module, an AI processing module, a switching module, and a path processing module. The preprocessing module includes a metadata acquisition module and a detection module. The metadata acquisition module acquires metadata from the electronic device. The detection module performs target detection processing on the acquired images. Target detection processing includes, but is not limited to, scene detection, face detection, human detection, motion detection, and brightness detection of the shooting scene. The AI processing module determines the current shooting scene identifier (i.e., Scene_ID in the above embodiment) based on the information acquired from the preprocessing module, thus determining the recommended shooting mode. The switching module uploads the current shooting scene identifier to the application layer. The application layer displays a prompt control for the recommended shooting mode in the user interface based on the acquired current shooting scene identifier. If a user operation on the prompt control for the recommended shooting mode is detected, the application layer sends a mode switching command to the switching module in the HAL. Upon receiving the mode switching command, the switching module sends the recommended shooting mode to the path processing module. The path processing module processes the acquired images based on the algorithm corresponding to the recommended shooting mode to generate a processed image.
[0359] Optionally, in embodiments of this application, the switching module can acquire real-time captured images in advance, thereby ensuring that the shooting mode can be switched in a timely manner after receiving the switching command.
[0360] Optionally, the processing algorithms in the above-mentioned path processing module include: image signal processor processing, post-processing and 3A algorithm processing, etc.; here, the path processing module can also be used to adjust the exposure of the image sensor in the next frame in the hardware layer.
[0361] For example, the aforementioned 3A algorithms include Auto Exposure (AE), Auto Focus (AF), and Auto White Balance (AWB). These three algorithms work together to ensure that the camera module can capture high-quality images under various lighting conditions.
[0362] For example, the preprocessing module described above can be used to perform... Figure 10 The relevant processing flow of S204; the AI processing module can be used to execute... Figure 10 The relevant processing flow of S205 is described below; the switching module can be used to execute the relevant processing flow of S207; these will not be elaborated here.
[0363] The driver layer is the layer between hardware and software. It includes drivers for various hardware components. Specifically, the driver layer can include image sensor drivers, gyroscope sensor drivers, and image signal processor drivers. The image sensor driver is used to drive the camera sensor to acquire images and to drive the image signal processor to preprocess the images. The image signal processor driver is used to drive the image signal processor to process the images.
[0364] The hardware layer includes various hardware devices in electronic devices; for example, the hardware layer includes image sensors, gyroscope sensors, and image signal processors.
[0365] It should be noted that the above example uses a gyroscope sensor; the hardware layer may also include other hardware for detecting the amount of movement of electronic devices; this application does not impose any limitations on this.
[0366] The recommended method in this application embodiment is described in detail below, taking into account the hardware and system architecture described above:
[0367] Step 1: Electronic device 100 turns on the camera module and displays the first preview interface.
[0368] In response to a user's action on the camera application icon (e.g., a click), the camera application calls the camera access interface in the application framework layer to launch itself. It then sends a command to launch the camera application by calling camera device 1 (the default, typically the main camera) in the camera hardware abstraction layer. The camera hardware abstraction layer forwards this command to the camera device driver in the driver layer. This driver can then activate the corresponding sensor (e.g., sensor 1) of camera device 1, which acquires image light signals. These signals are then transmitted to an image signal processor for preprocessing to obtain an image. This image is then transmitted back to the camera hardware abstraction layer via the camera device driver. The continuously generated images constitute an image stream; a first preview interface of the camera is displayed, showing the images acquired by the image sensor.
[0369] Step 2: Based on the acquired images and the target metadata of the electronic device, the electronic device 100 determines the target shooting mode.
[0370] For example, on one hand, the camera hardware abstraction layer can directly transmit images back to the camera application for display. On the other hand, the camera hardware abstraction layer can send images to the pre-processing module. The pre-processing module performs object detection processing on the image to obtain object detection results; and obtains metadata when the electronic device captures the image through the pre-processing module; and sends the metadata and object detection results to the AI processing module, which generates a target shooting mode matching the current shooting scene based on the object detection results and metadata.
[0371] Step 3: The electronic device 100 updates the content displayed on the screen and recommends a target shooting mode that matches the current shooting scene to the user.
[0372] For example, on one hand, a designated area of the camera application screen (e.g., a preview window) displays the image reported by the camera. On the other hand, the camera application can manage the various windows in the user interface through a window manager and update the content displayed in the windows; for example, taking the target shooting mode as stage mode, the electronic device 100 displays the first prompt control 26, or displays control 28, etc. The electronic device 100 can use the above controls to recommend shooting modes that match the current shooting scene to the user in real time.
[0373] Step 4: Electronic device 100 detects the user's operation of the prompt control (i.e., the first control) for the target shooting mode and displays the second preview interface.
[0374] For example, after the camera application in the application layer detects the operation of the prompt control for the target shooting mode, the camera application sends a switching command to the switching module in the hardware abstraction layer through the camera access interface; this causes the switching mode to send the identifier of the recommended shooting mode to the path processing module, which then processes the acquired image based on the algorithm corresponding to the recommended shooting mode to generate a processed image; and uploads the processed image to the camera application for display, that is, displays the second preview interface in the camera application.
[0375] Figure 12 This is a schematic diagram of the hardware structure of the electronic device 100 provided in the embodiments of this application.
[0376] Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, an audio module 170, a speaker 170A, a microphone 170C, a sensor module 180, a camera 193, and a display screen 194. The sensor module 180 includes a pressure sensor 180A, a gyroscope sensor 180B, an accelerometer sensor 180E, a proximity sensor 180F, a proximity light sensor 180G, a touch sensor 180K, an ambient light sensor 180L, etc.
[0377] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 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.
[0378] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0379] For example, processor 110 can perform Figure 10The recommended method for shooting modes shown or provided in the above embodiments of this application. For example, the processor 110 is configured to: in response to a click operation on a camera application in an electronic device, display a photo preview interface; in the photo preview interface, display a preview image captured by a first sensor (e.g., an image sensor) in the default shooting mode; jointly determine a target shooting mode matching the current shooting scene based on the preview image and target metadata of a second sensor (e.g., an ambient light sensor or a gyroscope sensor) when the electronic device captured the preview image; after determining the target shooting mode, display a control for the target shooting mode in the photo preview interface to facilitate guiding the user to activate the target shooting mode of the camera; in response to a click operation by the user on the control for the target shooting mode, switch the camera application to the target shooting mode, process the image currently captured by the first sensor using an algorithm corresponding to the target shooting mode, and generate a preview image of the target shooting mode; and display the preview image of the target shooting mode in the preview interface of the target shooting mode.
[0380] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0381] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0382] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an Inter-integrated circuit (I2C) interface, an Inter-integrated circuit sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI) interface, a General-Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface, etc.
[0383] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0384] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0385] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-oled, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, the electronic device may include one or N displays 194, where N is a positive integer greater than 1.
[0386] In this embodiment of the application, the image captured by the display camera and the preview image processed using the target shooting mode are displayed; for example, the image captured by the display camera are displayed. Figures 1 to 9 The user interface shown relies on the aforementioned GPU, display screen 194, and display functions provided by the application processor. Furthermore, display screen 194 also receives user input, such as selection commands from the user on display screen 194.
[0387] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0388] For example, an ISP can refer to, for instance, Figure 11 The image signal processor shown is part of the hardware layer.
[0389] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0390] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. 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, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0391] NPU stands for Neural Network (NN) computing processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0392] In this embodiment, the electronic device 100 implements the recommended shooting mode method provided in this embodiment; it first relies on the ISP and the image captured by the camera 193, and secondly on the video codec and the image computing and processing capabilities provided by the GPU. The electronic device 100 can implement neural network algorithms such as face recognition, human body recognition, and re-identification (ReID) through the computing power provided by the NPU.
[0393] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0394] In this embodiment, the code implementing the recommended method for the shooting mode described in this embodiment can be stored in non-volatile memory. When running the camera application, the electronic device 100 can load the executable code stored in the non-volatile memory into random access memory.
[0395] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions.
[0396] Electronic device 100 can implement audio functions such as music playback and recording through audio module 170, speaker 170A, microphone 170C, and application processor.
[0397] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music or make hands-free calls through speaker 170A.
[0398] In this embodiment, when the electronic device 100 activates the camera to capture images, it can simultaneously activate the microphone 170C to capture sound signals and convert the sound signals into electrical signals for storage. This allows the user to obtain video with sound.
[0399] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194.
[0400] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and causes the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization.
[0401] Accelerometer 180E detects the magnitude of acceleration of electronic device 100 in various directions (generally triaxial). When electronic device 100 is stationary, the magnitude and direction of gravity can be detected. Distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during scene capture, electronic device 100 can use distance sensor 180F to measure distance for rapid focusing. Proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. Electronic device 100 emits infrared light outward through the LED. Electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that an object is near electronic device 100. When insufficient reflected light is detected, electronic device 100 can determine that no object is near electronic device 100. Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the sensed ambient light brightness. Ambient light sensor 180L can also be used to automatically adjust white balance during photography.
[0402] In one implementation, in an embodiment of this application, the gyroscope sensor 180B and the accelerometer sensor 180E can be used to detect whether the electronic device 100 is moving; and to detect the amount of movement of the electronic device 100.
[0403] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0404] In this embodiment, the electronic device 100 can use the touch sensor 180K to detect user actions such as clicks on the display screen 194, in order to achieve... Figures 1 to 9 Recommended method for the shooting mode shown.
[0405] For example, Figure 12 The connections between the hardware components shown are merely illustrative and do not constitute a limitation on the connections between the hardware components of the electronic device 100. Alternatively, the hardware components of the electronic device 100 may employ other connection methods besides those described in the above embodiments.
[0406] It should be noted that, in the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0407] It should be understood that the methods, situations, categories, and classifications of embodiments in this application are for the convenience of description only and should not constitute a special limitation. Various methods, categories, situations, and features in embodiments can be combined with each other without contradiction.
[0408] It should also be understood that, in the description of this embodiment, unless otherwise stated, "multiple" means two or more. In the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0409] It should also be noted that in the embodiments of this application, "preset", "fixed value", etc. can be implemented by pre-saving the corresponding code, table or other means that can be used to indicate relevant information in the electronic device. This application does not limit the specific implementation method.
[0410] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware 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 in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0411] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0412] With each functional module corresponding to its respective function, the above embodiments illustrate a possible configuration of the electronic device. This electronic device may include a display unit, a detection unit, and a processing unit. The display unit, detection unit, and processing unit cooperate to support the electronic device in performing the aforementioned steps and / or other processes related to the technology described herein.
[0413] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0414] The electronic device provided in this embodiment is used to execute the recommended method of the above-described shooting mode, and therefore can achieve the same effect as the above-described implementation method.
[0415] When using integrated units, the electronic device may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the operation of the electronic device; for example, it can support the electronic device in executing the steps performed by the display unit, detection unit, and processing unit. The storage module can support the electronic device in executing stored program code and data. The communication module can support communication between the electronic device and other devices.
[0416] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of Digital Signal Processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
[0417] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment can be a device having... Figure 12 The electronic device shown has the following structure.
[0418] This embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the recommended method for shooting modes in the above embodiment.
[0419] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the recommended shooting mode method in the above embodiment.
[0420] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the recommended method of the shooting mode in the above method embodiments.
[0421] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0422] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0423] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0424] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0425] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0426] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0427] The above description is merely a specific embodiment of this application, but the specific embodiments of this application are not limited thereto. The scope of protection of this application shall be determined by the scope of protection of the claims. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the claims of this application shall be included within the scope of protection of this application.
Claims
1. A method of recommending a shooting mode, characterized by, The method comprises: displaying a first preview interface in response to a first operation on a camera application in an electronic device; wherein a first image is displayed in the first preview interface, and the first image is an image captured by a first sensor in the electronic device; determining a target shooting mode based on the first image and target metadata of the electronic device; wherein the target metadata of the electronic device is metadata of a second sensor in the electronic device when the first image is captured; and the target shooting mode is used to indicate a shooting mode matching a current shooting scene; displaying a first control in the first preview interface; wherein the first control is used to trigger the electronic device to shoot in the target shooting mode; displaying a second preview interface in response to a second operation on the first control; wherein a second image is displayed in the second preview interface, and the second image is an image obtained by processing an image currently captured by the first sensor in the target shooting mode.
2. The recommendation method of claim 1, wherein, The target metadata comprises first metadata and second metadata; and the determining of the target shooting mode based on the first image and the target metadata of the electronic device comprises: determining a scene brightness of a shooting scene in which the electronic device is located based on the first metadata; wherein the first metadata is used to indicate the scene brightness of the shooting scene; if the scene identification of the first image is a stage scene, the shooting scene comprises a face region or a body region, and the scene brightness is less than or equal to a first preset brightness threshold, determining that the target shooting mode is a stage mode; if the motion amount of a shooting object in the shooting scene is detected to be greater than a preset motion amount, the scene brightness is greater than the first preset brightness threshold, and the second metadata indicates that the movement amount of the electronic device is less than a preset movement amount, determining that the target shooting mode is a motion mode.
3. The recommendation method according to claim 2, characterized in that, If the target shooting mode is the stage mode, the method further comprises: displaying a first icon in the second preview interface; wherein the first icon is used to indicate the stage mode.
4. The recommendation method according to claim 3, characterized in that, The first icon comprises a second control, and the method further comprises: detecting a third operation on the second control; in response to the third operation, the electronic device exits the stage mode.
5. The recommendation method of claim 2, wherein, If the target shooting mode is the stage mode, the method further comprises: determining a target brightness value of a target region in the currently captured image; wherein the target brightness value is used to represent the average brightness of the target region; and the target region is the face region or the body region; performing a drop exposure processing on the currently captured image based on the target brightness value and a preset stage brightness value to generate the second image.
6. The recommendation method of claim 5, wherein, The performing of the drop exposure processing on the currently captured image based on the target brightness value and the preset stage brightness value to generate the second image comprises: if the ratio of the target brightness value to the preset stage brightness value is greater than a first brightness ratio threshold, a first preset value is used to perform the drop exposure processing on the currently captured image to generate the second image; If a ratio of the target brightness value and the preset stage brightness value is greater than a second brightness ratio threshold, a second preset value is used to perform the exposure reduction processing on the currently captured image to generate the second image; If a ratio of the target brightness value and the preset stage brightness value is greater than a third brightness ratio threshold, a third preset value is used to perform the exposure reduction processing on the currently captured image to generate the second image; The first brightness ratio threshold is greater than the second brightness ratio threshold, and the second brightness ratio threshold is greater than the third brightness ratio threshold; the first preset value is greater than the second preset value, and the second preset value is greater than the third preset value.
7. The recommendation method of claim 2, wherein, The third control is displayed in the first preview interface, and the third control is in a closed state; the third control is used to control the motion mode to be turned on or turned off. The second preview interface is displayed in response to the second operation on the first control, including: If the target shooting mode is the motion mode, the second preview interface is displayed in response to the second operation on the first control; the third control is displayed in the second preview interface, and the third control is in an open state.
8. The recommendation method of claim 2, wherein, The first metadata includes metadata of an ambient light sensor; and / or, the second metadata includes metadata of a gyroscope sensor.
9. The recommendation method of claim 1, if the first image is an i-th frame image; the target shooting mode is determined based on the first image and target metadata of the electronic device, including: n frame images before the i-th frame image are obtained; wherein the shooting modes of the n frame images are obtained based on the n frame images and the target metadata corresponding to the n frame images; an initial shooting mode of the i-th frame image is obtained based on the i-th frame image and the target metadata corresponding to the i-th frame image; the target shooting mode of the i-th frame image is determined based on the shooting modes corresponding to the n frame images and the initial shooting mode of the i-th frame image.
10. The recommendation method of claim 9, wherein, Further comprising: if the target shooting mode of the i-th frame image is a first shooting mode, and the target shooting mode of the i-1-th frame image is a second shooting mode, a cumulative number of the first shooting mode is determined; wherein the first shooting mode is different from the second shooting mode; if the cumulative number is greater than a preset number threshold, it is determined that the current target shooting mode of the camera application is the first shooting mode.
11. The recommendation method of claim 1, wherein, The first control is displayed in the first preview interface, including: the first control is displayed in the first preview interface through a target dynamic effect; or, a first prompt box is displayed in the first preview interface; wherein the first prompt box includes the first control and prompt information of a function corresponding to the first control.
12. The recommendation method of claim 1, wherein, Further comprising: if the second operation on the first control is not detected, the first preview interface is displayed.
13. The recommendation method of any one of claims 1 to 12, characterized in that, The first preview interface is a photographing preview interface, or the first preview interface is a video recording preview interface.
14. An electronic device, comprising: including: one or more processors, a memory, a display screen, a first sensor, and a second sensor; the memory, the display screen, the first sensor, the second sensor, and the one or more processors are coupled, the memory is configured to store computer program code including computer instructions, the display screen is configured to display a preview interface; the first sensor is configured to collect an image; the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the recommendation method of any one of claims 1 to 13.
15. A chip system, characterized by The chip system is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to cause the electronic device to perform the recommendation method of any one of claims 1 to 13.
16. A computer readable storage medium characterized by: The computer readable storage medium stores a computer program, when the computer program is executed by an electronic device, causes the electronic device to perform the recommendation method of any one of claims 1 to 13.
Citation Information
Patent Citations
Photographing mode switching method and mobile terminal
CN105979157A
Shooting method and mobile terminal
CN107580184A
Shooting method and equipment
CN113497890A
Video recording method and device and electronic equipment
CN114598819A
Shooting mode recommendation method
CN115883957A