Camera judging method and device, computer device and storage medium

By rotating the terminal with a gimbal and analyzing changes in video image features, the problem of difficulty in determining camera orientation was solved, enabling accurate camera type identification and target tracking.

CN116405656BActive Publication Date: 2026-11-20ARASHI VISION INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310253149.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2026-11-20
Estimated Expiration
2043-03-06

AI Technical Summary

Technical Problem

When users take photos with their mobile phones or other smart devices, it is impossible to accurately determine the orientation of the camera, especially when other applications occupy the camera, making target tracking difficult.

Method used

The gimbal drives the terminal to rotate in different preset directions in sequence, uses the camera to shoot and record video, analyzes the feature changes of the video, generates image motion information and parameter sequences, and determines the orientation type of the camera based on this information.

Benefits of technology

It enables accurate identification of whether the camera is a front or rear camera when the camera is occupied by other applications, and supports the normal operation of the target tracking function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116405656B_ABST
    Figure CN116405656B_ABST
Patent Text Reader

Abstract

The application relates to a camera judgment method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: recording a video picture obtained by recording a video captured by a camera of a terminal in a process of rotating the terminal to different preset directions in sequence by a holder; determining picture motion information according to feature change information of the video picture; generating a picture parameter sequence of the terminal in the rotating process according to the picture motion information; and determining a camera orientation type of the camera relative to the terminal according to a preset motion trend met by the picture parameter sequence. Through the scheme, the camera orientation type of a camera for collecting a video picture relative to the terminal can be determined when the camera is occupied by other application programs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for judging a camera. Background Technology

[0002] When a user takes a picture using a mobile phone, tablet, or other smart device, the built-in video recording application or other applications that occupy the camera may have already been launched.

[0003] If an application without tracking capabilities is using the camera, the video data captured by the camera accessed by that application is collected, and the target is identified within the collected video data. In this case, accurately determining whether the video data was captured by the front-facing camera, rear-facing camera, or other camera with a different orientation is crucial for target tracking. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, device, computer equipment, computer-readable storage medium, and computer program product for determining the orientation of a camera, which can accurately collect video data from a front-facing camera, a rear-facing camera, or other types of cameras.

[0005] Firstly, this application provides a method for determining a camera. The method includes:

[0006] While the terminal is rotated in different preset directions by the gimbal, the video captured by the terminal using the camera is recorded to obtain video footage.

[0007] Based on the feature change information of the video frame, determine the frame motion information;

[0008] Generate a sequence of screen parameters for the terminal as it rotates based on the screen motion information;

[0009] Based on the preset motion trend that the sequence of image parameters conforms to, the camera orientation type relative to the terminal is determined.

[0010] In one embodiment, the preset direction includes a first preset direction, a second preset direction, a third preset direction, and a fourth preset direction.

[0011] In one embodiment, the recording of video captured by the terminal's camera during the process of rotating the terminal sequentially in different preset directions via a gimbal includes:

[0012] According to the preset rotation sequence of the gimbal, the terminal is driven by the gimbal to rotate by a preset angle in the first preset direction, the second preset direction, the third preset direction and the fourth preset direction respectively;

[0013] During the process of the gimbal driving the terminal to rotate, the video screen displayed on the terminal is recorded; the video screen is the screen captured by the terminal using its camera.

[0014] In one embodiment, the motion information includes the motion duration of the process in which the terminal is rotated by the gimbal towards the first preset direction, the second preset direction, the third preset direction, and the third preset direction by the preset angle.

[0015] In one embodiment, the first preset direction and the second preset direction are opposite directions, and the third preset direction and the fourth preset direction are opposite directions.

[0016] In one embodiment, the step of rotating the terminal by a preset angle in the first preset direction, the second preset direction, the third preset direction, and the fourth preset direction respectively, according to the preset rotation sequence of the gimbal, includes:

[0017] The terminal is driven by the gimbal to rotate in the first preset direction at the first preset angle;

[0018] The gimbal drives the terminal to rotate in the second preset direction at the first preset angle.

[0019] The gimbal drives the terminal to rotate in the third preset direction at the second preset angle.

[0020] The terminal is driven by the gimbal to rotate in the fourth preset direction at the second preset angle.

[0021] In one embodiment, the first preset angle is within the longitudinal rotation range of the gimbal, the second preset angle is within the lateral rotation range of the gimbal, and the first preset angle is less than or equal to the second preset angle; or, the first preset angle is within the longitudinal rotation range of the terminal, the second preset angle is within the lateral rotation range of the terminal, and the first preset angle is less than or equal to the second preset angle.

[0022] In one embodiment, the first preset angle is greater than or equal to 20 degrees and less than or equal to 30 degrees; the second preset angle is greater than or equal to 30 degrees and the first preset angle is less than or equal to 40 degrees.

[0023] In one embodiment, the step of rotating the terminal by a preset angle in the first preset direction, the second preset direction, the third preset direction, and the fourth preset direction respectively, according to the preset rotation sequence of the gimbal, includes:

[0024] The gimbal drives the terminal to rotate in the first preset direction at a third preset angle.

[0025] The terminal is driven by the gimbal to rotate in the third preset direction at the third preset angle.

[0026] The gimbal drives the terminal to rotate in the second preset direction at the third preset angle;

[0027] Control the gimbal to drive the terminal to rotate in the fourth preset direction at the third preset angle.

[0028] In one embodiment, determining the motion information of the video frame based on the feature change information of the video frame includes:

[0029] Combine video frames recorded at different timestamps to obtain video frame pairs;

[0030] In each of the aforementioned video frame pairs, optical flow calculations are performed on the pixels to obtain the frame motion information.

[0031] In one embodiment, the pixels used for optical flow calculation include: each pixel in each video frame pair, or each pixel in the downsampled image of each video frame pair.

[0032] In one embodiment, the step of performing optical flow calculation on pixels in each of the video frame pairs to obtain frame motion information includes:

[0033] The velocity of each pixel in each video frame pair is determined; the velocity of each pixel includes the direction of movement of the pixels in each video frame.

[0034] The step of generating the sequence of screen parameters of the terminal during rotation based on the screen motion information includes:

[0035] Based on the pixel movement direction of each video frame and the timestamp, the pixel movement duration in each preset direction is determined;

[0036] Based on the recording sequence of the video footage, the pixel movement duration of each preset direction is combined to obtain the pixel parameter sequence of the terminal during rotation.

[0037] In one embodiment, the terminal includes a front-facing camera and a rear-facing camera; determining the camera orientation type of the camera relative to the terminal based on a preset motion trend conforming to the image parameter sequence includes: determining whether the camera is a front-facing camera or a rear-facing camera of the terminal based on the preset motion trend conforming to the image parameter sequence.

[0038] In one embodiment, the image parameter sequence includes a pixel parameter sequence, which includes the pixel movement duration of each preset direction and the pixel direction order in which the pixel movement durations of each preset direction are arranged.

[0039] In one embodiment, determining whether the camera is a front-facing camera or a rear-facing camera of the terminal based on a preset motion trend conforming to the sequence of image parameters includes:

[0040] The target pixels whose movement duration in the preset direction satisfies the duration conditions of each preset direction and whose pixel direction order conforms to the preset direction order are determined.

[0041] Based on the target pixel, the camera is determined to be either the front-facing camera or the rear-facing camera of the terminal.

[0042] In one embodiment, the preset motion trend includes at least one of a front-facing motion trend and a rear-facing motion trend, wherein the preset direction order of the front-facing motion trend and the rear-facing motion trend is opposite.

[0043] In one embodiment, determining whether the camera is a front-facing camera or a rear-facing camera of the terminal based on a preset motion trend conforming to the sequence of image parameters includes:

[0044] In the video frame, the number of front-facing pixels that conform to the front-facing motion trend and the number of rear-facing pixels that conform to the rear-facing motion trend are counted to obtain the number of front-facing pixels and the number of rear-facing pixels.

[0045] If the number of front-facing camera pixels is greater than the number of rear-facing camera pixels, then the camera is determined to be the front-facing camera of the terminal.

[0046] If the number of front-facing camera pixels is less than the number of rear-facing camera pixels, then the camera is determined to be the rear camera of the terminal.

[0047] In one embodiment, recording the video captured by the terminal using a camera to obtain video footage includes:

[0048] During the process of rotating the terminal in different preset directions and at preset angles by using a gimbal, the screen images of the terminal during the movement are acquired.

[0049] Detect pixel difference information of the screen images in each frame;

[0050] Determine the change value of the pixel difference information;

[0051] Based on the change value, determine the screen recording area in each frame of the screen;

[0052] Record the area described above to obtain a video image.

[0053] In one embodiment, before the gimbal drives the terminal to rotate sequentially in different preset directions, the following steps are included:

[0054] If the video frame is in the standby mode for target object recording, a prompt message indicating that the video frame is in the standby mode is displayed until the recording mode of the video frame is determined to be the target object recording mode in response to the judgment command of the camera.

[0055] In one embodiment, after determining that the camera is the front-facing camera or the rear-facing camera of the terminal, the method further includes:

