Shooting method, electronic equipment and storage medium
By using a specific form of focus frame in the shooting interface of an electronic device to distinguish moving objects from non-moving objects, the problem of difficult to effectively distinguish and indicate moving objects in the prior art is solved, and the user's shooting experience and accuracy are improved.
Patent Information
- Application Number
- CN202410039848.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-08
- Filing Date
- 2024-01-10
- Publication Date
- 2025-05-16
AI Technical Summary
When the shooting function of existing electronic devices is difficult to effectively distinguish and indicate the moving object from the non-moving object when processing moving objects, resulting in poor user shooting experience.
Moving objects and non-motion objects are indicated by displaying a focus frame with a specific display shape in the shooting interface. In the motion focus mode, a focus frame that follows the moving object is displayed. In the subject focus mode, a focus frame used to indicate the shooting object is displayed. The shape of the focus frame is different from that in the motion focus mode.
Improves the recognition and experience of users when shooting moving objects. With clear focus frame prompts, users can easily distinguish and capture moving objects, improving the accuracy and satisfaction of shooting.
Smart Images

Figure CN120017962A_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on November 8, 2023, with application number 202311487147.3 and invention name “A capture method and electronic device”, all contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a shooting method, an electronic device and a storage medium. Background Art
[0003] With the development of electronic devices, more and more functions are provided by electronic devices. The shooting function is one of the frequently used functions in electronic devices. Users can use the shooting function of electronic devices to shoot and obtain images or videos. As people's demand for the shooting effect of electronic devices continues to increase, the shooting functions of electronic devices are becoming more and more abundant. The shooting function of electronic devices has a variety of shooting modes. For example, shooting modes such as portrait mode and night scene mode.
[0004] However, the shooting functions currently provided by electronic devices are not perfect enough and cannot meet users' shooting needs in some scenarios. Summary of the invention
[0005] The present application provides a shooting method, an electronic device and a storage medium, which are used to indicate moving objects and non-moving objects through focus frames of different display forms during the shooting process, thereby improving the user's shooting experience.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, a shooting method is provided, the method comprising: receiving a first operation, the first operation being used to instruct to turn on a shooting function of a target application, the target application comprising a motion focus mode and a subject focus mode. In response to the first operation, a shooting interface of the target application is displayed, the shooting interface comprising a preview window, the preview window being used to display image frames captured by the electronic device. If the target application is in a motion focus mode, then after a moving object is detected, a first focus frame that follows the movement of the moving object is displayed in the shooting interface, the first focus frame comprising a plurality of sub-frames, and the plurality of sub-frames of the first focus frame cover a display area corresponding to the moving object. If the target application is in a subject focus mode, then after a shooting object is detected, a second focus frame for indicating the shooting object is displayed in the shooting interface, and the display form of the second focus frame is different from that of the first focus frame.
[0008] Through the above method, the electronic device can automatically focus on the moving object, and prompt the user of the current focus subject through the focus frame, so as to meet the user's needs for shooting the moving object. The electronic device indicates the moving object through a focus frame with a specific display form, and prompts the user of the detected moving object through a focus frame with a specific display form. The user can distinguish whether the focus subject is a moving object or a non-moving object through the focus frame, so as to meet the user's needs for shooting the moving object and improve the user experience. At the same time, the electronic device prompts the moving object of the focus subject in the shooting interface through the first focus frame formed by multiple sub-frames, which can improve the recognition of the moving object, thereby better prompting the user of the moving object in the shooting interface and improving the user's shooting experience.
[0009] In a possible implementation of the first aspect, the position of the first focus frame at the first moment is predicted based on the position of the moving object before the first moment. In this way, even when the moving object moves faster than the moving object, the focus frame provided by the electronic device can accurately indicate the moving object, thereby reducing the situation where the focus frame is separated from the moving object and improving the user experience.
[0010] In another possible implementation of the first aspect, if the moving object includes a face, the multiple sub-frames of the first focus frame cover other display areas other than the face of the moving object. In this implementation, the first focus frame displayed by the electronic device in the shooting interface avoids the face, thereby providing the user with a clear and unobstructed face and improving the user experience.
[0011] In another possible implementation of the first aspect, the number of the plurality of sub-frames in the first focus frame is less than a preset number, the preset number is different under different aspect ratios, and the aspect ratio is used to indicate the aspect ratio of the preview window. In this implementation, the maximum number of sub-frames included in the first focus frame displayed by the electronic device varies adaptively with the aspect ratio.
[0012] In another possible implementation of the first aspect, the first focus frame is in an irregular shape. In this implementation, the first focus frame displayed by the electronic device can present a variety of irregular shapes to provide a better visual experience for the user.
[0013] In another possible implementation of the first aspect, the shape of the first focus frame corresponds to the shape of the moving object. In this implementation, the electronic device can adaptively adjust the shape of the first focus frame according to the shape of the moving object to provide a better visual experience for the user.
[0014] In another possible implementation of the first aspect, the electronic device displays a function setting window in the shooting interface, and if the target application is in a motion focus mode, the function setting window includes a function key for the motion focus mode. If the target application is in a subject focus mode, the function setting window includes a function key for the subject focus mode. In this implementation, the electronic device can prompt the focus mode of the target application through the function setting window to provide convenience for the user.
[0015] In another possible implementation of the first aspect, in response to a third operation of the user in the function setting window, a function key for the motion focus mode and a function key for the subject focus mode are displayed in the function setting window. If the target application is in the motion focus mode, in response to a user operation in which the user selects the function key for the subject focus mode, the target application is switched to the subject focus mode. If the target application is in the subject focus mode, in response to a user operation in which the user selects the function key for the motion focus mode, the target application is switched to the motion focus mode.
[0016] In this implementation, the user can switch between the motion focus mode and the subject focus mode through the function key of the motion focus mode and the function key of the subject focus mode displayed in the function setting window, thereby meeting the user's shooting needs.
[0017] In another possible implementation of the first aspect, the shooting interface also includes a capture mode control. If the capture mode control is turned on, the target application uses the motion focus mode for focusing. If the capture mode control is turned off, the target application uses the subject focus mode for focusing. Of course, the user can also set the combination of the capture mode and the focus mode according to their own preferences or shooting needs. For example, when the capture mode control is turned on, the subject focus mode is selected. When the capture mode control is turned off, the motion focus mode is selected.
[0018] In another possible implementation of the first aspect, after a first focus frame that follows the movement of a moving object is displayed in a shooting interface, if a third operation acting on the target object is received, a third focus frame is displayed in the shooting interface in response to the third operation, and the third focus frame is used to prompt that the focus subject of the electronic device is the target object, and the display form of the third focus frame is different from that of the first focus frame.
[0019] The target object may be different from the moving object. For example, after the electronic device marks the moving object with the first focus frame in the shooting interface, it receives a user operation of the user clicking on other objects. The electronic device then performs tracking focus on the other objects clicked by the user, cancels the first focus frame, displays the third focus frame, and prompts the tracking subject through the third focus frame. Tracking focus can be understood as tracking focus. The target object may also be the same as the moving object, that is, the target object is the moving object. For example, after the electronic device marks the moving object with the first focus frame in the shooting interface, it receives a user operation of the user clicking on the moving object. The electronic device cancels the first focus frame and prompts the tracking subject to be the moving object through the second focus frame. The display form of the third focus frame is different from that of the first focus frame, so that the electronic device can respond to user operations by changing the display form of the focus frame.
[0020] In another possible implementation of the first aspect, in motion focus mode, the electronic device prioritizes focusing on a moving object. In motion focus mode, the priority order of the focus subject is: object indicated by user operation (which may be referred to as a manual trigger object) > moving object > registered face > non-registered face > human body > cat = dog. For example, if in motion focus mode, the electronic device does not detect a moving object, but detects a face, and the face is a registered face, the electronic device focuses on the registered face. A focus frame is displayed in the display area for registered face focus, such as a yellow frame with double lines.
[0021] In another possible implementation of the first aspect, if the target application is in subject focus mode, then after at least one face is detected in the image frame, at least one detection frame is displayed in the shooting interface; each detection frame is used to indicate a face; after a first preset time period, at least one detection frame is canceled; if the at least one face includes a registered face, a second focus frame is displayed in the shooting interface, and the second focus frame is used to indicate a registered face, wherein the display form of the second focus frame is different from the display form of the detection frame.
[0022] In this way, the electronic device can highlight the registered face through the second focus frame, and the user can quickly confirm the focus subject, thereby improving the user's shooting experience.
[0023] In another possible implementation of the first aspect, in the subject focus mode, if a fourth operation acting on a target face is received, in response to the fourth operation, a fourth focus frame is displayed on the shooting interface, and the fourth focus frame is used to indicate the target face. In the subject focus mode, the priority order of the focus subject is: the object indicated by the user operation (which may be referred to as the manual trigger object)>registered face>unregistered face>human body>cat=dog.
[0024] In this way, the electronic device can indicate non-registered faces through the fourth focus frame, and the user can quickly confirm the focus subject, thereby improving the user's shooting experience.
[0025] In another possible implementation of the first aspect, a fourth focus frame is displayed in a shooting interface, including: if the target face is an unregistered face, a fourth focus frame in a first display form is displayed in the shooting interface; if the target face is a registered face, a fourth focus frame in a second display form is displayed in the shooting interface; wherein the first display form and the second display form are different.
[0026] In this implementation, the electronic device sets focus frames of different display forms for registered faces and unregistered faces, thereby prompting the user whether the current focus subject is a registered face or an unregistered face through the focus frames of different display forms.
[0027] In a second aspect, the present application provides an electronic device, comprising: a memory, a display screen, and a processor; the memory and the display screen are respectively coupled to the processor. The display screen is used to display image data. The memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the method described in the first aspect and any possible implementation thereof.
[0028] In a third aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation thereof.
[0029] In a fourth aspect, the present application provides a computer program product including program instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect and any possible implementation thereof. For example, the computer may be the electronic device described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A hardware structure block diagram of a mobile phone 100, an example of an electronic device provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of an interface for setting a focus mode provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of switching a subject focus mode to a motion focus mode provided in an embodiment of the present application;
[0033] Figure 4 A flowchart of a shooting method provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of a shooting interface provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of a first focusing frame provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of another first focusing frame provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of a preview window in different aspect ratios provided by an embodiment of the present application;
[0038] Fig. 9 A schematic diagram of another first focusing frame provided in an embodiment of the present application;
[0039] Fig.10 A schematic diagram of a focus frame switching provided in an embodiment of the present application;
[0040] Fig.11 A schematic diagram of a focus frame display process provided by an embodiment of the present application;
[0041] Fig.12 A schematic diagram of changing a focus subject under the influence of a user operation provided in an embodiment of the present application;
[0042] Fig.13 A schematic diagram of a focus frame of a non-registered face and a registered face provided in an embodiment of the present application;
[0043] Fig.14 A schematic diagram of a focus frame for a non-face object and a focus frame for an unrecognizable object provided in an embodiment of the present application;
[0044] Fig.15 A schematic diagram of an intelligent focus tracking switch and a snapshot mode switch provided in an embodiment of the present application;
[0045] Fig.16 A schematic diagram of turning on and off the HDR shooting mode provided in an embodiment of the present application;
[0046] Fig.17 A schematic diagram of a portrait mode provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to meet the shooting needs of users, electronic devices are equipped with shooting functions. As electronic devices become smaller and more portable, users can shoot anytime and anywhere through electronic devices with shooting functions. As a result, users have higher and higher requirements for shooting functions.
[0048] Faced with users' increasingly high demands for shooting functions, electronic devices provide a variety of shooting modes such as portrait mode, night scene mode, and high dynamic range (HDR) mode to meet users' diverse shooting needs. However, at present, the shooting solution for moving objects is not perfect. The electronic device displays the shooting screen through the shooting interface, and prompts the user with the current focus subject with a focus frame in the shooting interface. In the related art, the focus frame is displayed in the form of a rectangular frame. It is difficult for users to distinguish the focus subject through the focus frame, thereby reducing the user experience.
[0049] In view of this, an embodiment of the present application provides a shooting method for improving the shooting scheme for moving objects. Specifically, the target application of the electronic device is provided with a motion focus mode and a subject focus mode. In the motion focus mode, the electronic device can prioritize the automatic focus on the moving object. In the subject focus mode, the electronic device can prioritize the automatic focus on the face.
[0050] The electronic device opens the target application under the control of the user and displays the shooting interface of the target application. The shooting interface includes a preview window for displaying the image frames captured by the electronic device, and the user can preview the scene captured by the electronic device through the preview window. If the target application is in motion focus mode, the electronic device will detect a moving object in the captured image frame and display a focus frame (which may be referred to as a first focus frame) that follows the movement of the moving object in the shooting interface. The first focus frame includes multiple sub-frames, and the multiple sub-frames in the first focus frame cover the display area corresponding to the moving object, so that the moving object is indicated by the first focus frame. If the target application is in subject focus mode, after the shooting object is detected, a focus frame (which may be referred to as a second focus frame) for indicating the shooting object is displayed in the shooting interface, and the display form of the second focus frame is different from that of the first focus frame.
[0051] Through the above method, the electronic device can indicate a moving object through a focus frame with a specific display form, and prompt the user of the detected moving object through the focus frame. The user can use the focus frame to distinguish whether the focused subject is a moving object or a non-moving object, thereby meeting the user's needs for shooting moving objects and improving the user experience.
[0052] In some implementations, the position of the focus frame of the moving object at the current moment is predicted based on the position of the moving object before the current moment. Even when the moving object moves quickly, the focus frame provided by the electronic device can accurately indicate the moving object, reduce the separation of the focus frame and the moving object, and improve the user experience.
[0053] For example, the electronic device described in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, a media player, a wearable device, etc. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0054] In the embodiment of the present application, the electronic device is a mobile phone 100 as an example, and the hardware structure of the electronic device is introduced through the mobile phone 100. Figure 1 As shown, the mobile phone 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0055] Among them, the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (neural-network processing unit, NPU), a driver processor, etc. Among them, different processing units can be independent devices or integrated in one or more processors. The processor 110 can be the nerve center and command center of the mobile phone 100. The processor 110 can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0056] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0057] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, the electronic device saves the captured image in the external memory card.
[0058] The internal memory 121 may be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 may execute the instructions stored in the internal memory 121, and the internal memory 121 may include a program storage area and a data storage area.
[0059] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. In some embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0060] The sensor module 180 may include sensors such as a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a Hall sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor. The mobile phone 100 may collect various data through the sensor module 180. For example, the mobile phone 100 collects touch data through the touch sensor in the sensor module 180, so that the mobile phone 100 recognizes user operations through the touch data.
[0061] The mobile phone 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0062] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), MiniLED, MicroLED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. For example, the mobile phone 100 displays a camera interface, a captured image, etc. through the display screen 194.
[0063] In some implementations, the touch sensor may be disposed in the display screen 194, and the touch sensor and the display panel may form a touch screen, also known as a "touch screen". The touch sensor, also known as a "touch panel", is used to detect touch operations on or near it, such as click operations, sliding operations, etc. The touch sensor may transmit the detected touch operations to the application processor to determine the type of touch event. The mobile phone 100 may provide visual output related to the touch operation through the display screen 194.
[0064] The mobile phone 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0065] The ISP is used to process the data fed back by the camera 193. For example, when the mobile phone 100 is shooting, the shutter of the camera is opened, and the light is transmitted to the camera photosensitive element through the lens. The camera photosensitive element converts the light signal into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the human eye. The ISP can also perform algorithm optimization on the noise, brightness, and color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0066] The camera 193 is used to capture static or dynamic images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile phone 100 may include one or more cameras 193, such as the mobile phone 100 includes a front camera and a rear camera.
[0067] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also include more or fewer modules than those provided in the above embodiments, and the modules may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods. The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure.
[0068] The following takes the electronic device as a mobile phone 100 as an example to introduce the method provided by an embodiment of the present application. The target application of the mobile phone 100 includes a motion focus mode and a subject focus mode. In some implementations, after the mobile phone 100 starts the shooting function, the mobile phone 100 is in the motion focus mode by default. Alternatively, after the mobile phone 100 starts the shooting function, it is in other focus modes by default, such as the subject focus priority mode. The shooting interface of the target application is provided with a function key for the motion focus mode and a function key for the subject focus mode. The user can select a focus mode according to actual shooting needs and shooting scenes. For example, the electronic device displays a function setting window in the shooting interface of the target application, and the function setting window includes a function key for the motion focus mode. When the function key for the motion focus mode is in a selected state, the target application is in the motion focus mode.
[0069] For example, Figure 2As shown, a pull-up function key is provided at the bottom of the shooting interface. If the mobile phone 100 receives a user operation of clicking or sliding up the pull-up function key (an example of the second operation), the mobile phone 100 pops up a function bar (or a function setting window) in the shooting interface. A function key for the focus mode is provided in the function bar. If the mobile phone 100 receives a user click operation on the function key for the focus mode (an example of the third operation), the mobile phone 100 displays a function key for the motion focus mode (such as "motion focus priority") and a function key for the subject focus mode (such as "subject focus priority") in the function bar. If the mobile phone 100 receives a user operation of selecting the function key for the motion focus mode, the mobile phone 100 sets the focus mode of the shooting function to the motion focus mode. If the mobile phone 100 receives a user operation of selecting the function key for the subject focus mode, the mobile phone 100 sets the focus mode of the shooting function to the subject focus mode.
[0070] In some examples, the mobile phone 100 may record the focus mode set by the user. When the mobile phone 100 turns off the shooting function and then turns it on again, the mobile phone 100 may use the focus mode set last time to focus. For example, if the focus mode set by the user last time is the motion focus mode, when the mobile phone turns on the shooting function this time, the mobile phone 100 automatically uses the motion focus mode to focus.
[0071] Of course, the shooting interface displayed by the mobile phone 100 also includes a shooting key (or shutter function key). If the user receives a user operation of clicking the shooting key, the mobile phone 100 generates and saves the shot image.
[0072] The following describes a process of switching between the motion focus mode and the subject focus mode of the mobile phone 100 by using an example.
[0073] For example, the mobile phone 100 switches the focus mode from the subject focus mode to the motion focus mode. Figure 3As shown, in the subject focus mode, if the mobile phone 100 receives a user operation of clicking or sliding the function key, the mobile phone 100 pops up a function bar in the shooting interface. The function bar includes the function key of the focus mode. In the subject focus mode, the function key of the focus mode is displayed as the subject focus mode. If the mobile phone 100 receives a click operation of the user on the function key of the focus mode, the mobile phone 100 displays the function key of the motion focus mode and the function key of the subject focus mode in the function bar. If the mobile phone 100 receives a user operation of selecting the motion focus mode, the mobile phone 100 switches the focus mode of the shooting function to the motion focus mode. In addition, the mobile phone 100 also displays the focus mode prompt information in the shooting interface, such as the focus mode prompt information is "motion focus priority is turned on". In the motion focus mode, if the mobile phone 100 detects a moving object, such as a moving ball, a special-shaped frame is displayed in the display area of the ball, and the moving object is focused frame by frame. If the mobile phone 100 receives a user operation of clicking the function key to return to the previous level, the mobile phone 100 switches the function key displaying the focus mode in the function bar to the function key of the motion focus mode. In this way, in the motion focus mode, the function key of the focus mode in the function bar displays the motion focus mode.
[0074] The following takes the case where the target application of the mobile phone 100 is in the motion focus mode as an example to introduce the method provided by the embodiment of the present application in the motion focus mode. Figure 4 As shown, the method provided in the embodiment of the present application includes the following steps:
[0075] S401 , the mobile phone 100 displays a shooting interface of a target application in response to a first operation.
[0076] The mobile phone 100 receives a first operation, the first operation being used to instruct to start the shooting function of the target application. In response to the first operation, the mobile phone 100 starts the shooting function of the target application and displays the shooting interface of the target application.
[0077] The target application may be an application with a shooting function installed in the mobile phone 100. For example, the target application is a camera application of the operating system. There is a camera application icon on the desktop of the mobile phone 100. The first operation is a user operation in which the user clicks on the camera application icon. In response to the first operation, the mobile phone 100 opens the camera application and displays the shooting interface of the camera application. For another example, the target application is a chat application, and the chat application provides a shooting function. A shooting function key is provided in the chat application interface. The first operation is a user operation in which the user clicks on the shooting function key in the chat application interface. In response to the first operation, the mobile phone 100 starts the shooting function of the chat application and displays the shooting interface of the camera application.
[0078] Of course, the first operation may also be other user operations that indicate turning on the shooting function of the target application, such as pressing a physical button in the mobile phone 100 that starts the shooting function, etc. The embodiment of the present application does not limit the specific implementation method of the first operation.
[0079] The shooting interface of the target application includes a preview window. The preview window is used to display the image frames collected by the mobile phone 100 through the camera. Through the preview window, the user can see the scene picture currently collected by the mobile phone 100. The user can change the shooting angle of the mobile phone 100 through the picture displayed in the preview window so that the mobile phone 100 can capture the scene required by the user. For example, Figure 5 An example of a shooting interface of a camera application is shown. The preview window is located in the middle area of the shooting interface.
[0080] In addition to the preview window, the shooting interface also includes a variety of function keys or controls. For example, Figure 5 As shown, at the bottom of the shooting interface, function keys for various shooting modes such as large aperture, night scene, portrait, photo, video, movie, and professional are also provided, and at the top of the shooting interface, controls for setting shooting parameters are displayed. In different shooting modes, the images captured by the mobile phone 100 differ in color, clarity, or imaging mode. The user can select any shooting mode to shoot an image. For example, if the mobile phone 100 receives a user operation of clicking the portrait function key, the mobile phone 100 can switch the shooting mode of the shooting function to the portrait mode. In this way, the user can flexibly select the shooting mode to adapt to different shooting scenes.
[0081] S402: In the motion focus mode, the mobile phone 100 predicts the position of the moving object at the first moment according to the position of the moving object before the first moment.
[0082] In the embodiment of the present application, the target application of the mobile phone 100 has a motion focus mode. In the motion focus mode, the mobile phone 100 detects multiple image frames captured by the camera, such as using motion detection algorithms such as optical flow method and frame difference method, analyzes the changes in pixels in adjacent image frames, and determines the moving objects in multiple image frames and the positions of the moving objects in multiple image frames. Further, the mobile phone 100 predicts the position of the moving object in the image frame captured at the first moment (i.e., the current moment) based on the position of the moving object in the multiple image frames. For example, the mobile phone 100 determines the moving trajectory of the moving object based on the position of the moving object in the multiple image frames, and the moving trajectory is used to indicate the moving trend of the moving object. Further, the mobile phone 100 predicts the position of the moving object in the image frame captured after these multiple image frames based on the moving trajectory of the moving object, that is, predicts the position of the moving object at the first moment.
[0083] Exemplarily, the mobile phone 100 can input the image sequence captured before the first moment into a preset machine learning model that has been trained to obtain a prediction result output by the preset machine learning model. The image sequence input into the preset machine learning model is a plurality of image frames captured by the mobile phone 100 in chronological order. The prediction result output by the preset machine learning model represents the position of the moving object at the first moment. The preset machine learning model is used to predict the position of the moving object. The preset machine learning model can be obtained by training a machine learning model with a specific model structure by the mobile phone 100 using the captured historical image frames and the position of the moving object in the historical image frames. Alternatively, the preset machine learning model is obtained by training other electronic devices. The mobile phone 100 can directly install the trained preset machine learning model. Through the preset machine learning model, the mobile phone 100 can more accurately predict the position of the moving object at the first moment.
[0084] The model structure of the preset machine learning model is not limited in the embodiments of the present application. For example, the preset machine learning model can adopt a model structure such as a support vector machine, a convolutional neural network, etc.
[0085] In the embodiment of the present application, the mobile phone 100 has multiple focus modes, such as a motion focus mode and a subject focus mode. The motion focus mode is a mode that prioritizes automatic focus on moving objects. The subject focus mode is a mode that prioritizes automatic focus on faces.
[0086] In the motion focus mode, the mobile phone 100 focuses on the position of the moving object at the first moment. For example, the mobile phone 100 can use an autofocus (AF) algorithm to adjust the focal length of the camera so that the position of the moving object in the image frame is clearly imaged.
[0087] It is understandable that, since it takes a certain amount of time for the mobile phone 100 to detect the image frame, when the mobile phone 100 obtains the position of the moving object in an image frame (such as the first image frame), the mobile phone 100 has already captured the second image frame, and the second image frame is the nth image frame after the first image frame, where n is a positive integer. At this time, if the mobile phone 100 uses the position of the moving object detected by the first image frame to focus, for a moving object with a slower moving speed, the moving object in the second image frame captured by the mobile phone 100 may still be relatively clear. However, for a moving object with a faster moving speed, the moving object in the second image captured by the mobile phone 100 is blurred. Therefore, in order to cope with the rapid movement of the moving object, the mobile phone 100 uses the predicted position of the moving object to adjust the focal length in advance to achieve accurate focus on the moving object.
[0088] In order to further improve the accuracy of the mobile phone 100 in automatically focusing on the moving object, in some implementations, the mobile phone 100 can also obtain the depth data corresponding to the position of the moving object at the first moment, and further focus on the moving object according to the depth data of the moving object. In this way, the mobile phone 100 can further improve the accuracy of focusing on the moving object.
[0089] It is understandable that, considering that the moving object moves at a fast speed, in order to improve the focusing accuracy, the mobile phone 100 can focus on the moving object in each captured image frame. This focusing method can also be called frame-by-frame focusing.
[0090] S403, the mobile phone 100 displays a first focus frame in the shooting interface, and the position of the first focus frame in the shooting interface is determined according to the position of the moving object at the first moment.
[0091] After determining the position of the moving object at the first moment, the mobile phone 100 may display a first focus frame in the shooting interface according to the position of the moving object at the first moment. The first focus frame is a focus frame indicating the moving object. For example, the mobile phone 100 may add a first focus frame at the position of the moving object at the first moment. The position of the first focus frame in the shooting interface is consistent with the moving object, and is used to indicate that the current focus is on the moving object. In this way, the first focus frame displayed in the shooting interface of the mobile phone 100 can follow the movement of the moving object, and prompt the user through the first focus frame that the focus subject in the current shooting process is the moving object.
[0092] It is understandable that, since there is a certain delay in the detection of the image frame by the mobile phone 100, if the mobile phone 100 uses the position obtained by detecting the moving object to display the focus frame, then for the moving object moving faster, the focus frame displayed by the mobile phone 100 in the shooting interface will be separated from the moving object, and the focus frame displayed in the shooting interface cannot catch up with the moving object. In the embodiment of the present application, the position of the first focus frame in the shooting interface is obtained according to the position of the moving object at the first moment, which is equivalent to the position of the first focus frame in the shooting interface being predicted based on the position of the moving object before the first moment. In this way, the mobile phone 100 can display the focus frame according to the predicted position of the moving object to reduce the impact of the detection delay of the image frame on the focus frame position. The focus frame displayed by the mobile phone 100 in the shooting interface can accurately indicate the moving object and reduce the situation where the focus frame is separated from the moving object.
[0093] The display form of the first focus frame may include multiple sub-frames, and the multiple sub-frames of the first focus frame cover the display area corresponding to the moving object. For example, the moving object in the scene photographed by the mobile phone 100 is a ball. Figure 6As shown in (1) of FIG. 1 , in the shooting interface displayed by the mobile phone 100 , the display area where the ball is located is covered with a first focus frame formed by a plurality of sub-frames. The first focus frame moves with the ball. When the ball moves to the Figure 6 After reaching the position shown in (2) in FIG. 1 , the first focus frame moves along with the movement of the ball and also moves to a position consistent with the ball.
[0094] In the embodiment of the present application, the mobile phone 100 prompts the user of the moving objects in the shooting interface through the first focus frame formed by multiple sub-frames, which can improve the recognition of the moving objects, thereby better prompting the user of the moving objects in the shooting interface and improving the user's shooting experience.
[0095] In some implementations, the first focus frame is irregular in shape, and may also be referred to as a special-shaped frame. The shape of the first focus frame corresponds to the shape of the moving object, and moving objects of different shapes correspond to different shapes of the first focus frame.
[0096] For example, in Figure 6 In the shooting scene shown in (1), the moving object is a ball. In the shooting interface displayed by the mobile phone 100, the first focus frame covers the display area of the ball, and the shape of the first focus frame corresponds to the shape of the ball. Figure 7 In the shooting scene shown, the moving object is a car. In the shooting interface displayed by the mobile phone 100, the first focus frame covers the display area of the car, and the shape of the first focus frame corresponds to the shape of the car.
[0097] In this implementation, the mobile phone 100 can adaptively adjust the shape of the first focusing frame according to the shape of the moving object, so that the first focusing frame can present a variety of irregular shapes, providing a better visual experience for the user.
[0098] In some implementations, the number of the plurality of sub-frames in the first focus frame is less than a preset number. For example, the preset number is a value such as 27 or 20. The preset number may be different under different aspect ratios. The aspect ratio is used to indicate the aspect ratio of the preview window. Figure 8 As shown in the figure, the aspect ratios of the preview window in the shooting interface are 4:3, 1:1 and full screen. Among them, the aspect ratio of the full screen is consistent with the aspect ratio of the screen.
[0099] Under different aspect ratios, the shooting interface of the mobile phone 100 is divided into a plurality of evenly arranged squares. The size of each square may be 8×8 device independent pixels (dp). When the aspect ratio is 4:3, the shooting interface is divided into 22×30 squares. When the aspect ratio is 1:1, the shooting interface is divided into 22×22 squares. When the aspect ratio is a full-screen aspect ratio, the shooting interface is divided into 15×30 squares. The mobile phone 100 may determine the squares corresponding to the moving object according to the display area where the moving object is located, and the squares corresponding to the moving object may be used as a plurality of sub-frames in the first focus frame. As described above, the number of the plurality of sub-frames is less than a preset number, and the preset number may be equal to a preset ratio of the total number of squares corresponding to the shooting interface, such as the preset number being equal to 1 / 6, 1 / 16, etc. of the total number of squares.
[0100] In some implementations, if the display area of the moving object is large and the number of squares corresponding to the moving object exceeds a preset number, in this case, the mobile phone 100 selects squares in the central area of the moving object as multiple sub-frames in the first focus frame, so that the number of multiple sub-frames is less than the preset number.
[0101] When the first focus frame covers the moving object, the first focus frame may visually block part of the moving object, causing inconvenience to the user. In order to reduce the visual impact of the first focus frame on the user, in some implementations, if the moving object includes a face, multiple sub-frames of the first focus frame cover the display area other than the face of the moving object. In this way, the first focus frame displayed in the shooting interface of the mobile phone 100 will avoid the face and display the first focus frame in the display area other than the face.
[0102] It is understandable that, usually, the user is likely to want to see the face clearly through the shooting interface. Therefore, in this implementation, the first focus frame displayed by the mobile phone 100 in the shooting interface will avoid the face, thereby providing the user with a clear and unobstructed face and improving the user experience.
[0103] For example, Fig. 9 As shown, in the motion focus mode, if the moving object detected by the mobile phone 100 is a person, a first focus frame is displayed on the shooting interface, and the first focus frame covers the display area other than the face of the person, avoiding the display area where the face is located.
[0104] In some implementations, even if the first focus frame displayed by the mobile phone 100 in the shooting interface avoids human faces, for other types of moving objects, the user may not be able to see the moving object clearly due to the obstruction of the first focus frame. In this case, the user can manually cancel the first focus frame. Specifically, after the mobile phone 100 displays the first focus frame in the shooting interface, if a user operation for the moving object is received in the preview window of the shooting interface, such as a click operation, the mobile phone 100 displays a third focus frame that moves with the moving object. The shape of the third focus frame is regular and will not block the moving object. For example, the third focus frame is a rectangular frame.
[0105] For example, the moving object is a ball. Fig.10 As shown, the mobile phone 100 covers the display area corresponding to the ball with a special-shaped frame (an example of the first focus frame). If the mobile phone 100 receives a user operation of clicking the display area corresponding to the ball, the mobile phone 100 displays a rectangular frame (an example of the third focus frame) in the display area corresponding to the ball.
[0106] In some other implementations, when the moving object is a preset type of object, such as a preset type of object such as a person, a cat, or a dog, the mobile phone 100 displays a rectangular frame at the moving object.
[0107] In some other implementations, the moving object indicated by the first focus frame may not be the shooting object that the user is interested in. In this case, the user can manually change the shooting object indicated by the focus frame. Specifically, if the mobile phone 100 receives a user operation of the user clicking the target object in the preview window, in response to the user operation, the mobile phone 100 displays a third focus frame in the display area corresponding to the target object. The display form of the third focus frame is different from that of the first focus frame. For example, the first focus frame is an irregular frame including multiple sub-frames, and the third focus frame is a rectangular frame. The target object is different from the moving object. The third focus frame is used to prompt that the focus subject is the target object. After the mobile phone 100 receives the user operation of the user clicking the target object, the mobile phone 100 responds to the user operation and focuses on the target object indicated by the user operation.
[0108] In other implementations, if the mobile phone 100 does not detect a moving object, the non-moving object may be focused on. The solution for focusing on a non-moving object in the motion focus mode may refer to the solution of the subject focus mode below.
[0109] As described above, the shooting function of the mobile phone 100 includes a subject focus mode in addition to the motion focus mode. The following takes the target application of the mobile phone 100 in the subject focus mode as an example to introduce the method provided by the embodiment of the present application in the motion focus mode. In the subject focus mode, the mobile phone 100 identifies the shooting object, such as a face, in the captured image frame and determines the position of the shooting object. Furthermore, the shooting object is focused according to the position of the shooting object. For example, the mobile phone 100 can use an autofocus algorithm to adjust the focal length of the camera so that the position of the shooting object in the image frame is clearly imaged.
[0110] It is understandable that, considering that the moving speed of the photographed object is usually low, in order to save power consumption of the mobile phone 100, the mobile phone 100 can focus on the photographed object every several image frames, such as focusing once every 4 image frames.
[0111] In the subject focus mode, the mobile phone 100 prioritizes the focus on the face. The following takes the subject being a face as an example to introduce the subject focus mode.
[0112] In some implementations, if the target application is in the subject focus mode, the mobile phone 100 recognizes faces in the captured image frames. If the mobile phone 100 detects at least one face, a detection frame is set for each face, and at least one detection frame corresponding to the at least one face is displayed in the shooting interface. When the duration for which the mobile phone 100 displays at least one detection frame reaches a first preset duration, the mobile phone 100 cancels the display of at least one detection frame. If the at least one face includes a registered face, after canceling the display of at least one detection frame, a third focus frame is displayed in the shooting interface, and the third focus frame is used to indicate a registered face.
[0113] In the subject focus mode, the mobile phone 100 displays a face detection frame to mark the face detected by the mobile phone 100. At this time, the mobile phone 100 may not focus on the face indicated by the detection frame. The mobile phone 100 provides the user with a selection prompt for face focus by displaying at least one detection frame, so that the user can select the shooting subject from the faces marked by at least one detection frame according to preference or need. If at least one face includes a registered face, the mobile phone 100 prompts the user of the current focus subject through a second focus frame. The display form of the second focus frame is different from that of the detection frame, so that the user can distinguish between the detection frame and the focus frame.
[0114] For example, Fig.11As shown in (1), in the subject focus mode, after the mobile phone 100 performs initial face detection, regardless of whether the detected face is a registered face, the mobile phone 100 uses the same form of detection frame to mark the detected face, such as using a single-line white frame to mark the face. In this way, the shooting interface can be made simple and unified, and the different elements in the shooting interface can be reduced. After 5 seconds (an example of the first preset time length), if there is no registered face among the faces detected by the mobile phone 100, the mobile phone 100 cancels the display of the detection frame in the shooting interface, and the face detection frame in the shooting interface disappears.
[0115] If there is a registered face among the faces detected by the mobile phone 100, such as Fig.11 As shown in (2), after displaying the detection frames of multiple faces, the mobile phone 100 marks the registered face with a double-line yellow frame (an example of the second focus frame), displays a double-line yellow frame at the registered face, and focuses on the registered face. In this way, the mobile phone 100 can highlight the registered face with a double-line yellow frame, and the user can quickly confirm the focus subject, thereby improving the user's shooting experience.
[0116] If the mobile phone 100 detects multiple registered faces, a registered face that is closer can be selected for marking, such as selecting a registered face that is closest to the camera of the mobile phone 100 for marking, so that only one second focus frame is displayed on the shooting interface at the same time.
[0117] If the face detected by the mobile phone 100 is not a registered face, the mobile phone 100 will no longer display the focus frame in the shooting interface after canceling the detection frame showing the face. Alternatively, in some examples, if the face detected by the mobile phone 100 is not a registered face, the mobile phone 100 will display a single-line yellow frame at the face. The single-line yellow frame indicates that the focus subject is a non-registered face.
[0118] It is understandable that the registered face is a face pre-registered in the mobile phone 100. For example, the registered face may be a face pre-registered in the mobile phone 100 with power-on permission. For another example, the registered face may be a face pre-registered in the target application. In other implementations, the registered face is determined by the mobile phone 100 based on the frequency of appearance of faces in images stored in the gallery. For example, the mobile phone 100 may count the frequency of appearance of each face in the image in the gallery application, and thus use the faces with the highest frequency of appearance as the registered faces.
[0119] If a new face appears in the shooting interface of the mobile phone 100 during the focus tracking process, the mobile phone 100 will not display a detection frame or a focus tracking frame at the new face. In this way, when the mobile phone 100 is locking the focus subject, even if a new face enters the screen, the mobile phone 100 still keeps the focus on the original focus subject without being disturbed by the appearance of the new face.
[0120] In some implementations, in order to provide users with flexible focusing solutions, the mobile phone 100 can also determine the focus subject of the mobile phone 100 under user control, or change the focus subject of the mobile phone 100, and prompt the user to select the focus subject through the focus frame.
[0121] In one example, the mobile phone 100 switches the focus subject from one registered face to another registered face under user control. For example, after the mobile phone 100 displays the second focus frame on the shooting interface, if a user operation acting on a target face is received, the mobile phone 100 responds to the user operation and displays a fourth focus frame on the shooting interface, the fourth focus frame is used to indicate the target face, and the target face is different from the registered face indicated by the second focus frame. The fourth focus frame is displayed differently from the second focus frame.
[0122] For example, see Fig.12 , if the mobile phone 100 marks a registered face with a double-line yellow frame (an example of a second focus frame) in the shooting interface, and then the mobile phone 100 receives a user operation of the user clicking on another registered face (an example of a target face). In response to the user operation, the mobile phone 100 displays a single-line yellow frame (an example of a fourth focus frame) at the registered face clicked by the user, and focuses on the registered person clicked by the user.
[0123] In another example, the mobile phone 100 determines a focus subject under user control, and further focuses on the determined focus subject.
[0124] For example, see Fig.13 In (1), after the mobile phone 100 performs initial face detection, if a face is detected, a single-line white frame is used to mark the face. If the mobile phone 100 receives a user operation of the user clicking on a face (such as a target face), in response to the user operation, if the target face is a non-registered face, the mobile phone 100 displays a single-line yellow frame at the target face in the shooting interface (an example of the fourth focus frame of the first display form). If the target face is a registered face, please refer to Fig.13 In (2), the mobile phone 100 displays a double-line yellow frame at the target face in the shooting interface (an example of the fourth focus frame of the second display form).
[0125] In this example, the mobile phone 100 sets focus frames of different display forms for registered faces and unregistered faces, thereby prompting the user whether the current focus subject is a registered face or an unregistered face through the focus frames of different display forms.
[0126] For another example, see Fig.14 If the mobile phone 100 receives a user operation of clicking on a recognizable non-face object (such as a ball), in response to the user operation, the mobile phone 100 displays a single-line yellow frame at the non-face object in the shooting interface, and performs tracking focus on the non-face object, such as using a single object tracking algorithm (Single Object Tracking, SOT) to track focus on the non-face object. If the mobile phone 100 receives a user operation of clicking on an unrecognizable object, in response to the user operation, the mobile phone 100 displays a single-line white frame at the location where the user clicked in the shooting interface.
[0127] In the embodiment of the present application, the mobile phone 100 provides the user with a variety of focus solutions. In the absence of user operation, the mobile phone 100 can actively perform automatic focus tracking on a moving object or a face. The user can also lock the focus tracking subject by manually clicking the screen to meet the user's diverse shooting needs.
[0128] In some implementations, the mobile phone 100 may also be configured to provide a unified switch for the motion focus mode and the subject focus mode. Fig.15 As shown in (1), a plurality of function keys are provided at the top of the shooting interface, including an intelligent focus switch, which is used to turn on or off the focus function. The mobile phone 100 turns on or off the focus function in response to a user operation of the user clicking the intelligent focus switch. When the intelligent focus switch is in the off state, the function key of the focus mode is in a disabled state, such as the function key of the focus mode is gray and cannot be clicked. At this time, the user cannot select the motion focus mode or the subject focus mode. If the mobile phone 100 receives a user operation of the user clicking the function key of the focus mode, the mobile phone 100 prompts a prompt message "Not available when intelligent focus is turned off" on the shooting interface. When the intelligent focus switch is in the on state, the use state of the function key of the focus mode is restored, and the user can select the motion focus mode or the subject focus mode through the function key of the focus mode.
[0129] It is understandable that when the tracking focus function is turned on, the mobile phone 100 tracks the focus subject for focusing. When the tracking focus mode is not turned on, the mobile phone 100 does not perform tracking focus. The motion focus mode and the subject focus mode are different focus modes under the tracking focus function.
[0130] In some implementations, the shooting mode of the mobile phone 100 also includes a snapshot mode. Fig.15As shown in (2), a snapshot mode switch (or snapshot mode control) is provided in the preview window of the shooting interface. The mobile phone 100 turns on or off the snapshot mode in response to the user's operation of clicking the snapshot mode switch. In the snapshot mode, the mobile phone 100 selects the image frame with the best image quality from the multiple image frames taken continuously as the photo finally provided to the user.
[0131] The snapshot mode can also be combined with the focus mode. For example, when the snapshot mode is turned on, the mobile phone 100 turns on the motion focus mode by default. When the snapshot mode is not turned on, the mobile phone 100 turns on the subject focus mode by default.
[0132] Of course, the user can also set the combination of the capture mode and the focus mode according to his or her own preferences or shooting needs. For example, when the capture mode is turned on, select the subject focus mode. When the capture mode is not turned on, select the motion focus mode. The mobile phone 100 will automatically record the user's selection. After the mobile phone 100 turns off the shooting function under the control of the user, when the shooting function is turned on again, the focus mode and shooting mode of the camera function are the same as the settings before turning off the shooting function. For example, when the mobile phone 100 turns on the shooting function for the first time, the subject focus mode and the capture mode are started. When the shooting function is turned on for the second time, the mobile phone 100 starts the subject focus mode and the capture mode by default. In this way, the mobile phone 100 can maintain the last user's setting for the shooting function, and the user can shoot images in the mode he or she likes or is accustomed to without manual adjustment.
[0133] In some implementations, the mobile phone 100 is provided with an HDR shortcut switch in the shooting interface. Fig.16 As shown, multiple function keys are provided at the top of the shooting interface, and these multiple function keys include an HDR shortcut switch. The HDR shortcut switch is used to turn off or on the HDR shooting mode. The mobile phone 100 turns on the HDR shooting mode by default, and the HDR shortcut switch is in the on state by default. If the mobile phone 100 receives a user operation to turn off the HDR shooting mode, such as a user operation of clicking the HDR shortcut switch, the mobile phone 100 turns off the HDR shooting mode, and the HDR shortcut switch is in the off state. In addition, the mobile phone 100 can also prompt the user in the shooting interface that the HDR shooting mode is turned off.
[0134] When the HDR shooting mode is turned off for a second preset time, such as 15 minutes, the mobile phone 100 automatically turns on the HDR shooting mode.
[0135] When the HDR shooting mode is turned off, if the mobile phone 100 receives a user operation of the user clicking the HDR quick shooting switch, the mobile phone 100 turns on the HDR shooting mode and prompts the user in the shooting interface that the HDR shooting mode is turned on. When the HDR shooting mode is turned on, if the mobile phone 100 receives a user operation of the user clicking the shutter function key, the mobile phone 100 automatically captures multiple image frames and synthesizes the captured multiple image frames into one photo through the HDR function. After the shooting is completed, the mobile phone 100 receives a user operation of the user clicking the gallery entrance, and the mobile phone 100 displays the captured photos in the shooting interface.
[0136] In some implementations, the mobile phone 100 is also provided with a function key for the portrait enhancement mode in the shooting interface. Fig.17 As shown, a function key for the portrait enhancement mode is set in the shooting interface, and the portrait enhancement mode is also called the portrait mode. Exemplarily, in the snapshot mode, if the mobile phone 100 receives a user operation of the user clicking the function key of the portrait enhancement mode, the mobile phone 100 displays the function key of the portrait blur and the function key of the beauty function in the bottom function area. If the mobile phone 100 receives a user operation of the user clicking "portrait blur", the mobile phone 100 displays the blur degree adjustment bar of the portrait blur in the shooting interface. The user can adjust the blur degree of the portrait through the blur degree adjustment bar. If the blur degree indicated by the blur degree adjustment bar is greater than the minimum value, the mobile phone 100 can also prompt a prompt message "portrait blur is turned on" in the shooting interface. If the mobile phone 100 receives a user operation of the user clicking "beautify", the mobile phone 100 displays the beauty adjustment bar in the shooting interface. The user can adjust the beauty degree of the portrait through the beauty adjustment bar. If the beauty degree indicated by the beauty adjustment bar is greater than the minimum value, the mobile phone 100 can also prompt a prompt message "beautify is turned on" in the shooting interface.
[0137] It should be noted that the personal information (such as facial images, etc.) used in the technical solution of this application is limited to information that has obtained the individual's separate consent, including but not limited to notifying and reminding the user to read the relevant user agreement (notification) before the user uses the function, and signing the agreement (authorization) including authorization of relevant user information.
[0138] In some other embodiments of the present application, an electronic device is provided, including: a memory, a display screen, and one or more processors. The memory and the display screen are coupled to the processors respectively. The display screen is used to display image data. The memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device can perform each function or step in the above method embodiment. Of course, the electronic device can also include other hardware structures. For example, the electronic device also includes hardware structures such as sensors and communication modules. The structure of the electronic device can refer to Figure 1The structure of the mobile phone 100 is shown.
[0139] The embodiment of the present application also provides a chip system, which is applied to an electronic device. The chip system includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected by lines. For example, the interface circuit can be used to receive signals from other devices (such as memory). For another example, the interface circuit can be used to send signals to other devices (such as processors). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instruction is executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiment of the present application.
[0140] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step in the above-mentioned method embodiment.
[0141] The present application also provides a computer program product, which, when executed on a computer, enables the computer to perform various functions or steps in the above method embodiment. For example, the computer may be the above electronic device.
[0142] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0144] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0145] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0147] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application.
Claims
1. A shooting method, characterized in that: Applied to electronic equipment, the method comprises: receiving a first operation, where the first operation is used to instruct to start a shooting function of a target application, where the target application includes a motion focus mode and a subject focus mode; In response to the first operation, displaying a shooting interface of the target application, wherein the shooting interface includes a preview window, and the preview window is used to display an image frame captured by the electronic device; If the target application is in a motion focus mode, after a moving object is detected, a first focus frame that follows the moving object is displayed in the shooting interface, wherein the first focus frame includes a plurality of sub-frames, and the plurality of sub-frames of the first focus frame cover a display area corresponding to the moving object; If the target application is in a subject focus mode, after a photographing object is detected, a second focus frame for indicating the photographing object is displayed in the photographing interface, and the display form of the second focus frame is different from that of the first focus frame.
2. The method according to claim 1, characterized in that The position of the first focus frame at the first moment is predicted based on the position of the moving object before the first moment.
3. The method according to claim 1 or 2, characterized in that: If the moving object includes a human face, the multiple sub-frames of the first focus frame cover other display areas except the face of the moving object.
4. The method according to any one of claims 1 to 3, characterized in that The number of the plurality of sub-frames in the first focus frame is less than a preset number, and the preset number is different under different aspect ratios, and the aspect ratio is used to indicate the aspect ratio of the preview window.
5. The method according to any one of claims 1 to 4, characterized in that The first focusing frame is in an irregular shape.
6. The method according to any one of claims 1 to 4, characterized in that The shape of the first focus frame corresponds to the shape of the moving object.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: In response to the user's second operation in the shooting interface, a function setting window is displayed in the shooting interface. If the target application is in motion focus mode, the function setting window includes a function key for the motion focus mode; if the target application is in subject focus mode, the function setting window includes a function key for the subject focus mode.
8. The method according to claim 7, characterized in that The method further comprises: In response to a third operation of the user in the function setting window, displaying a function key of the motion focus mode and a function key of the subject focus mode in the function setting window; If the target application is in the motion focus mode, in response to a user operation of selecting the function key of the subject focus mode, switching the target application to the subject focus mode; If the target application is in the subject focus mode, in response to a user operation of selecting the function key of the motion focus mode, the target application is switched to the motion focus mode.
9. The method according to any one of claims 1 to 8, characterized in that The shooting interface also includes a snapshot mode control; the method also includes: If the capture mode control is turned on, the target application uses the motion focus mode to focus; If the capture mode control is turned off, the target application uses the subject focus mode to focus.
10. The method according to any one of claims 1 to 9, characterized in that After displaying a first focus frame following the movement of the moving object in the shooting interface, the method further includes: If a user operation acting on a target object is received, a third focus frame is displayed in the shooting interface in response to the user operation, and the third focus frame is used to prompt the electronic device to focus on the target object. The display form of the third focus frame is different from that of the first focus frame.
11. The method according to any one of claims 1 to 10, characterized in that If the target application is in the subject focus mode, after detecting the photographing object, a second focus frame for indicating the photographing object is displayed in the photographing interface, including: If the target application is in subject focus mode, after detecting at least one face in the image frame, at least one detection frame is displayed in the shooting interface; each detection frame is used to indicate a face; After a first preset time period, the at least one detection frame is canceled and the second focus frame is displayed, and the photographed object is a face of the at least one face.
12. An electronic device, characterized in that: include: A display screen, a memory and one or more processors; the display screen and the memory are coupled to the processors respectively; The display screen is used to display image data; The memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the method as claimed in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 11.
Citation Information
Patent Citations
Imaging apparatus and control method therefor
CN101677361A
Method and device for shooting images
CN104243822A
Photographing control method, photographing control apparatus, photographing system, and storage medium
CN110383813A
Method and device for detecting motion direction, computer equipment and storage medium
CN110598559A
Shooting processing method and device, electronic equipment and readable storage medium
CN112312016A