WO2023226721A1 - 录像方法和相关装置 - Google Patents

录像方法和相关装置 Download PDF

Info

Publication number
WO2023226721A1
WO2023226721A1 PCT/CN2023/092393 CN2023092393W WO2023226721A1 WO 2023226721 A1 WO2023226721 A1 WO 2023226721A1 CN 2023092393 W CN2023092393 W CN 2023092393W WO 2023226721 A1 WO2023226721 A1 WO 2023226721A1
Authority
WO
WIPO (PCT)
Prior art keywords
tracking
terminal device
window
character
frame
Prior art date
Application number
PCT/CN2023/092393
Other languages
English (en)
French (fr)
Other versions
WO2023226721A9 (zh
Inventor
易婕
黄雨菲
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to EP23810794.0A priority Critical patent/EP4422193A1/en
Publication of WO2023226721A1 publication Critical patent/WO2023226721A1/zh
Publication of WO2023226721A9 publication Critical patent/WO2023226721A9/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Definitions

  • the present application relates to the field of terminal technology, and in particular to video recording methods and related devices.
  • electronic devices such as mobile phones and tablets are usually equipped with multiple cameras. For example, configure the front camera and the rear camera separately on the electronic device. Users can choose the corresponding shooting mode according to their own needs, such as front camera mode, rear camera mode, front and rear dual camera mode, etc.
  • videos taken by users through electronic devices include one or more characters.
  • the video needs to be manually edited.
  • Embodiments of the present application provide video recording methods and related devices, which are applied to electronic equipment. This method can track the selected person when shooting a video to generate an additional video, without the need for manual editing by the user, reducing user operations and increasing user experience.
  • embodiments of the present application provide a video recording method, which is applied to a terminal device including a first camera.
  • the method includes: the terminal device displays a first interface, the first interface includes a first window, the first window displays a picture collected in real time by the first camera, and one or more tracking identifiers; the terminal device receives a message for the first tracking identifier.
  • the first tracking identification is one of one or more tracking identifications; in response to the first operation, the terminal device displays a second interface, the second interface includes a first window and a second window, and the first window displays a third A camera captures a picture in real time.
  • the second window displays a part of the picture in the first window related to the first object.
  • the first object is the object corresponding to the first tracking identifier.
  • the terminal device detects the third object in the first window.
  • a first object is displayed in a position, and a part of the picture related to the first object at the first position in the first window is displayed in the second window; at the second moment, the terminal device detects that the first object is displayed in the second position of the first window.
  • the second window displays a part of the picture at the second position in the first window and related to the first object.
  • the first window can be the preview area or recording area below.
  • the tracking identification can be a tracking box as described below, or can be in other forms (for example, thumbnails of objects, numbers, icons, etc.), which are not limited here.
  • the tracking mark can also be located at the position where the object is displayed, or can be arranged and displayed on the edge of the preview area or recording area, without limitation here.
  • the first tracking identifier can be a tracking identifier corresponding to any object, for example, a tracking identifier corresponding to a male character. frame.
  • the triggering operation for the first tracking identification may be a click operation or a touch operation. The embodiment of the present application does not limit the type of the triggering operation.
  • the tracking target in response to the first operation, is set and an interface with a small window is displayed.
  • a part of the picture related to the first object in the first window can be understood as the tracking picture below.
  • the terminal device Before setting the tracking target, the terminal device does not display a small window. After setting the tracking target, the terminal device displays a small window.
  • the focus changes as the position of the focus target changes.
  • the interface at the first moment may be the interface shown as a in Figure 3B
  • the interface at the second moment may be the interface shown as b in Figure 3B
  • the interface at the first moment may be a as shown in Figure 3C
  • the interface at the second moment may be the interface shown as b in Figure 3C.
  • the picture displayed in the second window is cropped based on the picture displayed in the first window.
  • the first interface is a preview interface during video recording
  • the first window also includes a first control.
  • the method also includes: the terminal device receives a second operation on the first control; in response to the second operation, the terminal device End the recording, and save the first video and the second video.
  • the first video is a video composed of the pictures displayed in the first window
  • the second video is a video composed of the pictures displayed in the second window.
  • the second operation may be a user click operation or a user touch operation.
  • the embodiment of the present application does not limit the second operation.
  • the first video may be a video generated from the recording image displayed in the recording area
  • the second video may be a video generated from the tracking image displayed in the small window.
  • the first control may be an end control.
  • the first control may be the end control 318 shown in a in Figure 3C.
  • the terminal device detects that the user clicks on the end control 318, the terminal device ends the recording, generates a video based on the recording image displayed in the recording area, and generates a focus video based on the tracking image displayed in the small window.
  • the terminal device can save two videos and generate an additional video based on the tracking target. Without the user having to edit the video, the video of the tracking target can be obtained, improving the user experience.
  • the tracking identifier corresponds one-to-one with the object displayed in the first window detected by the terminal device.
  • each tracking identifier corresponds to an object, which makes it easier for users to select objects and improves user experience.
  • the method further includes: when the terminal device detects that the second object and the third object overlap in the first window, the terminal device displays the second tracking identification of the second object or the third tracking identification of the third object.
  • the second object and the third object are not the same object; the second object or the third object can be the first object, which is not limited here.
  • the second object and the third object may be the male character and the female character in FIG. 11B respectively, or the male character and the female character in FIG. 14 , which are not limited here.
  • the interface is as shown in Figure 11B, or the interface as shown in Figure 14.
  • the interface is as shown in Figure 11B, or the interface as shown in Figure 14.
  • the terminal device does not need to display the tracking logo corresponding to one of the objects, which can reduce the overlap of tracking logos, reduce the number of false triggers by users, and make the interface cleaner.
  • the terminal device displays the second tracking identification of the second object or the third tracking identification of the third object, including: when the terminal device When detecting that the second object and the third object overlap in the first window, the terminal device determines based on one or more of the following information that the terminal device displays the second tracking identification of the second object or the third tracking identification of the third object.
  • the second object The area occupied by the third object in the screen of the first window, the area occupied by the third object in the screen of the first window, the focal length between the second object and the first camera, the focal length between the third object and the first camera .
  • the area occupied by the object can also be understood as the size of the object.
  • the area occupied by the character and the size occupied by the character can be understood as the size of the object.
  • the focal length of an object can be understood as the distance between the object and the camera, or can be understood as the distance between the object and the terminal device. For example, in the following description corresponding to the interface shown in Figure 11B, the distance between the person and the camera distance.
  • the terminal device can determine the tracking identifier to be displayed based on the area occupied by the object or the focal length of the object, and the tracking identifier not to be displayed.
  • the terminal device determines that the terminal device displays the second tracking identification of the second object or the third tracking identification of the third object based on one or more of the following information of the second object and the third object, including: when the third object When the area of the second object in a window is less than or equal to the area of the third object in the first window, the terminal device displays the third tracking identifier and does not display the second tracking identifier; or when the second object detected by the terminal device is the same as the third object in the first window, the terminal device displays the third tracking identifier. When the focal length between one camera is less than or equal to the focal length between the third object and the first camera, the terminal device displays the second tracking logo and does not display the third tracking logo.
  • the larger the area occupied by the object the greater the possibility for the user to set it as a tracking target; the smaller the focal length between the object and the first camera, the closer the distance between the object and the terminal device, the greater the possibility for the user The more likely it is to set up a tracking target.
  • the terminal device can confirm whether the tracking mark corresponding to the object is displayed based on the area occupied by the object, the focal length between the object and the first camera, etc.
  • the terminal device can confirm whether the tracking mark corresponding to the object is displayed based on the area occupied by the object, the focal length between the object and the first camera, etc.
  • the method further includes: when the distance between the center position of the second tracking mark and the center position of the third tracking mark in the first preset direction is greater than or equal to the first preset distance, or when the center position of the second tracking mark is When the distance between the position and the center position of the third tracking mark in the second preset direction is greater than or equal to the second preset distance, the terminal device detects that the second object and the third object in the first window overlap.
  • the first preset direction may be horizontal, vertical, or oblique; the second preset direction may be vertical, horizontal, or oblique.
  • the terminal device can determine whether the two objects overlap based on the center positions of the tracking marks corresponding to the two objects, and then determine whether to display them, which facilitates calculation of whether they overlap and reduces the amount of calculation.
  • the first preset distance is half of the sum of the first length and the second length
  • the first length is the length of the second tracking mark in the first preset direction
  • the second length is the length of the third tracking mark in the first preset direction.
  • a length in a preset direction; the second preset spacing is half of the sum of the third length and the fourth length
  • the third length is the length of the second tracking mark in the second preset direction, and the fourth length is the third length. Track the length of the marker in the second preset direction.
  • the preset spacing is half of the sum of the lengths of the tracking mark in the same direction.
  • the first preset direction is horizontal and the second preset direction is vertical.
  • the method further includes: when the distance between the center position of the second tracking mark and the center position of the third tracking mark in the first preset direction is greater than or equal to the first preset distance, or when the center position of the second tracking mark is When the distance between the position and the center position of the third tracking mark in the second preset direction is greater than or equal to the second preset distance, the terminal device adjusts the position of the second tracking mark and/or adjusts the position of the third tracking mark until the Two tracking markers The distance between the center position and the center position of the third tracking mark in the first preset direction is less than the first preset distance, or the center position of the second tracking mark and the center position of the third tracking mark are in the second preset direction. The distance is smaller than the second preset distance.
  • the terminal device can reduce the overlap of tracking logos by adjusting the position of the tracking logos.
  • the specific adjustment method may refer to the corresponding descriptions in FIG. 11A and FIG. 13 below, and will not be described again here.
  • the tracking logos must be of the same size.
  • the size of the tracking frame is fixed, which can reduce the situation where the tracking frame is too small or too large.
  • the sizes of the tracking logos are different, and the size of each tracking logo is determined by the terminal device based on the size or area occupied by the object corresponding to each tracking logo in the first window. ; Alternatively, the size of each tracking mark is determined by the terminal device based on the focal length between the object corresponding to each tracking mark and the first camera.
  • the size of the tracking frame is not fixed.
  • the terminal device can adaptively adjust the specifications of the tracking frame based on the size of the character.
  • the object includes a first object and a fourth object; when the size of the first object in the first picture is larger than the size of the second object in the first picture, the size of the first tracking mark is larger than the size of the first tracking mark corresponding to the fourth object.
  • the fourth object is different from the first object and can be a second object, a third object, or other objects, which is not limited here.
  • the terminal device can display multiple tracking logos, and the terminal device can adaptively adjust the specifications of the tracking frame based on the size of the person, the focal length between the object and the camera, etc. Provide another way to display tracking logos to improve user experience.
  • the first interface when the number of objects displayed in the first window detected by the terminal device is greater than N, the first interface includes N tracking identifiers, where N is an integer.
  • N can be 5 or any other value. In this way, the number of tracking marks displayed when there are many objects can be limited, and the screen clutter caused by too many tracking marks can be reduced. In addition, limiting the number of tracking identifiers can also reduce the computing requirements of the terminal device, reduce the lagging phenomenon of the terminal device, reduce power consumption, etc. It can also reduce the hardware requirements of the terminal device and increase the applicability.
  • the objects corresponding to the N tracking identifiers are the top N objects in order from large to small in size in the first picture; or, the objects corresponding to the N tracking identifiers are the objects detected by the terminal device and the same as those of the first camera.
  • the top N objects in order from smallest to largest distance.
  • the first camera when the terminal device displays the second interface, the first camera focuses on the first object; at the first moment, the first camera focuses on the first object; at the second moment, the first camera focuses on the first object.
  • the focus is on the first object.
  • the terminal device can focus based on the tracking target, making the tracking target clearer.
  • terminal device may also be called a terminal (terminal), user equipment (user equipment, UE), mobile station (mobile station, MS), mobile terminal (mobile terminal, MT) etc.
  • Terminal devices can be mobile phones, smart TVs, wearable devices, tablets (Pads), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminals Equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grid, transportation Wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, etc.
  • VR virtual reality
  • AR augmented reality
  • the terminal device includes a processor, and the processor is configured to call a computer program in a memory to execute the method of the first aspect.
  • embodiments of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions.
  • the terminal device executes the method of the first aspect.
  • embodiments of the present application provide a computer program product, which when the computer program is run, causes the terminal device to execute the method of the first aspect.
  • inventions of the present application provide a chip.
  • the chip includes a processor, and the processor is configured to call a computer program in a memory to execute the method of the first aspect.
  • Figure 1 is a schematic structural diagram of a terminal equipment hardware system provided by an embodiment of the present application.
  • Figure 2 is a schematic structural diagram of the terminal equipment software system provided by the embodiment of the present application.
  • Figure 3A is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • Figure 3B is a schematic diagram of a protagonist mode preview interface provided by an embodiment of the present application.
  • Figure 3C is a schematic diagram of a protagonist mode recording interface provided by an embodiment of the present application.
  • Figure 4 is a schematic interface diagram of a terminal device entering protagonist mode according to an embodiment of the present application.
  • Figure 5 is a schematic interface diagram of a terminal device entering protagonist mode according to an embodiment of the present application.
  • Figure 6 is a schematic interface diagram corresponding to a protagonist mode recording process provided by an embodiment of the present application.
  • Figure 7 is a schematic interface diagram corresponding to a protagonist mode recording process provided by an embodiment of the present application.
  • Figure 8A is a schematic interface diagram of a tracking box display provided by an embodiment of the present application.
  • Figure 8B is a schematic interface diagram of a tracking box display provided by an embodiment of the present application.
  • Figure 8C is a schematic interface diagram of a tracking frame display provided by an embodiment of the present application.
  • Figure 9A is a schematic interface diagram of a tracking box display provided by an embodiment of the present application.
  • Figure 9B is a schematic interface diagram of the tracking box display provided by the embodiment of the present application.
  • Figure 10A is a schematic interface diagram of a tracking box display provided by an embodiment of the present application.
  • Figure 10B is a schematic interface diagram of the tracking box display provided by the embodiment of the present application.
  • FIG. 10C is a schematic interface diagram of the tracking box display provided by the embodiment of the present application.
  • Figure 10D is a schematic diagram of an interface for tracking frame movement provided by an embodiment of the present application.
  • Figure 11A is a schematic interface diagram of a tracking box display provided by an embodiment of the present application.
  • FIG. 11B is a schematic interface diagram of the tracking box display provided by the embodiment of the present application.
  • Figure 12 is a schematic diagram of overlapping tracking frames provided by an embodiment of the present application.
  • Figure 13 is a schematic diagram of an interface for tracking frame movement provided by an embodiment of the present application.
  • Figure 14 is a schematic interface diagram of a tracking box display provided by an embodiment of the present application.
  • Figure 15 is a schematic interface diagram of a tracking box display provided by an embodiment of the present application.
  • Figure 16 is a schematic flow chart of a video recording method provided by an embodiment of the present application.
  • Figure 17 is a schematic structural diagram of a video recording device provided by an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same functions and effects.
  • the first chip and the second chip are only used to distinguish different chips, and their sequence is not limited.
  • words such as “first” and “second” do not limit the number and execution order, and words such as “first” and “second” do not limit the number and execution order.
  • At least one refers to one or more, and “multiple” refers to two or more.
  • “And/or” describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the related objects are in an “or” relationship.
  • “At least one of the following” or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items).
  • At least one of a, b, or c can mean: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
  • the embodiments of the present application provide a video recording method, which can be applied to electronic devices with shooting functions.
  • Electronic equipment includes terminal equipment, which can also be called terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc.
  • Terminal devices can be mobile phones, smart TVs, wearable devices, tablets (Pads), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminals Equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grid, transportation Wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, etc.
  • the embodiments of this application do not limit the specific technology and specific equipment form used by the terminal equipment.
  • Figure 1 shows a schematic structural diagram of a terminal device 100.
  • the terminal device may include: radio frequency (radio frequency, RF) circuit 110, memory 120, input unit 130, display unit 140, sensor 150, audio circuit 160, wireless fidelity (wireless fidelity, WiFi) module 170, processor 180, power supply 190 and Bluetooth module 1100 and other components.
  • radio frequency radio frequency
  • RF radio frequency
  • the RF circuit 110 can be used to receive and transmit information or signals during a call. In particular, after receiving downlink information from the base station, it is processed by the processor 180; in addition, the designed uplink data is sent to the base station.
  • RF circuits include, but are not limited to, antennas, at least one amplifier, transceivers, couplers, low noise amplifiers (LNA), duplexers, etc. Additionally, RF circuitry 110 may communicate with networks and other devices through wireless communications.
  • the above wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (code division) multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, and short messaging service (SMS), etc.
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • LTE long term evolution
  • email and short messaging service
  • the memory 120 can be used to store software programs and modules.
  • the processor 180 executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the memory 120 .
  • the memory 120 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.), and a boot loader. etc.; the storage data area can store data created based on the use of the terminal device (such as audio data, phone book, etc.), etc.
  • the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. It can be understood that, in this embodiment of the present application, the memory 120 stores a program for Bluetooth device reconnection.
  • the input unit 130 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the terminal device.
  • the input unit 130 may include a touch panel 131 and other input devices 132 .
  • the touch panel 131 also known as a touch screen, can collect the user's touch operations on or near the touch panel 131 (for example, the user uses a finger, stylus, or any suitable object or accessory on or near the touch panel 131 operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 131 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the touch controller. to the processor 180, and can receive commands sent by the processor 180 and execute them.
  • the touch panel 131 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the input unit 130 may also include other input devices 132.
  • other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, etc.
  • the display unit 140 may be used to display information input by the user or information provided to the user as well as various menus of the terminal device.
  • the display unit 140 may include a display panel 141, which may optionally be in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
  • the display panel 141 is configured in the following manner.
  • the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it is sent to the processor 180 to determine the type of the touch event. The processor 180 then determines the type of the touch event. Type provides corresponding visual output on display panel 141.
  • the touch panel 131 and the display panel 141 are used as two independent components to implement the input and input functions of the terminal device, in some embodiments, the touch panel 131 and the display panel 141 can be integrated. And realize the input and output functions of the terminal device.
  • the terminal device may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor.
  • the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light.
  • the proximity sensor may close the display panel 141 or close the display panel 141 when the terminal device moves to the ear. Backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). It can detect the magnitude and direction of gravity when stationary.
  • terminal device posture such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, knock
  • other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. can also be configured, here No longer.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device.
  • the audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, and the speaker 161 converts it into a sound signal for output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, and the audio circuit 160 After receiving, it is converted into audio data, and then processed by the audio data output processor 180, and then sent to, for example, another terminal device through the RF circuit 110, or the audio data is output to the memory 120 for further processing.
  • WiFi is a short-distance wireless transmission technology.
  • the terminal device can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 170. It provides users with wireless broadband Internet access.
  • the WiFi module 170 is shown in FIG. 1 , it can be understood that it is not a necessary component of the terminal device and can be omitted as needed without changing the essence of the invention.
  • the processor 180 is the control center of the terminal device, using various interfaces and lines to connect various parts of the entire terminal device, and executing software programs or modules stored in the memory 120 by running or executing them, and calling data stored in the memory 120. Various functions of the terminal equipment and processing data, thereby overall monitoring of the terminal equipment.
  • the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180 .
  • the memory 120 stores a video recording program
  • the processor 180 can be used to call and execute the video recording program stored in the memory 120 to implement the video recording method in the embodiment of the present application.
  • the terminal device also includes a power supply 190 (such as a battery) that supplies power to various components.
  • a power supply 190 such as a battery
  • the power supply can be logically connected to the processor 180 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
  • Bluetooth technology is a short-distance wireless transmission technology.
  • the terminal device can establish a Bluetooth connection with other terminal devices equipped with a Bluetooth module through the Bluetooth module 1100, thereby transmitting data based on the Bluetooth communication link.
  • Bluetooth module 1100 can be Bluetooth low energy (BLE) or a module according to actual needs. It can be understood that in the embodiment of the present application, when the terminal device is a user terminal or a business machine, the terminal device includes a Bluetooth module. However, it can be understood that the Bluetooth module is not a necessary component of the terminal device and can be omitted as needed without changing the essence of the invention. For example, the server does not need to include the Bluetooth module.
  • the terminal device also includes a camera.
  • the position of the camera on the terminal device can be front-facing, rear-facing, or built-in (can be extended out of the fuselage during use), which is not limited in the embodiments of the present application.
  • the terminal device may include a single camera, dual cameras, or three cameras, which are not limited in the embodiments of the present application. Cameras include but are not limited to wide-angle cameras, telephoto cameras, or depth cameras.
  • the terminal device may include three cameras, including one main camera, one wide-angle camera, and one telephoto camera.
  • the multiple cameras may be all front-facing, or all rear-facing, or all built-in, or at least partially front-facing, or at least partially rear-facing, or at least partially built-in, etc.
  • This invention The application examples do not limit this.
  • FIG. 2 is a software structure block diagram of the terminal device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has clear roles and division of labor.
  • the layers communicate through software interfaces.
  • the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.
  • the application layer can include a series of application packages. As shown in Figure 2, the application package can include camera, gallery, phone, map, phone, music, settings, mailbox, video, social and other applications.
  • the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window managers, content providers, resource managers, view systems, notification managers, etc.
  • a window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make this data accessible to applications.
  • Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
  • a view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a prompt sound is emitted, the terminal device vibrates, and the indicator light flashes, etc.
  • the Android runtime includes core libraries and virtual machines. The Android runtime is responsible for the scheduling and management of the Android system. reason.
  • the core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
  • the application layer and application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and application framework layer into binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
  • System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
  • 2D Graphics Engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the following is an example of the workflow of terminal device software and hardware based on the scenario of terminal device interface switching.
  • the corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into original input events (including touch coordinates, touch intensity, timestamp of touch operations, and other information). Raw input events are stored at the kernel level.
  • the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation and the control corresponding to the click operation as a camera application icon control as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the display driver by calling the kernel layer to display The functional interface of the camera application.
  • the camera application can call the camera access interface in the application framework layer to start the camera's shooting function, and based on the camera driver in the kernel layer, drive one or more cameras to collect one or more frames of images in real time. After the camera collects the image, it can transmit the image to the camera application in real time through the kernel layer, system library, and application framework layer, and then the camera application displays the image to the corresponding functional interface.
  • terminal devices such as mobile phones and tablets are usually equipped with multiple cameras.
  • the terminal device can provide users with multiple shooting modes through multiple configured cameras, such as front-camera mode, rear-camera mode, front-rear dual-camera mode, protagonist mode, etc. Users can select the corresponding shooting mode to shoot according to the shooting scene.
  • Protagonist mode can be understood as a mode that can generate an additional portrait focus video when the terminal device records a video, that is, more than two videos are saved when the recording is completed, one of which is the original video recorded, and the other videos are based on the tracking
  • the target portrait is automatically cropped from the original video.
  • the portrait in the portrait focus video It can be understood as the "protagonist” that the user pays attention to.
  • the method of generating the video corresponding to the "protagonist” can be: cutting out the video content corresponding to the "protagonist” from the video regularly recorded by the terminal device.
  • the "protagonist” can be a living entity such as a human being or an animal, or a non-living entity such as a vehicle. It can be understood that any item that can be identified based on the algorithm model can be used as the "protagonist” in the embodiment of this application.
  • the "protagonist” can be defined as the focus-chasing object.
  • the focus-chasing object can also be called the protagonist object, the tracking target, the tracking object, the focus-chasing target, etc.
  • the embodiments of the present application do not limit the concept of the "protagonist” .
  • FIG. 3A is a schematic diagram of an application scenario provided by the embodiment of the present application.
  • the application scenario includes a terminal device 301, a character 302 and a character 303.
  • the terminal device 301 can record a video containing a tracking target through a camera.
  • the tracking target can be any person recorded by the camera, or any object such as an animal or a car. In the scene shown in FIG. 3A , the tracking target may be the person 302 or the person 303 in the photographed picture.
  • the terminal device can additionally obtain focus videos corresponding to one or more tracking targets while recording videos.
  • the terminal device 301 can receive the user's operation of setting a tracking target when previewing in the protagonist mode. After starting to record the video, the terminal device 301 can additionally generate one or more focus videos based on the tracking target. For example, the terminal device 301 can set the person 302 in the photographed picture as the tracking target, and can also set the person 303 in the photographed picture as the tracking target.
  • the terminal device 301 when the terminal device 301 records through the protagonist mode and receives the user's operation of setting a tracking target, the terminal device 301 can additionally generate one or more channels of focus video based on the tracking target. In this way, the focus video corresponding to the tracking target can be obtained without manually editing the entire video.
  • the terminal device can switch the person corresponding to the tracking target one or more times. Specifically, when the terminal device receives the user's operation to switch the tracking target, the terminal device switches the person corresponding to the tracking target.
  • the focus video obtained by the terminal device includes different characters.
  • the terminal device when the terminal device detects that the user switches the tracking target from the person 302 to the person 303 during the recording process, the terminal device displays the tracking screen based on the person 303.
  • the character 302 is displayed before the tracking target is switched; the character 303 is displayed after the tracking target is switched; it can also be understood that the part before the tracking target is switched corresponds to the character 302, and the tracking target The switched part corresponds to character 303.
  • the terminal device detecting that the user switches the tracking target from person 302 to person 303 at the 3rd second during the recording process of the focus tracking video.
  • the person 302 is displayed correspondingly in the focus video before 3 seconds; the person 303 is displayed correspondingly in the focus video after 3 seconds.
  • the terminal device can switch the tracking target, realize switching of characters in the focus video, and improve the user experience.
  • the terminal device when the character corresponding to the tracking target is switched, can obtain one channel of focus tracking video based on the tracking target before the switch, and another channel of focus tracking video based on the tracking target after the switch.
  • the terminal device when the terminal device detects that the user switches the tracking target from person 302 to person 303 during the recording process, the terminal device generates focus video 1 based on person 302. After the tracking target switches to person 303, Generate focus video 2 based on person 303.
  • the terminal device can also start and end the recording of focus chasing videos multiple times, and additionally generate multiple channels of focus chasing videos.
  • the terminal device can generate the focus video 2 based on the person 303.
  • the terminal device 301 can additionally generate a focus video 3 based on the character 302.
  • the terminal device in addition to the normally recorded video 1, the terminal device generates two additional focus-chasing videos (ie, focus-chasing video 2 and focus-chasing video 3).
  • the embodiment of this application does not limit the number of focus videos.
  • the terminal device can start and end the recording of focus tracking videos multiple times, and generate multi-channel focus tracking videos based on the tracking target, improving the user experience.
  • the video recorded by the terminal device through the camera includes two characters. More or fewer people can be included in the video of the terminal device.
  • the embodiment of this application does not specifically limit the number of characters recorded by the terminal device.
  • the terminal device previews and records through the protagonist mode, it does not receive the user's operation to set the tracking target. When the recording ends, you can get a video.
  • the terminal device receives the user's operation to set the tracking target through the protagonist mode preview and then receives the user's operation to close the small window, the terminal device cancels tracking of the tracking target. If the user's operation to set the tracking target is not received during recording, the end device When recording, you can get a video.
  • the protagonist mode can be set in applications with shooting functions such as cameras. After the terminal device enters the protagonist mode, the implementation of the protagonist mode may include preview mode and recording mode.
  • the interface displayed by the terminal device in both preview mode (before recording) and recording mode (during recording) can be called a preview interface; the screen displayed in the preview interface in preview mode (before recording) will not generate a video. and save; the screen displayed in the preview interface of recording mode (during recording) can generate a video and save it.
  • the preview interface in preview mode (before recording) is called the preview interface; the preview interface in recording mode (during recording) is called the recording interface.
  • the terminal device can display the image obtained by the camera (preview screen) in the preview area, and display the image of the tracking target selected by the user (tracking screen) in the small window.
  • the terminal device does not need to generate video, or save the content displayed in the preview area and the content displayed in the small window.
  • the preview interface of the protagonist mode in the terminal device may be as shown in Figure 3B.
  • the preview interface includes a preview area 304 and a recording control 305.
  • the preview area 304 displays a preview screen.
  • a tracking frame for example, tracking frame 307 and tracking frame 308 is displayed in the preview area.
  • the tracking box can prompt the user that the corresponding character can be set or switched to a tracking target, and can also facilitate the user to set or switch the tracking target.
  • the preview area may display multiple tracking frames.
  • the number of tracking frames is less than or equal to the number of people recognized by the terminal device.
  • the tracking target is any one of the multiple characters corresponding to the tracking frame in the preview screen.
  • the tracking target can be called a focus object, a protagonist object, etc. This application implementation does not limit this.
  • the display style of the tracking frame corresponding to the person set as the tracking target is different from the tracking frame corresponding to the person not set as the tracking target (eg, tracking frame 308). In this way, it is convenient for users to distinguish and identify the person being tracked (tracking target).
  • the color of the tracking frame can also be set. For example, the color of the tracking frame 307 and the tracking frame 308 are different. In this way, the tracking target can be intuitively distinguished from other characters.
  • the tracking box can be a virtual box, such as tracking box 307; it can also be a combination of a virtual box and "+", such as tracking box 308.
  • the tracking box can also be in any display form, and the tracking box can be triggered by the user to implement tracking. Just set it up as a target tracking function.
  • the tracking frame can be marked at any position of the person who can be set as the tracking target, which is not specifically limited in the embodiment of the present application.
  • the tracking box is a type of tracking logo
  • the terminal device can also display other forms of tracking logos to facilitate the user to set tracking targets.
  • other forms of tracking identifiers may be thumbnails of objects, numbers, letters, graphics, etc.
  • the tracking mark can be set anywhere on the object, near the object, or at the edge of the preview area. The embodiment of the present application does not specifically limit the specific location of the tracking mark.
  • the terminal device can arrange and display the thumbnails of one or more objects at the edge of the preview area.
  • the terminal device receives the operation of the user clicking on any tracking identification, the terminal device sets the object corresponding to the clicked tracking identification as the tracking target. .
  • the terminal device can identify people through face recognition technology and display a tracking box.
  • the terminal device can determine the display position of the tracking frame based on human body recognition and other technologies, such as the more central position of the person's body. In this way, calculating the position of the tracking frame based on the human body can reduce the situation where the tracking frame is located at the face, reduce the occlusion of the face by the tracking frame, and improve the user experience.
  • the embodiments of this application do not specifically limit the technology used to identify people and calculate the position of the tracking frame.
  • Figure 3B also includes a small window 306.
  • the small window 306 displays a tracking screen.
  • the tracking screen corresponds to the tracking target.
  • the characters in the tracking screen displayed in the small window 306 are switched. For example, if the tracking target switches from the person corresponding to the tracking frame 307 to the person corresponding to the tracking frame 308, the tracking screen displayed in the small window 306 will also change accordingly.
  • the tracking screen can be part of the preview screen.
  • the tracking picture is obtained by the terminal device cropping the preview picture in real time according to a certain proportion based on the tracking target.
  • the embodiment of the present application does not specifically limit the picture displayed by the small window.
  • the size, position, and horizontal and vertical screen display modes of the small window are adjustable, and users can adjust the style of the small window according to their recording habits.
  • the tracking target is displayed in the center of the tracking screen.
  • a small window floats above the recording area.
  • the small window 306 also includes a closing control 309 and a first switching control 310 .
  • a small window is displayed on the preview interface to display the tracking screen of the tracking target.
  • the preview interface does not display a small window.
  • the terminal device When the user triggers the close control 309 by clicking, touching or other operations in the preview interface shown in Figure 3B, the terminal device receives the operation of closing the small window, and the terminal device closes the small window and cancels the preview of the tracking target.
  • the terminal device When the user triggers the first switching control 310 through operations such as clicking and touching in the preview interface shown in FIG. 3B, the terminal device receives the operation of switching the small window display mode (small window style), and the terminal device switches the style of the small window. Specifically, the small window can be switched from horizontal to vertical, or from vertical to horizontal.
  • the final The end device receives the operation to start recording and starts recording video and focus tracking video.
  • the preview interface may also include other controls, such as protagonist mode exit control 311, setting control 312, flash control 313, second switching control 314, zoom control 315, etc.
  • the terminal device When the protagonist mode exit control 311 is triggered, the terminal device exits the protagonist mode and enters the video recording mode.
  • the terminal device can adjust various setting parameters. Setting parameters include but are not limited to: whether to turn on watermark, storage path, encoding method, whether to save geographical location, etc.
  • the flash control 313 When the flash control 313 is triggered, the terminal device can set the flash effect, for example, control the flash to be forced on, forced off, turned on when taking pictures, turned on according to environmental adaptability, etc.
  • the zoom control 315 When the zoom control 315 is triggered, the terminal device can adjust the focus of the camera and then adjust the magnification of the preview image.
  • the terminal device When the user triggers the second switching control 314 by clicking or touching the preview interface shown in FIG. 3B, the terminal device receives the operation of setting the small window style and displays the small window style options for the user to select.
  • Small window style options include but are not limited to: horizontal or vertical, etc. The embodiments of the present application do not limit this.
  • the second switching control 314 corresponds to the display style of the small window to facilitate the user to distinguish the small window style.
  • the small window style switching can be controlled through the first switching control 310 , or the small window style switching can be controlled through the second switching control 314 .
  • the first switching control 310 in the small window and the second switching control 314 in the preview area can be linked.
  • the icon of the first switching control 310 is the style of the vertical preview
  • the icon of the second switching control 314 is also the style of the vertical preview
  • the first The icons of the switching control 310 and the second switching control 314 are both in the horizontal preview style, prompting the user to click again to switch to the preview style.
  • the tracking target in the preview scene, when the terminal device sets a tracking target, the tracking target can be displayed in the center of the tracking screen in the small window. In some scenes, the tracking target can be in a moving state. When the tracking target moves but does not leave the camera, the tracking screen in the small window will continue to display the tracking target in the center.
  • the preview interface can be set to include a male character and a female character as the tracking target objects.
  • the terminal device sets the male character as the tracking target and enters a in Figure 3B interface shown.
  • the tracking screen of the small window displays a male character in the center, and the male character is located to the right of the female character.
  • the terminal device continues to focus on the male character and displays the male character in the center in a small window.
  • the interface of the terminal device can be shown as b in Figure 3B.
  • the tracking screen of the small window still displays the male character in the center, and the male character is located to the left of the female character.
  • the focus moves with the movement of the tracking target.
  • the focus is located on the face area of the male character, located in the middle of the screen.
  • the interface of the terminal device is as shown in b in Figure 3B.
  • the focus is on the male character's face area, located in the middle left part of the screen.
  • the terminal device can display the image obtained by the camera (recording screen) in the recording area, display the image of the tracking target selected by the user (tracking screen) in the small window, and generate the recording obtained after turning on the recording mode Video and focus video.
  • the terminal device saves the video generated based on the recording screen and the focus video generated based on the tracking screen.
  • the small window can end recording earlier than recording in the recording area. Recording in a small window When it ends, the terminal device saves the focus video generated based on the tracking screen. Or it can be understood that the terminal device can end the recording of the focus video earlier than the entire video.
  • the small window may start recording with a delay compared to the recording of the recording area. Or it can be understood that after the terminal device starts recording the video and detects the user's operation of setting the tracking target, the terminal device opens a small window and starts recording the focus video.
  • the recording interface of the protagonist mode in the terminal device may be as shown in Figure 3C.
  • the recording interface includes a recording area 316, a pause control 317, and an end control 318.
  • the recording area 316 displays the recording screen and recording duration.
  • a tracking frame for example, tracking frame 320 and tracking frame 321 is displayed in the recording area. It can be understood that the number of tracking frames is less than or equal to the number of people recognized by the terminal device.
  • the recording interface also displays a small window 319.
  • the small window 319 displays a tracking screen.
  • the tracking screen corresponds to the tracking target.
  • the characters in the tracking screen displayed in the small window 319 are switched. For example, if the tracking target switches from the person corresponding to the tracking frame 320 to the person corresponding to the tracking frame 321, the tracking screen displayed in the small window 319 will also change accordingly.
  • the tracking screen can be part of the recording screen.
  • the tracking picture is obtained by cropping the recording picture in real time according to a certain proportion based on the tracking target.
  • the embodiment of the present application does not specifically limit the picture displayed by the small window.
  • the tracking target is displayed in the center of the tracking screen.
  • a small window floats above the recording area.
  • the small window 319 also includes a small window end control 322 and a small window recording duration.
  • a small window is displayed on the recording interface to display the tracking screen of the tracking target.
  • the recording interface does not display a small window.
  • the terminal device When the user triggers the end control 318 by clicking, touching or other operations on the recording interface shown in Figure 3C, the terminal device receives the user's operation to end the recording, the terminal device enters the preview interface of the protagonist mode, and stores the video corresponding to the recording screen, and Track the focus video corresponding to the picture.
  • the terminal device When the user triggers the pause control 317 by clicking, touching, etc. on the recording interface shown in Figure 3C, the terminal device receives the user's operation to pause the recording, and the terminal device pauses the recording of the video in the recording area 316 and the focus tracking in the small window 319. Video recording.
  • the terminal device When the user triggers the small window end control 322 by clicking, touching, etc. on the recording interface shown in Figure 3C, the terminal device receives the user's operation to end the small window recording, and the terminal device continues to display the recording screen in the recording area 316 and closes the small window. 319 and store the focus video corresponding to the tracking screen in the small window 319.
  • the recording interface also includes a flash control 323.
  • the flash light control 323 When the flash light control 323 is triggered, the terminal device can set the flash light effect.
  • the terminal device when the terminal device records through the protagonist mode, it can generate a video based on the recording image of the recording area, and additionally generate a focus video corresponding to the tracking target based on the tracking image of the small window.
  • the two channels of video are independently stored in the terminal device. In this way, the video corresponding to the tracking target can be obtained without subsequent manual editing of the entire video. The operation is simple and convenient, and the user experience is improved.
  • the tracking screen of the small window can Display the tracking target in the center.
  • the tracking target can be in a moving state.
  • the tracking screen in the small window will continue to display the tracking target in the center.
  • the preview interface can be set to include a male character and a female character as the tracking target objects.
  • the terminal device sets the male character as the tracking target and enters a in Figure 3C interface shown.
  • the tracking screen of the small window displays a male character in the center, and the male character is located to the right of the female character.
  • the terminal device continues to focus on the male character and displays the male character in the center in a small window.
  • the interface of the terminal device can be shown as b in Figure 3C.
  • the tracking screen of the small window still displays the male character in the center, and the male character is located to the left of the female character.
  • the focus moves with the movement of the tracking target.
  • the focus is located on the face area of the male character, located in the middle of the screen.
  • the interface of the terminal device can be shown in b in Figure 3C.
  • the focus is on the facial area of the male character, located in the middle left part of the screen.
  • the embodiment of the present application defines the shooting mode that can additionally generate one or more focus tracking videos based on the tracking target as the protagonist mode.
  • This shooting mode can also be called the focus tracking mode, etc., and the embodiment of the present application does not make any reference to this. limited.
  • Figures 4 and 5 are schematic diagrams of two protagonist mode entry processes provided by embodiments of the present application.
  • Figures 6 and 7 are schematic diagrams of the interface involved in recording provided by the embodiment of the present application.
  • FIG. 4 is a schematic interface diagram of a terminal device entering protagonist mode according to an embodiment of the present application.
  • the terminal device When the terminal device receives the user's operation to open the camera application 401 in the main interface shown in a in Figure 4, the terminal device can enter the photo preview interface shown in b in Figure 4.
  • the photo-taking preview interface may include a preview area and a shooting mode selection item.
  • the preview area displays a preview image in real time; shooting mode options include but are not limited to: portrait, photo, video, professional or more 402.
  • the shooting mode selection interface includes: shooting mode selection items.
  • Shooting mode options include but are not limited to: professional, panorama, high-dynamic-range image (high-dynamic-range, HDR), time-lapse photography, watermark, document correction, high-pixel, micro-movie, protagonist mode 403 or other types of shooting modes options.
  • the terminal device receives the user's operation to select the preview of the protagonist mode and enters the protagonist mode as shown in d in Figure 4
  • the corresponding preview interface includes: preview area and recording controls.
  • a preview screen is displayed in the preview area.
  • a tracking frame is also displayed in the preview area.
  • the terminal device receives the operation of setting the tracking target, sets the person corresponding to the tracking box as the tracking target, and displays the tracking screen corresponding to the tracking target through a small window on the display interface.
  • FIG. 5 is a schematic interface diagram of another terminal device entering protagonist mode according to an embodiment of the present application.
  • the terminal device When the terminal device receives the user's request to open the camera application 501 in the main interface shown in a in Figure 5 During operation, the terminal device can enter the photo preview interface shown in b in Figure 5.
  • the photo-taking preview interface may include a preview area and a shooting mode selection item.
  • the preview area displays a preview image in real time; shooting mode options include but are not limited to: portrait, photo, video 502, professional or other types of shooting mode options.
  • the terminal device receives the user's operation of selecting the video preview and enters the video preview interface shown in c in Figure 5.
  • the video preview interface includes: preview area, recording parameter selection items and shooting mode selection items.
  • the preview area displays a preview image in real time; recording parameter selections include but are not limited to: protagonist mode 503, flash, filter, settings or other types of recording parameter selections.
  • Shooting mode options include but are not limited to: portrait, photo, video, professional or other types of shooting mode options.
  • the terminal device receives the user's operation of selecting the protagonist mode preview and enters the protagonist mode corresponding to d in Figure 5 preview interface.
  • the preview interface includes: preview area and recording controls.
  • a preview screen is displayed in the preview area.
  • a tracking frame is also displayed in the preview area.
  • the terminal device receives the operation of setting the tracking target, sets the person corresponding to the tracking box as the tracking target, and displays the tracking screen corresponding to the tracking target through a small window on the display interface.
  • the terminal device when the terminal device enters the protagonist mode, the terminal device can be placed horizontally in the landscape screen state, or it can be placed vertically in the portrait screen state.
  • the principle of the terminal device implementing the protagonist mode is similar , the following embodiment will take horizontal screen recording of a terminal device as an example to describe multiple application scenarios of the protagonist mode.
  • FIG. 6 is a schematic interface diagram corresponding to a protagonist mode recording process provided by an embodiment of the present application.
  • the terminal device When the user triggers the recording control 601 through operations such as clicking and touching in the preview interface shown in a in Figure 6, the terminal device receives the operation to start recording and enters the recording interface shown in b in Figure 6.
  • the recording interface includes: recording area 602, pause control 603, and end control 604.
  • the recording area displays a recording screen and a tracking frame 605.
  • the tracking box 605 can facilitate the user to select a tracking target.
  • the terminal device When the user triggers the tracking box 605 through operations such as clicking and touching in the recording interface shown in b in Figure 6, the terminal device receives the user's operation of setting the tracking target, and the terminal device enters the recording interface shown in c in Figure 6,
  • the recording interface includes: recording area, pause control 606, end control 607, and small window 608.
  • the recording area displays the recording screen.
  • Widget 608 includes widget end control 609 .
  • the small window 608 displays a tracking screen corresponding to the tracking target.
  • the tracking screen corresponding to the tracking target is part of the recording screen.
  • the terminal device receives the operation to pause the video recording, and the video recording is paused.
  • the focus video corresponding to the window is also recorded and paused.
  • the terminal device When the user triggers the end control 607 by clicking or touching the recording interface shown in c in Figure 6, the terminal device receives the operation to end the video recording, the video recording ends, and the focus video corresponding to the small window also ends.
  • the terminal device When the user triggers the small window end control 609 by clicking or touching on the recording interface shown in c in Figure 6
  • the terminal device receives the operation to end the focus tracking video recording, the focus tracking video recording corresponding to the small window ends, and the video continues to be recorded.
  • the position of the small window 608 can be moved.
  • the moving distance of the small window 608 is related to the distance between the start position of the drag operation and the end position of the drag operation, and the moving direction of the small window 608 is related to the direction of the drag operation.
  • FIG. 7 is a schematic interface diagram corresponding to a protagonist mode recording process provided by an embodiment of the present application.
  • the terminal device receives the user's operation to set the tracking target and enters the preview interface shown in b in Figure 7 .
  • the preview interface includes: preview area 702, recording control 703 and small window 704.
  • a preview screen is displayed in the recording area.
  • Small window 704 displays a tracking screen.
  • the tracking screen corresponds to the tracking target.
  • the small window 704 also includes a closing control 705 and a first switching control 706 .
  • the terminal device When the user triggers the recording control 703 by clicking, touching or other operations in the preview interface shown in b in Figure 7, the terminal device receives the operation to start recording and enters the recording interface shown in c in Figure 7.
  • the recording interface includes: recording area, pause control 707, end control 708 and small window 709.
  • the recording area displays the recording screen.
  • Widget 709 includes widget end control 710 .
  • the small window 709 displays the tracking screen, and the tracking screen corresponds to the tracking target.
  • the tracking screen is part of the recording screen.
  • the terminal device receives the operation of closing the small window, and the terminal device closes Small window, cancel the preview of the tracking target.
  • the terminal device When the user triggers the first switching control 706 of the recording control through operations such as clicking and touching in the preview interface shown in b in Figure 7, the terminal device receives the operation of switching the display mode of the small window, and the terminal device switches the display mode of the small window. . Specifically, the small window can be switched from horizontal to vertical or from vertical to horizontal.
  • the terminal device can also adjust the size of the small window.
  • the embodiment of the present application does not limit the specific implementation method of adjusting the size of the small window.
  • the terminal device can start focus video recording in a small window based on the above scenario and obtain multi-channel video.
  • the small window can display the footage of the tracking target in the preview area/recording area, but the video recorded by the small window and the video recorded in the recording area are multiple independent videos and are not embedded in the recording screen of one recording area.
  • the terminal device can obtain a video recorded in the recording area. If the terminal device enables the recording of small windows, the terminal device can obtain one channel of video recorded in the recording area and one or more channels of video recorded in the small window. For example, while recording video in the recording area, the terminal device can start small window recording multiple times. When the terminal device detects a click operation on the small window end control, it can end the recording of the small window and obtain a video. When the small window opens recording again, the terminal device can obtain a new video. The number of videos obtained by the terminal device based on the small window can be related to the number of times the small window is opened for recording.
  • the user can browse the videos recorded in the recording area and the multi-channel videos recorded in the small window based on the album of the camera application.
  • the display order of the multi-channel videos can be the recording order of the videos, that is, the terminal device can display the videos according to the results of the recorded videos. Sort by end time point or start time point.
  • the display order of multi-channel videos can also be the reverse order of video recording, that is, the terminal device can arrange the videos in reverse order according to the end time or start time of the recorded video.
  • the video recorded in the recording area and the video recorded in the small window can be displayed in the video thumbnail on the same album interface.
  • the terminal device can set an identifier for the video recorded in the small window.
  • the terminal device can add outer borders, fonts, graphics, etc. to the video recorded in the small window.
  • the terminal device can also set the size of the video thumbnail recorded in the small window, so that there is a size difference between the video thumbnail recorded in the small window and the recording area. It can be understood that the embodiment of the present application does not limit the form of video thumbnails in the album, the arrangement order of video thumbnails, and the saving order of videos.
  • the terminal device may display an interface with a tracking frame in both the preview scene and the recording scene.
  • a tracking frame for the expression form and display position of the tracking frame, please refer to the relevant description of the tracking frame in FIG. 3B and/or FIG. 3C , and will not be described again here.
  • the terminal device can adaptively adjust the specifications of the tracking frame based on the size of the character.
  • the shooting screen includes but is not limited to: preview screen or recording screen.
  • the character size can be understood as the size of the human face frame, or can be understood as the size of the human body frame.
  • the terminal device can adaptively adjust the specifications of the tracking frame based on the size of the face frame, or adaptively adjust the specifications of the tracking frame based on the size of the human body frame. This is not limited in the embodiments of the present application.
  • the terminal device can recognize the person's face and the person's body, and then obtain the face frame and/or the human body frame.
  • the terminal device can obtain the size of the face frame and/or the human body frame, and calculate the size of the tracking frame.
  • FIG. 8A is a schematic diagram of an interface provided by an embodiment of the present application.
  • the terminal device can recognize 4 people and 4 tracking frames in the preview screen shown in Figure 8A.
  • the four characters are character 801, character 802, character 803, and character 804.
  • the four tracking frames are tracking frame 805, tracking frame 806, tracking frame 807, and tracking frame 808.
  • character 801 corresponds to tracking frame 805
  • character 802 corresponds to tracking frame 806
  • character 803 corresponds to tracking frame 807
  • character 804 corresponds to tracking frame 808.
  • the terminal device can adaptively adjust the specifications of the tracking frame based on the distance between the character and the terminal device.
  • the distance between the character and the terminal device can also be understood as the distance between the character and the camera of the terminal device, or the focal length between the character and the camera.
  • FIG. 8B is a schematic diagram of an interface provided by an embodiment of the present application.
  • the terminal device can recognize 4 people and 4 tracking frames in the preview screen shown in Figure 8B.
  • the four characters are character 809, character 810, character 811, and character 812.
  • the four tracking frames are tracking frame 813, tracking frame 814, tracking frame 815, and tracking frame 816.
  • the character 809 corresponds to the tracking frame 813
  • the character 810 corresponds to the tracking frame 814
  • the character 811 corresponds to the tracking frame 815
  • the character 810 corresponds to the tracking frame 816.
  • the terminal device recognizes the distance between the person 809 and the terminal device, the distance between the person 810 and the terminal device, The distance, the distance between the character 812 and the terminal device, and the distance between the character 811 and the terminal device decrease in sequence, then the size of the tracking frame 813, the size of the tracking frame 814, the size of the tracking frame 816 and the size of the tracking frame 815 are in order. decline.
  • the terminal device displays the tracking frame based on a preset size. It can be understood that the sizes of the tracking frames corresponding to the characters in the shot are the same. In this way, the situation where the tracking frame size is too small can be reduced.
  • FIG. 8C is a schematic diagram of an interface provided by an embodiment of the present application.
  • the terminal device can recognize 4 people and 4 tracking frames in the preview screen shown in Figure 8C.
  • the four characters are character 817, character 818, character 819, and character 820.
  • the four tracking frames are tracking frame 821, tracking frame 822, tracking frame 823, and tracking frame 824.
  • character 817 corresponds to tracking frame 821
  • character 818 corresponds to tracking frame 822
  • character 819 corresponds to tracking frame 823
  • character 818 corresponds to tracking frame 824.
  • the area of the character 817, the area of the character 818, the area of the character 819 and the area of the character 820 decrease in order
  • the size of the tracking frame 821, the size of the tracking frame 822, the size of the tracking frame 823 and the tracking The dimensions of frame 824 are the same.
  • the size of the character 817, the size of the character 818, the size of the character 819 and the size of the character 820 decrease in order
  • the size of the tracking frame 821, the size of the tracking frame 822, the size of the tracking frame 823 and the size of the tracking frame 824 Dimensions are the same.
  • the terminal device may be set with a first threshold.
  • the first threshold represents the maximum number of tracking frames that the terminal device can display.
  • the first threshold may be 3 or 5. This application applies to the first threshold.
  • the specific value of the threshold is not limited.
  • the terminal device displays 4 characters and 3 tracking frames in the preview screen shown in a in Figure 9A.
  • the four characters are character 901, character 902, character 903 and character 904 respectively.
  • the three tracking frames are tracking frame 905, tracking frame 906 and tracking frame 907 respectively.
  • the character 901 corresponds to the tracking frame 905;
  • the character 902 corresponds to the tracking frame 906;
  • the character 903 corresponds to the tracking frame 907; and the character 904 does not correspond to the tracking frame.
  • the size of the tracking frame 905, the size of the tracking frame 906, and the size of the tracking frame 907 are sequentially reduced.
  • the terminal device displays four characters and three tracking frames in the preview screen shown in b in FIG. 9A .
  • the four characters are character 909, character 910, character 911, and character 912.
  • the three tracking frames are tracking frame 913, tracking frame 914, and tracking frame 915 respectively.
  • the character 909 corresponds to the tracking frame 913
  • the character 910 corresponds to the tracking frame 914
  • the character 911 corresponds to the tracking frame 915
  • the character 912 does not correspond to the tracking frame.
  • the size of the tracking frame 913, the size of the tracking frame 914, and the size of the tracking frame 915 are the same.
  • the terminal device confirms the person displaying the tracking frame based on the size of the person and the first threshold.
  • the terminal device when the terminal device recognizes that the number of people in the photographed picture is less than or equal to N, the tracking frame corresponding to the person will be displayed.
  • the terminal device recognizes that the number of people in the shooting screen is greater than N, the characters corresponding to the first N in order of size from large to small will display tracking frames, and the remaining characters will not display tracking frames.
  • the characters corresponding to N before character size sorting are character 901, character 902 and character 903. Therefore, character 901, character 902 and character 903 are all displayed correspondingly. tracking box.
  • the tracking frame is not displayed correspondingly to the character 904; for example, assuming that N is 3, as shown in b in Figure 9A, the characters corresponding to N before character size sorting are character 909, character 910 and character 911. Therefore, character 909, character 910 and character 911 all display tracking frames correspondingly. There is no corresponding tracking frame displayed for character 912.
  • the terminal device confirms the person displaying the tracking frame based on the distance between the person and the terminal device and the first threshold.
  • the first threshold is N
  • the terminal device recognizes that the number of people in the photographed picture is less than or equal to N
  • the tracking frame corresponding to the person will be displayed.
  • the terminal device recognizes that the number of people in the shooting screen is greater than N
  • the first N characters corresponding to the distance between the characters and the terminal device are sorted from large to small to display a tracking frame, and the remaining characters do not display a tracking frame.
  • the terminal device can use technologies such as machine vision and deep neural networks to identify the person in front of the camera used by the terminal device to take the picture, and calculate the distance between the person and the camera used by the terminal device to take the picture.
  • the distance between the person and the camera used for shooting the terminal device can also be called the distance between the person and the terminal device.
  • the terminal device displays 4 characters and 3 tracking frames in the preview screen shown in a in Figure 9B.
  • the four characters are character 921, character 922, character 923, and character 924.
  • the three tracking frames are tracking frame 925, tracking frame 926, and tracking frame 928 respectively.
  • the character 921 corresponds to the tracking frame 925;
  • the character 922 corresponds to the tracking frame 926;
  • the character 923 corresponds to the tracking frame 928;
  • the character 924 does not correspond to the tracking frame.
  • the size of the tracking box 925, the size of the tracking box 926, and the size of the tracking box 928 are sequentially reduced.
  • the terminal device recognizes the distance between the character 921 and the terminal device, the distance between the character 922 and the terminal device, the distance between the character 923 and the terminal device, and the distance between the character 924 and the terminal device The distances between them decrease in sequence, and the tracking frames of character 921, character 922 and character 924 are correspondingly displayed. There is no corresponding tracking frame displayed for character 923.
  • N is 3 as an example.
  • the terminal device displays 4 characters in the preview screen as shown in b in Figure 9B and 3 tracking boxes.
  • the four characters are character 929, character 930, character 931, and character 932.
  • the three tracking frames are tracking frame 933, tracking frame 934, and tracking frame 936 respectively.
  • the character 929 corresponds to the tracking frame 933;
  • the character 930 corresponds to the tracking frame 934;
  • the character 931 corresponds to the tracking frame 936;
  • the character 932 does not correspond to the tracking frame.
  • the size of the tracking frame 933, the size of the tracking frame 934, and the size of the tracking frame 936 are the same.
  • the terminal device recognizes the distance between the character 929 and the terminal device, the distance between the character 930 and the terminal device, the distance between the character 932 and the terminal device, and the distance between the character 931 and the terminal device The distances between them decrease in sequence, and then character 929, character 930 and character 932 all display tracking frames accordingly. There is no corresponding tracking frame displayed for character 931.
  • the position of the tracking frame is calculated in real time based on the character.
  • the position of the character is close or the character is overlapped and blocked, the corresponding displayed tracking frame may overlap.
  • embodiments of the present application provide several tracking frame display strategies to reduce overlapping tracking frames, thereby reducing false triggering caused by overlapping tracking frames.
  • the terminal device can comprehensively determine the image based on the relevant information of the face frame and the relevant information of the human body frame. Determine the position of the tracking frame.
  • the relevant information of the face frame includes but is not limited to: the center position of the face frame, the size of the face frame, etc.
  • the relevant information of the human body frame includes but is not limited to: the center position of the human body frame, the size of the human body frame, etc.
  • the terminal device calculates the average value based on the center of the face frame and the center of the human body frame to obtain the center of the tracking frame.
  • the terminal device can recognize the face and human body of the character 1001a, and obtain the face frame 1002a and the human body frame 1003a.
  • the terminal device can obtain the center 1004a of the face frame and the center 1005a of the human body frame.
  • the terminal device calculates the average value based on the center 1004a of the face frame and the center 1005a of the human body frame to obtain the center 1006a of the tracking frame.
  • the terminal device can calculate the center position of the tracking frame based on the center position of the face frame, the center position of the human body frame, the first weight, and the second weight.
  • the terminal device can recognize the person 1001b. Face and human body, the face frame 1002b and the human body frame 1003b are obtained. Correspondingly, the terminal device can obtain the center 1004b of the face frame and the center 1005b of the human body frame. The terminal device obtains the center 1006b of the tracking frame based on the center 1004b of the face frame, the center 1005b of the human body frame, the first weight and the second weight.
  • the center position of the tracking frame can also be the center position of the human body frame.
  • the terminal device can recognize the face and human body of the character 1001c, and obtain the face frame 1002c and the human body frame 1003c.
  • the terminal device can obtain the center 1004c of the face frame and the center 1005c of the human body frame.
  • the terminal device determines that the center of the tracking frame is the center of the human body frame 1005c.
  • the tracking frame is adjacent to the face frame.
  • the terminal device determines the relative position of the tracking frame and the face frame based on the relative position of the face frame and the human body frame, as well as the horizontal and vertical lengths of the human body frame, and then determines the position of the tracking frame.
  • the tracking frame is located on the lower side of the human face frame (as shown in a in Figure 10D);
  • the tracking frame is located on the upper side of the face frame (as shown in b in Figure 10D);
  • the tracking frame is located on the right side of the face frame (as shown in c in Figure 10D);
  • the face frame is located on the right side of the human body frame, When the horizontal length of the human body frame is greater than the vertical length, the tracking frame is located on the left side of the face frame (as shown in d in Figure 10D).
  • the terminal device can also determine the position of the tracking frame based on other methods or other conditions.
  • Other conditions include: the distance between the tracking frame and the face frame is greater than the preset distance, the tracking frame is located on the torso of the human body, etc.
  • the embodiment of the present application does not limit the specific method of determining the position of the tracking frame based on a single person.
  • the terminal device may recognize multiple people and display multiple tracking boxes.
  • the position of the characters is close or the characters are overlapped and blocked, the corresponding displayed tracking frames may overlap.
  • the display strategy of the tracking frame in a scene with multiple characters will be described below with a collection of Figures 11A to 15 .
  • the terminal device when the terminal device detects that the tracking frames overlap or calculates that the tracking frames overlap, the terminal device redetermines the display position of the tracking frames to reduce the overlap of the tracking frames.
  • the terminal device can reduce the tracking frame by moving the tracking frame away from the overlapping area. Overlap; the terminal device can also reduce the overlap of tracking frames by not displaying the tracking frame corresponding to one of the characters.
  • the following describes the display strategy of the tracking frame in a scenario where the size of the tracking frame is the preset size, that is, in a scenario where the tracking frame size is the same.
  • the terminal device moves the tracking frames away from the overlapping area.
  • Directions away from the overlapping area include but are not limited to: up, down, left, right, diagonally upward or diagonally downward, etc. In this way, the overlap of tracking frames can be reduced.
  • the terminal device can determine whether the tracking frames overlap based on the positions and preset sizes of two adjacent tracking frames. When the conditions are not met, the terminal device can adjust the position of one of the tracking frames based on the relative positions of the two adjacent tracking frames, or adjust the positions of the two tracking frames so that the distance between the two adjacent tracking frames increases, thereby reducing Tracking box overlap.
  • the terminal device can calculate the horizontal spacing and the vertical spacing between the center positions of the two adjacent tracking frames based on the center positions and preset sizes of the two adjacent tracking frames. Then it is determined whether the horizontal spacing and the vertical spacing satisfy the first preset condition.
  • the first preset condition includes: the horizontal distance is greater than or equal to the first horizontal preset distance, and the vertical distance is greater than or equal to the first vertical preset distance.
  • the tracking frames overlap; that is, the horizontal distance is smaller than the first horizontal preset distance, and/or the vertical distance is smaller than the first vertical preset distance.
  • the terminal device can adjust the center position of one of the tracking frames based on the relative positions of the two adjacent tracking frames, or adjust the center positions of the two tracking frames respectively, so that the adjusted center positions of the two tracking frames are spaced apart in the lateral direction. Any one of the vertical spacing and the vertical spacing satisfies the first preset condition, thereby reducing the overlap of the tracking frames.
  • the horizontal preset spacing may be the horizontal length of the tracking frame, and the horizontal preset spacing may be the vertical length of the tracking frame.
  • the terminal device can also determine whether adjacent tracking frames overlap based on other methods, which are not limited here.
  • FIG. 11A is a schematic interface diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device calculates the tracking frame based on a single character
  • the terminal device can enter the interface shown in a in Figure 11A.
  • the preview screen in this interface includes character 1111a and character 1112a.
  • a tracking frame 1113a is displayed corresponding to the character 1111a; a tracking frame 1114a is displayed corresponding to the character 1112a.
  • the tracking frame 1113a and the tracking frame 1114a overlap.
  • the position of the adjusted tracking frame may be to the left.
  • the terminal device can enter the interface shown in b in Figure 11A.
  • the preview screen in this interface includes character 1111b and character 1112b.
  • a tracking frame 1113b is displayed corresponding to the character 1111b; a tracking frame 1114b is displayed corresponding to the character 1112b.
  • the tracking frame 1113b is displayed to the left.
  • the tracking frame 1113b and the tracking frame 1114b do not overlap.
  • the position of the adjusted tracking frame may be to the right.
  • the terminal device can enter the interface shown as c in Figure 11A.
  • the preview screen in this interface includes character 1111c and character 1112c.
  • a tracking frame 1113c is displayed corresponding to the character 1111c;
  • a tracking frame 1114c is displayed corresponding to the character 1112c.
  • the tracking frame 1114a and the tracking frame 1114c are displayed to the right.
  • the tracking frame 1113c and the tracking frame 1114c do not overlap.
  • the position of one of the adjusted tracking frames may be to the left, and the position of the other adjusted tracking frame may be to the right.
  • the terminal device can enter the interface shown in d in Figure 11A.
  • the preview screen in this interface includes character 1111d and character 1112d.
  • a tracking frame 1113d is displayed corresponding to the character 1111d;
  • a tracking frame 1114d is displayed corresponding to the character 1112d.
  • the tracking frame 1113d is displayed to the left.
  • the tracking frame 1114d is displayed to the right.
  • the tracking frame 1113d and the tracking frame 1114d do not overlap.
  • Moving two tracking frames at the same time can also reduce the offset of the tracking frames and reduce the situation where the tracking frames do not correspond to the characters.
  • the terminal device can move any tracking frame in a direction away from the overlapping area.
  • the terminal device can also move two tracking frames simultaneously in a direction away from the overlapping area.
  • the terminal device can reduce the overlap of the tracking frames by panning left or right; when the vertical length of the overlapping area is less than the overlapping area
  • the terminal device can reduce the overlap of the tracking frame by panning up or down. In this way, the offset of the tracking frame can be reduced, and the situation where the tracking frame does not correspond to the character can be reduced.
  • the terminal device when the characters are close to each other or the characters are overlapped and blocked, the terminal device does not display the tracking frame corresponding to one of the characters. In this way, the overlapping tracking frames can be reduced.
  • the terminal device when the tracking frames overlap, the terminal device does not display the tracking frame corresponding to one of the characters.
  • the preview screen includes a character 1101a and a character 1102a.
  • a tracking frame 1103a is displayed corresponding to the character 1101a; a tracking frame 1104a is displayed corresponding to the character 1102a. Tracking frame 1103a and tracking frame 1104a overlap.
  • the terminal device can enter the interface shown as b in Figure 11B.
  • the preview screen in this interface includes character 1101b and character 1102b.
  • the tracking frame corresponding to the character 1101b is not displayed; the tracking frame 1104b is displayed corresponding to the character 1102b; there will be no overlap between the tracking frame corresponding to the character 1101b and the tracking frame corresponding to the character 1102b.
  • the terminal device can also enter the interface shown as c in Figure 11B.
  • the preview screen in this interface includes character 1101c and character 1102c.
  • the tracking frame 1103c is displayed correspondingly to the character 1101c; the tracking frame is not displayed correspondingly to the character 1102c. There will be no overlap between the tracking frame corresponding to the character 1101c and the tracking frame corresponding to the character 1102c.
  • the terminal device does not display the tracking frames corresponding to the smaller characters.
  • the character 1101b is smaller in size than the character 1102b, and the tracking box corresponding to 1001b is not displayed.
  • the terminal device when the tracking frames overlap, the terminal device does not display the tracking frame corresponding to the person who is far away from the terminal device.
  • the terminal device compared with the distance between the character 1101c and the terminal device, the distance between the character 1102c and the terminal device is greater, and the terminal device does not display the tracking box corresponding to 1102c.
  • the tracking frame 1103c corresponding to the character 1101c is displayed.
  • the terminal device can select the implementation method based on the overlapping area of the tracking frame.
  • the terminal device can select the implementation method based on the area/size of the overlapping area, etc.
  • the terminal device selects implementation mode 1; when the first value is greater than the second threshold, the terminal device selects implementation mode 2.
  • the first value can be the ratio of the area of the overlapping area of the tracking frames to the total area of the overlapping tracking frames; the first value can also be the ratio of the area of the overlapping area of the tracking frames to the area of any one of the tracking frames, which is not limited here.
  • the second threshold can be 0.25 or 0.4. The embodiment of the present application does not limit the value of the second threshold.
  • the terminal device selects implementation method 1; when the second value and the third value are both greater than the third threshold, the terminal device Device selection implementation method 2.
  • the second value may be the ratio of the lateral length of the overlapping area of the tracking frames to the total lateral length of the overlapping tracking frames
  • the third value may be the ratio of the vertical length of the overlapping area of the tracking frames to the total vertical length of the overlapping tracking frames
  • the second value may also be the ratio of the lateral length of the overlapping area of the tracking frames to the lateral length of any tracking frame
  • the third value may be the ratio of the vertical length of the overlapping area of the tracking frames to the lateral length of any tracking frame;
  • the embodiments of this application do not limit the specific calculation methods of the second value and the third value.
  • the third threshold can be 0.25 or 0.4. The embodiment of the present application does not limit the value of the third threshold.
  • the overlapping area of the tracking frame is the diagonally shaded area in Figure 12.
  • the horizontal length of the overlapping area of the tracking frames is the length of line segment a; the total horizontal length of the overlapping tracking frames is the length of line segment b; the vertical length of the overlapping area of the tracking frames is the length of line segment c; the total vertical length of the overlapping tracking frames is the length of line segment d; the horizontal length of the tracking frame is the length of line segment e; the vertical length of the tracking frame is the length of line segment f.
  • the following describes the display strategy of the tracking frame in the scenario where the size of the tracking frame is adaptively adjusted.
  • the terminal device can reduce the overlap of tracking frames by moving the tracking frames away from the overlapping area; the terminal device can also reduce the overlap of tracking frames by not displaying tracking frames corresponding to smaller characters.
  • the terminal device when the tracking frames overlap, the terminal device reduces the overlap of the tracking frames by moving the tracking frames away from the overlapping area.
  • the terminal device can determine whether the tracking frames overlap based on the positions of two adjacent tracking frames and the size of the corresponding tracking frames. When the conditions are not met, the terminal device can adjust the position of one of the tracking frames based on the relative positions of the two adjacent tracking frames, or adjust the positions of the two tracking frames so that the distance between the two adjacent tracking frames increases, thereby reducing Tracking box overlap.
  • the terminal device can calculate the horizontal spacing and the vertical spacing between the center positions of the two adjacent tracking frames based on the center positions and preset sizes of the two adjacent tracking frames. Then it is determined whether the horizontal spacing and the vertical spacing satisfy the second preset condition.
  • the second preset condition includes that the lateral spacing is greater than or equal to the second lateral preset spacing, and the vertical spacing is greater than or equal to the second vertical preset spacing.
  • the second lateral preset spacing may be half the sum of the lateral lengths of two adjacent tracking frames; the second vertical preset spacing may be half the sum of the vertical lengths of the two adjacent tracking frames.
  • the tracking frames overlap; that is, the horizontal distance is smaller than the second horizontal preset distance, and/or the vertical distance is smaller than the second vertical preset distance.
  • the terminal device can adjust the center position of one of the tracking frames based on the relative positions of the two adjacent tracking frames, or adjust the center positions of the two tracking frames respectively, so that the adjusted center positions of the two tracking frames are spaced apart in the lateral direction. Either one of the vertical distance and the vertical distance satisfies the second preset condition, thereby reducing the overlap of the tracking frames.
  • the terminal device can also determine whether adjacent tracking frames overlap based on other methods, which are not limited here.
  • the terminal device can reduce the overlap of the tracking frames by moving any tracking frame up, down, left, and/or right.
  • the terminal device can also move two tracking frames in opposite directions at the same time to reduce the overlap of tracking frames.
  • FIG. 13 is a schematic interface diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device calculates the tracking frame based on a single character
  • the terminal device can enter the interface shown in a in Figure 13.
  • the preview screen includes characters 1301a and 1302a.
  • a tracking frame 1303a is displayed corresponding to the character 1301a; a tracking frame 1304a is displayed corresponding to the character 1302a. Tracking frame 1303a and tracking frame 1304a overlap.
  • the position of the adjusted tracking frame may be to the left.
  • the terminal device can reduce the overlap of the tracking frames by moving the tracking frame corresponding to the smaller person to the left, and enter, for example, The interface shown in b in Figure 13.
  • the preview screen in this interface includes character 1301b and character 1302b.
  • a tracking frame 1303b is displayed corresponding to the character 1301b;
  • a tracking frame 1304b is displayed corresponding to the character 1302b.
  • the tracking frame 1303b is displayed to the left.
  • the tracking frame 1303b and the tracking frame 1304b do not overlap.
  • the position of the adjusted tracking frame may be to the right.
  • the terminal device can reduce the overlap of the tracking frames by moving the tracking frame corresponding to the larger person to the right, and enter, for example, The interface shown in c in Figure 13.
  • the preview screen in this interface includes character 1301c and character 1302c.
  • a tracking frame 1303c is displayed corresponding to the character 1301c;
  • a tracking frame 1304c is displayed corresponding to the character 1302c.
  • the tracking frame 1304c is displayed to the right.
  • the tracking frame 1303c and the tracking frame 1304c do not overlap.
  • the position of one of the adjusted tracking frames may be to the left, and the position of the other adjusted tracking frame may be to the right.
  • the preview screen in this interface includes character 1301d and character 1302d.
  • a tracking frame 1303d is displayed corresponding to the character 1301d;
  • a tracking frame 1304d is displayed corresponding to the character 1302d.
  • the tracking frame 1303d is displayed to the left.
  • the tracking frame 1304d is displayed to the right.
  • the tracking frame 1303d and the tracking frame 1304d do not overlap.
  • Moving two tracking frames at the same time can also reduce the offset of the tracking frames and reduce the situation where the tracking frames do not correspond to the characters.
  • the terminal device can move the tracking frame corresponding to the smaller person in a direction away from the overlapping area.
  • the terminal device can move the tracking frame corresponding to the larger person in a direction away from the overlapping area.
  • the terminal device can also move two tracking frames simultaneously in a direction away from the overlapping area.
  • the embodiment of the present application does not limit the specific movement method of the tracking frame.
  • the terminal device can reduce the overlap of the tracking frames by panning left or right; when the vertical length of the overlapping area is less than the overlapping area When the horizontal length is , the terminal device can reduce the overlap of the tracking frame by panning up or down. In this way, the offset of the tracking frame can be reduced.
  • the terminal device when the characters are close to each other or the characters are overlapped and blocked, the terminal device does not display the tracking frame corresponding to one of the characters. In this way, the overlapping tracking frames can be reduced.
  • the terminal device when the tracking frames overlap, the terminal device does not display the tracking frame corresponding to one of the characters.
  • the preview screen includes a character 1401a and a character 1402a.
  • a tracking frame 1403a is displayed corresponding to the character 1401a; a tracking frame 1404a is displayed corresponding to the character 1402a.
  • Tracking frame 1403a and tracking frame 1404a overlap.
  • the terminal device determines the size of the tracking frame based on the character size, the size of the tracking frame 1404a is larger than the size of the tracking frame 1403a.
  • the terminal device can enter the interface shown in b in Figure 14.
  • the preview screen in this interface includes character 1401b and character 1402b.
  • the tracking frame corresponding to the character 1401b is not displayed; the tracking frame 1404b is displayed corresponding to the character 1402b; there will be no overlap between the tracking frame corresponding to the character 1401b and the tracking frame corresponding to the character 1402b.
  • the terminal device can also enter the interface shown as c in Figure 14.
  • the preview screen in this interface includes character 1401c and character 1402c.
  • the tracking frame 1403c is displayed correspondingly to the character 1401c; the tracking frame is not displayed correspondingly to the character 1402c. There will be no overlap between the tracking frame corresponding to the character 1401c and the tracking frame corresponding to the character 1402c.
  • the terminal device does not display the tracking frames corresponding to the smaller characters.
  • the character 1401b is smaller in size than the character 1402b, and the tracking box corresponding to 1001b is not displayed.
  • the terminal device when the tracking frames overlap, the terminal device does not display the tracking frame corresponding to the person who is far away from the terminal device.
  • the terminal device compared with the distance between character 1401c and the terminal device, the distance between character 1402c and the terminal device is greater, and the terminal device does not display the tracking box corresponding to 1402c.
  • the tracking frame 1403c corresponding to the character 1401c is displayed.
  • the preview screen includes a character 1501a and a character 1502a.
  • a tracking frame 1503a is displayed corresponding to the character 1501a; a tracking frame 1504a is displayed corresponding to the character 1502a. Tracking frame 1503a and tracking frame 1504a overlap.
  • the terminal device determines the size of the tracking frame based on the distance between the character and the terminal device, the size of the tracking frame 1504a is smaller than the size of the tracking frame 1503a.
  • the terminal device can enter the interface shown in b in Figure 15.
  • the preview screen in this interface includes character 1501b and character 1502b.
  • the tracking frame corresponding to the character 1501b is not displayed; the tracking frame 1504b is displayed corresponding to the character 1502b; there will be no overlap between the tracking frame corresponding to the character 1501b and the tracking frame corresponding to the character 1502b.
  • the terminal device can also enter the interface shown as c in Figure 15.
  • the preview screen in this interface includes character 1501c and character 1502c.
  • the tracking frame 1503c is displayed correspondingly to the character 1501c; the tracking frame is not displayed correspondingly to the character 1502c. There will be no overlap between the tracking frame corresponding to the character 1501c and the tracking frame corresponding to the character 1502c.
  • the terminal device does not display the tracking frames corresponding to the smaller characters.
  • the character 1501b is smaller in size than the character 1502b, and the tracking box corresponding to 1001b is not displayed.
  • the terminal device when the tracking frames overlap, the terminal device does not display the tracking frame corresponding to the person who is far away from the terminal device.
  • the terminal device compared with the distance between character 1501c and the terminal device, the distance between character 1502c and the terminal device is greater, and the terminal device does not display the tracking box corresponding to 1502c.
  • the tracking frame 1503c corresponding to the character 1501c is displayed.
  • the terminal device can select the implementation method based on the overlapping area of the tracking frame.
  • the terminal device can select the implementation method based on the area/size of the overlapping area, etc.
  • the terminal device selects implementation mode 1; when the fourth value is greater than the fourth threshold, the terminal device selects implementation mode 2.
  • the fourth value can be the ratio of the area of the overlapping area of the tracking frame to the total area of the overlapping tracking frames; the fourth value can also be the ratio of the area of the overlapping area of the tracking frame to the area of the smaller tracking frame, which is not done here. limited.
  • the fourth threshold can be 0.25 or 0.4. The embodiment of the present application does not limit the value of the fourth threshold.
  • the terminal device selects implementation method 1; when the fifth value and the sixth value are both greater than the fifth threshold, the terminal device Device selection implementation method 2.
  • the fifth value may be the ratio of the lateral length of the overlapping area of the tracking frames to the total lateral length of the overlapping tracking frames, and the sixth value may be the ratio of the vertical length of the overlapping area of the tracking frames to the total vertical length of the overlapping tracking frames;
  • the fifth value may also be the ratio of the lateral length of the overlapping area of the tracking frames to the lateral length of any tracking frame, and the sixth value may be the ratio of the vertical length of the overlapping area of the tracking frames to the lateral length of any tracking frame;
  • the embodiment of the present application does not limit the specific calculation method of the fifth value and the sixth value.
  • the fifth threshold can be 0.25 or 0.4.
  • the embodiment of the present application does not limit the value of the fifth threshold.
  • the terminal device can also comprehensively confirm the movement direction and movement distance of the tracking frame based on multiple aspects such as the position of the face, the position of the person's limbs, etc., which will not be described again here. In this way, the situation where the tracking frame does not correspond to the character can be reduced.
  • the terminal device can additionally generate a focus video based on a person as the tracking target.
  • the terminal device can also be based on pets (for example, cats, dogs), preset objects (for example, vehicles) and other objects. Tracking the target additionally generates a focus-tracking video.
  • object tracking targets such as pets (eg, cats, dogs), preset objects (eg, vehicles), etc. may also display corresponding tracking frames. The display of the tracking frames may refer to the above relevant descriptions, which will not be described again here.
  • the above interface of the terminal device is only an example, and the interface of the terminal device may also include more More or less content.
  • the shapes and forms of each control in the above embodiments are only examples. The embodiments of this application do not limit the content of the display interface or the shape and form of each control.
  • FIG. 16 is a schematic flowchart of a video recording method provided by an embodiment of the present application.
  • the video recording method may include the following steps:
  • the terminal device displays a first interface.
  • the first interface includes a first window.
  • the first window displays images collected by the first camera in real time and one or more tracking identifiers.
  • the first window can be the preview area or recording area mentioned above.
  • the tracking identifier can be the tracking box mentioned above, or it can be in other forms (for example, thumbnails of objects, numbers, icons, etc.), which are not limited here.
  • the tracking mark can also be located at the position where the object is displayed, or can be arranged and displayed on the edge of the preview area or recording area, without limitation here.
  • the terminal device receives a first operation for a first tracking identifier, where the first tracking identifier is one of one or more tracking identifiers.
  • the first tracking identifier may be a tracking identifier corresponding to any object, for example, a tracking frame corresponding to a male character.
  • the triggering operation for the first tracking identification may be a click operation or a touch operation.
  • the embodiment of the present application does not limit the type of the triggering operation.
  • the terminal device displays a second interface.
  • the second interface includes a first window and a second window.
  • the first window displays the image collected by the first camera in real time
  • the second window displays the images in the first window and the second window.
  • the tracking target in response to the first operation, is set and an interface with a small window is displayed.
  • a part of the picture related to the first object in the first window can be understood as the tracking picture mentioned above.
  • the terminal device Before setting the tracking target, the terminal device does not display a small window. After setting the tracking target, the terminal device displays a small window.
  • the terminal device detects that the first object is displayed at the first position of the first window, and the second window displays a part of the screen related to the first object at the first position in the first window.
  • the terminal device detects that the first object is displayed at the second position of the first window, and the second window displays a part of the screen related to the first object at the second position in the first window.
  • the picture (tracking picture) displayed in the second window changes as the position of the focus target changes.
  • the position of the tracking object in the picture displayed in the second window changes, as shown in FIG. 3B or FIG. 3C.
  • the interface at the first moment may be the interface shown as a in Figure 3B
  • the interface at the second moment may be the interface shown as b in Figure 3B
  • the interface at the first moment may be a as shown in Figure 3C
  • the interface at the second moment may be the interface shown as b in Figure 3C.
  • the terminal device can set a tracking target based on the tracking identification. After setting the tracking target, the terminal device can additionally obtain and display the corresponding screen of the tracking target, and then additionally obtain one or more tracking targets corresponding to the video while recording the video. Focus video, thereby reducing subsequent editing operations on the tracking target and improving editing efficiency.
  • the picture displayed in the second window is cropped based on the picture displayed in the first window.
  • the first interface is a preview interface during video recording
  • the first window also includes a first control.
  • the method also includes: the terminal device receives a second operation on the first control; in response to the second operation, the terminal device End the recording and save the first video and the second video.
  • the first video is a video composed of the pictures displayed in the first window.
  • the second video is a video composed of the pictures displayed in the second window.
  • the second operation may be a user click operation or a user touch operation.
  • the embodiment of the present application does not limit the second operation.
  • the first video may be a video generated from the recording image displayed in the recording area
  • the second video may be a video generated from the tracking image displayed in the small window.
  • the first control may be an end control.
  • the first control may be the end control 318 shown in a in Figure 3C.
  • the terminal device detects that the user clicks on the end control 318, the terminal device ends the recording, generates a video based on the recording image displayed in the recording area, and generates a focus video based on the tracking image displayed in the small window.
  • the terminal device can save two videos and generate an additional video based on the tracking target. Without the user having to edit the video, the video of the tracking target can be obtained, improving the user experience.
  • the tracking identifier corresponds one-to-one with the object displayed in the first window detected by the terminal device.
  • each tracking identifier corresponds to an object, which makes it easier for users to select objects and improves user experience.
  • the method further includes: when the terminal device detects that the second object and the third object overlap in the first window, the terminal device displays the second tracking identification of the second object or the third tracking identification of the third object.
  • the second object and the third object are not the same object; the second object or the third object can be the first object, which is not limited here.
  • the second object and the third object may be the male character and the female character in FIG. 11B respectively, or the male character and the female character in FIG. 14 , which are not limited here.
  • the interface is as shown in Figure 11B, or the interface as shown in Figure 14.
  • the interface is as shown in Figure 11B, or the interface as shown in Figure 14.
  • the terminal device does not need to display the tracking logo corresponding to one of the objects, which can reduce the overlap of tracking logos, reduce the number of false triggers by users, and make the interface cleaner.
  • the terminal device displays the second tracking identification of the second object or the third tracking identification of the third object, including:
  • the terminal device determines based on one or more of the following information that the terminal device displays the second tracking identifier of the second object or the third object of the third object.
  • Three tracking markers the area occupied by the second object in the frame of the first window, the area occupied by the third object in the frame of the first window, the focal length between the second object and the first camera, the distance between the third object and the first camera The focal length between the first cameras.
  • the area occupied by the object can also be understood as the size of the object.
  • the area occupied by the character and the size occupied by the character can be understood as the size of the object.
  • the focal length of an object can be understood as the distance between the object and the camera, or can be understood as the distance between the object and the terminal device. For example, in the above description corresponding to the interface shown in Figure 11B, the distance between the person and the camera distance.
  • the terminal device can determine the tracking identifier to be displayed based on the area occupied by the object or the focal length of the object, and the tracking identifier not to be displayed.
  • the terminal device determines that the terminal device displays the second tracking identification of the second object or the third tracking identification of the third object based on one or more of the following information of the second object and the third object, including: when the third object When the area of the second object in a window is less than or equal to the area of the third object in the first window, the terminal device displays the third tracking identifier and does not display the second tracking identifier; or when the second object detected by the terminal device is the same as the third object in the first window, the terminal device displays the third tracking identifier. When the focal length between one camera is less than or equal to the focal length between the third object and the first camera, the terminal device displays the second tracking logo and does not display the third tracking logo.
  • the larger the area occupied by the object the greater the possibility for the user to set it as a tracking target; the smaller the focal length between the object and the first camera, the closer the distance between the object and the terminal device, the greater the possibility for the user The more likely it is to set up a tracking target.
  • the terminal device can confirm whether the tracking mark corresponding to the object is displayed based on the area occupied by the object, the focal length between the object and the first camera, etc.
  • FIG. 11B For details, reference may be made to the above-mentioned FIG. 11B and the corresponding description in FIG. 14 , which will not be described again here.
  • the method further includes: when the distance between the center position of the second tracking mark and the center position of the third tracking mark in the first preset direction is greater than or equal to the first preset distance, or when the center position of the second tracking mark is When the distance between the position and the center position of the third tracking mark in the second preset direction is greater than or equal to the second preset distance, the terminal device detects that the second object and the third object in the first window overlap.
  • the first preset direction may be horizontal, vertical, or oblique; the second preset direction may be vertical, horizontal, or oblique.
  • the terminal device can determine whether the two objects overlap based on the center positions of the tracking marks corresponding to the two objects, and then determine whether to display them, which facilitates calculation of whether they overlap and reduces the amount of calculation.
  • the first preset distance is half of the sum of the first length and the second length
  • the first length is the length of the second tracking mark in the first preset direction
  • the second length is the length of the third tracking mark in the first preset direction.
  • a length in a preset direction; the second preset spacing is half of the sum of the third length and the fourth length
  • the third length is the length of the second tracking mark in the second preset direction, and the fourth length is the third length. Track the length of the marker in the second preset direction.
  • the preset spacing is half of the sum of the lengths of the tracking mark in the same direction.
  • the first preset direction is horizontal and the second preset direction is vertical.
  • the method further includes: when the distance between the center position of the second tracking mark and the center position of the third tracking mark in the first preset direction is greater than or equal to the first preset distance, or when the center position of the second tracking mark is When the distance between the position and the center position of the third tracking mark in the second preset direction is greater than or equal to the second preset distance, the terminal device adjusts the position of the second tracking mark and/or adjusts the position of the third tracking mark until the The distance between the center position of the second tracking mark and the center position of the third tracking mark in the first preset direction is less than the first preset distance, or the center position of the second tracking mark and the center position of the third tracking mark are in the second preset direction.
  • the distance in the preset direction is smaller than the second preset interval.
  • the terminal device can reduce the overlap of tracking logos by adjusting the position of the tracking logos.
  • the specific adjustment method may refer to the corresponding descriptions in the above-mentioned FIG. 11A and FIG. 13 , and will not be described again here.
  • the tracking logos must be of the same size.
  • the size of the tracking frame is fixed, which can reduce the situation where the tracking frame is too small or too large.
  • the sizes of the tracking logos are different, and the size of each tracking logo is determined by the terminal device based on the size or area occupied by the object corresponding to each tracking logo in the first window. ; Alternatively, the size of each tracking mark is determined by the terminal device based on the focal length between the object corresponding to each tracking mark and the first camera.
  • the size of the tracking frame is not fixed. Terminal devices can be based on character size The size realizes adaptive adjustment of the tracking frame specifications.
  • the object includes a first object and a fourth object; when the size of the first object in the first picture is larger than the size of the second object in the first picture, the size of the first tracking mark is larger than the size of the first tracking mark corresponding to the fourth object.
  • the fourth object is different from the first object and can be a second object, a third object, or other objects, which is not limited here.
  • the terminal device can display multiple tracking logos, and the terminal device can adaptively adjust the specifications of the tracking frame based on the size of the person, the focal length between the object and the camera, etc. Provide another way to display tracking logos to improve user experience.
  • the first interface when the number of objects displayed in the first window detected by the terminal device is greater than N, the first interface includes N tracking identifiers, where N is an integer.
  • N can be 5 or any other value. In this way, the number of tracking marks displayed when there are many objects can be limited, and the screen clutter caused by too many tracking marks can be reduced. In addition, limiting the number of tracking identifiers can also reduce the computing requirements of the terminal device, reduce the lagging phenomenon of the terminal device, reduce power consumption, etc. It can also reduce the hardware requirements of the terminal device and increase the applicability.
  • the objects corresponding to the N tracking identifiers are the top N objects in order from large to small in size in the first picture; or, the objects corresponding to the N tracking identifiers are the objects detected by the terminal device and the same as those of the first camera.
  • the top N objects in order from smallest to largest distance.
  • the first camera when the terminal device displays the second interface, the first camera focuses on the first object; at the first moment, the first camera focuses on the first object; at the second moment, the first camera focuses on the first object.
  • the focus is on the first object.
  • the terminal device can focus based on the tracking target, making the tracking target clearer.
  • FIG. 17 is a schematic structural diagram of a video recording device provided by an embodiment of the present application.
  • the video recording device may be a terminal device in an embodiment of the present application, or may be a chip or chip system in the terminal device.
  • the video recording device 2100 can be used in communication equipment, circuits, hardware components or chips.
  • the video recording device includes: a display unit 2101 and a processing unit 2102.
  • the display unit 2101 is used to support the display steps performed by the video recording device 2100;
  • the processing unit 2102 is used to support the information processing steps performed by the video recording device 2100.
  • the video recording device 2100 may also include a communication unit 2103. Specifically, the communication unit is used to support the video recording device 2100 in performing the steps of sending data and receiving data.
  • the communication unit 2103 may be an input or output interface, a pin or a circuit, etc.
  • the video recording device may also include: a storage unit 2104.
  • the processing unit 2102 and the storage unit 2104 are connected through lines.
  • the storage unit 2104 may include one or more memories, which may be devices used to store programs or data in one or more devices or circuits. Storage unit 2104 can store independently Now, it is connected to the processing unit 2102 of the video recording device through a communication line.
  • the storage unit 2104 may also be integrated with the processing unit 2102.
  • the storage unit 2104 may store computer execution instructions for the method in the terminal device, so that the processing unit 2102 executes the method in the above embodiment.
  • the storage unit 2104 may be a register, cache, RAM, etc., and the storage unit 2104 may be integrated with the processing unit 2102.
  • the storage unit 2104 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, and the storage unit 2104 may be independent from the processing unit 2102.
  • Embodiments of the present application provide a terminal device.
  • the terminal device may also be called a terminal (terminal), user equipment (user equipment, UE), mobile station (mobile station, MS), mobile terminal (mobile terminal, MT), etc.
  • Terminal devices can be mobile phones, smart TVs, wearable devices, tablets (Pads), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminals Equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grid, transportation Wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, etc.
  • VR virtual reality
  • AR augmented reality
  • the terminal device includes: a processor and a memory; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the terminal device executes the above method.
  • An embodiment of the present application provides a terminal device, the structure of which is shown in Figure 1 .
  • the memory of the terminal device may be used to store at least one program instruction, and the processor is used to execute at least one program instruction to implement the technical solutions of the above method embodiments.
  • the implementation principles and technical effects are similar to the above-mentioned method-related embodiments, and will not be described again here.
  • An embodiment of the present application provides a chip.
  • the chip includes a processor, and the processor is used to call the computer program in the memory to execute the technical solutions in the above embodiments.
  • the implementation principles and technical effects are similar to the above-mentioned related embodiments and will not be described again here.
  • Embodiments of the present application provide a computer program product.
  • the computer program product When the computer program product is run on an electronic device, it causes the terminal device to execute the technical solutions in the above embodiments.
  • the implementation principles and technical effects are similar to the above-mentioned related embodiments and will not be described again here.
  • Embodiments of the present application provide a computer-readable storage medium on which program instructions are stored.
  • the terminal device is caused to execute the technical solutions of the above embodiments.
  • the implementation principles and technical effects are similar to the above-mentioned related embodiments and will not be described again here.
  • the methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
  • Computer-readable media may include computer storage media and communication media and may include any medium that can transfer a computer program from one place to another.
  • the storage media can be any target media that can be accessed by the computer.
  • Computer-readable media may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium intended to carry instructions or
  • the required program code is stored in the form of a data structure and can be accessed by the computer.
  • any connection is properly termed a computer-readable medium.
  • coaxial cable, fiber optic cable, Coaxial cable, fiber optic cable, twisted pair, DSL, or Wireless technologies such as infrared, radio and microwave are included in the definition of medium.
  • Disk and optical disk includes optical disk, laser disk, optical disk, Digital Versatile Disc (DVD), floppy disk, and Blu-ray disk, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions executed by the processing unit of the computer or other programmable device produce instructions for implementing the process. Diagram of a process or processes and/or block diagram of an apparatus for the functions specified in a block or blocks.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