[0056] Determine the location of the target object in the video frame;

[0057] The camera's image acquisition parameters are determined based on the location of the target object;

[0058] The gimbal drives the terminal to rotate according to the image acquisition parameters;

[0059] During the rotation according to the image acquisition parameters, the video footage captured by the terminal using the camera is recorded; wherein the target object is at a preset position in the video footage recorded according to the image acquisition parameters.

[0060] Secondly, this application also provides a camera identification device. The device includes:

[0061] The terminal motion module is used to record video captured by the camera of the terminal while the terminal is rotated in different preset directions by the gimbal, so as to obtain video images.

[0062] The information acquisition module is used to determine the motion information of the video frame based on the feature change information of the video frame;

[0063] The parameter generation module is used to generate a sequence of screen parameters of the terminal when it rotates based on the screen motion information;

[0064] The camera determination module is used to determine the camera orientation type relative to the terminal based on a preset motion trend that conforms to the sequence of image parameters.

[0065] Thirdly, this application also provides a handheld gimbal, including a processor, which is used to execute the computer program to implement the camera judgment steps in any of the above embodiments.

[0066] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the camera judgment steps in any of the above embodiments.

[0067] Fifthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the judgment steps of the camera in any of the above embodiments.

[0068] Sixthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the camera judgment steps in any of the above embodiments.

[0069] The aforementioned camera determination method, device, computer equipment, storage medium, and computer program product, through a gimbal, drive the terminal to rotate sequentially in different preset directions, causing changes in the video captured by the terminal using the camera by other applications. Since other applications occupy the camera, the video captured by the terminal using the camera is recorded, obtaining video images of the terminal rotating in different preset directions. Based on the characteristic change information of this video image, image motion information is determined. Then, the image motion information is sequentially combined to form an image parameter sequence of the terminal during rotation. Based on the preset motion trend conforming to the image parameter sequence, the camera's orientation type relative to the terminal is accurately determined. The camera orientation type includes, but is not limited to, the terminal's front-facing camera or rear-facing camera. Attached Figure Description

[0070] Figure 1 This is an application environment diagram of the camera judgment method in one embodiment;

[0071] Figure 2 This is a flowchart illustrating a camera detection method in one embodiment;

[0072] Figure 3 This is a schematic diagram of the interface of a video screen in one embodiment;

[0073] Figure 4 This is a schematic diagram of the interface of a video screen in one embodiment;

[0074] Figure 5 This is a flowchart illustrating the camera detection method in an application scenario, as shown in one embodiment.

[0075] Figure 6 This is a structural block diagram of the camera's judgment device in one embodiment;

[0076] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0077] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0078] The camera determination method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 can be, but is not limited to, various cameras, camcorders, panoramic cameras, action cameras, personal computers, laptops, smartphones, tablets, and portable wearable devices. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Terminal 102 can be fixed to the gimbal body by welding or other methods, and can also be detachably or rotatably connected to the gimbal body.

[0079] In one embodiment, such as Figure 2 As shown, a method for determining the identity of a camera is provided, which is then applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps:

[0080] Step 202: While the terminal is rotated in different preset directions by the gimbal, the video captured by the terminal's camera is recorded to obtain video footage.

[0081] A preset direction is one of the directions of the gimbal turntable, and each preset direction is related to a preset motion trend. By analyzing the duration of the video image movement in each preset direction and the sequence of combinations of these durations, it can be determined whether the video image conforms to the preset motion trend. Specifically, the gimbal turntable direction is the rotation direction of the mounting platform on which the terminal is located within the gimbal. Various rotations or deformations of the gimbal's components control the terminal's movement, thereby generating characteristic changes in the video image.

[0082] The video feed is recorded by an application on a terminal using the terminal's camera to capture video. Because the application is occupying the terminal's camera, it's impossible to directly capture the content. Therefore, screen recording or similar methods are used to capture the screen image, determine the recording area within the screen, and then obtain the video feed from that area. The video feed can be at least a portion of the screen image, or it can be directly transmitted, stored, or displayed on other electronic devices.

[0083] In one embodiment, during the process of rotating the terminal sequentially in different preset directions via a gimbal, the video captured by the terminal using a camera is recorded to obtain the video image. This includes: responding to a camera judgment instruction sent by the gimbal, the terminal controls the gimbal to rotate the terminal sequentially in different preset directions, and records the video captured by the terminal using the camera through the terminal's screen recording thread; wherein, the camera judgment instruction can be an object tracking instruction, and it can also be a video image judgment instruction, and the camera judgment instruction, object tracking instruction, and video image judgment instruction can be the same data or different data.

[0084] In one embodiment, the relationship between the screen image and the video image is as follows: Figure 3 (a) or Figure 3 As shown in (b) Figure 3 (a) is a small window video captured by the application using the front-facing camera. Figure 3 (b) is a small window video image captured by the application through the rear camera; recording the video captured by the terminal using the camera to obtain a video image includes: acquiring each frame of the screen image of the terminal during the movement process while the terminal is rotated to different preset directions and preset angles by the gimbal; detecting the pixel difference information of each frame of the screen image; determining the change value of the pixel difference information; determining the screen recording area in each frame of the screen image according to the change value; and recording the video image in the screen recording area to obtain a video image.

[0085] The screen display includes the image shown on the screen while the terminal is rotating. The screen display includes at least a portion of the video feed, and may also include the terminal's system desktop or images from other applications. If the terminal's camera is occupied by other applications, it is necessary to determine the relationship between the video feed and the screen display. This relationship can be determined by analyzing the pixel differences between each frame of the screen display.

[0086] Pixel difference information for each frame of the screen is used to determine whether there are differences in the pixels in each frame of the screen. Pixel difference information includes, but is not limited to, the difference in pixel color channel value and pixel brightness value at the corresponding position in each frame of the screen.

[0087] The change value of pixel difference information is used to characterize the degree of change of pixels in the screen during rotation. If the change value of a pixel is large, the difference information of that pixel fluctuates greatly during rotation, and it is more likely to be a pixel in the screen recording area; if the change value of a pixel is small, the difference information of that pixel fluctuates less during rotation, and it is located in other types of screen areas. Other types of screen areas include the desktop screen area and the screen area of ​​a specific application.

[0088] The recording area is the region on the screen where the video captured by the camera is displayed. The recording area can be a region of interest defined by a rectangle, circle, ellipse, irregular polygon, or other shapes. Recording this area produces the video image.

[0089] The recording area can be used to determine the target detection area during the initial tracking process; it can also be used to determine the tracking area during target tracking, and to determine how the gimbal control signals are calculated during the target tracking process. For example, a typical control strategy is to center the target within the camera lens area. Therefore, the recording area (the area captured by the lens) must first be determined before the current offset can be calculated to determine the gimbal rotation strategy during target tracking.

[0090] For example, in a scenario where a user simultaneously plays a game and records a video via a terminal, the screen image includes both the game image and the video image. Even if the pixel difference information of the game image and the video image may be similar, the game image will not change significantly due to the rotation of the gimbal, while the video image will change depending on the object being captured by the camera. Therefore, the recording area in the screen image can be determined by the change value of the pixel difference information, and the recording area is the area where the video image is located in the screen image.

[0091] The system acquires screen frames during the terminal's movement, which can be recorded in full screen using methods such as screen recording. It then detects pixel differences in each frame, determines the change value of these differences, and uses this information to identify whether any pixels have changed. By identifying pixels with changed differences from the full screen, the system reduces the number of pixels to process. Based on the change value, it determines the recording area in each frame, using a smaller amount of data to define the recording area, and then records the video within that area.

[0092] In one embodiment, the preset direction includes a first preset direction, a second preset direction, a third preset direction, and a fourth preset direction.

[0093] The first, second, third, and fourth preset directions are four different motion directions used to control the terminal to rotate relatively stably relative to a certain position. These motion directions can refer to the gimbal, or the motion direction of the phone or camera mounted on the gimbal. For example, the first and second preset directions are the pitch and roll directions, respectively. To ensure smooth camera movement when the phone moves the camera 25 degrees in the pitch direction, the gimbal's pitch and roll directions move simultaneously. By rotating the terminal sequentially in the four preset directions using the gimbal, the degree of change in the video image is relatively moderate, enhancing the characteristic change information of the video image and facilitating efficient determination of image motion information. The video image displayed on the terminal is recorded to provide real-time feedback on the changes in the video image during the rotation process.

[0094] In one embodiment, while the terminal is rotated sequentially in different preset directions by the gimbal, the video captured by the terminal using the camera is recorded, including: rotating the terminal by the gimbal in a preset angle in a first preset direction, a second preset direction, a third preset direction, and a fourth preset direction according to the preset rotation sequence of the gimbal; and recording the video screen displayed on the terminal while the terminal is rotated by the gimbal; the video screen is the screen captured by the terminal using the camera.

