Shooting mode recommendation method
This application provides a shooting mode recommendation method. The method may be applied to an electronic device, such as a digital camera or a mobile phone, that can provide a shooting service by using a camera. Through the method, the electronic device may obtain each frame of image generated by the camera in real time, and determine feature information of each frame of image. The electronic device may determine, based on the feature information of the image, a shooting scene in which a user is currently located, and then determine a shooting mode that is most adapted to a current shooting scene. Then the electronic device may display a recommendation tag corresponding to a currently recommended shooting mode in a shooting interface.
1 . A shooting mode recommendation method, applied to an electronic device comprising a camera, wherein the method comprises:
displaying a first preview interface, wherein the first preview interface comprises a first preview window, and the first preview window is configured to display an image captured by the camera in real time;
capturing one or more images through the camera in a first time period;
determining a first shooting mode based on the one or more images captured in the first time period;
displaying a first control in the first preview interface, wherein the first control is configured to trigger the electronic device to perform video recording in the first shooting mode; and
if a first operation for the first control is not detected within a first preset time,
displaying the first preview window, and skipping displaying the first control; or
if a first operation for the first control is detected within first preset time,
displaying a second preview interface in response to the first operation, wherein the second preview interface comprises a second preview window, the second preview window is configured to display a first image, and the first image is an image obtained by processing an image captured by the camera in real time in the first shooting mode,
wherein after displaying the first preview window, and skipping displaying the first control, the method further comprises:
capturing one or more images through the camera in a second time period, wherein the second time period is different from the first time period;
determining a second shooting mode based on the one or more images captured in the second time period;
displaying a second control in the first preview interface, wherein the second control is configured to trigger the electronic device to perform video recording in the second shooting mode, and the second shooting mode is different from the first shooting mode; and
if a second operation for the second control is not detected within a second preset time,
displaying the first preview window, and skipping displaying the second control; or
if a second operation for the second control is detected within second preset time,
displaying a third preview interface in response to the second operation, wherein the third preview interface comprises a third preview window, the third preview window is configured to display a second image, and the second image is an image obtained by processing an image captured by the camera in real time in the second shooting mode.
2 . The method according to claim 1 , wherein after the displaying a first control in the first preview interface, the method further comprises:
determining, based on one or more images captured in a third time period, that a matching condition of the first shooting mode is not satisfied; and no longer displaying the first control, wherein the third time period is after the first time period, and the third time period is within the first preset time.
3 . The method according to claim 2 , wherein before the no longer displaying the first control, the method further comprises: determining that the one or more images captured in the third time period satisfy an exit condition of the first shooting mode, wherein the exit condition is mutually exclusive but not opposite to the matching condition.
4 . The method according to claim 2 , wherein the second time period is before the third time period, and the displaying a second control in the first preview interface specifically comprises:
displaying the second control and the first control in the first preview interface.
5 . The method according to claim 4 , wherein the method further comprises:
detecting a third operation for the first control and the second control; and
displaying a fourth preview interface in response to the third operation, wherein the fourth preview interface comprises a fourth preview window and a fifth preview window, the fourth preview window is configured to display the first image, and the fifth preview window is configured to display the second image.
6 . The method according to claim 1 , wherein the determining a first shooting mode based on the one or more images captured in the first time period specifically comprises:
determining the first shooting mode when the one or more images captured in the first time period satisfy both the matching condition of the first shooting mode and a matching condition of a third shooting mode, and a priority of the first shooting mode is higher than a priority of the third shooting mode.
7 . The method according to claim 1 , wherein the first preview interface is a photograph preview interface or a recorded video preview interface.
8 . The method according to claim 1 , wherein the first shooting mode is any one of the following plurality of shooting modes: a macro mode, a night scene mode, a portrait mode, a high dynamic range mode, a protagonist mode, or a multi-lens mode; and the second shooting mode is any one of the following plurality of shooting modes: the macro mode, the night scene mode, the portrait mode, the high dynamic range mode, the protagonist mode, or the multi-lens mode.
9 . The method according to claim 8 , wherein
when the first shooting mode is the macro mode, the determining a first shooting mode based on the one or more images captured in the first time period is specifically:
determining object distances of the one or more images captured in the first time period; and
determining, based on that each of the object distances is less than a preset value, that the first shooting mode is the macro mode.
10 . The method according to claim 8 , wherein
when the first shooting mode is the night scene mode, the determining a first shooting mode based on the one or more images captured in the first time period is specifically:
determining illuminance of the one or more images captured in the first time period; and
determining, based on that the illuminance is less than a preset value, that the first shooting mode is the night scene mode.
11 . The method according to claim 8 , wherein
when the first shooting mode is the portrait mode, the determining a first shooting mode based on the one or more images captured in the first time period is specifically:
determining object information of each image of the one or more images captured in the first time period; and
determining that the first shooting mode is the portrait mode when the object information of each image indicates that each image comprises a portrait, and a portrait area is greater than a preset value.
12 . The method according to claim 8 , wherein
when the first shooting mode is the high dynamic range mode, the determining a first shooting mode based on the one or more images captured in the first time period is specifically:
determining exposure proportions of the one or more images captured in the first time period; and
determining that the first shooting mode is the high dynamic range mode when each of the exposure proportions is greater than a preset value.
13 . An electronic device, comprising one or more processors and one or more memories, wherein the one or more memories are coupled to the one or more processors, the one or more memories are configured to store computer program code, the computer program code comprises computer instructions, and when the one or more processors execute the computer instructions, the method according to claim 1 is performed.
14 . A shooting mode recommendation method, applied to an electronic device comprising a camera, wherein the method comprises:
displaying a first preview interface, wherein the first preview interface comprises a first preview window, and the first preview window is configured to display an image captured by the camera in real time;
capturing one or more images through the camera in a first time period;
determining a first shooting mode based on the one or more images captured in the first time period;
displaying a first control in the first preview interface, wherein the first control is configured to trigger the electronic device to perform video recording in the first shooting mode;
capturing one or more images through the camera in a second time period;
determining a second shooting mode based on the one or more images captured in the second time period;
displaying a second control in the first preview interface, wherein the second control is configured to trigger the electronic device to perform video recording in the second shooting mode, and the second shooting mode is different from the first shooting mode;
determining another shooting mode based on one or more images captured by the camera in another time period;
displaying another control in the first preview interface, wherein the another control is configured to trigger the electronic device to perform video recording in the another shooting mode, and the another shooting mode is different from the first shooting mode, and is also different from the second shooting mode;
detecting a third operation for the first control, the second control, or the another control;
displaying a fourth preview interface in response to the third operation, wherein the fourth preview interface comprises a fourth preview window and a fifth preview window, the fourth preview window and the fifth preview window are displayed in a tiled manner, and a sum of display areas of the fourth preview window and the fifth preview window is equal to a display area of the first preview window;
the fourth preview window is configured to display a first image, and the first image is an image obtained by processing an image captured by the camera in real time in the first shooting mode; and
the fifth preview window is configured to display a second image, and the second image is an image obtained by processing an image captured by the camera in real time in the second shooting mode;
detecting an operation for the fourth preview window, and displaying a second preview interface in response to the operation, wherein the second preview interface comprises a second preview window, a display area of the second preview window is equal to the display area of the first preview window, and the second preview window is configured to display the first image; and
detecting an operation for a shooting control in the second preview interface, and starting video recording in response to the operation.
15 . The method according to claim 14 , wherein the method further comprises:
if a first operation for the first control is not detected within a first preset time, no longer displaying the first control; and
if a second operation for the second control is not detected within a second preset time, no longer displaying the second control.
16 . The method according to claim 15 , wherein after the displaying a first control in the first preview interface, the method further comprises:
determining, based on one or more images captured in a third time period, that a matching condition of the first shooting mode is not satisfied; and no longer displaying the first control, wherein the third time period is after the first time period, and the third time period is within the first preset time.
17 . The method according to claim 16 , wherein before the no longer displaying the first control, the method further comprises: determining that the one or more images captured in the third time period satisfy an exit condition of the first shooting mode, wherein the exit condition is mutually exclusive but not opposite to the matching condition.
18 . The method according to claim 14 , wherein the first preview interface is a recorded video preview interface.
19 . The method according to claim 14 , wherein the first shooting mode is any one of the following plurality of shooting modes: a macro mode, a night scene mode, a portrait mode, a high dynamic range mode, a protagonist mode, or a multi-lens mode; and the second shooting mode is any one of the following plurality of shooting modes: the macro mode, the night scene mode, the portrait mode, the high dynamic range mode, the protagonist mode, or the multi-lens mode.