本申请实施例提供录像方法和相关装置。该方法包括:显示包括第一窗口的第一界面,第一窗口显示有摄像头采集的画面和追踪标识;接收到对第一追踪标识的第一操作;响应于第一操作显示第二界面,第二界面包括第一窗口和第二窗口,第二窗口显示第一窗口中与第一对象有关的部分画面,第一对象为第一追踪标识对应的对象;第一时刻检测到第一窗口的第一位置显示有第一对象,第二时刻检测到第一窗口的第二位置显示有第一对象;在第一时刻和第二时刻第二窗口均显示与第一对象有关的一部分画面。这样,基于追踪标识设置追踪目标,设置追踪目标后可以得到并显示追踪目标对应的画面,额外得到追踪目标对应的视频,可以减少对用户后续剪辑操作,提升剪辑效率。

Description

录像方法和相关装置
本申请要求于2022年05月25日提交中国国家知识产权局、申请号为202210577630.X、申请名称为“录像方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及录像方法和相关装置。
背景技术
为提高用户体验,手机、平板电脑等电子设备通常配置多个摄像头。例如,在电子设备上分别配置前置摄像头和后置摄像头。用户可以根据自己的需求选择相应的拍摄模式,例如,前摄模式、后摄模式、前后双摄模式等。
一些场景中,用户通过电子设备拍摄的视频中包括一个或多个人物。当用户想要获得单个人物的视频时,需要对视频进行人工剪辑处理。
但是,人工剪辑的方式操作繁琐,效率低下,使得电子设备用户体验较差。
发明内容
本申请实施例提供录像方法和相关装置,应用于电子设备。该方法可以在拍摄视频时追踪选中的人物额外生成一路视频,无需用户进行人工剪辑,减少用户操作,增加用户体验。
第一方面,本申请实施例提出一种录像方法,应用于包括第一摄像头的终端设备。该方法包括:终端设备显示第一界面,第一界面包括第一窗口,第一窗口显示有第一摄像头实时采集的画面,以及一个或多个追踪标识;终端设备接收到针对第一追踪标识的第一操作,第一追踪标识为一个或多个追踪标识中的一个;响应于第一操作,终端设备显示第二界面,第二界面包括第一窗口和第二窗口,第一窗口显示有第一摄像头实时采集的画面,第二窗口显示第一窗口中与第一对象有关的一部分画面,第一对象为第一追踪标识对应的对象;在第一时刻,终端设备检测到第一窗口的第一位置显示有第一对象,第二窗口显示第一窗口中第一位置处、与第一对象有关的一部分画面;在第二时刻,终端设备检测到第一窗口的第二位置显示有第一对象,第二窗口显示第一窗口中第二位置处、与第一对象有关的一部分画面。
第一窗口可以为下文中的预览区域或录制区域。追踪追踪标识可以为下文中的追踪框,也可以为其他形式(例如,对象的缩略图、数字、图标等),此处不做限定。追踪标识也可以位于对象显示的位置,也可以排列显示在预览区域或录制区域的边缘,此处不做限定。
第一追踪标识可以为任意一个对象对应的追踪标识,例如,男性人物对应的追踪 框。对第一追踪标识的触发操作,可以为点击操作,也可以为触摸操作,本申请实施例对于触发操作的类型不做限定。
可以理解的是,响应于第一操作,设置追踪目标,显示带有小窗的界面。第一窗口中与第一对象有关的一部分画面可以理解为下文中的追踪画面。在设置追踪目标之前,终端设备不显示小窗,设置追踪目标之后,终端设备显示小窗。
本申请实施例中,焦点随追焦目标的位置变化而变化。具体的,焦点随追焦目标的位置变化而变化的示意,可以参照图3B或图3C。例如,第一时刻的界面可以为图3B中的a所示的界面,第二时刻的界面可以为图3B中的b所示的界面;或者,第一时刻的界面可以为图3C中的a所示的界面,第二时刻的界面可以为图3C中的b所示的界面。
可选的,第二窗口显示的画面是基于第一窗口显示的画面裁剪得到的。
可选的,第一界面为录制视频过程中的预览界面,第一窗口还包括第一控件,方法还包括:终端设备接收到对第一控件的第二操作;响应于第二操作,终端设备结束录制,并保存第一视频和第二视频,第一视频为第一窗口显示的画面组成的视频,第二视频为第二窗口显示的画面组成的视频。
本申请实施例中,第二操作可以为用户点击操作,也可以为用户触摸操作,本申请实施例对于第二操作不做限定。第一视频可以为录制区域显示的录制画面生成的视频,第二视频可以为小窗显示的追踪画面生成的视频。
第一控件可以为结束控件,示例性的,第一控件可以为图3C中的a所示的结束控件318。当终端设备检测到用户点击结束控件318的操作时,终端设备结束录制,基于录制区域显示的录制画面生成视频;基于小窗显示的追踪画面生成追焦视频。
这样,终端设备可以保存两路视频,基于追踪目标额外生成一路视频,无需用户剪辑视频,即可得到追踪目标的视频,提升用户体验。
可选的,追踪标识与终端设备检测到的第一窗口显示的对象一一对应。
这样,每个追踪标识分别对应一个对象,可以方便用户选取对象,提升用户体验。
可选的,方法还包括:当终端设备检测到第一窗口中的第二对象和第三对象重叠时,终端设备显示第二对象的第二追踪标识或者第三对象的第三追踪标识。
可以理解的是,第二对象与第三对象不为同一对象;第二对象或第三对象可以为第一对象,此处不做限定。
本申请实施例中,第二对象与第三对象可以分别为图11B中的男性人物和女性人物,或者图14中的的男性人物和女性人物,此处不做限定。
示例性的,如图11B所示的界面,或者如图14所示的界面。具体显示情况可以参照图11B,以及图14中相应说明,此处不再赘述。
这样,终端设备可以不显示其中一个对象对应的追踪标识,可以减少追踪标识重叠的情况,减少用户误触发的情况,还可以使得界面更加整洁。
可选的,当终端设备检测到第一窗口中的第二对象和第三对象重叠时,终端设备显示第二对象的第二追踪标识或者第三对象的第三追踪标识,包括:当终端设备检测到第一窗口中的第二对象和第三对象重叠时,终端设备根据以下信息中的一项或多项确定终端设备显示第二对象的第二追踪标识或者第三对象的第三追踪标识,第二对象 在第一窗口的画面中所占的面积、第三对象在第一窗口的画面中所占的面积、第二对象与第一摄像头之间的焦距、第三对象与第一摄像头之间的焦距。
对象所占的面积还可以理解为对象的尺寸,示例性的,下述图11B所示的界面相对应的说明中,人物所占的面积、人物所占的尺寸。对象的焦距可以理解为对象与摄像头之间的距离、或者可以理解为对象与终端设备之间的距离,示例性的,下述图11B所示的界面相对应的说明中,人物与摄像头之间的距离。
终端设备可以基于对象所占的面积、也可以基于对象的焦距确定显示的追踪标识,以及不显示的追踪标识。
可选的,终端设备根据第二对象和第三对象的以下信息中的一项或多项确定终端设备显示第二对象的第二追踪标识或者第三对象的第三追踪标识,包括:当第一窗口中第二对象的面积小于或等于第一窗口中第三对象的面积时,终端设备显示第三追踪标识,不显示第二追踪标识;或者,当终端设备检测到的第二对象与第一摄像头之间的焦距小于或等于第三对象与第一摄像头之间的焦距时,终端设备显示第二追踪标识,不显示第三追踪标识。
可以理解的是,对象所占的面积越大,为用户设置为追踪目标的可能性越大;对象与第一摄像头之间的焦距越小,对象与终端设备之间的距离越近,为用户设置为追踪目标的可能性越大。
这样,终端设备可以基于对象所占的面积、对象与第一摄像头之间的焦距等确认对象对应的追踪标识是否显示。具体可以参照下述图11B,以及图14中相应说明,此处不再赘述。
可选的,方法还包括:当第二追踪标识的中心位置与第三追踪标识的中心位置在第一预设方向上的距离大于或等于第一预设间距,或者,第二追踪标识的中心位置与第三追踪标识的中心位置在第二预设方向上的距离大于或等于第二预设间距时,终端设备检测到第一窗口中的第二对象和第三对象重叠。
第一预设方向可以为横向,也可以为竖向,还可以为斜向;第二预设方向可以为竖向或横向,还可以为斜向。
终端设备可以基于两个对象对应的追踪标识的中心位置确定两个对象是否重叠,进而确定是否显示,方便计算是否重叠,可以减少计算量。
可选的,第一预设间距为第一长度和第二长度之和的一半,第一长度为第二追踪标识在第一预设方向上的长度,第二长度为第三追踪标识在第一预设方向上的长度;第二预设间距为第三长度和第四长度之和的一半,第三长度为第二追踪标识在第二预设方向上的长度,第四长度为第三追踪标识在第二预设方向上的长度。
当追踪标识为矩形或者方形时,预设间距为追踪标识在相同方向上的长度之和的一半。
可选的,第一预设方向为横向,第二预设方向为竖向。
可选的,方法还包括:当第二追踪标识的中心位置与第三追踪标识的中心位置在第一预设方向上的距离大于或等于第一预设间距,或者,第二追踪标识的中心位置与第三追踪标识的中心位置在第二预设方向上的距离大于或等于第二预设间距时,终端设备调整第二追踪标识的位置和/或调整第三追踪标识的位置,直至第二追踪标识的中 心位置与第三追踪标识的中心位置在第一预设方向上的距离小于第一预设间距,或者,第二追踪标识的中心位置与第三追踪标识的中心位置在第二预设方向上的距离小于第二预设间距。
当人物重叠/追踪标识重叠时,终端设备可以通过调整追踪标识的位置,减少追踪标识的重叠。提供另一种调整方法,该调整方法中,用户可以将重叠的对象中的任一个设置为追踪目标。示例性的,具体调整方式可以参照下述图11A、图13中相应说明,此处不做赘述。
可选的,当终端设备显示多个追踪标识时,追踪标识的尺寸相同。
示例性的,如图8C所示,追踪框大小固定,可以减少追踪框过小或过大的情况。
可选的,当终端设备显示多个追踪标识时,追踪标识的尺寸不同,每个追踪标识的尺寸是终端设备基于每个追踪标识对应的对象在第一窗口中所占的尺寸或面积确定的;或者,每个追踪标识的尺寸是终端设备基于每个追踪标识对应的对象与第一摄像头之间的焦距确定的。
示例性的,如图8A、8B所示,追踪框大小不固定。终端设备可以基于人物尺寸的大小实现自适应调整追踪框的规格。
可选的,对象包括第一对象和第四对象;当第一画面中第一对象的尺寸大于第一画面中第二对象的尺寸时,第一追踪标识的尺寸大于与第四对象对应的第四追踪标识的尺寸;或者,当第一画面中第一对象的面积大于第一画面中第四对象的面积时,第一追踪标识的尺寸大于第四追踪标识的尺寸;或者,当终端设备检测到的第一对象与第一摄像头之间的焦距大于第四对象与第一摄像头之间的焦距时,第一追踪标识的尺寸大于第四追踪标识的尺寸。
本申请实施例中,第四对象与第一对象不同,可以为第二对象,也可以为第三对象,还可以为其他对象,此处不做限定。
终端设备可以显示多个追踪标识,终端设备可以基于人物尺寸的大小、对象与摄像头之间的焦距等实现自适应调整追踪框的规格。提供另一种追踪标识的显示方式,提升用户体验。
可选的,当终端设备检测到的第一窗口显示的对象的数量大于N时,第一界面包括N个追踪标识,N为整数。
N可以为5,也可以为其他任意数值。这样,可以限制对象较多时显示的追踪标识的数量,减少追踪标识过多导致的画面杂乱。此外,限制追踪标识的数量,还可以减少终端设备的计算需求,减少终端设备的卡顿现象、减少耗电量等,还可以降低终端设备的硬件要求,增加适用性。
可选的,N个追踪标识对应的对象为第一画面中对象的尺寸从大至小排序,前N的对象;或者,N个追踪标识对应的对象为终端设备检测到的与第一摄像头的距离从小至大排序中前N的对象。
可选的,终端设备显示第二界面时,第一摄像头对焦的焦点在第一对象上;在第一时刻,第一摄像头对焦的焦点在第一对象上;在第二时刻,第一摄像头对焦的焦点在第一对象上。
这样,终端设备可以基于追踪目标进行追焦,使得追踪目标更加清晰。
第二方面,本申请实施例提供了一种终端设备,终端设备也可以称为终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、智能电视、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。
该终端设备包括处理器,处理器用于调用存储器中的计算机程序以执行如第一方面的方法。
第三方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,当计算机指令在终端设备上运行时,使得终端设备执行如第一方面的方法。
第四方面,本申请实施例提供了一种计算机程序产品,当计算机程序被运行时,使得终端设备执行如第一方面的方法。
第五方面,本申请实施例提供了一种芯片,芯片包括处理器,处理器用于调用存储器中的计算机程序,以执行如如第一方面的方法。
应当理解的是,本申请的第二方面至第五方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
附图说明
图1为本申请实施例提供的终端设备硬件系统结构示意图;
图2为本申请实施例提供的终端设备软件系统结构示意图;
图3A为本申请实施例提供的一种应用场景示意图;
图3B为本申请实施例提供的一种主角模式预览界面示意图;
图3C为本申请实施例提供的一种主角模式录制界面示意图;
图4为本申请实施例提供的一种终端设备进入主角模式的界面示意图;
图5为本申请实施例提供的一种终端设备进入主角模式的界面示意图;
图6为本申请实施例提供的一种主角模式录制流程对应的界面示意图;
图7为本申请实施例提供的一种主角模式录制流程对应的界面示意图;
图8A为本申请实施例提供的一种追踪框显示的界面示意图;
图8B为本申请实施例提供的一种追踪框显示的界面示意图;
图8C为本申请实施例提供的一种追踪框显示的界面示意图;
图9A为本申请实施例提供的追踪框显示的界面示意图;
图9B为本申请实施例提供的追踪框显示的界面示意图;
图10A为本申请实施例提供的追踪框显示的界面示意图;
图10B为本申请实施例提供的追踪框显示的界面示意图;
图10C为本申请实施例提供的追踪框显示的界面示意图;
图10D为本申请实施例提供的一种追踪框移动的界面示意图;
图11A为本申请实施例提供的一种追踪框显示的界面示意图;
图11B为本申请实施例提供的追踪框显示的界面示意图;
图12为本申请实施例提供的一种追踪框重叠的示意图;
图13为本申请实施例提供的一种追踪框移动的界面示意图;
图14为本申请实施例提供的一种追踪框显示的界面示意图;
图15为本申请实施例提供的一种追踪框显示的界面示意图;
图16为本申请实施例提供的一种录像方法的流程示意图;
图17为本申请实施例提供的一种录像装置的结构示意图。
具体实施方式
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一芯片和第二芯片仅仅是为了区分不同的芯片,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
本申请实施例提供的是录像方法,可以应用在具备拍摄功能的电子设备中。电子设备包括终端设备,终端设备也可以称为终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、智能电视、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。本申请的实施例对终端设备所采用的具体技术和具体设备形态不做限定。
为了能够更好地理解本申请实施例,下面对本申请实施例的终端设备的结构进行介绍:
图1示出了终端设备100的结构示意图。终端设备可以包括:射频(radio frequency,RF)电路110、存储器120、输入单元130、显示单元140、传感器150、音频电路160、无线保真(wireless fidelity,WiFi)模块170、处理器180、电源190以及蓝牙模块1100等部件。本领域技术人员可以理解,图1中示出的终端设备结构并不构成对终端设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图1对终端设备的各个构成部件进行具体的介绍:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器180处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(low noise amplifier,LNA)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、长期演进(long term evolution,LTE)、电子邮件、以及短消息服务(short messaging service,SMS)等。
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行终端设备的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)、引导装载程序(boot loader)等;存储数据区可存储根据终端设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。可以理解的是,本申请实施例中,存储器120中存储有蓝牙设备回连的程序。
输入单元130可用于接收输入的数字或字符信息,以及产生与终端设备的用户设置以及功能控制有关的键信号输入。具体地,输入单元130可包括触控面板131以及其他输入设备132。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板131。除了触控面板131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及终端设备的各种菜单。显示单元140可包括显示面板141,可选的,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形 式来配置显示面板141。进一步的,触控面板131可覆盖显示面板141,当触控面板131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图1中,触控面板131与显示面板141是作为两个独立的部件来实现终端设备的输入和输入功能,但是在某些实施例中,可以将触控面板131与显示面板141集成而实现终端设备的输入和输出功能。
终端设备还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在终端设备移动到耳边时,关闭显示面板141或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别终端设备姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端设备还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路160、扬声器161,传声器162可提供用户与终端设备之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一终端设备,或者将音频数据输出至存储器120以便进一步处理。
WiFi属于短距离无线传输技术,终端设备通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了WiFi模块170,但是可以理解的是,其并不属于终端设备的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器180是终端设备的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储器120内的软件程序或模块,以及调用存储在存储器120内的数据,执行终端设备的各种功能和处理数据,从而对终端设备进行整体监控。可选的,处理器180可包括一个或多个处理单元;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。
可以理解的是,本申请实施例中,存储器120中存储有录像的程序,而处理器180可以用于调用存储器120中存储的录像的程序并执行,以实现本申请实施例的录像的方法。
终端设备还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
蓝牙技术属于短距离无线传输技术,终端设备通过蓝牙模块1100可以与其他具备蓝牙模块的终端设备建立蓝牙连接,从而基于蓝牙通信链路进行数据传输。蓝牙模块 1100根据实际需要,可以为低功耗蓝牙(bluetooth low energy,BLE),或模块。可以理解的是,本申请实施例中终端设备为用户终端和业务机具的情形下,终端设备包括蓝牙模块。但是可以理解的是,蓝牙模块并不属于终端设备的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略,比如服务器中可以不包括蓝牙模块。
尽管未示出,终端设备还包括摄像头。可选地,摄像头在终端设备上的位置可以为前置的,也可以为后置的,还可以为内置的(在使用时可伸出机身),本申请实施例对此不作限定。
可选地,终端设备可以包括单摄像头、双摄像头或三摄像头等,本申请实施例对此不作限定。摄像头包括但不限于广角摄像头、长焦摄像头或深度摄像头等。例如,终端设备可以包括三摄像头,其中,一个为主摄像头、一个为广角摄像头、一个为长焦摄像头。
可选地,当终端设备包括多个摄像头时,这多个摄像头可以全部前置,或者全部后置,或者全部内置,或者至少部分前置,或者至少部分后置,或者至少部分内置等,本申请实施例对此不作限定。
示例性的,图2是本申请实施例的终端设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。如图2所示,应用程序包可以包括相机,图库,电话,地图,电话,音乐,设置,邮箱,视频,社交等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,资源管理器,视图系统,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,触摸屏幕,拖拽屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管 理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
下面结合终端设备界面切换的场景,示例性说明终端设备软件以及硬件的工作流程。
当终端设备中的触摸传感器接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸力度,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动显示驱动,显示相机应用的功能界面。
当相机应用启动后,相机应用可以调用应用程序框架层中的相机访问接口,启动相机的拍摄功能,并基于内核层的摄像头驱动,驱动一个或多个摄像头实时采集一帧或多帧图像。摄像头采集到图像后,可通过内核层、系统库、应用程序框架层将图像实时传输至相机应用,进而由相机应用将图像显示到相应的功能界面。
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以独立实现,也可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
为提高用户体验,手机、平板电脑等终端设备通常配置多个摄像头。终端设备可以通过配置的多个摄像头,为用户提供多种拍摄模式,例如,前摄模式、后摄模式、前后双摄模式、主角模式等。用户可以根据拍摄场景,选择相应的拍摄模式进行拍摄。
主角模式可以理解为,在终端设备录制视频时,可额外生成一份人像追焦视频的模式,也就是在录制完成时保存两个以上视频,其中一个为录制的原视频,其他视频为根据追踪的目标人像从原视频中自动剪裁的视频。其中,该人像追焦视频中的人像 可以理解为用户关注的“主角”,生成“主角”对应的视频的方式可以为:从终端设备常规录制的视频中裁剪出“主角”对应的视频内容。
其中,“主角”可以人物、动物等生命体,也可以是车辆等非生命体。可以理解的是,任一可基于算法模型识别的物品均可作为本申请实施例的“主角”。本申请实施例中可将“主角”定义为追焦对象,追焦对象还可称为主角对象、追踪目标、追踪对象与追焦目标等,本申请实施例对“主角”的概念不做限制。
为方便理解,下面结合附图对拍摄模式中的主角模式进行说明。
示例性的,图3A为本申请实施例提供的一种应用场景示意图。如图3A所示,应用场景中包括终端设备301、人物302和人物303。
终端设备301可以通过摄像头录制包含追踪目标的视频。追踪目标可以为通过摄像头录制的任意一个人物,也可以为动物、车子等任意对象。图3A所示的场景中,追踪目标可以为拍摄画面中的人物302,也可以为拍摄画面中的人物303。
在主角模式下,终端设备可以在录制视频的同时,额外得到一路或多路追踪目标对应的追焦视频。
具体的,终端设备301在主角模式预览时,可以接收到用户设置追踪目标的操作,终端设备301在开始录制视频后,可以基于追踪目标额外生成一路或多路追焦视频。示例性的,终端设备301可以将拍摄画面中的人物302设置为追踪目标,也可以将拍摄画面中的人物303设置为追踪目标。
或者,当终端设备301通过主角模式录制时,接收到用户设置追踪目标的操作,终端设备301可以基于追踪目标额外生成一路或多路追焦视频。这样,无需对整个视频进行人工剪辑即可得到追踪目标对应的追焦视频。
可以理解的是,终端设备在录制视频的过程中,可以对追踪目标对应的人物进行一次或多次切换。具体的,当终端设备接收到用户切换追踪目标的操作时,终端设备切换追踪目标对应的人物。
一种可能的实现中,当追踪目标对应的人物发生切换时,终端设备得到的追焦视频中有不同的人物。
示例性的,当终端设备在录制的过程中检测到用户将追踪目标从人物302切换为人物303时,终端设备基于人物303显示追踪画面。在录制结束后基于追踪目标生成的追焦视频中,追踪目标切换前对应显示人物302;在追踪目标切换后对应显示人物303;也可以理解为追踪目标切换前的部分对应于人物302,追踪目标切换后的部分对应于人物303。
具体的,以终端设备在追焦视频的录制过程中第3秒,检测到用户将追踪目标从人物302切换为人物303为例。在基于追踪目标生成的追焦视频中,第3秒前的追焦视频中对应显示人物302;第3秒后的追焦视频中对应显示人物303。这样,终端设备可以切换追踪目标,实现追焦视频中人物的切换,提升用户体验。
另一种可能的实现中,当追踪目标对应的人物发生切换时,终端设备可以基于切换前的追踪目标得到一路追焦视频,基于切换后的追踪目标得到另一路追焦视频。
示例性的,当终端设备在录制的过程中检测到用户将追踪目标从人物302切换为人物303时,终端设备基于人物302生成追焦视频1,在追踪目标切换为人物303后, 基于人物303生成追焦视频2。
一些实施例中,在视频的录制过程中,终端设备还可以多次开始和结束追焦视频的录制,额外生成多路追焦视频。
示例性的,在录制视频1的过程中,当终端设备接收到用户结束追踪人物303的操作时,终端设备可以基于人物303生成追焦视频2。当终端设备在结束追踪人物303的操作后,接收到用户追踪人物302的操作时,终端设备301可以基于人物302额外生成追焦视频3。此时,除了正常录制得到的视频1外,终端设备额外生成了2个追焦视频(即追焦视频2和追焦视频3)。本申请实施例对于追焦视频的数量不做限定。
这样,终端设备可以多次开始和结束追焦视频的录制,基于追踪目标生成多路追焦视频,提升用户体验。
需要说明的是,上述图3A所示的场景中终端设备通过摄像头录制的视频中包括两个人物。在终端设备的视频中,可以包含更多或更少的人物。本申请实施例对于终端设备录制的人物数量不做具体限定。
需要说明的是,当终端设备通过主角模式预览以及录制时,均未接收到用户设置追踪目标的操作,在结束录制时,可以得到一路视频。当终端设备通过主角模式预览接收到用户设置追踪目标的操作后接收到用户关闭小窗的操作,终端设备取消对追踪目标的追踪,若录制时,未接收到用户设置追踪目标的操作,在结束录制时,可以得到一路视频。可以理解的是,主角模式可设置在相机等具有拍摄功能的应用中。在终端设备进入主角模式后,主角模式的实现可以包括预览模式和录制模式。
需要说明的是,终端设备在预览模式(录制前)和录制模式(录制过程中)显示的界面均可以被称为预览界面;预览模式(录制前)的预览界面中显示的画面不会生成视频并保存;录制模式(录制过程中)的预览界面中显示的画面可以生成视频并保存。为方便区分,下文中,将预览模式(录制前)的预览界面称为预览界面;将录制模式(录制过程中)的预览界面称为录制界面。
主角模式的预览模式中,终端设备中可以在预览区域显示摄像头获得的图像(预览画面),在小窗显示用户选定的追踪目标的图像(追踪画面)。预览模式中终端设备可以不生成视频,也可以不保存预览区域显示的内容和小窗显示的内容。
示例性的,终端设备中主角模式的预览界面可如图3B所示。该预览界面包括预览区域304、录制控件305。
预览区域304显示有预览画面。当终端设备识别到预览画面中包括人物时,预览区域显示有追踪框(例如,追踪框307和追踪框308)。追踪框可以提示用户相应人物可设置或可切换为追踪目标,还可以方便用户设置或切换追踪目标。当终端设备识别到预览画面中包括多个人物时,预览区域可以显示有多个追踪框。追踪框的数量小于或等于终端设备识别到的人物的数量。追踪目标为预览画面中多个对应有追踪框的人物中的任一个。追踪目标可以称为追焦对象、主角对象等,本申请实施对此不做限定。
一些实施例中,设置为追踪目标的人物对应的追踪框(例如,追踪框307)与未被设置为追踪目标的人物(例如,追踪框308)对应的追踪框显示样式不同。这样,方便用户区分识别被追踪的人物(追踪目标)。除追踪框的样式不同,本申请实施例 还可设置追踪框的颜色,例如,追踪框307与追踪框308的颜色不同。这样,可直观的区分追踪目标与其他人物。追踪框可以为虚框,如,追踪框307;也可以为虚框与“+”的组合,如追踪框308,该追踪框也可以是任意显示形式,追踪框满足能够被用户触发实现追踪可设置为追踪目标的功能即可。该追踪框可以标记在可设置为追踪目标的人物的任意位置,本申请实施例对此不作具体限定。
可以理解的是,追踪框为追踪标识的一种,终端设备还可以显示其他形式的追踪标识,以方便用户设置追踪目标。示例性的,其他形式的追踪标识可以为对象的缩略图,数字、字母和图形等。此外,追踪标识可以设置在对象的任意位置,也可以设置在对象的附近,还可以设置在预览区域的边缘。本申请实施例对于追踪标识的具体位置不作具体限定。
示例性的,终端设备可以将一个或多个对象的缩略图排列显示在预览区域的边缘,当终端设备接收到用户点击任一追踪标识的操作时,设置点击的追踪标识对应的对象为追踪目标。
可能的实现方式中,终端设备可以通过人脸识别技术识别人物,并显示追踪框。终端设备可根据人体识别等技术确定追踪框的显示位置,例如人物身体较居中的位置。这样,基于人体计算追踪框的位置,可以减少追踪框位于人脸位置的情况,可以减少追踪框对人脸的遮挡,提升用户体验。本申请实施例对于人物的识别技术以及追踪框位置计算所采用的技术不做具体限定。
一些实施例中,图3B还包括小窗306。小窗306显示有追踪画面。追踪画面与追踪目标相对应。当追踪目标切换时,小窗306显示的追踪画面中的人物进行切换。示例性的,若追踪目标从追踪框307对应人物切换为追踪框308对应人物,小窗306显示的追踪画面也相应发生变化。
追踪画面可以为预览画面的一部分。可能的实现方式中,追踪画面是终端设备基于追踪目标按照一定比例实时裁剪预览画面得到的。本申请实施例对于小窗显示的画面不做具体限定。
一些实施例中,小窗的规格、位置和横竖屏显示方式等可调,用户可根据录像习惯调整小窗口的样式。
可选的,追踪画面中追踪目标居中显示。
可选的,小窗浮于录制区域的上方。此处不做限定。
一些实施例中,小窗306还包括关闭控件309和第一切换控件310。
可以理解的是,当终端设备接收到用户设置追踪目标的操作后,在预览界面显示有小窗,以显示追踪目标的追踪画面。当终端设备未接收到用户设置追踪目标的操作,预览界面不显示小窗。
当用户在图3B所示的预览界面中通过点击、触摸等操作触发关闭控件309时,终端设备接收到关闭小窗的操作,终端设备关闭小窗,取消对追踪目标的预览。
当用户在图3B所示的预览界面中通过点击、触摸等操作触发第一切换控件310时,终端设备接收到切换小窗显示方式(小窗样式)的操作,终端设备切换小窗的样式。具体的,可将小窗从横向切换为竖向,或者从竖向切换为横向。
当用户在图3B所示的预览界面通过点击、触摸等操作触发录制控件305时,终 端设备接收到开始录制的操作,开始录制视频和追焦视频。
可选的,预览界面还可以包括其他控件,例如,主角模式退出控件311、设置控件312、闪光灯控件313、第二切换控件314、变焦控件315等。
当主角模式退出控件311被触发时,终端设备退出主角模式,进入录像模式。当设置控件312被触发时,终端设备可调整多种设置参数。设置参数包括但不限于:是否开启水印、存储路径、编码方式、是否保存地理位置等。当闪光灯控件313被触发时,终端设备可设置闪光灯效果,例如,控制闪光灯强制开启、强制关闭、拍照时开启及根据环境适应性开启等。当变焦控件315被触发时,终端设备可调整摄像头的焦距,进而调整预览画面的放大倍数。
当用户在图3B所示的预览界面通过点击或触摸等操作触发第二切换控件314时,终端设备接收到设置小窗样式的操作,显示小窗样式选择项,以供用户选取。小窗样式选择项包括但不限于:横向或竖向等。本申请实施例对此不作限定。可能的实现方式中,第二切换控件314与小窗的显示样式相对应,方便用户区分小窗样式。
需要说明的是,图3B所示的预览界面中可以通过第一切换控件310控制小窗样式切换,也可以通过第二切换控件314控制小窗样式切换。可能的实现方式中,小窗中的第一切换控件310与预览区域的第二切换控件314可设置联动。示例性的,当小窗从横向切换为竖向时,第一切换控件310的图标为竖向预览时的样式,第二切换控件314的图标也为竖向预览时的样式,或者,第一切换控件310和第二切换控件314的图标都是横向预览时的样式,提示用户,再次点击切换后预览的样式。
可以理解的是,在预览场景中,当终端设备设置追踪目标后,小窗的追踪画面可居中显示追踪目标。一些场景中,追踪目标可处于移动状态,当追踪目标发生移动但未离开镜头时,小窗的追踪画面可持续居中显示追踪目标。
例如,预览界面中可设置为追踪目的对象包括男性人物与女性人物,终端设备响应于用户针对男性人物的追踪框的点击操作,终端设备设置男性人物为追踪目标,并进入如图3B中的a所示的界面。图3B中的a所示的界面中,小窗的追踪画面居中显示男性人物,男性人物居于女性人物的右侧。男性人物发生移动,终端设备可持续追焦男性人物,并将男性人物居中显示到小窗中。当男性人物走到女性人物左侧时,终端设备的界面可如图3B的b所示。图3B中的b界面中,小窗的追踪画面仍居中显示男性人物,男性人物居于女性人物的左侧。
可能的实现方式中,当终端设备追踪目标后,焦点随追踪目标移动而移动,示例性的,图3B中的a所示的界面中,焦点位于男性人物的脸部区域,位于画面的中间偏右部分;男性人物发生移动,终端设备可持续追焦男性人物,当男性人物走到女性人物左侧时,终端设备的界面可如图3B的b所示。图3B中的b所示的界面中,焦点位于男性人物的脸部区域,位于画面的中间偏左部分。
主角模式的录制模式中,终端设备可以在录制区域显示摄像头获得的图像(录制画面),在小窗显示用户选定的追踪目标的图像(追踪画面),并生成开启录制模式后录制得到的录制视频和追焦视频。在录制结束时,终端设备保存基于录制画面生成的视频,以及基于追踪画面生成的追焦视频。
一些实施例中,相比较于录制区域的录制,小窗可提前结束录制。在小窗录制结 束时,终端设备保存基于追踪画面生成的追焦视频。或者可以理解为,相比较于整个视频,终端设备可以提前结束追焦视频的录制。
一些实施例中,相比较于录制区域的录制,小窗可延迟开始录制。或者可以理解为,在终端设备开始录制视频后检测到用户设置追踪目标的操作,终端设备开启小窗,开始追焦视频的录制。
示例性的,终端设备中主角模式的录制界面可如图3C所示。该录制界面包括录制区域316、暂停控件317、结束控件318。
录制区域316显示有录制画面和录制时长。当终端设备识别到录制画面中包括人物时,录制区域显示有追踪框(例如,追踪框320和追踪框321)。可以理解的是,追踪框的数量小于或等于终端设备识别到的人物的数量。
一些实施例中,录制界面还显示有小窗319。小窗319显示有追踪画面。追踪画面与追踪目标相对应。当追踪目标切换时,小窗319显示的追踪画面中的人物进行切换。示例性的,若追踪目标从追踪框320对应人物切换为追踪框321对应人物,小窗319显示的追踪画面也相应发生变化。
追踪画面可以为录制画面的一部分。可能的实现方式中,追踪画面是基于追踪目标按照一定比例实时裁剪录制画面得到的。本申请实施例对于小窗显示的画面不做具体限定。
可选的,追踪画面中追踪目标居中显示。
可选的,小窗浮于录制区域的上方。此处不做限定。
小窗319还包括小窗结束控件322和小窗录制时长。
可以理解的是,当终端设备接收到用户设置追踪目标的操作后,在录制界面显示有小窗,以显示追踪目标的追踪画面。当终端设备未接收到用户设置追踪目标的操作,录制界面不显示小窗。
当用户在图3C所示的录制界面通过点击、触摸等操作触发结束控件318时,终端设备接收到用户结束录制的操作,终端设备进入主角模式的预览界面,并存储录制画面对应的视频,以及追踪画面对应的追焦视频。
当用户在图3C所示的录制界面通过点击、触摸等操作触发暂停控件317时,终端设备接收到用户暂停录制的操作,终端设备暂停录制区域316中视频的录制,以及小窗319中追焦视频的录制。
当用户在图3C示的录制界面通过点击、触摸等操作触发小窗结束控件322时,终端设备接收到用户结束小窗录制的操作,终端设备继续显示录制区域316中的录制画面,关闭小窗319并存储小窗319中追踪画面对应的追焦视频。
可能的实现方式中,录制界面中还包括闪光灯控件323。当闪光灯控件323被触发时,终端设备可设置闪光灯效果。
可以理解的是,终端设备通过主角模式录制时,可基于录制区域的录制画面生成一路视频,并基于小窗的追踪画面额外生成一路追踪目标对应的追焦视频。两路视频独立保存在终端设备中。这样,无需后续对整个视频进行人工剪辑,即可得到追踪目标对应的视频,操作简单方便,提升用户体验。
可以理解的是,在录制场景中,当终端设备设置追踪目标后,小窗的追踪画面可 居中显示追踪目标。一些场景中,追踪目标可处于移动状态,当追踪目标发生移动但未离开镜头时,小窗的追踪画面可持续居中显示追踪目标。
例如,预览界面中可设置为追踪目的对象包括男性人物与女性人物,终端设备响应于用户针对男性人物的追踪框的点击操作,终端设备设置男性人物为追踪目标,并进入如图3C中的a所示的界面。图3C中的a所示的界面中,小窗的追踪画面居中显示男性人物,男性人物居于女性人物的右侧。男性人物发生移动,终端设备可持续追焦男性人物,并将男性人物居中显示到小窗中。当男性人物走到女性人物左侧时,终端设备的界面可如图3C的b所示。图3C中的b界面中,小窗的追踪画面仍居中显示男性人物,男性人物居于女性人物的左侧。
可能的实现方式中,当终端设备追踪目标后,焦点随追踪目标移动而移动,示例性的,图3C中的a所示的界面中,焦点位于男性人物的脸部区域,位于画面的中间偏右部分;男性人物发生移动,终端设备可持续追焦男性人物,当男性人物走到女性人物左侧时,终端设备的界面可如图3C的b所示。图3C中的b所示的界面中,焦点位于男性人物的脸部区域,位于画面的中间偏左部分。
可以理解的是,本申请实施例将基于追踪目标可以额外生成一路或多路追焦视频的拍摄模式定义为主角模式,该拍摄模式还可以称为追焦模式等,本申请实施例对此不作限定。
下面结合图4-图7对终端设备中主角模式的进入方式,以及录制时涉及的界面进行说明。图4和图5为本申请实施例提供的两种主角模式进入流程示意图。图6和图7为本申请实施例提供的录制时涉及的界面示意图。
示例性的,图4为本申请实施例提供的一种终端设备进入主角模式的界面示意图。
当终端设备在图4中的a所示的主界面中,接收到用户打开相机应用程序401的操作时,终端设备可以进入到图4中的b所示的拍照预览界面。该拍照预览界面中可以包括预览区域和拍摄模式选择项。预览区域实时显示有预览画面;拍摄模式选择项包括但不限于:人像、拍照、录像、专业或更多402。
当用户在图4中的b所示的相机预览界面通过点击、触摸等操作触发更多402时,终端设备接收到用户查看其他类型拍摄模式的操作,进入图4中的c所示的拍摄模式选择界面。该拍摄模式选择界面包括:拍摄模式选择项。拍摄模式选择项包括但不限于:专业、全景、高动态范围图像(high-dynamic-range,HDR)、延时摄影、水印、文档矫正、高像素、微电影、主角模式403或其他类型拍摄模式选择项。
当用户在图4中的c所示的拍摄模式选择界面通过点击、触摸等操作触发主角模式403时,终端设备接收到用户选取主角模式预览的操作,进入图4中的d所示的主角模式对应的预览界面。该预览界面包括:预览区域和录制控件。预览区域显示有预览画面。当预览画面中有人物时,预览区域还显示有追踪框。当用户通过点击或触摸操作触发追踪框时,终端设备接收到设置追踪目标的操作,设置追踪框对应的人物为追踪目标,并在显示界面上通过小窗显示追踪目标对应的追踪画面。
示例性的,图5为本申请实施例提供的另一种终端设备进入主角模式的界面示意图。
当终端设备在图5中的a所示的主界面中,接收到用户打开相机应用程序501的 操作时,终端设备可以进入到图5中的b所示的拍照预览界面。该拍照预览界面中可以包括预览区域和拍摄模式选择项。预览区域实时显示有预览画面;拍摄模式选择项包括但不限于:人像、拍照、录像502、专业或其他类型拍摄模式选择项。
当用户在图5中的b所示的相机预览界面通过点击、触摸等操作触发录像502时,终端设备接收到用户选取录像预览的操作,进入图5中的c所示的录像预览界面。该录像预览界面包括:预览区域、录制参数选择项和拍摄模式选择项。预览区域实时显示有预览画面;录制参数选择项包括但不限于:主角模式503、闪光灯、滤镜、设置或其他类型录制参数选择项。拍摄模式选择项包括但不限于:人像、拍照、录像、专业或其他类型拍摄模式选择项。
当用户在图5中的c所示的录像预览界面通过点击、触摸等操作触发主角模式503时,终端设备接收到用户选取主角模式预览的操作,进入图5中的d所示的主角模式对应的预览界面。该预览界面包括:预览区域和录制控件。预览区域显示有预览画面。当预览画面中有人物时,预览区域还显示有追踪框。当用户通过点击或触摸操作触发追踪框时,终端设备接收到设置追踪目标的操作,设置追踪框对应的人物为追踪目标,并在显示界面上通过小窗显示追踪目标对应的追踪画面。
可以理解的是,在终端设备进入主角模式时,终端设备可以水平放置处于横屏状态,也可以竖直放置处于竖屏状态,横屏状态或竖屏状态中,终端设备实现主角模式的原理类似,以下实施例将以终端设备横屏录制为例,对主角模式的多个应用场景进行描述。
可以理解的是,相机的主角模式下,终端设备可以在开始录制后选取追踪目标,也可以在开始录制视频之前,先选取追踪目标再进行录制。下面结合图6和图7分别对两种录制流程进行说明。示例性的,图6为本申请实施例提供的一种主角模式录制流程对应的界面示意图。
当用户在图6中的a所示的预览界面中通过点击、触摸等操作触发录制控件601时,终端设备接收到开始录制的操作,进入图6中的b所示的录制界面。该录制界面包括:录制区域602、暂停控件603、结束控件604。录制区域显示有录制画面和追踪框605。追踪框605可以方便用户选取追踪目标。
当用户在图6中的b所示的录制界面中通过点击、触摸等操作触发追踪框605时,终端设备接收到用户设置追踪目标的操作,终端设备进入图6中的c所示录制界面,该录制界面包括:录制区域、暂停控件606、结束控件607、小窗608。录制区域显示有录制画面。小窗608包括小窗结束控件609。小窗608显示有追踪目标对应的追踪画面。追踪目标对应的追踪画面为录制画面的一部分。
在图6所示的流程的基础上,当用户在图6中c所示的录制界面通过点击或触摸等操作触发暂停控件606时,终端设备接收到暂停视频录制的操作,视频录制暂停,小窗对应的追焦视频也录制暂停。
当用户在图6中c所示的录制界面通过点击或触摸等操作触发结束控件607时,终端设备接收到结束视频录制的操作,视频录制结束,小窗对应的追焦视频也录制结束。
当用户在图6中c所示的录制界面通过点击或触摸等操作触发小窗结束控件609 时,终端设备接收到结束追焦视频录制的操作,小窗对应的追焦视频录制结束,视频继续录制。
当用户在图6中c所示的录制界面通过拖拽操作触发小窗608时,小窗608位置可以移动。
小窗608的移动距离与拖拽操作开始位置和拖拽操作结束位置之间的距离相关,小窗608的移动方向与拖拽操作的方向相关。
示例性的,图7为本申请实施例提供的一种主角模式录制流程对应的界面示意图。
当用户在图7中的a所示的预览界面中通过点击、触摸等操作触发追踪框701时,终端设备接收到用户设置追踪目标的操作,进入图7中的b所示的预览界面。该预览界面包括:预览区域702、录制控件703和小窗704。录制区域显示有预览画面。小窗704显示有追踪画面。追踪画面与追踪目标相对应。小窗704还包括关闭控件705和第一切换控件706。
当用户在图7中的b所示的预览界面中通过点击、触摸等操作触发录制控件703时,终端设备接收到开始录制的操作,进入图7中的c所示的录制界面。该录制界面包括:录制区域、暂停控件707、结束控件708和小窗709。录制区域显示有录制画面。小窗709包括小窗结束控件710。小窗709显示追踪画面,追踪画面与追踪目标相对应。追踪画面为录制画面的一部分。
暂停控件707、结束控件708和小窗709的作用可以参照图6中的相关说明,此处不再赘述。
在图7所示的流程的基础上,当用户在图7中的b所示的预览界面中通过点击、触摸等操作触发关闭控件705时,终端设备接收到关闭小窗的操作,终端设备关闭小窗,取消对追踪目标的预览。
当用户在图7中的b所示的预览界面中通过点击、触摸等操作触发录制控件第一切换控件706时,终端设备接收到切换小窗显示方式的操作,终端设备切换小窗的显示方式。具体的,可将小窗从横向切换为竖向或者从竖向切换为横向。
可能的实现方式中,终端设备还可以对小窗的尺寸进行调整。本申请实施例对于小窗的尺寸调整具体的实现方式不做限定。
终端设备可以基于以上场景开启小窗的追焦视频录制,并得到多路视频。需要说明的是,小窗可显示预览区域/录制区域中有关追踪目标的画面,但小窗录制的视频与录制区域录制的视频为多个独立的视频,并不是一个录制区域的录制画面中嵌套小窗的追踪画面的画中画形式的合成视频。
需要说明的是,若终端设备未开启小窗的录制,则终端设备可得到录制区域录制的一路视频。若终端设备开启小窗的录制,则终端设备可得到录制区域录制的一路视频,以及小窗录制的一路或多路视频。例如,在录制区域录制视频期间,终端设备可多次开启小窗录制,其中,终端设备在检测到针对小窗结束控件的点击操作时,可结束小窗的录制,得到一路视频。当小窗再次开启录制后,终端设备可得到一路新的视频。终端设备基于小窗得到的视频数量可与小窗开启录制的次数相关。
可选的,用户可基于相机应用的相册浏览录制区域录制的视频与小窗录制的多路视频,多路视频的显示顺序可以为视频的录制顺序,即终端设备可根据录制视频的结 束时间点或开始时间点进行排序。多路视频的显示顺序还可以为视频的录制倒序,即终端设备可根据录制视频的结束时间或开始时间进行倒序排列。
可选的,录制区域录制的视频与小窗录制的视频可显示在同一相册界面的视频缩略图中。为便于区分录制区域录制的视频与小窗录制的视频,终端设备可为小窗录制的视频设置标识。例如,终端设备可为小窗录制的视频添加外边框、字体及图形等,终端设备还可设置小窗录制的视频缩略图大小,使得小窗与录制区域所录制的视频缩略图存在大小差异。可以理解的是,本申请实施例对相册中视频缩略图的形式、视频缩略图的排列顺序及视频的保存顺序等不做限制。
可以理解的是,终端设备在预览场景和录制场景中均可能会显示带有追踪框的界面。对于追踪框的表现形式和显示位置等可以参照上述图3B和/或图3C中追踪框的相关说明,此处不做赘述。
下面结合图8A-图14对追踪框的数量、规格、显示策略进行说明。
一些实施例中,终端设备可以基于人物尺寸的大小实现自适应调整追踪框的规格。
可以理解的是,当拍摄画面中人物的尺寸或面积越大时,追踪框的尺寸越大;当人物的尺寸或面积越小时,追踪框的尺寸越小。拍摄画面包括但不限于:预览画面或录制画面。
一些实施例中,人物尺寸可以理解为人脸框的尺寸,或者可以理解为人体框的尺寸。终端设备可以基于人脸框的尺寸大小实现自适应调整追踪框的规格,或者基于人体框的尺寸大小实现自适应调整追踪框的规格,本申请实施例对此不做限定。
可以理解的是,终端设备可以识别到人物的人脸以及人物的人体,进而得到人脸框和/或人体框。相应的,终端设备可以得到人脸框的大小和/或人体框的大小,计算得到追踪框的大小。
示例性的,图8A为本申请实施例提供的一种界面示意图。如图8A所示,终端设备在图8A所示的预览画面中可以识别到4个人物和4个追踪框。4个人物分别为人物801、人物802、人物803、人物804。4个追踪框分别为追踪框805、追踪框806、追踪框807和追踪框808。其中,人物801与追踪框805相对应;人物802与追踪框806相对应;人物803与追踪框807相对应;人物804与追踪框808相对应。
从图8A中可以看出,人物801、人物802、人物803和人物804在画面中占据的面积依次下降,则追踪框805的尺寸、追踪框806的尺寸、追踪框807的尺寸和追踪框808的尺寸依次减小。
一些实施例中,终端设备可以基于人物与终端设备之间的距离的大小实现自适应调整追踪框的规格。人物与终端设备之间的距离也可以理解为,人物与终端设备的摄像头之间的距离,还可以理解为人物与摄像头之间的焦距。
示例性的,图8B为本申请实施例提供的一种界面示意图。如图8B所示,终端设备在图8B所示的预览画面中可以识别到4个人物和4个追踪框。4个人物分别为人物809、人物810、人物811、人物812。4个追踪框分别为追踪框813、追踪框814、追踪框815和追踪框816。其中,人物809与追踪框813相对应;人物810与追踪框814相对应;人物811与追踪框815相对应;人物810与追踪框816相对应。
若终端设备识别出人物809与终端设备之间的距离、人物810与终端设备之间的 距离、人物812与终端设备之间的距离、以及人物811与终端设备之间的距离依次下降,则追踪框813的尺寸、追踪框814的尺寸、追踪框816的尺寸和追踪框815的尺寸依次下降。
另一些实施例中,终端设备基于预先设置的尺寸显示追踪框。可以理解的是,拍摄画面中人物对应的追踪框的尺寸相同。这样,可以减少追踪框尺寸过小的情况。
示例性的,图8C为本申请实施例提供的一种界面示意图。如图8C所示,终端设备在图8C所示的预览画面中可以识别到4个人物和4个追踪框。4个人物分别为人物817、人物818、人物819、人物820。4个追踪框分别为追踪框821、追踪框822、追踪框823和追踪框824。其中,人物817与追踪框821相对应;人物818与追踪框822相对应;人物819与追踪框823相对应;人物818与追踪框824相对应。
从图8C中可以看出,人物817的面积、人物818的面积、人物819的面积和人物820的面积依次下降,而追踪框821的尺寸、追踪框822的尺寸、追踪框823的尺寸和追踪框824的尺寸相同。或者,可以理解为人物817的尺寸、人物818的尺寸、人物819的尺寸和人物820的尺寸依次下降,而追踪框821的尺寸、追踪框822的尺寸、追踪框823的尺寸和追踪框824的尺寸相同。
在上述实施例的基础上,终端设备可能设置有第一阈值,第一阈值表示终端设备能够显示的追踪框的最大数量,举例来说,第一阈值可以为3或者5,本申请对第一阈值的具体值不做限定。当终端设备识别到拍摄画面中的人物数量大于第一阈值时,部分人物不对应显示追踪框。
这样,可以减少追踪框显示过多导致的界面杂乱,优化用户界面,还可以减少追踪框的误触等情况。此外,还可以节约计算资源,降低终端设备的硬件标准。
示例性的,以第一阈值为3为例,如图9A中的a所示,终端设备在图9A中的a所示的预览画面中显示有4个人物和3个追踪框。4个人物分别为人物901、人物902、人物903、人物904。3个追踪框分别为追踪框905、追踪框906和追踪框907。其中,人物901与追踪框905相对应;人物902与追踪框906相对应;人物903与追踪框907相对应;人物904未对应追踪框。追踪框905的尺寸、追踪框906的尺寸和追踪框907的尺寸依次减小。
如图9A中的b所示,终端设备在图9A中的b所示的预览画面中显示有4个人物和3个追踪框。4个人物分别为人物909、人物910、人物911、人物912。3个追踪框分别为追踪框913、追踪框914和追踪框915。其中,人物909与追踪框913相对应;人物910与追踪框914相对应;人物911与追踪框915相对应;人物912未对应追踪框。追踪框913的尺寸、追踪框914的尺寸和追踪框915的尺寸相同。
可能的实现方式中,终端设备基于人物的大小和第一阈值,确认显示追踪框的人物。
具体的,若第一阈值为N,当终端设备识别到拍摄画面中的人物数量小于或等于N时,人物对应显示追踪框。当终端设备识别到拍摄画面中的人物数量大于N时,人物尺寸从大至小排序前N对应的人物对应显示追踪框,其余人物不对应显示追踪框。
示例性的,以N为3为例,如图9A中的a所示,人物尺寸排序前N对应的人物为人物901、人物902和人物903。因此,人物901、人物902和人物903均对应显示 追踪框。人物904未对应显示追踪框;示例性的,以N为3为例,如图9A中的b所示,人物尺寸排序前N对应的人物为人物909、人物910和人物911。因此,人物909、人物910和人物911均对应显示追踪框。人物912未对应显示追踪框。
可能的实现方式中,终端设备基于人物与终端设备之间的距离,以及第一阈值,确认显示追踪框的人物。
具体的,若第一阈值为N,当终端设备识别到拍摄画面中的人物数量小于或等于N时,人物对应显示追踪框。当终端设备识别到拍摄画面中的人物数量大于N时,人物与终端设备之间的距离从大至小排序前N对应的人物对应显示追踪框,其余人物不对应显示追踪框。
可以理解的是,终端设备可以通过机器视觉和深度神经网络等技术,识别终端设备拍摄所使用的摄像头前方的人物,并计算人物与终端设备拍摄所使用的摄像头的距离。人物与终端设备拍摄所使用的摄像头的距离也可以称为人物与终端设备的距离。
示例性的,以第一阈值为3为例,如图9B中的a所示,终端设备在图9B中的a所示的预览画面中显示有4个人物和3个追踪框。4个人物分别为人物921、人物922、人物923、人物924。3个追踪框分别为追踪框925、追踪框926和追踪框928。其中,人物921与追踪框925相对应;人物922与追踪框926相对应;人物923与追踪框928相对应;人物924未对应追踪框。追踪框925的尺寸、追踪框926的尺寸和追踪框928的尺寸依次减小。
如图9B中的a所示,若终端设备识别出人物921与终端设备之间的距离、人物922与终端设备之间的距离、人物923与终端设备之间的距离、以及人物924与终端设备之间的距离依次下降,则人物921、人物922和人物924均对应显示追踪框。人物923未对应显示追踪框。
示例性的,以N为3为例,示例性的,以N为3为例,如图9B中的b所示,终端设备在图9B中的b所示的预览画面中显示有4个人物和3个追踪框。4个人物分别为人物929、人物930、人物931、人物932。3个追踪框分别为追踪框933、追踪框934和追踪框936。其中,人物929与追踪框933相对应;人物930与追踪框934相对应;人物931与追踪框936相对应;人物932未对应追踪框。追踪框933的尺寸、追踪框934的尺寸和追踪框936的尺寸相同。
如图9B中的b所示,若终端设备识别出人物929与终端设备之间的距离、人物930与终端设备之间的距离、人物932与终端设备之间的距离、以及人物931与终端设备之间的距离依次下降,则人物929、人物930和人物932均对应显示追踪框。人物931未对应显示追踪框。
可以理解的是,追踪框的位置是基于人物实时计算的,当人物的位置较近或者人物重叠遮挡时,对应显示的追踪框可能会出现重叠的情况。
基于此,本申请实施例提供几种追踪框的显示策略,以减少追踪框重叠的情况,进而可以减少追踪框重叠导致的误触发情况。
为方便理解,下面结合图10A-图10D对终端设备可能的几种确定追踪框位置的方式进行说明。
可以理解的是,终端设备可以基于人脸框的相关信息和人体框的相关信息综合确 定追踪框的位置。本申请实施例中,人脸框的相关信息包括但不限于:人脸框的中心位置,人脸框的尺寸等。人体框的相关信息包括但不限于:人体框的中心位置,人体框的尺寸等。
实现方式一中,终端设备基于人脸框的中心与人体框的中心计算平均值,得到追踪框的中心。
示例性的,如图10A所示,终端设备可以识别到人物1001a的人脸以及人体,得到人脸框1002a和人体框1003a。相应的,终端设备可以得到人脸框的中心1004a和人体框的中心1005a。终端设备基于人脸框的中心1004a和人体框的中心1005a,计算平均值得到追踪框的中心1006a。
实现方式二中,终端设备可以基于人脸框的中心位置、人体框的中心位置、第一权重和第二权重,计算得到追踪框的中心位置。
示例性的,以第一权重为0.2且对应于人脸框的中心位置,第二权重为0.8且对应于人体框的中心位置为例,如图10B所示,终端设备可以识别到人物1001b的人脸以及人体,得到人脸框1002b和人体框1003b。相应的,终端设备可以得到人脸框的中心1004b和人体框的中心1005b。终端设备基于人脸框的中心1004b、人体框的中心1005b、第一权重和第二权重,得到追踪框的中心1006b。
实现方式三中,追踪框的中心位置还可以为人体框的中心位置。
示例性的,如图10C所示,终端设备可以识别到人物1001c的人脸以及人体,得到人脸框1002c和人体框1003c。相应的,终端设备可以得到人脸框的中心1004c和人体框的中心1005c。终端设备确定追踪框的中心为人体框的中心1005c。
实现方式四中,追踪框与人脸框相邻。
具体的,终端设备基于人脸框与人体框的相对位置,以及人体框的横向长度和纵向长度,确定追踪框与人脸框的相对位置,进而确定追踪框的位置。
示例性的,当人脸框位于人体框的上侧时,且当人体框的横向长度小于或等于纵向长度时,追踪框位于人脸框的下侧(如图10D中的a所示);当人脸框位于人体框的下侧时,且当人体框的横向长度小于或等于纵向长度时,追踪框位于人脸框的上侧(如图10D中的b所示);当人脸框位于人体框的左侧时,人体框的横向长度大于纵向长度时,追踪框位于人脸框的右侧(如图10D中的c所示);当人脸框位于人体框的右侧时,人体框的横向长度大于纵向长度时,追踪框位于人脸框的左侧(如图10D中的d所示)。
可以理解的是,终端设备还可以基于其他方式或其他条件确定追踪框的位置,其他条件包括:追踪框与人脸框的间距大于预设间距,追踪框位于人体的躯干部位等。本申请实施例对于基于单个人物确定追踪框位置的具体方式不做限定。
可以理解的是,终端设备可能会识别到多个人物,并显示多个追踪框。当人物的位置较近或者人物重叠遮挡时,对应显示的追踪框可能会出现重叠的情况。下面集合图11A-图15对多个人物的场景中追踪框的显示策略进行说明。
可以理解的是,当终端设备检测到追踪框重叠或者计算到追踪框重叠时,终端设备重新确定追踪框的显示位置,以减少追踪框的重叠。
具体的,终端设备可以通过向远离重叠区域的方向移动追踪框的方式减少追踪框 的重叠;终端设备还可以不显示其中一个人物对应的追踪框的方式,减少追踪框的重叠。
下面对追踪框的尺寸为预设尺寸的场景中,也就是追踪框的尺寸大小相同的场景中,追踪框的显示策略进行说明。
可能的实现方式一中,当追踪框出现重叠时,终端设备通过向远离重叠区域的方向移动追踪框。远离重叠区域的方向包括但不限于:上、下、左、右、斜向上或斜向下等。这样,可以减少追踪框的重叠。
可以理解的是,终端设备可以基于相邻两个追踪框的位置及预设尺寸,确定追踪框是否重叠。当不满足条件时,终端设备可以基于相邻两个追踪框的相对位置,调整其中一个追踪框的位置,或者调整两个追踪框的位置,使得相邻两个追踪框的距离增加,进而减少追踪框的重叠。
示例性的,以追踪框为矩形为例,终端设备可以基于相邻两个追踪框的中心位置及预设尺寸,通过计算两个追踪框的中心位置在横向上的间距和竖向上的间距,进而判断横向上的间距和竖向上的间距是否满足第一预设条件。第一预设条件包括:横向上的间距大于或等于第一横向预设间距,以及竖向上的间距大于或等于第一竖向预设间距。
当不满足第一预设条件时,追踪框重叠;即横向上的间距小于第一横向预设间距,和/或,竖向上的间距小于第一竖向预设间距。
终端设备可以基于相邻两个追踪框的相对位置,调整其中一个追踪框的中心位置,或者分别调整两个追踪框的中心位置,使得调整后的两个追踪框的中心位置在横向上的间距和竖向上的间距中的任一个满足第一预设条件,进而减少追踪框的重叠。
横向预设间距可以为追踪框在横向上的长度,横向预设间距可以为追踪框在竖向上的长度。
可以理解的是,终端设备还可以基于其他方式确定相邻追踪框是否重叠,此处不做限定。
示例性的,图11A为本申请实施例提供的一种终端设备的界面示意图。当终端设备基于单个人物计算的追踪框时,终端设备可以进入如图11A中的a所示的界面。该界面中的预览画面中包括人物1111a和人物1112a。人物1111a对应显示有追踪框1113a;人物1112a对应显示有追踪框1114a。追踪框1113a和追踪框1114a出现重叠。
相比较于基于单个人物计算的追踪框的位置,调整后的追踪框的位置可能偏左。示例性的,若终端设备通过向左移动一个追踪框,减少追踪框的重叠,终端设备可以进入如图11A中的b所示的界面。该界面中的预览画面中包括人物1111b和人物1112b。人物1111b对应显示有追踪框1113b;人物1112b对应显示有追踪框1114b。相比较于追踪框1113a,追踪框1113b显示的位置偏左。图11A中的b所示的界面中,追踪框1113b和追踪框1114b不重叠。
相比较于基于单个人物计算的追踪框的位置,调整后的追踪框的位置可能偏右。示例性的,若终端设备通过向右移动一个追踪框,减少追踪框的重叠,终端设备可以进入如图11A中的c所示的界面。该界面中的预览画面中包括人物1111c和人物1112c。人物1111c对应显示有追踪框1113c;人物1112c对应显示有追踪框1114c。相比较于 追踪框1114a,追踪框1114c显示的位置偏右。图11A中的c所示的界面中,追踪框1113c和追踪框1114c不重叠。
相比较于基于单个人物计算的追踪框的位置,其中一个调整后的追踪框的位置可能偏左,另一个调整后的追踪框的位置可能偏右。示例性的,若终端设备通过同时反向移动两个追踪框,减少追踪框的重叠,终端设备可以进入如图11A中的d所示的界面。该界面中的预览画面中包括人物1111d和人物1112d。人物1111d对应显示有追踪框1113d;人物1112d对应显示有追踪框1114d。相比较于追踪框1113a,追踪框1113d显示的位置偏左。相比较于追踪框1114a,追踪框1114d显示的位置偏右。图11A中的d所示的界面中,追踪框1113d和追踪框1114d不重叠。
这样,可减少追踪框的重叠,两个追踪框同时移动还可以减少追踪框的偏移,减少追踪框与人物不对应的情况。
可以理解的是,终端设备可以向远离重叠区域的方向移动任一个追踪框。终端设备也可以向远离重叠区域的方向同时移动两个追踪框。
可选的,当重叠区域的竖向长度大于或等于重叠区域的横向长度时,终端设备可通过向左平移或向右平移的方式减少追踪框的重叠;当重叠区域的竖向长度小于重叠区域的横向长度时,终端设备可通过向上平移或向下平移的方式减少追踪框的重叠。这样,可以减少追踪框的偏移,减少追踪框与人物不对应的情况。
可能的实现方式二中,当人物的位置较近或者人物重叠遮挡时,终端设备不显示其中一个人物对应的追踪框,这样,可以减少追踪框重叠的情况。
可能的实现方式中,当追踪框出现重叠时,终端设备不显示其中一个人物对应的追踪框。
示例性的,如图11B中的a所示,预览画面中包括人物1101a和人物1102a。人物1101a对应显示有追踪框1103a;人物1102a对应显示有追踪框1104a。追踪框1103a和追踪框1104a出现重叠。
若终端设备通过减少一个追踪框的显示的方式,减少追踪框的重叠,终端设备可以进入如图11B中的b所示的界面。该界面中的预览画面中包括人物1101b和人物1102b。人物1101b未对应显示追踪框;人物1102b对应显示有追踪框1104b;,不会出现人物1101b对应的追踪框和人物1102b对应的追踪框的重叠现象。
若终端设备通过减少一个追踪框的显示的方式,减少追踪框的重叠,终端设备还可以进入如图11B中的c所示的界面。该界面中的预览画面中包括人物1101c和人物1102c。人物1101c对应显示有追踪框1103c;人物1102c未对应显示追踪框,不会出现人物1101c对应的追踪框和人物1102c对应的追踪框的重叠现象。
可选的,当追踪框出现重叠时,终端设备不显示尺寸较小的人物对应的追踪框。示例性的,图11B中的b所示的界面中,相比较于人物1102b,人物1101b的尺寸较小,不显示1001b对应的追踪框。
可选的,当追踪框出现重叠时,终端设备不显示与终端设备之间的距离较大的人物对应的追踪框。示例性的,图11B中的c所示的界面中,相比较于人物1101c与终端设备之间的距离,人物1102c与终端设备之间的距离更大,终端设备不显示1102c对应的追踪框,显示人物1101c对应的追踪框1103c。
上述两种可能的实现方式可以单独应用在终端设备中,也可以同时应用在终端设备中。本申请实施例对此不作限定。
当两种方式同时应用在终端设备时,终端设备可以基于追踪框重叠区域选取实现方式。
具体的,终端设备可以通过重叠区域的面积/尺寸等选取实现方式。
可选的,当第一值小于或等于第二阈值时,终端设备选取实现方式一;当第一值大于第二阈值时,终端设备选取实现方式二。第一值可以为追踪框重叠区域的面积与重叠的追踪框的总面积之比;第一值也可以为追踪框重叠区域的面积与任一个的追踪框的面积之比,此处不做限定。第二阈值可以为0.25,也可以为0.4。本申请实施例对于第二阈值的取值不做限定。
可选的,当第二值小于或等于第三阈值,或者第三值小于或等于第三阈值时,终端设备选取实现方式一;当第二值和第三值均大于第三阈值时,终端设备选取实现方式二。
第二值可以为追踪框重叠区域的横向长度与重叠的追踪框的横向总长度之比,第三值可以为追踪框重叠区域的竖向长度与重叠的追踪框的竖向总长度之比;第二值也可以为追踪框重叠区域的横向长度与任一个的追踪框的横向长度之比,第三值可以为追踪框重叠区域的竖向长度与任一个的追踪框的横向长度之比;本申请实施例对于第二值和第三值的具体计算方式不做限定。第三阈值可以为0.25,也可以为0.4。本申请实施例对于第三阈值的取值不做限定。
下面结合图12对追踪框的横向长度等相关名词进行说明。
示例性的,如图12所示,追踪框重叠区域重叠区域为图12中的斜线阴影部分。追踪框重叠区域的横向长度为线段a的长度;重叠的追踪框的横向总长度为线段b的长度;追踪框重叠区域的竖向长度为线段c的长度;重叠的追踪框的竖向总长度为线段d的长度;追踪框的横向长度为线段e的长度;追踪框的竖向长度为线段f的长度。
下面对追踪框的尺寸自适应调整的场景中,追踪框的显示策略进行说明。
可以理解的是,终端设备可以通过向远离叠区域的方向移动追踪框的方式减少追踪框的重叠;终端设备还可以不显示尺寸较小的人物对应的追踪框的方式,减少追踪框的重叠。
可能的实现方式一中,当追踪框出现重叠时,终端设备通过向远离重叠区域的方向移动追踪框以减少追踪框的重叠。
可以理解的是,终端设备可以基于相邻两个追踪框的位置及相应追踪框的尺寸,确定追踪框是否重叠。当不满足条件时,终端设备可以基于相邻两个追踪框的相对位置,调整其中一个追踪框的位置,或者调整两个追踪框的位置,使得相邻两个追踪框的距离增加,进而减少追踪框的重叠。
示例性的,以追踪框为矩形为例,终端设备可以基于相邻两个追踪框的中心位置及预设尺寸,通过计算两个追踪框的中心位置在横向上的间距和竖向上的间距,进而判断横向上的间距和竖向上的间距是否满足第二预设条件。第二预设条件包括横向上的间距大于或等于第二横向预设间距,以及竖向上的间距大于或等于第二竖向预设间距。
第二横向预设间距可以为相邻两个追踪框的横向长度之和的一半;第二竖向预设间距可以为相邻两个追踪框的竖向长度之和的一半。
当不满足第二预设条件时,追踪框重叠;即横向上的间距小于第二横向预设间距,和/或,竖向上的间距小于第二竖向预设间距。
终端设备可以基于相邻两个追踪框的相对位置,调整其中一个追踪框的中心位置,或者分别调整两个追踪框的中心位置,使得调整后的两个追踪框的中心位置在横向上的间距和竖向上的间距中的任一个满足第二预设条件,进而减少追踪框的重叠。
可以理解的是,终端设备还可以基于其他方式确定相邻追踪框是否重叠,此处不做限定。
可以理解的是,终端设备可以通过向上移动、向下移动、向左移动和/或向右移动任一个追踪框,以减少追踪框的重叠。终端设备也可以同时反向移动两个追踪框,以减少追踪框的重叠。
示例性的,图13为本申请实施例提供的一种终端设备的界面示意图。当终端设备基于单个人物计算的追踪框时,终端设备可以进入如图13中的a所示的界面,预览画面中包括人物1301a和人物1302a。人物1301a对应显示有追踪框1303a;人物1302a对应显示有追踪框1304a。追踪框1303a和追踪框1304a出现重叠。
相比较于基于单个人物计算的追踪框的位置,调整后的追踪框的位置可能偏左。示例性的,若终端设备中尺寸较小的人物对应的追踪框向远离重叠区域的方向移动,终端设备可以通过向左移动尺寸较小的人物对应的追踪框,减少追踪框的重叠,进入如图13中的b所示的界面。该界面中的预览画面中包括人物1301b和人物1302b。人物1301b对应显示有追踪框1303b;人物1302b对应显示有追踪框1304b。相比较于追踪框1303a,追踪框1303b显示的位置偏左。图13中的b所示的界面中,追踪框1303b和追踪框1304b不重叠。
相比较于基于单个人物计算的追踪框的位置,调整后的追踪框的位置可能偏右。示例性的,若终端设备中尺寸较大的人物对应的追踪框向远离重叠区域的方向移动,终端设备可以通过向右移动尺寸较大的人物对应的追踪框,减少追踪框的重叠,进入如图13中的c所示的界面。该界面中的预览画面中包括人物1301c和人物1302c。人物1301c对应显示有追踪框1303c;人物1302c对应显示有追踪框1304c。相比较于追踪框1304a,追踪框1304c显示的位置偏右。图13中的c所示的界面中,追踪框1303c和追踪框1304c不重叠。
相比较于基于单个人物计算的追踪框的位置,其中一个调整后的追踪框的位置可能偏左,另一个调整后的追踪框的位置可能偏右。示例性的,若终端设备通过同时反向移动两个追踪框,减少追踪框的重叠,终端设备可以进入如图13中的d所示的界面。该界面中的预览画面中包括人物1301d和人物1302d。人物1301d对应显示有追踪框1303d;人物1302d对应显示有追踪框1304d。相比较于追踪框1303a,追踪框1303d显示的位置偏左。相比较于追踪框1304a,追踪框1304d显示的位置偏右。图13中的d所示的界面中,追踪框1303d和追踪框1304d不重叠。
这样,可减少追踪框的重叠,两个追踪框同时移动还可以减少追踪框的偏移,减少追踪框与人物不对应的情况。
可以理解的是,终端设备可以向远离重叠区域的方向移动尺寸较小的人物对应的追踪框。终端设备可以向远离重叠区域的方向移动尺寸较大的人物对应的追踪框。终端设备也可以向远离重叠区域的方向同时移动两个追踪框。本申请实施例对于追踪框的具体移动方式不做限定。
可选的,当重叠区域的竖向长度大于或等于重叠区域的横向长度时,终端设备可通过向左平移或向右平移的方式减少追踪框的重叠;当重叠区域的竖向长度小于重叠区域的横向长度时,终端设备可通过向上平移或向下平移的方式减少追踪框的重叠。这样,可以减少追踪框的偏移。
可能的实现方式二中,当人物的位置较近或者人物重叠遮挡时,终端设备不显示其中一个人物对应的追踪框,这样,可以减少追踪框重叠的情况。
可能的实现方式中,当追踪框出现重叠时,终端设备不显示其中一个人物对应的追踪框。
示例性的,如图14中的a所示,预览画面中包括人物1401a和人物1402a。人物1401a对应显示有追踪框1403a;人物1402a对应显示有追踪框1404a。追踪框1403a和追踪框1404a出现重叠。当终端设备基于人物尺寸确定追踪框大小时,追踪框1404a的尺寸大于追踪框1403a的尺寸。
若终端设备通过减少一个追踪框的显示的方式,减少追踪框的重叠,终端设备可以进入如图14中的b所示的界面。该界面中的预览画面中包括人物1401b和人物1402b。人物1401b未对应显示追踪框;人物1402b对应显示有追踪框1404b;,不会出现人物1401b对应的追踪框和人物1402b对应的追踪框的重叠现象。
若终端设备通过减少一个追踪框的显示的方式,减少追踪框的重叠,终端设备还可以进入如图14中的c所示的界面。该界面中的预览画面中包括人物1401c和人物1402c。人物1401c对应显示有追踪框1403c;人物1402c未对应显示追踪框,不会出现人物1401c对应的追踪框和人物1402c对应的追踪框的重叠现象。
可选的,当追踪框出现重叠时,终端设备不显示尺寸较小的人物对应的追踪框。示例性的,图14中的b所示的界面中,相比较于人物1402b,人物1401b的尺寸较小,不显示1001b对应的追踪框。
可选的,当追踪框出现重叠时,终端设备不显示与终端设备之间的距离较大的人物对应的追踪框。示例性的,图14中的c所示的界面中,相比较于人物1401c与终端设备之间的距离,人物1402c与终端设备之间的距离更大,终端设备不显示1402c对应的追踪框,显示人物1401c对应的追踪框1403c。
示例性的,如图15中的a所示,预览画面中包括人物1501a和人物1502a。人物1501a对应显示有追踪框1503a;人物1502a对应显示有追踪框1504a。追踪框1503a和追踪框1504a出现重叠。当终端设备基于人物与终端设备之间的距离确定追踪框大小时,追踪框1504a的尺寸小于追踪框1503a的尺寸。
若终端设备通过减少一个追踪框的显示的方式,减少追踪框的重叠,终端设备可以进入如图15中的b所示的界面。该界面中的预览画面中包括人物1501b和人物1502b。人物1501b未对应显示追踪框;人物1502b对应显示有追踪框1504b;,不会出现人物1501b对应的追踪框和人物1502b对应的追踪框的重叠现象。
若终端设备通过减少一个追踪框的显示的方式,减少追踪框的重叠,终端设备还可以进入如图15中的c所示的界面。该界面中的预览画面中包括人物1501c和人物1502c。人物1501c对应显示有追踪框1503c;人物1502c未对应显示追踪框,不会出现人物1501c对应的追踪框和人物1502c对应的追踪框的重叠现象。
可选的,当追踪框出现重叠时,终端设备不显示尺寸较小的人物对应的追踪框。示例性的,图15中的b所示的界面中,相比较于人物1502b,人物1501b的尺寸较小,不显示1001b对应的追踪框。
可选的,当追踪框出现重叠时,终端设备不显示与终端设备之间的距离较大的人物对应的追踪框。示例性的,图15中的c所示的界面中,相比较于人物1501c与终端设备之间的距离,人物1502c与终端设备之间的距离更大,终端设备不显示1502c对应的追踪框,显示人物1501c对应的追踪框1503c。
上述两种可能的实现方式可以单独应用在终端设备中,也可以同时应用在终端设备中。本申请实施例对此不作限定。
当两种方式同时应用在终端设备时,终端设备可以基于追踪框重叠区域选取实现方式。
具体的,终端设备可以通过重叠区域的面积/尺寸等选取实现方式。
可选的,当第四值小于或等于第四阈值时,终端设备选取实现方式一;当第四值大于第四阈值时,终端设备选取实现方式二。第四值可以为追踪框重叠区域的面积与重叠的追踪框的总面积之比;第四值也可以为追踪框重叠区域的面积与尺寸较小的追踪框的面积之比,此处不做限定。第四阈值可以为0.25,也可以为0.4。本申请实施例对于第四阈值的取值不做限定。
可选的,当第五值小于或等于第五阈值,或者第六值小于或等于第五阈值时,终端设备选取实现方式一;当第五值和第六值均大于第五阈值时,终端设备选取实现方式二。
第五值可以为追踪框重叠区域的横向长度与重叠的追踪框的横向总长度之比,第六值可以为追踪框重叠区域的竖向长度与重叠的追踪框的竖向总长度之比;第五值也可以为追踪框重叠区域的横向长度与任一个的追踪框的横向长度之比,第六值可以为追踪框重叠区域的竖向长度与任一个的追踪框的横向长度之比;本申请实施例对于第五值和第六值的具体计算方式不做限定。第五阈值可以为0.25,也可以为0.4。本申请实施例对于第五阈值的取值不做限定。
在上述实施例的基础上,终端设备还可以基于人脸位置、人物的肢体位置等多个方面综合确认追踪框的移动方向和移动距离,此处不再赘述。这样,可以减少追踪框与人物不对应的情况。
上述实施例中终端设备以人物为追踪目标可以额外生成一路追焦视频,可能的实现方式中,终端设备还可以基于宠物(例如,猫、狗)、预设物体(例如,车辆)等对象为追踪目标额外生成一路追焦视频。相应的,宠物(例如,猫、狗)、预设物体(例如,车辆)等对象追踪目标也可以对应显示有追踪框,其追踪框的显示可以参照上述相关说明,此处不再赘述。
可以理解的是,上述终端设备的界面仅作为示例,终端设备的界面还可以包括更 多或更少的内容。此外,上述实施例中各个控件的形状、形式仅作为示例。本申请实施例对于显示界面的内容和各个控件的形状、形式均不做限定。
在上述实施例的基础上,本申请实施例提供一种录像方法。示例性的,图16为本申请实施例提供的一种录像方法的流程示意图。
如图16所示,该录像方法可以包括如下步骤:
S1601、终端设备显示第一界面,第一界面包括第一窗口,第一窗口显示有第一摄像头实时采集的画面,以及一个或多个追踪标识。
第一窗口可以为上文中的预览区域或录制区域。追踪追踪标识可以为上文中的追踪框,也可以为其他形式(例如,对象的缩略图、数字、图标等),此处不做限定。追踪标识也可以位于对象显示的位置,也可以排列显示在预览区域或录制区域的边缘,此处不做限定。
S1602、终端设备接收到针对第一追踪标识的第一操作,第一追踪标识为一个或多个追踪标识中的一个。
第一追踪标识可以为任意一个对象对应的追踪标识,例如,男性人物对应的追踪框。
对第一追踪标识的触发操作,可以为点击操作,也可以为触摸操作,本申请实施例对于触发操作的类型不做限定。
S1603、响应于第一操作,终端设备显示第二界面,第二界面包括第一窗口和第二窗口,第一窗口显示有第一摄像头实时采集的画面,第二窗口显示第一窗口中与第一对象有关的一部分画面,第一对象为第一追踪标识对应的对象。
可以理解的是,响应于第一操作,设置追踪目标,显示带有小窗的界面。第一窗口中与第一对象有关的一部分画面可以理解为上文中的追踪画面。在设置追踪目标之前,终端设备不显示小窗,设置追踪目标之后,终端设备显示小窗。
S1604、在第一时刻,终端设备检测到第一窗口的第一位置显示有第一对象,第二窗口显示第一窗口中第一位置处、与第一对象有关的一部分画面。
S1605、在第二时刻,终端设备检测到第一窗口的第二位置显示有第一对象,第二窗口显示第一窗口中第二位置处、与第一对象有关的一部分画面。
本申请实施例中,第二窗口显示的画面(追踪画面)随追焦目标的位置变化而变化。具体的,第二窗口显示的画面中追踪对象的位置变化而变化,可以参照图3B或图3C。例如,第一时刻的界面可以为图3B中的a所示的界面,第二时刻的界面可以为图3B中的b所示的界面;或者,第一时刻的界面可以为图3C中的a所示的界面,第二时刻的界面可以为图3C中的b所示的界面。
综上,终端设备可以基于追踪标识设置追踪目标,终端设备在设置追踪目标后,可以额外得到并显示追踪目标对应的画面,进而在录制视频的同时,额外得到一路或多路追踪目标对应的追焦视频,进而减少对追踪目标的后续剪辑操作,提升剪辑效率。
可选的,第二窗口显示的画面是基于第一窗口显示的画面裁剪得到的。
可选的,第一界面为录制视频过程中的预览界面,第一窗口还包括第一控件,方法还包括:终端设备接收到对第一控件的第二操作;响应于第二操作,终端设备结束录制,并保存第一视频和第二视频,第一视频为第一窗口显示的画面组成的视频,第 二视频为第二窗口显示的画面组成的视频。
本申请实施例中,第二操作可以为用户点击操作,也可以为用户触摸操作,本申请实施例对于第二操作不做限定。第一视频可以为录制区域显示的录制画面生成的视频,第二视频可以为小窗显示的追踪画面生成的视频。
第一控件可以为结束控件,示例性的,第一控件可以为图3C中的a所示的结束控件318。当终端设备检测到用户点击结束控件318的操作时,终端设备结束录制,基于录制区域显示的录制画面生成视频;基于小窗显示的追踪画面生成追焦视频。
这样,终端设备可以保存两路视频,基于追踪目标额外生成一路视频,无需用户剪辑视频,即可得到追踪目标的视频,提升用户体验。
可选的,追踪标识与终端设备检测到的第一窗口显示的对象一一对应。
这样,每个追踪标识分别对应一个对象,可以方便用户选取对象,提升用户体验。
可选的,方法还包括:当终端设备检测到第一窗口中的第二对象和第三对象重叠时,终端设备显示第二对象的第二追踪标识或者第三对象的第三追踪标识。
可以理解的是,第二对象与第三对象不为同一对象;第二对象或第三对象可以为第一对象,此处不做限定。
本申请实施例中,第二对象与第三对象可以分别为图11B中的男性人物和女性人物,或者图14中的的男性人物和女性人物,此处不做限定。
示例性的,如图11B所示的界面,或者如图14所示的界面。具体显示情况可以参照图11B,以及图14中相应说明,此处不再赘述。
这样,终端设备可以不显示其中一个对象对应的追踪标识,可以减少追踪标识重叠的情况,减少用户误触发的情况,还可以使得界面更加整洁。
可选的,当终端设备检测到第一窗口中的第二对象和第三对象重叠时,终端设备显示第二对象的第二追踪标识或者第三对象的第三追踪标识,包括:
当终端设备检测到第一窗口中的第二对象和第三对象重叠时,终端设备根据以下信息中的一项或多项确定终端设备显示第二对象的第二追踪标识或者第三对象的第三追踪标识:第二对象在第一窗口的画面中所占的面积、第三对象在第一窗口的画面中所占的面积、第二对象与第一摄像头之间的焦距、第三对象与第一摄像头之间的焦距。
对象所占的面积还可以理解为对象的尺寸,示例性的,上述图11B所示的界面相对应的说明中,人物所占的面积、人物所占的尺寸。对象的焦距可以理解为对象与摄像头之间的距离、或者可以理解为对象与终端设备之间的距离,示例性的,上述图11B所示的界面相对应的说明中,人物与摄像头之间的距离。
终端设备可以基于对象所占的面积、也可以基于对象的焦距确定显示的追踪标识,以及不显示的追踪标识。
可选的,终端设备根据第二对象和第三对象的以下信息中的一项或多项确定终端设备显示第二对象的第二追踪标识或者第三对象的第三追踪标识,包括:当第一窗口中第二对象的面积小于或等于第一窗口中第三对象的面积时,终端设备显示第三追踪标识,不显示第二追踪标识;或者,当终端设备检测到的第二对象与第一摄像头之间的焦距小于或等于第三对象与第一摄像头之间的焦距时,终端设备显示第二追踪标识,不显示第三追踪标识。
可以理解的是,对象所占的面积越大,为用户设置为追踪目标的可能性越大;对象与第一摄像头之间的焦距越小,对象与终端设备之间的距离越近,为用户设置为追踪目标的可能性越大。
这样,终端设备可以基于对象所占的面积、对象与第一摄像头之间的焦距等确认对象对应的追踪标识是否显示。具体可以参照上述图11B,以及图14中相应说明,此处不再赘述。
可选的,方法还包括:当第二追踪标识的中心位置与第三追踪标识的中心位置在第一预设方向上的距离大于或等于第一预设间距,或者,第二追踪标识的中心位置与第三追踪标识的中心位置在第二预设方向上的距离大于或等于第二预设间距时,终端设备检测到第一窗口中的第二对象和第三对象重叠。
第一预设方向可以为横向,也可以为竖向,还可以为斜向;第二预设方向可以为竖向或横向,还可以为斜向。
终端设备可以基于两个对象对应的追踪标识的中心位置确定两个对象是否重叠,进而确定是否显示,方便计算是否重叠,可以减少计算量。
可选的,第一预设间距为第一长度和第二长度之和的一半,第一长度为第二追踪标识在第一预设方向上的长度,第二长度为第三追踪标识在第一预设方向上的长度;第二预设间距为第三长度和第四长度之和的一半,第三长度为第二追踪标识在第二预设方向上的长度,第四长度为第三追踪标识在第二预设方向上的长度。
当追踪标识为矩形或者方形时,预设间距为追踪标识在相同方向上的长度之和的一半。
可选的,第一预设方向为横向,第二预设方向为竖向。
可选的,方法还包括:当第二追踪标识的中心位置与第三追踪标识的中心位置在第一预设方向上的距离大于或等于第一预设间距,或者,第二追踪标识的中心位置与第三追踪标识的中心位置在第二预设方向上的距离大于或等于第二预设间距时,终端设备调整第二追踪标识的位置和/或调整第三追踪标识的位置,直至第二追踪标识的中心位置与第三追踪标识的中心位置在第一预设方向上的距离小于第一预设间距,或者,第二追踪标识的中心位置与第三追踪标识的中心位置在第二预设方向上的距离小于第二预设间距。
当人物重叠/追踪标识重叠时,终端设备可以通过调整追踪标识的位置,减少追踪标识的重叠。提供另一种调整方法,该调整方法中,用户可以将重叠的对象中的任一个设置为追踪目标。示例性的,具体调整方式可以参照上述图11A、图13中相应说明,此处不做赘述。
可选的,当终端设备显示多个追踪标识时,追踪标识的尺寸相同。
示例性的,如图8C所示,追踪框大小固定,可以减少追踪框过小或过大的情况。
可选的,当终端设备显示多个追踪标识时,追踪标识的尺寸不同,每个追踪标识的尺寸是终端设备基于每个追踪标识对应的对象在第一窗口中所占的尺寸或面积确定的;或者,每个追踪标识的尺寸是终端设备基于每个追踪标识对应的对象与第一摄像头之间的焦距确定的。
示例性的,如图8A、8B所示,追踪框大小不固定。终端设备可以基于人物尺寸 的大小实现自适应调整追踪框的规格。
可选的,对象包括第一对象和第四对象;当第一画面中第一对象的尺寸大于第一画面中第二对象的尺寸时,第一追踪标识的尺寸大于与第四对象对应的第四追踪标识的尺寸;或者,当第一画面中第一对象的面积大于第一画面中第四对象的面积时,第一追踪标识的尺寸大于第四追踪标识的尺寸;或者,当终端设备检测到的第一对象与第一摄像头之间的焦距大于第四对象与第一摄像头之间的焦距时,第一追踪标识的尺寸大于第四追踪标识的尺寸。
本申请实施例中,第四对象与第一对象不同,可以为第二对象,也可以为第三对象,还可以为其他对象,此处不做限定。
终端设备可以显示多个追踪标识,终端设备可以基于人物尺寸的大小、对象与摄像头之间的焦距等实现自适应调整追踪框的规格。提供另一种追踪标识的显示方式,提升用户体验。
可选的,当终端设备检测到的第一窗口显示的对象的数量大于N时,第一界面包括N个追踪标识,N为整数。
N可以为5,也可以为其他任意数值。这样,可以限制对象较多时显示的追踪标识的数量,减少追踪标识过多导致的画面杂乱。此外,限制追踪标识的数量,还可以减少终端设备的计算需求,减少终端设备的卡顿现象、减少耗电量等,还可以降低终端设备的硬件要求,增加适用性。
可选的,N个追踪标识对应的对象为第一画面中对象的尺寸从大至小排序,前N的对象;或者,N个追踪标识对应的对象为终端设备检测到的与第一摄像头的距离从小至大排序中前N的对象。
可选的,终端设备显示第二界面时,第一摄像头对焦的焦点在第一对象上;在第一时刻,第一摄像头对焦的焦点在第一对象上;在第二时刻,第一摄像头对焦的焦点在第一对象上。
这样,终端设备可以基于追踪目标进行追焦,使得追踪目标更加清晰。
上面已对本申请实施例的录像方法进行了说明,下面对本申请实施例提供的执行上述方法的装置进行描述。如图17所示,图17为本申请实施例提供的一种录像装置的结构示意图,该录像装置可以是本申请实施例中的终端设备,也可以是终端设备内的芯片或芯片系统。
如图17所示,录像装置2100可以用于通信设备、电路、硬件组件或者芯片中,该录像装置包括:显示单元2101、以及处理单元2102。其中,显示单元2101用于支持录像装置2100执行的显示的步骤;处理单元2102用于支持录像装置2100执行信息处理的步骤。
可能的实现方式中,该录像装置2100中也可以包括通信单元2103。具体的,通信单元用于支持录像装置2100执行数据的发送以及数据的接收的步骤。其中,该通信单元2103可以是输入或者输出接口、管脚或者电路等。
可能的实施例中,录像装置还可以包括:存储单元2104。处理单元2102、存储单元2104通过线路相连。存储单元2104可以包括一个或者多个存储器,存储器可以是一个或者多个设备、电路中用于存储程序或者数据的器件。存储单元2104可以独立存 在,通过通信线路与录像装置具有的处理单元2102相连。存储单元2104也可以和处理单元2102集成在一起。
存储单元2104可以存储终端设备中的方法的计算机执行指令,以使处理单元2102执行上述实施例中的方法。存储单元2104可以是寄存器、缓存或者RAM等,存储单元2104可以和处理单元2102集成在一起。存储单元2104可以是只读存储器(read-only memory,ROM)或者可存储静态信息和指令的其他类型的静态存储设备,存储单元2104可以与处理单元2102相独立。
本申请实施例提供一种终端设备,终端设备也可以称为终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、智能电视、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。
该终端设备包括:包括:处理器和存储器;存储器存储计算机执行指令;处理器执行存储器存储的计算机执行指令,使得终端设备执行上述方法。
本申请实施例提供一种终端设备,结构参见图1。终端设备的存储器可用于存储至少一个程序指令,处理器用于执行至少一个程序指令,以实现上述方法实施例的技术方案。其实现原理和技术效果与上述方法相关实施例类似,此处不再赘述。
本申请实施例提供一种芯片。芯片包括处理器,处理器用于调用存储器中的计算机程序,以执行上述实施例中的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。
本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备运行时,使得终端设备执行上述实施例中的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。
本申请实施例提供一种计算机可读存储介质,其上存储有程序指令,程序指令被终端设备执行时,使得终端设备执行上述实施例的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。如果在软件中实现,则功能可以作为一个或多个指令或代码存储在计算机可读介质上或者在计算机可读介质上传输。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。
计算机可读介质可以包括RAM,ROM,只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储器,磁盘存储器或其它磁存储设备,或目标于承载的任何其它介质或以指令或数据结构的形式存储所需的程序代码,并且可由计算机访问。而且,任何连接被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆, 双绞线,数字用户线(Digital Subscriber Line,DSL)或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘,激光盘,光盘,数字通用光盘(Digital Versatile Disc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。上述的组合也应包括在计算机可读介质的范围内。
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程设备的处理单元以产生一个机器,使得通过计算机或其他可编程设备的处理单元执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (19)

  1. 一种录像方法,其特征在于,应用于包括第一摄像头的终端设备,所述方法包括:
    所述终端设备显示第一界面,所述第一界面包括第一窗口,所述第一窗口显示有所述第一摄像头实时采集的画面,以及一个或多个追踪标识;
    所述终端设备接收到针对第一追踪标识的第一操作,所述第一追踪标识为所述一个或多个追踪标识中的一个;
    响应于所述第一操作,所述终端设备显示第二界面,所述第二界面包括所述第一窗口和第二窗口,所述第一窗口显示有所述第一摄像头实时采集的画面,所述第二窗口显示所述第一窗口中与第一对象有关的一部分画面,所述第一对象为所述第一追踪标识对应的对象;
    在第一时刻,所述终端设备检测到所述第一窗口的第一位置显示有所述第一对象,所述第二窗口显示所述第一窗口中所述第一位置处、与所述第一对象有关的一部分画面;
    在第二时刻,所述终端设备检测到所述第一窗口的第二位置显示有所述第一对象,所述第二窗口显示所述第一窗口中所述第二位置处、与所述第一对象有关的一部分画面。
  2. 根据权利要求1所述的方法,其特征在于,所述第二窗口显示的画面是基于所述第一窗口显示的画面裁剪得到的。
  3. 根据权利要求1所述的方法,其特征在于,所述第一界面为录制视频过程中的预览界面,所述第一窗口还包括第一控件,所述方法还包括:
    所述终端设备接收到对所述第一控件的第二操作;
    响应于所述第二操作,所述终端设备结束录制,并保存第一视频和第二视频,所述第一视频为所述第一窗口显示的画面组成的视频,所述第二视频为所述第二窗口显示的画面组成的视频。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,
    所述追踪标识与所述终端设备检测到的所述第一窗口显示的对象一一对应。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:
    当所述终端设备检测到所述第一窗口中的第二对象和第三对象重叠时,所述终端设备显示所述第二对象的第二追踪标识或者所述第三对象的第三追踪标识。
  6. 根据权利要求5所述的方法,其特征在于,当所述终端设备检测到所述第一窗口中的第二对象和第三对象重叠时,所述终端设备显示所述第二对象的第二追踪标识或者所述第三对象的第三追踪标识,包括:
    当所述终端设备检测到所述第一窗口中的第二对象和第三对象重叠时,所述终端设备根据以下信息中的一项或多项确定所述终端设备显示所述第二对象的第二追踪标识或者所述第三对象的第三追踪标识:所述第二对象在第一窗口的画面中所占的面积、所述第三对象在第一窗口的画面中所占的面积、所述第二对象与所述第一摄像头之间的焦距、所述第三对象与所述第一摄像头之间的焦距。
  7. 根据权利要求6所述的方法,其特征在于,所述终端设备根据所述第二对象和 所述第三对象的以下信息中的一项或多项确定所述终端设备显示所述第二对象的第二追踪标识或者所述第三对象的第三追踪标识,包括:
    当所述第一窗口中所述第二对象的面积小于或等于所述第一窗口中所述第三对象的面积时,所述终端设备显示所述第三追踪标识,不显示所述第二追踪标识;
    或者,当所述终端设备检测到的所述第二对象与所述第一摄像头之间的焦距小于或等于所述第三对象与所述第一摄像头之间的焦距时,所述终端设备显示所述第二追踪标识,不显示所述第三追踪标识。
  8. 根据权利要求6或7所述的方法,其特征在于,
    当所述第二追踪标识的中心位置与所述第三追踪标识的中心位置在第一预设方向上的距离大于或等于第一预设间距,或者,所述第二追踪标识的中心位置与所述第三追踪标识的中心位置在第二预设方向上的距离大于或等于第二预设间距时,所述终端设备检测到所述第一窗口中的第二对象和第三对象重叠。
  9. 根据权利要求8所述的方法,其特征在于,
    所述第一预设间距为第一长度和所述第二长度之和的一半,所述第一长度为所述第二追踪标识在所述第一预设方向上的长度,所述第二长度为所述第三追踪标识在所述第一预设方向上的长度;
    所述第二预设间距为第三长度和第四长度之和的一半,所述第三长度为所述第二追踪标识在所述第二预设方向上的长度,所述第四长度为所述第三追踪标识在所述第二预设方向上的长度。
  10. 根据权利要求9所述的方法,其特征在于,
    所述第一预设方向为横向,所述第二预设方向为竖向。
  11. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:
    当第二追踪标识的中心位置与第三追踪标识的中心位置在第一预设方向上的距离大于或等于第一预设间距,或者,所述第二追踪标识的中心位置与所述第三追踪标识的中心位置在第二预设方向上的距离大于或等于第二预设间距时,所述终端设备调整所述第二追踪标识的位置和/或调整所述第三追踪标识的位置,直至所述第二追踪标识的中心位置与所述第二追踪标识的中心位置在所述第一预设方向上的距离小于所述第一预设间距,或者,所述第二追踪标识的中心位置与所述第三追踪标识的中心位置在所述第二预设方向上的距离小于所述第二预设间距。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,
    当所述终端设备显示多个所述追踪标识时,所述追踪标识的尺寸相同。
  13. 根据权利要求1-11任一项所述的方法,其特征在于,当所述终端设备显示多个所述追踪标识时,所述追踪标识的尺寸不同,
    每个所述追踪标识的尺寸是所述终端设备基于每个所述追踪标识对应的对象在所述第一窗口中所占的尺寸或面积确定的;
    或者,每个所述追踪标识的尺寸是所述终端设备基于每个所述追踪标识对应的对象与所述第一摄像头之间的焦距确定的。
  14. 根据权利要求13所述的方法,其特征在于,所述对象包括所述第一对象和第四对象;
    当所述第一画面中所述第一对象的尺寸大于所述第一画面中所述第四对象的尺寸时,所述第一追踪标识的尺寸大于与所述第四对象对应的第四追踪标识的尺寸;
    或者,当所述第一画面中所述第一对象的面积大于所述第一画面中所述第四对象的面积时,所述第一追踪标识的尺寸大于所述第四追踪标识的尺寸;
    或者,当所述终端设备检测到的所述第一对象与所述第一摄像头之间的焦距大于所述第四对象与所述第一摄像头之间的焦距时,所述第一追踪标识的尺寸大于所述第四追踪标识的尺寸。
  15. 根据权利要求1-14任一项所述的方法,其特征在于,
    当所述终端设备检测到的所述第一窗口显示的对象的数量大于N时,所述第一界面包括N个所述追踪标识,所述N为整数。
  16. 根据权利要求15所述的方法,其特征在于,
    N个所述追踪标识对应的对象为所述第一画面中所述对象的尺寸从大至小排序,前N的对象;
    或者,N个所述追踪标识对应的对象为所述终端设备检测到的与所述第一摄像头的距离从小至大排序中前N的对象。
  17. 根据权利要求1-16任一项所述的方法,其特征在于,
    所述终端设备显示所述第二界面时,所述第一摄像头对焦的焦点在所述第一对象上;
    在所述第一时刻,所述第一摄像头对焦的焦点在所述第一对象上;
    在所述第二时刻,所述第一摄像头对焦的焦点在所述第一对象上。
  18. 一种终端设备,其特征在于,所述终端设备包括处理器,所述处理器用于调用存储器中的计算机程序,以执行如权利要求1-17中任一项所述的方法。
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在终端设备上运行时,使得所述终端设备执行如权利要求1-17中任一项所述的方法。
PCT/CN2023/092393 2022-05-25 2023-05-06 录像方法和相关装置 WO2023226721A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP23810794.0A EP4422193A1 (en) 2022-05-25 2023-05-06 Video recording method and related apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210577630.XA CN116112782B (zh) 2022-05-25 2022-05-25 录像方法和相关装置
CN202210577630.X 2022-05-25

Publications (2)

Publication Number Publication Date
WO2023226721A1 true WO2023226721A1 (zh) 2023-11-30
WO2023226721A9 WO2023226721A9 (zh) 2024-05-10

Family

ID=86264426

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/092393 WO2023226721A1 (zh) 2022-05-25 2023-05-06 录像方法和相关装置

Country Status (3)

Country Link
EP (1) EP4422193A1 (zh)
CN (1) CN116112782B (zh)
WO (1) WO2023226721A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180152666A1 (en) * 2016-11-29 2018-05-31 Facebook, Inc. Face detection for video calls
CN111163267A (zh) * 2020-01-07 2020-05-15 影石创新科技股份有限公司 一种全景视频剪辑方法、装置、设备及存储介质
CN112954219A (zh) * 2019-03-18 2021-06-11 荣耀终端有限公司 一种多路录像方法及设备
CN113067983A (zh) * 2021-03-29 2021-07-02 维沃移动通信(杭州)有限公司 视频处理方法、装置、电子设备和存储介质
CN114390191A (zh) * 2020-10-22 2022-04-22 华为技术有限公司 录像方法、电子设备及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI514327B (zh) * 2013-06-26 2015-12-21 Univ Nat Taiwan Science Tech 目標偵測與追蹤方法及系統
US11030813B2 (en) * 2018-08-30 2021-06-08 Snap Inc. Video clip object tracking
CN110248254A (zh) * 2019-06-11 2019-09-17 Oppo广东移动通信有限公司 显示控制方法及相关产品
CN111008621B (zh) * 2020-03-10 2020-07-07 浙江清鹤科技有限公司 对象追踪方法、装置、计算机设备和存储介质
CN113536866A (zh) * 2020-04-22 2021-10-22 华为技术有限公司 一种人物追踪显示方法和电子设备
CN114430457B (zh) * 2020-10-29 2024-03-08 北京小米移动软件有限公司 拍摄方法、装置、电子设备和存储介质
CN113766129B (zh) * 2021-09-13 2023-12-05 维沃移动通信(杭州)有限公司 录像方法、装置、电子设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180152666A1 (en) * 2016-11-29 2018-05-31 Facebook, Inc. Face detection for video calls
CN112954219A (zh) * 2019-03-18 2021-06-11 荣耀终端有限公司 一种多路录像方法及设备
CN111163267A (zh) * 2020-01-07 2020-05-15 影石创新科技股份有限公司 一种全景视频剪辑方法、装置、设备及存储介质
CN114390191A (zh) * 2020-10-22 2022-04-22 华为技术有限公司 录像方法、电子设备及存储介质
CN113067983A (zh) * 2021-03-29 2021-07-02 维沃移动通信(杭州)有限公司 视频处理方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN116112782A (zh) 2023-05-12
WO2023226721A9 (zh) 2024-05-10
EP4422193A1 (en) 2024-08-28
CN116112782B (zh) 2024-04-02

Similar Documents

Publication Publication Date Title
US10104312B2 (en) Mobile terminal and method for controlling the same
CN103595909B (zh) 移动终端及其控制方法
US9483501B2 (en) Mobile terminal and a method of controlling the mobile terminal
KR20170112497A (ko) 이동 단말기 및 그 제어방법
CN105245640A (zh) 移动终端及其控制方法
KR20150009069A (ko) 이동 단말기 및 그것의 제어 방법
KR20150133056A (ko) 이동 단말기 및 그것의 제어방법
KR20170131101A (ko) 이동 단말기 및 그 제어방법
KR20170029837A (ko) 이동 단말기 및 그 제어 방법
US10915223B2 (en) Mobile terminal and method for controlling the same
KR20180133743A (ko) 이동 단말기 및 그 제어 방법
WO2023226721A1 (zh) 录像方法和相关装置
KR20150030082A (ko) 이동 단말기 및 그 제어방법
WO2016024668A1 (ko) 이동 단말기 및 그 제어 방법
KR101708318B1 (ko) 이동 단말기 및 그것의 제어방법
WO2023226725A1 (zh) 录像方法和相关装置
KR20170039994A (ko) 이동 단말기 및 그 제어방법
KR20170021616A (ko) 이동 단말기 및 그 이동 단말기의 제어 방법
CN116132790B (zh) 录像方法和相关装置
WO2023226694A1 (zh) 录像方法、装置及存储介质
WO2023226695A1 (zh) 录像方法、装置及存储介质
CN116112780B (zh) 录像方法和相关装置
WO2023226699A1 (zh) 录像方法、装置及存储介质
KR20150094355A (ko) 이동 단말기 및 이의 제어 방법
CN116095461A (zh) 录像方法和相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23810794

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023810794

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2023810794

Country of ref document: EP

Effective date: 20240522