[0095] The preset rotation sequence and angle corresponding to the first, second, third, and fourth preset directions can be achieved through various preset path movements or combinations thereof. These preset path movements can be either the first or second preset path movement. By using a gimbal to rotate the terminal sequentially in the four preset directions by preset angles, the degree of change in the video image becomes more appropriate, and the characteristic change information of the video image is further enhanced, which helps to more efficiently determine the motion information of the image.

[0096] The motion information includes the duration of motion during the process of the gimbal driving the terminal to rotate in the first preset direction, the second preset direction, the third preset direction, and the third preset direction by the preset angle, respectively. Therefore, based on the characteristic changes in the video image, the duration of motion of the gimbal driving the terminal to rotate in the four preset directions by the preset angle is determined. These durations are then sequentially combined to form a sequence of image parameters, accurately determining whether the camera used for shooting is a front-facing camera or a rear-facing camera.

[0097] In one embodiment, the first and second preset directions are opposite, as are the third and fourth preset directions. For example, if the first preset direction is the direction in which the camera of the gimbal control terminal moves upward, then the second preset direction is the direction in which the camera of the gimbal control terminal moves downward; if the third preset direction is the direction in which the camera of the gimbal control terminal rotates to the left, then the fourth preset direction is the direction in which the camera of the gimbal control terminal rotates to the right. Thus, by sequentially rotating the gimbal in opposite directions, the video footage captured during the rotation process can accurately extract feature change information, and this feature change information can be used to accurately determine whether the camera is a front-facing or rear-facing camera of the terminal.

[0098] In one embodiment, the process of moving along a first preset path is described. During the movement along the first preset path, the video frames are sequentially as follows: Figure 4 (a) to Figure 4 As shown in (e); correspondingly, according to the preset rotation sequence of the gimbal, the terminal is driven by the gimbal to rotate by a preset angle in the first preset direction, the second preset direction, the third preset direction and the fourth preset direction respectively, including: driving the terminal to rotate in the first preset direction by the first preset angle; driving the terminal to rotate in the second preset direction by the first preset angle; driving the terminal to rotate in the third preset direction by the second preset angle; driving the terminal to rotate in the fourth preset direction by the second preset angle.

[0099] Optionally, before the terminal is rotated in the first preset direction by the gimbal, the method includes: if the terminal is not in the preset position, controlling the motion to move the terminal to the preset position so that the rotation range of the gimbal will not be exceeded during the rotation of the terminal; wherein, the preset position may be the center position of the rotation range.

[0100] In one feasible implementation, rotating the terminal in a first preset direction by means of a gimbal includes: responding to a camera judgment command, rotating the terminal at a preset position in a first preset direction by means of a first preset angle by means of a gimbal; wherein, the camera judgment command may be an object tracking command, and may also be a video image judgment command.

[0101] In one feasible implementation, rotating the terminal by a gimbal in a second preset direction at a first preset angle includes: after rotating the terminal in the first preset direction by a first preset angle, rotating the terminal in the second preset direction by a first preset angle so that the terminal is reset to a preset position by the gimbal via the first preset angle; wherein, the rotation in the second preset direction can be achieved by directly resetting the terminal via a turntable reset device or by rotating it again.

[0102] In one feasible implementation, rotating the terminal in a third preset direction by means of a gimbal includes: rotating the terminal in a second preset direction by means of a first preset angle after rotating it in a second preset direction by means of a gimbal by means of a first preset angle, and then rotating it in a third preset direction by means of a second preset angle by means of a gimbal by means of a second preset angle.

[0103] In one feasible implementation, rotating the terminal by the gimbal in a fourth preset direction at a second preset angle includes: after rotating the terminal in a third preset direction by a second preset angle by the gimbal, rotating the terminal in a fourth preset direction by a second preset angle by the gimbal, so that the terminal driven by the gimbal returns to a preset position via the second preset angle.

[0104] By rotating the gimbal in opposite directions at the first and second preset angles, the video footage captured during the rotation process can accurately and efficiently extract feature change information. This feature change information can be used to determine whether the camera is the front or rear camera of the terminal, and the rotation time can be reduced.

[0105] During the movement along the first preset path, a first preset angle and a second preset angle are involved; the first preset angle is greater than or equal to 20 degrees and the first preset angle is less than or equal to 30 degrees; the second preset angle is greater than or equal to 30 degrees and the first preset angle is less than or equal to 40 degrees.

[0106] When the first preset angle is 20 degrees, the movement time of the gimbal in the first and second preset directions is short, and after calculating the amount of data on the feature change information of the video image, it is possible to determine whether the camera is a front camera or a rear camera. When the first preset angle is 30 degrees, after calculating the amount of data on the feature change information of the video image, it is possible to more accurately determine whether the camera is a front camera or a rear camera.

[0107] When the second preset angle is 30 degrees, the movement time of the gimbal in the third and fourth preset directions is short, and after calculating the amount of data on the feature change information of the video image, it is possible to determine whether the camera is a front camera or a rear camera. When the second preset angle is 40 degrees, after calculating the amount of data on the feature change information of the video image, it is possible to more accurately determine whether the camera is a front camera or a rear camera.

[0108] In an exemplary embodiment of the first preset path movement, the first preset angle is 25 degrees and the second preset angle is 35 degrees. Correspondingly, the process of using the first preset path movement includes: the gimbal first moves the camera upward by 25 degrees, then moves the camera downward back to center, then moves the camera to the left by 35 degrees, and finally moves the camera to the right back to center. In this exemplary embodiment, one camera movement takes about 700ms, and the total time is 2.8s. In this exemplary embodiment, the camera movement time is relatively small under the premise of accurate camera judgment.

[0109] Optionally, the first preset angle is within the longitudinal rotation range of the gimbal, and the second preset angle is within the lateral rotation range of the gimbal. The first preset angle is less than or equal to the second preset angle. Both the longitudinal and lateral rotation ranges of the gimbal have their own limits. The lateral rotation range is smaller, and setting a smaller angle can avoid hitting the gimbal's limits. By setting the first preset angle to be less than or equal to the second preset angle, the rotation time is minimized.

[0110] The longitudinal and lateral rotation ranges of the gimbal refer to the gimbal's rotation range in mutually perpendicular directions. These ranges are used to determine the rotation range of the mounting platform, which is used to mount the terminal.

[0111] Optionally, the first preset angle is within the longitudinal rotation range of the terminal, and the second preset angle is within the lateral rotation range of the terminal. The first preset angle is less than or equal to the second preset angle. Both the longitudinal and lateral rotation ranges of the terminal have their own limits. The lateral rotation range is smaller, and setting a smaller degree can avoid touching the gimbal limit. By setting the first preset angle to be less than or equal to the second preset angle, the time consumption is minimized.

[0112] Taking commonly used yaw, roll, and pitch directions as examples, the gimbal's longitudinal rotation range is the pitch range, and its lateral rotation range is either the roll or yaw range. Correspondingly, the terminal's longitudinal rotation range is determined by the gimbal's longitudinal and lateral rotation ranges, representing the terminal's range of motion in the pitch direction; similarly, the terminal's lateral rotation range is determined by the gimbal's longitudinal and lateral rotation ranges, representing the terminal's range of motion in the roll or yaw direction. The aforementioned gimbal longitudinal rotation range is not limited to the pitch direction, and the aforementioned gimbal lateral rotation range is not limited to the roll or yaw angle range; it can be the rotation range under other attitudes.

[0113] In one embodiment, the process of moving along the second preset path is described. Following a preset rotation sequence of the gimbal, the terminal is rotated by preset angles in the first, second, third, and fourth preset directions, respectively, including: rotating the terminal in the first preset direction by the third preset angle; rotating the terminal in the third preset direction by the third preset angle; rotating the terminal in the second preset direction by the third preset angle; and controlling the gimbal to rotate the terminal in the fourth preset direction by the third preset angle.

[0114] The first preset angle, the second preset angle, and the third preset angle are different angles of the gimbal turntable, with the third preset angle being between the first and second preset angles.

[0115] In an exemplary embodiment of the second preset path movement, the third preset angle is 30 degrees. The process of using the second preset path movement includes: the gimbal moves the camera 30 degrees up, left, down, and right in sequence. When the camera moves 30 degrees to the right, it returns to the center. In this exemplary embodiment, one camera movement takes about 1000ms, and the total time is 4s.

[0116] The gimbal rotates at a third preset angle in the first preset direction, the third preset direction, the second preset direction, and the fourth preset direction, respectively. During the rotation, the video footage captured can accurately extract feature change information from the video footage. This feature change information is used to determine whether the camera is a front-facing camera or a rear-facing camera on the terminal.

[0117] Step 204: Determine the motion information of the video frame based on the characteristic change information of the video frame.

[0118] Feature change information refers to the changes in video frames at different times. Optionally, feature change information can be obtained by analyzing the pixel differences of pixel positions in consecutive video frames, or by analyzing the pixel differences of pixel positions in video frames selected at timestamp intervals. For example, feature change information can be obtained by feature point matching, feature block matching, or optical flow.

[0119] The image motion information refers to the motion information during the pan-tilt-zoom (PTZ) operation, including the image motion direction and value at each moment. The image motion values ​​are combined according to the image motion direction at each moment to form a sequence of image trend parameters for each image motion direction.

[0120] Optionally, the image motion information is defined as at least one type of image optical flow vector depending on the image motion value; when the image motion value includes the distance of the image within a certain time period, the image optical flow vector includes image displacement; when the image motion value includes the speed of the image within a certain time period, the image optical flow vector includes image speed. Here, image displacement is calculated from the pixel displacements of at least some pixels in the image at different times, and image speed is calculated based on the pixel speeds of at least some pixels in the image at different times.

[0121] In one feasible implementation, determining the motion information of a video frame based on feature change information includes: calculating the motion information of each pixel in the video frame based on feature change information of each pixel in different video frames; statistically analyzing the motion information of each pixel to obtain statistical results; and determining the frame information based on the statistical results. For example, the number of pixels at each speed can be statistically analyzed to obtain the number of pixels at each speed; the maximum number of pixels at each speed can be determined; and the speed at which the maximum number of pixels is located can be determined as the frame motion speed.

[0122] In one embodiment, determining motion information based on feature change information of video frames includes: combining video frames recorded at different timestamps to obtain video frame pairs; and performing optical flow calculations on pixels in each video frame pair to obtain motion information.

[0123] A video frame pair consists of two video frames with different timestamps, and these two timestamps are spaced apart. Optionally, the video frame pair is obtained by combining the frames according to a preset timestamp interval, with each video frame forming a video frame pair with its preceding or following video frame. The video frame pair includes individual pixels for optical flow calculation based on their positional correspondence.

[0124] In one feasible implementation, video frames recorded at different timestamps are combined to obtain video frame pairs, including: determining the video frames recorded at different timestamps sequentially as a first video frame and a corresponding second video frame according to a preset timestamp interval; the first video frame and its corresponding second video frame form a video frame pair; wherein the second video frame and the first video frame are spaced apart by a preset timestamp, and the second video frame can be a preceding video frame or a following video frame of the first video frame. For example, for sequentially arranged video frames A, B, and C, the timestamp interval of these three video frames is 3 frames at a certain frame rate, that is, the interval between video frames A and B is 3 frames at that frame rate, and the interval between video frames B and C is 3 frames at that frame rate; in this case, video frame B can belong to different video frame pairs, serving as the second video frame of video frame A in one video frame pair, and as the first video frame of video frame C in another video frame pair.

[0125] Optical flow calculation is based on the pixel positions in a video frame and extracts the changes in motion information of pixels across different frames. Optical flow calculation involves relatively little data and processing; furthermore, it can also extract features from regions with structural information, flat regions, textured regions, or other image regions.

[0126] The pixels used for optical flow calculation include each pixel in each video frame pair, or each pixel in the downsampled image of each video frame pair.

[0127] A video frame downsampled image is an image obtained by downsampling each video frame in a video frame pair. Optionally, each video frame pair is downsampled according to a preset sampling rate to obtain a video frame pair downsampled image. For example, if the video frame pair has a resolution of 1920*1080, then each pixel in the video frame pair is a pixel in the 1920*1080 resolution. After downsampling the 1920*1080 video frame pair by a factor of 4, a video frame pair downsampled image with a resolution of 480*270 is obtained, and each pixel in the video frame pair downsampled image is a pixel in the 480*270 resolution.

[0128] When the pixels in each video frame pair are all the pixels in the video frame pair, the image motion information is calculated based on dense optical flow. The image motion information during the rotation process is relatively smooth, which helps to accurately determine whether the image motion information conforms to the preset motion trend. Moreover, since the camera's judgment method is only a small part of the entire video shooting process, the amount of data processed by the terminal is relatively moderate. When the pixels in each video frame pair are the pixels in the downsampled image of each video frame pair, it helps to reduce at least one calculation parameter in terms of the amount of data to be calculated and time.

[0129] In an optional implementation, optical flow calculations are performed on pixels in each video frame to obtain image motion information. This includes: performing optical flow calculations on pixels in each video frame to obtain optical flow features for each pixel; and generating image motion information based on the optical flow features of each pixel. Optionally, the traditional Lucas-Kanade optical flow algorithm or various neural network models can be used to calculate the optical flow features. The optical flow features of each pixel can be ordered according to direction to form a sequence of pixel parameters or other image parameter sequences when the terminal rotates.

[0130] Step 206: Generate a sequence of screen parameters for the terminal as it rotates based on the screen motion information.

[0131] The image parameter sequence is an ordered set of parameters obtained by sequentially combining the motion information of each video frame. The image trend parameter sequence, based on the motion information in a single preset direction, combines the motion information of each frame in an orderly manner, thus more objectively reflecting the motion pattern of the video frame and determining whether the frame conforms to the preset motion trend. For example, the image parameter sequence is obtained by orderly combining the motion information of each video frame captured by the terminal during its rotation in each preset direction.

[0132] In one embodiment, optical flow calculation is performed on pixels in each video frame pair to obtain frame motion information, including: determining the velocity of pixels in each video frame pair; the velocity of each pixel includes the direction of pixel movement in each video frame.

[0133] Correspondingly, a sequence of screen parameters for the terminal during rotation is generated based on the motion information of the screen, including: determining the motion duration of pixels in each preset direction based on the motion direction and timestamp of pixels in each video screen; and combining the motion duration of pixels in each preset direction according to the recording order of the video screens to obtain the sequence of pixel parameters for the terminal during rotation.

[0134] Pixel velocity is an instantaneous velocity calculated using traditional optical flow methods or neural networks, and can be determined based on the temporal changes in image grayscale. Pixel velocity includes the pixel velocity direction, which is the direction of pixel movement within a video frame.

[0135] The pixel motion direction in a video frame is the instantaneous direction of the pixel at the timestamp of the video frame. The scene motion direction in the video frame is analyzed based on the instantaneous direction of each pixel. Optionally, pixels whose motion direction differs from a reference direction within a preset range are designated as pixels in the reference direction. The motion duration of the pixels in the reference direction is then determined by the interval between the timestamps of the video frame alignment. The reference direction can be any preset direction, including but not limited to a first preset direction, a second preset direction, a third preset direction, and a fourth preset direction.

[0136] For example, the first video frame and the second video frame are arranged in the recording order, and the time stamp interval between the first video frame and the second video frame is 1 / 30 second; in the video frame pair composed of the first video frame and the second video frame, the pixel speed includes the instantaneous speed of the pixel at the same coordinate at the timestamp of the first video frame, and the direction of the instantaneous speed is the pixel movement direction of the timestamp of the first video frame; the duration of the preset direction to which the pixel movement direction of the timestamp of the first video frame belongs increases the time stamp interval between the first video frame and the second video frame, that is, increases by 1 / 30 second, and so on.

[0137] The recording order of the video footage is the order of the video frames recorded. It is used to sequentially combine the pixel movement durations in each preset direction to form a pixel parameter sequence for each preset direction. The pixel parameter sequence is the pixel movement duration of at least a portion of the pixels in the video footage arranged according to timestamps or other identifiers in each preset direction.

[0138] In one feasible implementation, optical flow calculations are performed on the pixels in each video frame pair to obtain pixel velocities. This includes: determining corresponding pixel pairs in each video frame pair; and performing optical flow calculations on each pixel pair to obtain the individual pixel velocity of each pixel. Here, pixel velocity is a type of optical flow vector for a pixel. These optical flow vectors can form an optical flow map of the video frame pair based on pixel positions. The coordinates of each point in this optical flow map correspond one-to-one with the pixel positions of a specific video frame in the video frame pair, thereby determining the optical flow vector of each pixel using the corresponding pixel pairs.

[0139] The corresponding pixel pairs include two pixels at related positions in different video frames of the video frame pair. These pixels can be pixels with the same coordinates in different video frames of the video frame pair. Optionally, the video frame pair includes a first video frame and a second video frame. Both the first and second video frames are matrices composed of K×L pixels. The first pixel in the first video frame is located at (k1, l1), and the second pixel in the second video frame is located at (k1, l1). Thus, the first pixel and the second pixel form a pixel pair, where k1 is a positive integer in [1, K] and l1 is a positive integer in [1, L].

[0140] In one feasible implementation, determining the pixel movement duration in each preset direction based on the pixel velocity includes: sequentially calculating the angle between the pixel velocity in each preset direction and a reference direction; the reference direction is any one of the preset directions; when the angle is within a preset angle range of the reference direction, the pixel velocity is determined to be the pixel velocity in the reference direction; and the pixel movement duration in each preset direction is determined based on the timestamp of the pixel velocity in the reference direction. For example, in an image coordinate system where the rightward direction of the x-axis is positive, the downward direction of the y-axis is positive, and the upper left corner is the origin, the standard upward / downward / leftward / rightward optical flow vectors are (0, -1), (0, 1), (-1, 0), and (1, 0), respectively. When the upward direction is taken as the reference direction, the pixel velocity (f) is calculated. x ,f y The angle between the target pixel and the standard upward optical flow vector (0, -1) is defined as a perfect match, with a 0° angle indicating a perfect match. To tolerate minor calculation errors, we can consider angles falling within the range of (-10°, 10°) as upward. This process is repeated for other directions until the pixel motion direction for each preset direction is obtained. The pixel motion direction is the direction of motion within each video frame and is related to the timestamp of the video frame, thus gradually determining the pixel motion duration.

[0141] In an exemplary embodiment, the video frames recorded by the system are analyzed sequentially as video frames according to the recording order. Frames can be sent at a fixed frame rate, such as 30fps. In this case, one frame of the system screen recording is captured every 1 / 30th of a second and sent to the algorithm, and sequentially denoted as {I0, I1, I2, ..., I...} N The optical flow is calculated according to the timestamp intervals to obtain the optical flow vector of each pixel; the optical flow vectors of each pixel form an optical flow map. The optical flow map F_N consists of a matrix of K*L pixels, with the point positions on the map being (k, l), where k belongs to the interval [1, K] and l belongs to the interval [1, L]. The optical flow vector at (k, l) is denoted as F. N(k,l) The two-dimensional optical flow vector is the pixel velocity (v) xv y ), where v x v represents the velocity in the x-direction. y This represents the velocity in the y-direction. The timestamp interval is represented by the frame interval. For example, if the interval is 3 frames, then the optical flow between I3 and I0 is calculated in the 3rd frame and denoted as F3; the optical flow between I4 and I1 is calculated in the 4th frame and denoted as F4, resulting in the optical flow graph sequence {F3, F4, F5, ..., F...}. N}

[0142] For pixel (k,l), the recording order of the video frames forms a time series or other type of pixel parameter sequence with adjacent timestamps spaced at 1 / 30 second intervals, i.e., {F 3(k,l) ,F 4(k,l) F 5(k,l) ,...,F N(k,l)}

[0143] Step 208: Determine the camera orientation type relative to the terminal based on the preset motion trend that the image parameter sequence conforms to.

[0144] The preset motion trend is a motion state obtained by rotating the terminal relative to the camera's orientation type according to a preset rotation sequence adapted to that type of camera. Optionally, the preset motion trend includes at least one of a front-facing motion trend and a rear-facing motion trend; if the image parameter sequence matches the front-facing motion trend, the camera used by the terminal to shoot the video is a front-facing camera; if the image parameter sequence matches the rear-facing motion trend, the camera used by the terminal to shoot the video is a rear-facing camera; if the image parameter sequence does not match either the front-facing or rear-facing motion trend, the camera is determined to be faulty, and an error is reported.

[0145] Optionally, the camera orientation type can be an orientation type for physical terminals or an orientation type for virtual terminals. For example, a virtual terminal in a virtual reality environment has multiple camera orientation types, each with its own preset motion trend.

[0146] In one optional embodiment, the terminal includes a front-facing camera and a rear-facing camera; determining the camera orientation type relative to the terminal based on a preset motion trend conforming to the sequence of image parameters includes: determining whether the camera is a front-facing camera or a rear-facing camera of the terminal based on the preset motion trend conforming to the sequence of image parameters. This allows for the determination of whether the device is a mobile phone or another terminal with both a front-facing and rear-facing camera.

[0147] In an optional embodiment, the preset motion trend includes the front-facing camera's front-facing shooting duration conditions in each preset direction and the rear-facing camera's rear-facing shooting duration conditions in each preset direction; the image motion information includes the motion information of each pixel; the preset direction order includes the preset direction order of the front-facing camera and the preset direction order of the rear-facing camera.

[0148] Correspondingly, based on the preset motion trend that the image parameter sequence conforms to, the camera is determined to be either the front-facing camera or the rear-facing camera of the terminal. This includes: in the video image, determining the number of front-facing camera pixels that meet the front-facing duration condition and the number of rear-facing camera pixels that conform to the rear-facing motion trend; if the number of front-facing camera pixels is greater than the number of rear-facing camera pixels, then the camera is determined to be the front-facing camera of the terminal; if the number of front-facing camera pixels is less than the number of rear-facing camera pixels, then the camera is determined to be the rear-facing camera of the terminal.

[0149] Optionally, the image parameter sequence includes a pixel parameter sequence, which includes the pixel movement duration in each preset direction and the pixel direction order in which the pixel movement durations in each preset direction are arranged. The pixel movement duration in each preset direction refers to the length of time a pixel moves in each preset direction in each video frame; the pixel direction order can be the timestamp order of all or part of the video frames, and this timestamp order can be the recording order. The parameter sequence of each pixel in the image is determined from two dimensions: one dimension is the pixel movement duration, i.e., the length of time a pixel moves in a preset direction; the other dimension is the pixel direction order, i.e., the order in which the pixel moves in different preset directions. By comprehensively judging from the duration condition and the pixel direction order, it is possible to more accurately determine whether the camera is a front-facing camera or a rear-facing camera when the video frame belongs to different scenes.

[0150] In one embodiment, determining whether a camera is a front-facing camera or a rear-facing camera of a terminal based on a preset motion trend conforming to a sequence of image parameters includes: determining target pixels whose pixel movement duration in a preset direction satisfies the duration conditions of each preset direction and whose pixel direction order conforms to the preset direction order; and determining whether a camera is a front-facing camera or a rear-facing camera of a terminal based on the target pixels.

[0151] A target pixel is a pixel in a video frame used to determine whether the camera is a front-facing or rear-facing camera. A target pixel includes at least two dimensions: one is the pixel's motion duration, i.e., the length of time the pixel moves in a preset direction; the other is the pixel's direction order, i.e., the order in which the pixel moves in different preset directions. Optionally, the target pixel can be the intersection of pixels that meet the duration condition and pixels that conform to the preset direction order, or it can be a pixel obtained by processing the intersection, such as data cleaning.

[0152] In one feasible implementation, determining a target pixel whose pixel movement duration in a preset direction satisfies the duration conditions of each preset direction and whose pixel direction order conforms to the preset direction order includes: determining that the pixel movement duration in a preset direction satisfies the duration conditions of each preset direction, and obtaining pixels that satisfy the duration conditions; and determining that the pixel direction order conforms to the preset direction order, and obtaining pixels that conform to the preset direction order; and determining a target pixel based on the pixels that satisfy the duration conditions and the pixels that conform to the preset direction order.

[0153] In one possible implementation, determining that the motion duration of a pixel in a preset direction satisfies the duration conditions of each preset direction includes: sequentially determining the motion duration of the same pixel in a first direction in a first preset direction, the motion duration in a second direction in a second preset direction, the motion duration in a third direction in a third preset direction, and the motion duration in a fourth direction in a fourth preset direction; determining that the motion duration in the first direction exceeds a threshold value for the first direction, determining that the motion duration in the second direction exceeds a threshold value for the second direction, determining that the motion duration in the third direction exceeds a threshold value for the third direction, and determining that the motion duration in the fourth direction exceeds a threshold value for the fourth direction, and then determining that the pixel satisfies the duration conditions.

[0154] In one possible implementation, determining whether the pixel direction order conforms to a preset direction order and obtaining pixels that conform to the preset direction order includes: determining whether the first direction movement duration, the second direction movement duration, the third direction movement duration, and the fourth direction movement duration of the pixel match the preset direction order of the gimbal rotation; if so, obtaining pixels that conform to the preset direction order.

[0155] In one feasible implementation, the target pixel belongs to the front-facing pixel and the rear-facing pixel. The front-facing pixel refers to the pixel whose movement duration in a preset direction meets the front-facing duration conditions of each preset direction, and whose pixel direction order conforms to the front-facing preset direction order. The rear-facing pixel refers to the pixel whose movement duration in a preset direction meets the rear-facing duration conditions of each preset direction, and whose pixel direction order conforms to the rear-facing preset direction order.

[0156] Correspondingly, based on the target pixels, the camera is determined to be either a front-facing camera or a rear-facing camera of the terminal, including: determining whether the camera is a front-facing camera or a rear-facing camera based on the statistical results of the number of front-facing and rear-facing pixels.

[0157] Since the target pixel is determined by a combination of time conditions and pixel orientation order, it can more accurately determine whether the camera is a front camera or a rear camera when the video frame belongs to different scenes.

[0158] Optionally, the preset motion trend includes at least one of a front-facing motion trend and a rear-facing motion trend, wherein the preset direction order of the front-facing motion trend and the rear-facing motion trend is opposite.

[0159] The front-facing camera motion trend includes a preset sequence of front-facing camera parameters, based on the sequence of video frames captured sequentially by the front-facing camera in a preset orientation, during the pre-capture process of video footage using the front-facing camera. Correspondingly, the rear-facing camera motion trend includes a preset sequence of rear-facing camera parameters, based on the sequence of rear-facing camera frames captured sequentially in a preset orientation, during the pre-capture process of video footage using the rear-facing camera.

[0160] The preset direction order of the front camera and the preset direction order of the rear camera are reversed. During the execution of the camera judgment method, the camera is determined to be the front camera or the rear camera of the terminal based on the image parameter sequence that conforms to the motion trend of the front camera and the motion trend of the rear camera, respectively. The image parameter sequence that conforms to the motion trend of the front camera and the motion trend of the rear camera includes the pixel parameter sequence that conforms to the motion trend of the front camera and the pixel parameter sequence that conforms to the motion trend of the rear camera.

[0161] In one embodiment, determining whether a camera is a front-facing camera or a rear-facing camera of a terminal based on a preset motion trend conforming to a sequence of image parameters includes: counting the number of front-facing pixels conforming to the front-facing motion trend and the number of rear-facing pixels conforming to the rear-facing motion trend in the video image to obtain the number of front-facing pixels and the number of rear-facing pixels; if the number of front-facing pixels is greater than the number of rear-facing pixels, then the camera is determined to be a front-facing camera of the terminal; if the number of front-facing pixels is less than the number of rear-facing pixels, then the camera is determined to be a rear-facing camera of the terminal.

[0162] Optionally, the front-facing pixels and rear-facing pixels can be obtained from the aforementioned target pixel classification, or they can be obtained from other pixel classifications used to determine a preset motion trend. For example, the other pixels used to determine the preset motion trend can be obtained by statistically analyzing the pixel motion directions of each video frame to obtain the number of pixels whose motion directions conform to a preset direction; the front-facing pixels and rear-facing pixels are determined based on a comprehensive judgment of the number of pixels whose motion directions conform to the preset direction and the pixel direction order.

[0163] Therefore, based on the different conditions met by the preset motion trend, the front camera pixels and rear camera pixels are determined respectively, which can more accurately determine whether the above camera is a front camera or a rear camera when the video image belongs to different scenes.

[0164] For example, if the first preset direction is upward, the second preset direction is downward, the third preset direction is left, and the fourth preset direction is right, then the following two cases are considered to be the pixel parameter sequence that conforms to the preset motion trend under the first preset rotation order:

[0165] 700ms upward + 700ms downward + 700ms left + 700ms right = matches the movement trend of the rear camera image;

[0166] Downward 700ms + Upward 700ms + Rightward 700ms + Leftward 700ms = Matches the movement trend of the front-facing camera image.

[0167] 700ms is the set time for the phone / lens to move continuously in one direction. However, in actual movement, there are start-up and stabilization processes. The actual continuous movement time that can be detected by optical flow may be less than 700ms. Therefore, a smaller value can be used to judge the preset motion trend that the pixels conform to, in order to better tolerate control and calculation errors. The following criteria can be used to judge the pixel parameter sequence that conforms to the preset motion trend:

[0168] 400ms upward + 400ms downward + 400ms left + 400ms right = matches the movement trend of the rear camera image;

[0169] Downward 400ms + Upward 400ms + Rightward 400ms + Leftward 400ms = Matches the movement trend of the front-facing camera image.

[0170] In the above-mentioned method for determining the camera, the terminal is rotated sequentially in different preset directions by a gimbal, causing changes in the video captured by other applications using the camera. Since other applications occupy the camera, the video footage of the terminal rotating in different preset directions is obtained by screen recording. Based on the characteristic change information of the video footage, the motion information of the image is determined. Based on the preset motion trend that the motion information of the image conforms to, the camera is accurately determined to be the front-facing camera or the rear-facing camera of the terminal.

[0171] In one embodiment, before the gimbal drives the terminal to rotate sequentially in different preset directions, the process includes: if the video screen is in the standby mode for target object recording, displaying a prompt message indicating that the video screen is in the standby mode, until the recording mode of the video screen is determined to be the target object recording mode in response to the judgment command from the camera.

[0172] When the video screen is in standby mode for recording the target object, a prompt message indicating that the video screen is in standby mode is displayed through human-computer interaction methods such as dynamic island, floating window, and push notification, thereby reminding and waiting for the user to send object tracking instructions. The object tracking instructions can be judgment instructions from the camera or instructions used to trigger the camera's judgment.

[0173] When responding to the camera's judgment instruction, the video frame is determined to be in the target object recording mode. By executing the above steps 202-208, it is determined that the camera is either a front-facing camera or a rear-facing camera of the terminal, thus completing the camera judgment process in this target object recording mode. In this case, the video frame in the target object recording mode determines the camera's image acquisition parameters based on the position of the target object.

[0174] In an optional implementation, if the video frame is in a target object recording standby mode, a prompt message indicating that the video frame is in the standby mode is displayed until a judgment command from the camera is received, and the recording mode of the video frame is determined to be the target object recording mode. This includes: if no command triggered by the gimbal trigger is detected, a prompt message indicating that the terminal is in a target object tracking standby mode is displayed until a screen recording command or other command used to characterize the camera's judgment is received, and the recording mode of the video frame is determined to be the target object recording mode. The initialization process of the target object recording mode includes the steps 202-208 described above.

[0175] In an optional implementation, if the video frame is in a standby mode for target object recording, a prompt message indicating that the video frame is in the standby mode is displayed until a judgment command from the camera is received, at which point the recording mode of the video frame is determined to be the target object recording mode. This includes: if no gimbal-triggered object tracking command is detected, the terminal is prompted that it is not in target object tracking mode. If a gimbal-triggered object tracking command is detected, the terminal and gimbal are initialized and linked through the application, and it is determined whether the video frame and the camera capturing the video are front-facing or rear-facing cameras.

[0176] Therefore, by displaying the recording mode on the terminal interface, users can intuitively determine the state of video recording and decide whether to initiate the video recording initialization process under this recording mode.

[0177] In one embodiment, after determining that the camera is a front-facing camera or a rear-facing camera of the terminal, the method further includes: determining the position of the target object in the video frame; determining the image acquisition parameters of the camera based on the position of the target object; rotating the terminal according to the image acquisition parameters via a gimbal; and recording the video frame captured by the camera during the rotation according to the image acquisition parameters; wherein the target object is located at a preset position in the video frame recorded according to the image acquisition parameters.

[0178] The video capture parameters ensure that the video image is located within the recording area of ​​the screen, and the position of the target object is also determined based on the recording area. This is used to determine the area where the target object is tracked during the tracking process, and to determine how the PTZ control signals are calculated.

[0179] Image acquisition parameters are used to characterize the distribution information of the target object in the video frame. Different distribution information can be calculated from the salient region and associated region of the target object using area, coordinates, or other data, to adjust the gimbal rotation parameters during the shooting process. The salient region of the target object is the region identified by target detection, and the associated region is related to the salient region according to the object structure detected by target detection; for example, the associated region of the target object is the head region, and the associated region of the target object is the body region.

[0180] Optionally, if the gimbal rotation parameters during the shooting process are adjusted, the image acquisition parameter is the image acquisition offset. The image acquisition offset includes at least the adjustment of the acquisition direction and may also include the adjustment of the focal length. The image acquisition offset is determined based on whether the salient area of ​​the video image is located at a preset image position. When the positional difference between the salient area of ​​the video image and the target position is less than a position threshold, the image acquisition offset of the video image can be considered small, and there is no need to control the position of the gimbal adjustment terminal, or only a small adjustment needs to be made; when the positional difference between the salient area of ​​the video image and the target position is greater than the position threshold, the image acquisition offset is large, and the target object in the video image needs to be adjusted. Optionally, when adjusting the target object in the video image, the identifiable object category of the target object can be changed, or the target object can be changed. Here, the target object is the tracking target, which can be a system-preset identifiable object type, including but not limited to people, heads, faces, cats, dogs, and vehicles.

[0181] The image capture parameters are determined by the position of the target object in at least one frame of video. Then, based on the target object's position, the pan-tilt unit (PTZ) is controlled to rotate the terminal, ensuring that the preset image position in the recorded video matches the target object's position, allowing for targeted shooting. Optionally, the preset image position is the center of the video frame or a user-selected position.

[0182] In one embodiment, after determining whether the camera is a front-facing or rear-facing camera of the terminal, the method further includes: when shooting with a mobile phone, camera, or other shooting terminal mounted on the gimbal, if the terminal's camera is occupied by video shooting software, the video footage captured by the camera is collected through the terminal's backend, and then it is determined whether there is a target object in the collected video footage. If there is, the image acquisition parameters are determined based on the position of the target object in order to track the target object. This achieves mutual cooperation between front-end shooting and back-end tracking, improving the user shooting experience.

[0183] In an exemplary embodiment, upon detecting a command triggered by a button on the handheld gimbal, the gimbal notifies the application in the terminal via Bluetooth or other communication connection; then, tracking initialization begins. During initialization, the aforementioned camera and video image judgment processes are first performed to determine the area of ​​the video image and whether the camera is a front-facing or rear-facing camera. Then, object detection is performed on the video image, detecting objects of a preset type. The distance between the center point of each bounding box and the center of the preview area is calculated, and the candidate object with the smallest distance is selected for tracking. Common detection methods can be used, including those based on handcrafted features (such as template matching, keypoint matching, and key feature methods) or those based on convolutional neural network technology (such as YOLO, SSD, R-CNN, and Mask R-CNN).

[0184] In one exemplary embodiment, this application is applied to a specific application scenario, such as... Figure 5As shown, it includes: detecting the application launch command of the terminal; the application connecting the terminal and the gimbal; the terminal's shooting page switching to screen recording and tracking mode; entering the standby state of screen recording and tracking, and popping up a prompt window to switch the application to the background; waiting for the object tracking command through other human-computer interaction methods such as the dynamic island, floating window, and push notification; if no command triggered by the gimbal trigger is detected, the terminal is prompted that it is not in the target object tracking mode; if the command triggered by the first click of the gimbal trigger is detected, the initialization process is initiated; initialization linkage refers to determining the video frame and determining whether the camera shooting the video is a front camera or a rear camera; in the initialization Then, the target object is identified and tracked; the target object is displayed in the video frame; the terminal is shown to be in target object tracking recovery mode through human-computer interaction interfaces such as floating boxes; if the tracking of the target object continues for 1 hour, the above steps of "no command triggered by gimbal trigger detected" are re-executed; if the above event "the command triggered by the gimbal trigger is detected and the initialization process is initiated" exists before the tracking of the target object is maintained, the tracking is canceled when the command triggered by the gimbal trigger is clicked again, and the above steps of "no command triggered by the gimbal trigger detected and the terminal is not in target object tracking mode" are re-executed.

[0185] In an exemplary embodiment, applying this application to a specific application scenario includes: detecting an application launch command on the terminal; the application connecting the terminal to the gimbal; the terminal's shooting page switching to screen recording tracking mode, then entering a standby state for screen recording tracking, and popping up a prompt window to switch the application to the background; then waiting for an object tracking command through real-time message activities such as Dynamic Island, floating windows, push notifications, or other human-computer interaction methods; if no object tracking command is detected from the gimbal, the terminal is prompted that it is not in target object tracking mode; if an object tracking command is detected from the gimbal, the application initializes the linkage between the terminal and the gimbal, and determines whether the video frame and the camera used to shoot the video are front-facing or rear-facing cameras; after the video frame and camera are determined, initialization is completed, thereby starting target object tracking. During target object tracking, the target object is displayed in the video frame, and the terminal is shown to be in target object tracking recovery mode through human-computer interaction interfaces such as floating windows, and the tracking of the target object is maintained; during the process of maintaining target object tracking, if an object tracking termination command is detected from the gimbal or the tracking process lasts for 1 hour, the terminal waits for an object tracking command again.

[0186] The gimbal triggers the object tracking command when the user clicks the tracking start button in the gimbal, and the object tracking termination command can also be triggered by the user clicking the tracking termination button in the gimbal. The tracking start button and the tracking termination button can be the same button, and this button acts as the tracking start button when waiting for the object tracking command, and acts as the tracking termination button while maintaining the tracking of the target object.

[0187] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0188] Based on the same inventive concept, this application also provides a camera judgment device for implementing the camera judgment method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in the one or more camera judgment device embodiments provided below can be found in the limitations of the camera judgment method described above, and will not be repeated here.

[0189] In one embodiment, such as Figure 6 As shown, a camera-based detection device includes:

[0190] The terminal motion module 602 is used to record the video captured by the camera of the terminal during the process of the terminal being rotated in different preset directions by the gimbal, so as to obtain the video image.

[0191] The information acquisition module 604 is used to determine the motion information of the video frame based on the feature change information of the video frame;

[0192] The parameter generation module 606 is used to generate a sequence of screen parameters of the terminal when it rotates based on the screen motion information.

[0193] The camera determination module 608 is used to determine the camera orientation type of the camera relative to the terminal based on the preset motion trend that the image parameter sequence conforms to.

[0194] In one embodiment, the preset direction includes a first preset direction, a second preset direction, a third preset direction, and a fourth preset direction.

[0195] In one embodiment, the terminal motion module 602 is used for:

[0196] According to the preset rotation sequence of the gimbal, the terminal is driven by the gimbal to rotate by a preset angle in the first preset direction, the second preset direction, the third preset direction and the fourth preset direction respectively;

[0197] During the process of the gimbal driving the terminal to rotate, the video screen displayed on the terminal is recorded; the video screen is the screen captured by the terminal using its camera.

[0198] In one embodiment, the motion information includes the motion duration of the process in which the terminal is rotated by the gimbal towards the first preset direction, the second preset direction, the third preset direction, and the third preset direction by the preset angle.

[0199] In one embodiment, the first preset direction and the second preset direction are opposite directions, and the third preset direction and the fourth preset direction are opposite directions.

[0200] In one embodiment, the terminal motion module 602 is used for:

[0201] The terminal is driven by the gimbal to rotate in the first preset direction at the first preset angle;

[0202] The gimbal drives the terminal to rotate in the second preset direction at the first preset angle.

[0203] The gimbal drives the terminal to rotate in the third preset direction at the second preset angle.

[0204] The terminal is driven by the gimbal to rotate in the fourth preset direction at the second preset angle.

[0205] In one embodiment, the first preset angle is within the longitudinal rotation range of the gimbal, the second preset angle is within the lateral rotation range of the gimbal, and the first preset angle is less than or equal to the second preset angle; or, the first preset angle is within the longitudinal rotation range of the terminal, the second preset angle is within the lateral rotation range of the terminal, and the first preset angle is less than or equal to the second preset angle.

[0206] In one embodiment, the first preset angle is greater than or equal to 20 degrees and less than or equal to 30 degrees; the second preset angle is greater than or equal to 30 degrees and the first preset angle is less than or equal to 40 degrees.

[0207] In one embodiment, the terminal motion module 602 is used for:

[0208] The gimbal drives the terminal to rotate in the first preset direction at a third preset angle.

[0209] The terminal is driven by the gimbal to rotate in the third preset direction at the third preset angle.

[0210] The gimbal drives the terminal to rotate in the second preset direction at the third preset angle;

[0211] Control the gimbal to drive the terminal to rotate in the fourth preset direction at the third preset angle.

[0212] In one embodiment, the information acquisition module 604 is used for:

[0213] Combine video frames recorded at different timestamps to obtain video frame pairs;

[0214] In each of the aforementioned video frame pairs, optical flow calculations are performed on the pixels to obtain the frame motion information.

[0215] In one embodiment, the pixels used for optical flow calculation include: each pixel in each video frame pair, or each pixel in the downsampled image of each video frame pair.

[0216] In one embodiment, the information acquisition module 604 is used for:

[0217] The velocity of each pixel in each video frame pair is determined; the velocity of each pixel includes the direction of movement of the pixels in each video frame.

[0218] Correspondingly, the parameter generation module 606 is used to determine the duration of pixel movement in each preset direction based on the pixel movement direction of each video frame and the timestamp.

[0219] Based on the recording sequence of the video footage, the pixel movement duration of each preset direction is combined to obtain the pixel parameter sequence of the terminal during rotation.

[0220] In one embodiment, the terminal includes a front-facing camera and a rear-facing camera; the camera determination module 608 is configured to: determine the camera orientation type of the camera relative to the terminal based on a preset motion trend conforming to the image parameter sequence.

[0221] In one embodiment, the image parameter sequence includes a pixel parameter sequence, which includes the pixel movement duration of each preset direction and the pixel direction order in which the pixel movement durations of each preset direction are arranged.

[0222] In one embodiment, the camera determining module 608 is configured to:

[0223] The target pixels whose movement duration in the preset direction satisfies the duration conditions of each preset direction and whose pixel direction order conforms to the preset direction order are determined.

[0224] Based on the target pixel, the camera is determined to be either the front-facing camera or the rear-facing camera of the terminal.

[0225] In one embodiment, the preset motion trend includes at least one of a front-facing motion trend and a rear-facing motion trend, wherein the preset direction order of the front-facing motion trend and the rear-facing motion trend is opposite.

[0226] In one embodiment, the camera determining module 608 is configured to:

[0227] In the video frame, the number of front-facing pixels that conform to the front-facing motion trend and the number of rear-facing pixels that conform to the rear-facing motion trend are counted to obtain the number of front-facing pixels and the number of rear-facing pixels.

[0228] If the number of front-facing camera pixels is greater than the number of rear-facing camera pixels, then the camera is determined to be the front-facing camera of the terminal.

[0229] If the number of front-facing camera pixels is less than the number of rear-facing camera pixels, then the camera is determined to be the rear camera of the terminal.

[0230] In one embodiment, the terminal motion module 602 is used for:

[0231] During the process of rotating the terminal in different preset directions and at preset angles by using a gimbal, the screen images of the terminal during the movement are acquired.

[0232] Detect pixel difference information of the screen images in each frame;

[0233] Determine the change value of the pixel difference information;

[0234] Based on the change value, determine the screen recording area in each frame of the screen;

[0235] Record the area described above to obtain a video image.

[0236] In one embodiment, the terminal motion module 602 is used for:

[0237] If the video frame is in the standby mode for target object recording, a prompt message indicating that the video frame is in the standby mode is displayed until the recording mode of the video frame is determined to be the target object recording mode in response to the judgment command of the camera.

[0238] In one embodiment, after determining that the camera is the front-facing camera or the rear-facing camera of the terminal, the information acquisition module 604 is used to:

[0239] Determine the location of the target object in the video frame;

[0240] The camera's image acquisition parameters are determined based on the location of the target object;

[0241] The gimbal drives the terminal to rotate according to the image acquisition parameters;

[0242] During the rotation according to the image acquisition parameters, the video footage captured by the terminal using the camera is recorded; wherein the target object is at a preset position in the video footage recorded according to the image acquisition parameters.

[0243] The various modules in the aforementioned camera's judgment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0244] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0245] In one embodiment, a handheld gimbal is also provided, including a processor that executes a computer program to implement the steps in the above method embodiments.

[0246] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0247] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0248] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0249] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0250] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0251] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0252] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for determining a camera, characterized in that, The method includes: While the terminal is rotated in different preset directions by the gimbal, the video captured by the terminal's camera is recorded to obtain video footage; the different preset directions include opposite directions. Based on the feature change information of the video frame, determine the frame motion information; The screen parameter sequence of the terminal during rotation is generated based on the screen motion information; the screen parameter sequence is obtained by orderly combination of the screen motion information of each video frame in each preset direction; Based on the preset motion trend that the sequence of image parameters conforms to, the camera orientation type relative to the terminal is determined.

2. The method according to claim 1, characterized in that, The preset directions include a first preset direction, a second preset direction, a third preset direction, and a fourth preset direction.

3. The method according to claim 2, characterized in that, The process of recording video captured by the terminal's camera during the rotation of the terminal in different preset directions by the gimbal includes: According to the preset rotation sequence of the gimbal, the terminal is driven by the gimbal to rotate by a preset angle in the first preset direction, the second preset direction, the third preset direction and the fourth preset direction respectively; During the process of the gimbal driving the terminal to rotate, the video screen displayed on the terminal is recorded; the video screen is the screen captured by the terminal using its camera.

4. The method according to claim 3, characterized in that, The motion information of the screen includes: the motion duration of the process in which the terminal is rotated by the gimbal towards the first preset direction, the second preset direction, the third preset direction and the fourth preset direction by the preset angle respectively.

5. The method according to claim 3, characterized in that, The first preset direction and the second preset direction are opposite directions, and the third preset direction and the fourth preset direction are opposite directions.

6. The method according to claim 5, characterized in that, The step of rotating the terminal by a preset angle in the first preset direction, the second preset direction, the third preset direction, and the fourth preset direction, respectively, according to the preset rotation sequence of the gimbal, includes: The terminal is driven by the gimbal to rotate in the first preset direction at the first preset angle; The gimbal drives the terminal to rotate in the second preset direction at the first preset angle. The gimbal drives the terminal to rotate in the third preset direction at the second preset angle. The terminal is driven by the gimbal to rotate in the fourth preset direction at the second preset angle.

7. The method according to claim 6, characterized in that, The first preset angle is within the longitudinal rotation range of the gimbal, and the second preset angle is within the lateral rotation range of the gimbal, wherein the first preset angle is less than or equal to the second preset angle; or, the first preset angle is within the longitudinal rotation range of the terminal, and the second preset angle is within the lateral rotation range of the terminal, wherein the first preset angle is less than or equal to the second preset angle.

8. The method according to claim 6, characterized in that, The first preset angle is greater than or equal to 20 degrees and less than or equal to 30 degrees; the second preset angle is greater than or equal to 30 degrees and the first preset angle is less than or equal to 40 degrees.

9. The method according to claim 5, characterized in that, The step of rotating the terminal by a preset angle in the first preset direction, the second preset direction, the third preset direction, and the fourth preset direction, respectively, according to the preset rotation sequence of the gimbal, includes: The gimbal drives the terminal to rotate in the first preset direction at a third preset angle. The terminal is driven by the gimbal to rotate in the third preset direction at the third preset angle. The gimbal drives the terminal to rotate in the second preset direction at the third preset angle; Control the gimbal to drive the terminal to rotate in the fourth preset direction at the third preset angle.

10. The method according to claim 1, characterized in that, The step of determining the motion information of the video frame based on the feature change information of the video frame includes: Combine video frames recorded at different timestamps to obtain video frame pairs; In each of the aforementioned video frame pairs, optical flow calculations are performed on the pixels to obtain the frame motion information.

11. The method according to claim 10, characterized in that, The pixels used for optical flow calculation include: each pixel in each of the video frame pairs, or each pixel in the downsampled image of each of the video frame pairs.

12. The method according to claim 11, characterized in that, The step of performing optical flow calculations on pixels in each of the video frame pairs to obtain frame motion information includes: The velocity of each pixel in each video frame pair is determined; the velocity of each pixel includes the direction of movement of the pixels in each video frame. The step of generating the sequence of screen parameters of the terminal during rotation based on the screen motion information includes: Based on the pixel movement direction of each video frame and the timestamp, the pixel movement duration in each preset direction is determined; Based on the recording sequence of the video footage, the pixel movement duration of each preset direction is combined to obtain the pixel parameter sequence of the terminal during rotation.

13. The method according to claim 1, characterized in that, The terminal includes a front-facing camera and a rear-facing camera; determining the camera orientation type of the camera relative to the terminal based on a preset motion trend conforming to the sequence of image parameters includes: determining whether the camera is a front-facing camera or a rear-facing camera of the terminal based on a preset motion trend conforming to the sequence of image parameters.

14. The method according to claim 13, characterized in that, The image parameter sequence includes a pixel parameter sequence, which includes the pixel movement duration in each preset direction and the pixel direction order in which the pixel movement durations in each preset direction are arranged.

15. The method according to claim 14, characterized in that, The step of determining whether the camera is a front-facing camera or a rear-facing camera of the terminal based on a preset motion trend conforming to the sequence of image parameters includes: The target pixels whose movement duration in the preset direction satisfies the duration conditions of each preset direction and whose pixel direction order conforms to the preset direction order are determined. Based on the target pixel, the camera is determined to be either the front-facing camera or the rear-facing camera of the terminal.

16. The method according to claim 13, characterized in that, The preset motion trend includes at least one of a front-facing motion trend and a rear-facing motion trend, wherein the preset direction order of the front-facing motion trend and the rear-facing motion trend is opposite.

17. The method according to claim 16, characterized in that, The step of determining whether the camera is a front-facing camera or a rear-facing camera of the terminal based on a preset motion trend conforming to the sequence of image parameters includes: In the video frame, the number of front-facing pixels that conform to the front-facing motion trend and the number of rear-facing pixels that conform to the rear-facing motion trend are counted to obtain the number of front-facing pixels and the number of rear-facing pixels. If the number of front-facing camera pixels is greater than the number of rear-facing camera pixels, then the camera is determined to be the front-facing camera of the terminal. If the number of front-facing camera pixels is less than the number of rear-facing camera pixels, then the camera is determined to be the rear camera of the terminal.

18. The method according to claim 1, characterized in that, The process of recording video captured by the terminal using a camera to obtain video footage includes: During the process of rotating the terminal in different preset directions and at preset angles by using a gimbal, the screen images of the terminal during the movement are acquired. Detect pixel difference information of the screen images in each frame; Determine the change value of the pixel difference information; Based on the change value, determine the screen recording area in each frame of the screen; Record the area described above to obtain a video image.

19. The method according to claim 1, characterized in that, Before the process of rotating the terminal sequentially in different preset directions via the gimbal includes: If the video frame is in the standby mode for target object recording, a prompt message indicating that the video frame is in the standby mode is displayed until the recording mode of the video frame is determined to be the target object recording mode in response to the judgment command of the camera.

20. The method according to any one of claims 1-19, characterized in that, After determining that the camera is the front-facing camera or the rear-facing camera of the terminal, the method further includes: Determine the location of the target object in the video frame; The camera's image acquisition parameters are determined based on the location of the target object; The gimbal drives the terminal to rotate according to the image acquisition parameters; During the rotation according to the image acquisition parameters, the video footage captured by the terminal using the camera is recorded; wherein the target object is at a preset position in the video footage recorded according to the image acquisition parameters.

21. A camera detection device, characterized in that, The device includes: The terminal motion module is used to record video captured by the camera of the terminal while the terminal is rotated in different preset directions by the gimbal, so as to obtain video images; the different preset directions include opposite directions. The information acquisition module is used to determine the motion information of the video frame based on the feature change information of the video frame; The parameter generation module is used to generate a sequence of screen parameters when the terminal rotates based on the screen motion information; the screen parameter sequence is obtained by orderly combination of the screen motion information of each video frame in each preset direction; The camera determination module is used to determine the camera orientation type relative to the terminal based on a preset motion trend that conforms to the sequence of image parameters.

22. A handheld gimbal, characterized in that, Includes a processor for implementing the steps of the method according to any one of claims 1 to 20.

23. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 20.

24. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 20.

Citation Information

Patent Citations

  • Method and apparatus for adjusting shooting direction

    CN106203254A

  • Camera switching-on method and device

    CN106572299A