Automatic tracking shooting method, device and storage medium for fixed scoring area movement
By identifying and adjusting the gimbal angle, the problems of frequent gimbal rotation and target tracking loss in motion tracking shooting in a fixed scoring area are solved, achieving stable and accurate shooting effects.
Patent Information
- Application Number
- CN202510781429.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-12
AI Technical Summary
In tracking shooting of movement in a fixed scoring area, the existing technical solution causes the gimbal to repeatedly fine-tune its rotation within a small range, resulting in frequent jitter in the shooting image and the problem of target tracking loss.
By identifying the position of the tracking target and fixed scoring area in the real-time shooting picture, the tracking or locking state of the gimbal is dynamically adjusted, and the target recognition algorithm is used to identify and determine the position of players, crowds or balls, and the gimbal angle is adjusted to stabilize the shooting.
It achieves stable shooting in sports scenes with fixed scoring areas, reduces image jitter and improves the accuracy and continuity of target tracking.
Smart Images

Figure CN120321492B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the fields of computer vision technology and motion tracking and shooting, and more particularly to a method, apparatus, and computing device for automatically tracking and shooting motion in a fixed scoring area. Background Art
[0002] In the field of computer vision, using a rotatable gimbal to automatically track a target is a common approach. Target identification is typically achieved through facial recognition, and automatic tracking involves controlling the gimbal's rotation strictly based on the target's location. For example, CN119653240A uses this method to track a target and determine whether the gimbal should rotate. However, applying this common computer vision technology to motion tracking, particularly when tracking motion within a fixed scoring area, presents some difficult challenges.
[0003] First, unlike sports like volleyball, table tennis, and badminton, which typically score points based on opposing players' mistakes around the ball, sports like basketball, soccer, hockey, and rugby, which have a fixed scoring area—the basket or goal—are scored based on opposing players' attempts to get the ball into the scoring area. Consequently, players frequently and rapidly run back and forth around the fixed scoring area, creating exciting moments in a game. In these situations, mechanically implementing existing tracking solutions would result in the gimbal repeatedly fine-tuning its rotation within a small range, causing frequent jitter in the captured footage.
[0004] Secondly, compared with general target tracking scenarios, motion tracking shooting scenarios are more complex and unpredictable. Whether the tracking target is a person or a ball, tracking loss may occur, and general target tracking solutions do not provide a solution for this scenario.
[0005] It should be understood that the aforementioned two problems do not occur in general automatic target tracking shooting scenarios. Therefore, those skilled in the art have not discovered the aforementioned technical problems and provided technical solutions. This application is based on the aforementioned defects that exist when using a general automatic target tracking shooting solution in an automatic tracking shooting scenario with fixed scoring area motion. Summary of the Invention
[0006] In view of this, the present application provides an automatic tracking shooting solution for the movement of a fixed scoring area, aiming to improve the stability of the automatic tracking shooting solution for the movement of a fixed scoring area.
[0007] In a first aspect of the present application, a method for automatically tracking and shooting motion in a fixed scoring area is provided, characterized by comprising:
[0008] S1: Identify the position of the tracking target and the position of the fixed scoring area in the real-time shooting picture;
[0009] S2: When the position of the tracking target exceeds the first preset range, adjust the pan / tilt camera angle to track and shoot the tracking target;
[0010] S3: When the position of the fixed scoring area is within the second preset range and the position of the tracking target is within the third preset range, pausing execution of S2, locking the gimbal shooting angle, and the first preset range is included in the third preset range.
[0011] Preferably, the tracking target is at least one of a player, a crowd or a ball.
[0012] According to an embodiment of the present application, the method for automatically tracking and shooting motion in a fixed scoring area further includes:
[0013] S4: When the position of the tracking target exceeds the third preset range, the pan / tilt camera angle is unlocked and S2 is executed.
[0014] When the position of the tracked target exceeds the first preset range, the gimbal shooting angle is adjusted as follows:
[0015] When the position of the tracked target is outside the left side of the first preset range, the gimbal shooting angle is moved leftward until the position of the tracked target is back within the first preset range;
[0016] When the position of the tracking target is outside the right side of the first preset range, the pan / tilt camera angle is moved rightward until the position of the tracking target is again within the first preset range.
[0017] According to an embodiment of the present application, when the tracking target is a player, identifying the position of the tracking target in the real-time shooting picture includes:
[0018] Pre-acquire the jersey features of the target being tracked, where the jersey features include the target jersey number and the target jersey color;
[0019] Obtain all human targets in the real-time shooting picture, crop the jersey number area of each human target and feed it into the number classification model to obtain the jersey number of each human target and match it with the target jersey number;
[0020] If the match is successful, the jersey color of the successfully matched human target is obtained and matched with the target jersey color; if the match is successful, the successfully matched human target is determined to be the tracking target.
[0021] According to an embodiment of the present application, when the tracking target is a crowd, the average value of the position coordinates of all targets in the crowd is used as the position of the tracking target.
[0022] According to an embodiment of the present application, when the tracking target is a ball, identifying the position of the tracking target in the real-time shooting picture includes:
[0023] When the tracking target cannot be identified in the real-time shooting picture, the first position of the tracking target when the tracking target was last identified in a preset number of frames before the real-time shooting picture is traced back, and the first position is used as the position of the tracking target.
[0024] In a second aspect of the present application, another method for automatically tracking and shooting motion in a fixed scoring area is provided, characterized by comprising:
[0025] S1: Identify the position of the tracking target and the position of the fixed scoring area in the real-time shooting picture;
[0026] S2: When the position of the tracking target exceeds the first preset range, adjust the pan / tilt camera angle to track and shoot the tracking target;
[0027] S31: When the position of the fixed scoring area is within the second preset range and the number of human targets within the second preset range is not less than a preset value, pausing execution of S2 and locking the pan / tilt camera angle;
[0028] S41: When the number of human targets within the second preset range is lower than a preset value, the pan / tilt angle is unlocked and step S2 is executed.
[0029] Preferably, the tracking target is at least one of a player, a crowd or a ball.
[0030] When the target is outside the first preset range in the center of the live view, the gimbal's shooting angle can be adjusted as follows:
[0031] When the position of the tracked target is outside the left side of the first preset range, the gimbal shooting angle is moved leftward until the position of the tracked target is back within the first preset range;
[0032] When the position of the tracking target is outside the right side of the first preset range, the pan / tilt camera angle is moved rightward until the position of the tracking target is again within the first preset range.
[0033] According to an embodiment of the present application, when the tracking target is a player, identifying the position of the tracking target in the real-time shooting picture includes:
[0034] Pre-acquire the jersey features of the target being tracked, where the jersey features include the target jersey number and the target jersey color;
[0035] Obtain all human targets in the real-time shooting picture, crop the jersey number area of each human target and feed it into the number classification model to obtain the jersey number of each human target and match it with the target jersey number;
[0036] If the match is successful, the jersey color of the successfully matched human target is obtained and matched with the target jersey color; if the match is successful, the successfully matched human target is determined to be the tracking target.
[0037] According to an embodiment of the present application, when the tracking target is a crowd, the average value of the position coordinates of all targets in the crowd is used as the position of the tracking target.
[0038] According to an embodiment of the present application, when the tracking target is a ball, identifying the position of the tracking target in the real-time shooting picture includes:
[0039] When the tracking target cannot be identified in the real-time shooting picture, the first position of the tracking target when the tracking target was last identified in a preset number of frames before the real-time shooting picture is traced back, and the first position is used as the position of the tracking target.
[0040] In the third aspect of the present application, an automatic tracking shooting device is provided, including a shooting module, an analysis module and a rotation module. The shooting module is physically connected to the rotation module, the rotation module is suitable for horizontal rotation, the shooting module is suitable for continuously acquiring real-time shooting pictures, and sending the real-time shooting pictures to the analysis module; the analysis module is suitable for executing the method of the first aspect or the second aspect of the present application, and sending a rotation instruction to the rotation module: the rotation module is suitable for changing the angle of the shooting module according to the rotation instruction.
[0041] In a fourth aspect of the present application, an electronic device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method of the first aspect or the second aspect of the present application is implemented.
[0042] In a fifth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect or the second aspect of the present application is implemented.
[0043] The automatic tracking and shooting method of the movement of a fixed scoring area provided in the embodiment of the present application uses a target recognition algorithm to identify and determine the position of the fixed scoring area and the target to be tracked in the real-time video screen, and dynamically adjusts the tracking or locking state of the gimbal, so that during the automatic tracking shooting, intense activities around the fixed scoring area can be stably shot and the screen jitter can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0045] Figure 1is a flow chart of an automatic tracking shooting method for fixed scoring area motion according to an embodiment of the present application;
[0046] Figure 2 Flowchart of a method for identifying a player's position in a real-time shot according to an embodiment of the present application;
[0047] Figure 3 is a flowchart of another method for automatically tracking and shooting motion in a fixed scoring area according to an embodiment of the present application;
[0048] Figure 4 This is an example diagram of the division of a visible area and a preset range according to an embodiment of the present application;
[0049] Figure 5 is a flowchart of another method for automatically tracking and shooting motion in a fixed scoring area according to an embodiment of the present application;
[0050] Figure 6 is a block diagram of an automatic tracking shooting device according to an embodiment of the present application;
[0051] Figure 7 It is a structural diagram of a terminal device or server suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0052] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0053] In the field of computer vision analysis, it is generally assumed that the origin of the coordinate system is located in the upper left corner of the screen. In the various embodiments of the present application, unless otherwise stated, the upper left corner is used as the origin of the coordinate system of the screen. Those skilled in the art should know that such a coordinate system setting is not absolutely fixed. When the origin of the coordinate system is set at any position inside or outside the screen, the corresponding technical solutions that can be obtained by simple adjustments to this solution without creative labor are all within the scope of protection of this application.
[0054] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.
[0055] Figure 1 Flowchart of a method for automatically tracking and shooting motion in a fixed scoring area according to an embodiment of the present application. Figure 1 , the method comprising:
[0056] S1: Identify the position of the tracking target and the position of the fixed scoring area in the real-time shooting picture.
[0057] The technical solution of this application is directed to the automatic tracking and shooting of sports within a fixed scoring area. Sports within a fixed scoring area are defined as sports where a specific target enters a fixed scoring area within a sports field. Examples include basketball, where the ball enters the basket, and soccer, hockey, ice hockey, water polo, rugby, and handball, where the ball enters the goal. The location of the fixed scoring area is the location of the basket or goal.
[0058] In one possible implementation, the identification of the tracking target and the position of the fixed scoring area is performed using a target recognition algorithm. The specific choice of the target recognition algorithm is not limited in this application: the YOLOv8 model can be used, or recognition algorithms such as CNN (convolutional neural network) and ViT (Vision Transformer) can be used. In order to achieve more accurate recognition results, a large number of annotated pictures can be used to train the algorithm model. The training of algorithms and models is a common technical means that those skilled in the art should know. It does not belong to the content that needs to be protected in this application and will not be repeated here. The target recognition algorithm uses four parameters: the horizontal and vertical coordinates of the center point of the target frame and the width and height of the target frame to represent each identified target. In a possible implementation, the position of the tracking target and the position of the fixed scoring area are represented by the center point of the corresponding target recognition frame.
[0059] This application provides three target tracking solutions for automatic tracking of sports: tracking a single player, tracking a crowd, or tracking a ball. These three solutions can be used individually or conditionally within an overall tracking solution, without any restrictions in this application. The following describes the specific implementations of these three target tracking methods.
[0060] 1. Tracking target is a player:
[0061] In the scenario of tracking a single player, preferably, the player to be tracked is determined by matching jersey features. Figure 2 FIG. 1 is a flow chart of a method for identifying a player's position in a real-time shooting picture according to an embodiment of the present application. Figure 2 As shown:
[0062] S201: Pre-acquire jersey features of the target to be tracked, including the target jersey number and jersey color. Specifically, the jersey number and jersey color of the target to be tracked are pre-entered and used as a matching benchmark during subsequent tracking and filming. The jersey number and jersey color of the target to be tracked can be pre-entered by uploading a complete jersey photo and then using the model for recognition.
[0063] S202: Acquire all human targets in the real-time shooting picture, cut out the jersey number area of each human target and send it to the number classification model, obtain the jersey number of each human target, and match it with the target jersey number.
[0064] Specifically, the object detection model detects human targets in the live footage, extracts all human targets, and crops the jersey number region. The classification model then identifies the target's jersey number and matches it with the preset target jersey number. A match is considered successful if the numbers match. The choice of object detection model and number classification model is not restricted. The YOLOv8 (You Only Look Once version 8) model can be used to integrate number region recognition and number classification. Alternatively, a combination of recognition and classification models can be used. For example, the first object detection model can utilize a convolutional neural network or ViT (Vision Transformer). The classification model can utilize large models such as MobileNet and EfficientNet-Lite, or traditional machine learning models such as traditional vector machines and random forests.
[0065] S203: If the match is successful, obtain the jersey color of the successfully matched human target and match it with the target jersey color; if the match is successful, determine the successfully matched human target as the tracking target.
[0066] Since in a game, the two opposing teams usually have independent numbering rules, it is very likely that two players with the same jersey number will appear on the field. If tracking is performed only based on the jersey number, target recognition errors are likely to occur. Therefore, when the jersey number matching in S202 is successful, in order to eliminate the misidentification caused by the above situation, jersey color matching is introduced. The extraction of jersey color can be directly implemented through the color picker API of the mobile terminal operating system. When performing color matching, due to lighting or shooting angles, it cannot be guaranteed that the second jersey color in the real-time video image is completely consistent with the first jersey color, and a certain color difference may occur. Therefore, jersey color matching does not require the values of the three RGB channels to be completely consistent, but only requires that the error does not exceed the preset threshold.
[0067] In one embodiment, the similarity of hue and saturation is measured by calculating the cosine of the angle between the color vectors, r(f,g). The cosine of the angle is the ratio of the dot product of the two color vectors to the length-module product, i.e., r(f,g)=(f·g) / (||f||·||g||). The closer the value of the cosine of the angle is to 1, the closer the hue and saturation of the two colors are. For example, if Color1=(216,8,24) and Color2=(240,16,16), then f·g=216*240+8*16+24*16=52352, ||f||·||g||≈52,475.85, and the cosine of the angle is 0.999, indicating that the hue of the two colors is highly similar.
[0068] 2. Tracking target groups:
[0069] In sports tracking photography, crowd tracking mode is a method for capturing the entire game. Crowd tracking uses a pre-defined group of people in the live footage as tracking targets, and determines their overall movement trends. In crowd tracking mode, the average position coordinates of all targets in the crowd are used as the group's position.
[0070] The crowd can be a collection of all human target objects in the real-time shooting picture, or a collection of some preset human target objects, for example:
[0071] (1) Detecting the movement of the same team. To determine if a team is the same, consider the set of players with the same jersey color in the real-time footage as the same team, and then calculate the average of their position coordinates. The method for determining whether the jersey colors are the same has been described in detail before and will not be repeated here.
[0072] (2) Detect the movement of a preset number of players with the fastest speed in the picture. In ball sports, there are often intense fast break scenes. At this time, the players move very fast. The preset number of players closest to the direction of movement, that is, the fastest moving players, can be configured as three or five people, are the focus of tracking. At this time, this group of people should be tracked to capture the most effective game footage.
[0073] Specifically, the movement direction of the target in the image is first determined by continuously analyzing multiple frames. When the average value of the center points of all target frames in the image moves in the same direction at a speed exceeding a threshold (the threshold depends on the frame rate and pixel count of the camera and can be set to 1000 pixels in 1 second) for several consecutive frames (depending on the frame rate of the camera, which can be set to within 2 seconds. For example, if the frame rate of the camera is 60 frames per second, this is 180 consecutive frames. In actual judgment, the real-time video can be extracted and then judged) the current scene is identified as a fast break. The front three or five people in the entire crowd, closest to the aforementioned direction, are identified as the tracking group, and the average value of their position coordinates is calculated.
[0074] 3. Tracking target is a ball:
[0075] Given the characteristics of ball sports, the ball is the core target in such sports. Players' activities all revolve around the ball, and there is only one valid ball on the playing field at a time. Therefore, the ball can be used as a tracking target.
[0076] When the ball is used as a tracking target, it may be obscured. When the ball cannot be continuously identified in the real-time shooting picture, it can be considered that the ball is continuously obscured and the ball is stationary at this time. For example, in a free kick or penalty kick scene in football, the ball may be stationary and a large number of players may surround the ball to cause occlusion. In view of this situation, it is preferred to backtrack several frames of the real-time shooting picture to find the position of the ball when it was last identified as the current tracking position. Specifically, when the ball is not found in the real-time shooting picture, the recognition log of the recognition algorithm is backtracked to find the frame where the ball position was last identified, and this position is used as the current tracking target position.
[0077] For example, the timestamp of the live shot is 1736771678.5463305, and the ball is not recognized in the current frame. However, in the log of the frame with the timestamp 1736771678.2343305, there is a record of the last successful ball recognition:
[0078] "yolo": [
[0079] {
[0080] "label": 0,
[0081] "confidence": 0.96,
[0082] "x": 552.0,
[0083] "y": 930.0,
[0084] "width": 50.0,
[0085] "height": 131.0
[0086] }, ]
[0088] Among them, label is the label of the target box; confidence is the confidence; x is the horizontal coordinate of the center point of the target box; y is the vertical coordinate of the center point of the target box; width is the width of the target box; height is the height of the target box.
[0089] The predicted position of the ball has not changed, so the coordinates of the last successful ball identification position (552,930) are used as the current tracking target position.
[0090] S2: When the position of the tracking target exceeds the first preset range, the pan / tilt camera shooting angle is adjusted to track and shoot the tracking target.
[0091] The first preset range is adjustable and can vary depending on the ball game and the intensity of the sport. If a balanced composition is used, the target object should be located within the central third of the screen. Therefore, the first preset range can be set in the center of the screen, with an area of one-third of the screen size. If a golden ratio composition is used, the target object should be located at the golden section point on the left or right side of the screen, with an area of one-quarter to one-third of the screen size. This application does not impose any restrictions on the specific location and area of the first preset range.
[0092] The preset range can be expressed as the ratio of the distance from the edge to the centerline of the screen to the screen length, as [x, y]. In this case, a plane coordinate system is established with the centerline of the screen as the y-axis, x is the ratio of the horizontal coordinate of the left edge of the first preset range to the total screen length, and y is the ratio of the horizontal coordinate of the right edge of the first preset range to the total screen length. For example, if the first preset range is set at the center of the screen and its area is one-third of the screen size, the first preset range can be expressed as [-1 / 6, 1 / 6].
[0093] Specifically, when the position of the tracking target is outside the left side of the first preset range, the gimbal shooting angle is moved to the left until the position of the tracking target is back within the first preset range; when the position of the tracking target is outside the right side of the first preset range, the gimbal shooting angle is moved to the right until the position of the tracking target is back within the first preset range. In a specific embodiment, when it is detected that the position of the tracking target is outside the first preset range, a rotation instruction in the corresponding direction is sent to the gimbal to control the gimbal to rotate a preset small angle, for example, which can be set to 3° or 5°; during the next detection, if the position of the tracking target has returned to the first preset range, the rotation is stopped; if the position of the tracking target is still outside the first preset range, the instruction to rotate by the preset small angle is continued to be sent.
[0094] S3: When the position of the fixed scoring area is within the second preset range and the position of the tracking target is within the third preset range, S2 is paused and the gimbal shooting angle is locked. The first preset range is included in the third preset range.
[0095] In this step, the position of the fixed scoring area is first identified. When the fixed scoring area in the real-time video is within the second preset range and the position of the tracking target does not exceed the third preset range, it is determined that the tracking target is moving in a small range around the fixed scoring area. In this case, even if the position of the tracking target exceeds the first preset range, S2 is not executed. Instead, the camera angle of the gimbal is locked to continuously capture the tracking target's movement around the fixed scoring area.
[0096] The second preset range is the location of the fixed scoring area in a conventional photographic composition. In a specific implementation, the second preset range can be the central two-thirds of the real-time shooting screen, that is, [-1 / 3, 1 / 3]. When shooting games on smaller fields, the proportions of the second preset range can be appropriately adjusted, such as to [-1 / 4, 1 / 4] or [-1 / 5, 1 / 5].
[0097] S3 is a special case of S2, executed under certain conditions. Specifically, it's executed when the target has exceeded the first preset range but remains within the third preset range. Therefore, the first preset range is always within the third preset range. In typical competitions, the third preset range can be set to 1.5 or 2 times the first preset range.
[0098] After executing the above three steps S1-S3, you can lock the shooting angle when tracking the designated target staying around the fixed scoring area to maintain composition optimization and shooting stability within a certain range.
[0099] Preferably, in a possible implementation, the method may further include S4: when the position of the tracking target exceeds a third preset range, unlocking the pan / tilt camera angle and executing S2.
[0100] When the position of the tracking target exceeds the third preset range, it can be considered that the tracking target has left the range of the fixed scoring area, so the pan / tilt lock is released and step S2 is executed again.
[0101] Figure 4 This is an example diagram of an automatic tracking shooting method for motion in a fixed scoring area according to an embodiment of the present application. This example is provided for ease of understanding and should not be regarded as the only implementation method.
[0102] Take an automatic tracking shot of a basketball game as an example, where, in the real-time shooting picture, the first preset range is configured as [-1 / 6, 1 / 6], the second preset range is configured as [-1 / 4, 1 / 4], and the third preset range is configured as [-1 / 3, 1 / 3].
[0103] Normally, when the tracking target is outside the first preset range, such as area A, B, or C, according to the logic of step S2, the gimbal should be controlled to rotate to the left until the tracking target is relocated to area D;
[0104] However, when the basket is within the second preset range, such as area C or D, even if the tracking target is outside the first preset range but within the third preset range, such as area B, S2 is stopped and the gimbal angle is locked to capture a fixed image.
[0105] In one possible implementation, whether to lock the pan / tilt angle may be determined by determining the number of human targets within a fixed scoring area.
[0106] Figure 5 FIG. 1 shows a flow chart of another method for automatically tracking and shooting motion in a fixed scoring area according to an embodiment of the present application. Figure 5 As shown:
[0107] S31: When the position of the fixed scoring area is within the second preset range and the number of human targets within the second preset range is not less than a preset value, pausing the execution of S2 and locking the pan / tilt camera angle.
[0108] S41: When the number of human targets within the second preset range is lower than the preset value, the pan / tilt angle is unlocked and the step S2 is executed.
[0109] The target recognition algorithm is used to identify the human target. The specific selection of the target recognition algorithm has been mentioned above and will not be repeated here. Specifically, the midpoint horizontal coordinate of the human target recognition frame obtained by the target recognition algorithm is used to determine whether the human target is within the second preset range.
[0110] The setting of the preset value is related to the type of game: in one possible implementation, after browsing and counting a large number of game videos, the preset value can be set to 60% to 80% of the total number of active players on the field. For example, in a basketball game, the total number of active players is 10, and the preset value can be set to 6 to 8; in a football game, the total number of active players is 20, and the preset value can be set to 12 to 14.
[0111] Specifically, when there is a fixed scoring area and a number of players above a preset value within the second preset range, the pan / tilt angle is locked to fix the activities of the players around the fixed scoring area.
[0112] Figure 6 FIG is a block diagram of an automatic tracking shooting device 400 according to an embodiment of the present application. Figure 6As shown, the automatic tracking shooting device 400 includes a shooting module 401, an analysis module 402, and a rotation module 403. The automatic tracking shooting device 400 is used to implement the aforementioned automatic shooting and tracking method.
[0113] Optionally, the automatic tracking shooting device 400 can be an independent device, a component included in an independent device, or a combination of multiple different independent devices. In one possible implementation, the shooting module 401 is implemented as an independent smart terminal or camera, the analysis module 402 is implemented as another independent smart terminal or smart hardware, and the rotation module 403 is implemented as a pan-tilt head or a rotatable bracket. In another possible implementation, the shooting module 401 is implemented as a camera module in a smart terminal, the analysis module 402 is implemented as a computing module in the same smart terminal, and the rotation module 403 is implemented as an intelligent pan-tilt head or a rotatable bracket. In yet another possible implementation, the shooting module 401 is implemented as a camera module in an integrated intelligent camera device, the analysis module 402 is implemented as a computing module in the same integrated intelligent camera device, and the rotation module 403 is implemented as a motion mechanism in the same integrated intelligent camera device.
[0114] Among them, the shooting module 401 is physically connected to the rotation module 403, and the physical connection can be a fixed connection or a detachable connection, so as to ensure that the rotation module 403 can directly or indirectly affect the movement of the shooting module 401 by physical means. The shooting module 401 is suitable for continuously acquiring real-time shooting pictures and sending the real-time shooting pictures to the analysis module 402. Optionally, the shooting module 401 may not have the active information sending function, but the analysis module 402 actively acquires the real-time shooting pictures from the shooting module 401. The analysis module 402 is suitable for executing the embodiments of the present application based on the real-time shooting pictures. Figure 1 or Figure 2 The tracking center position is calculated and determined in real time using a method, and a rotation instruction is sent to the rotation module 403 based on the determination criteria. The rotation module 403 is configured to rotate horizontally, i.e., about a vertical axis (z-axis). The rotation module 403 is configured to change the angle of the camera module 401 based on the rotation instruction.
[0115] Figure 7 A schematic diagram of the structure of a terminal device or server suitable for implementing an embodiment of the present application is shown.
[0116] like Figure 7As shown, the terminal device or server includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the terminal device or server are also stored. The CPU 501, ROM 502 and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0117] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output section 507 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 508 including a hard disk; and a communication section 509 including a network interface card such as a LAN card or a modem. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 510 as needed, so that computer programs read therefrom can be installed into the storage section 508 as needed.
[0118] In particular, according to an embodiment of the present application, the above method flow steps can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present application are executed.
[0119] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the aforementioned module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0121] The units or modules described in the embodiments of the present application may be implemented in software or hardware. The units or modules described may also be provided in a processor. The names of these units or modules do not, in certain circumstances, limit the units or modules themselves.
[0122] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device. The computer-readable storage medium stores one or more programs, which, when used by one or more processors, execute the methods described in the present application.
[0123] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of application involved in this application is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the aforementioned application concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions applied for in this application.
Claims
1. An automatic tracking shooting method for fixed scoring area movement, characterized in that: include: S1: Identify the position of the tracking target and the position of the fixed scoring area in the real-time shooting picture, wherein the fixed scoring area is a basket or a goal; S2: When the position of the tracking target exceeds a first preset range in the real-time shooting picture, adjusting the pan / tilt camera angle to track and shoot the tracking target; S3: When the position of the fixed scoring area is within the second preset range in the real-time shooting picture, and the position of the tracking target is within the third preset range in the real-time shooting picture, pausing the execution of S2 and locking the gimbal shooting angle, the first preset range is included in the third preset range, and the second preset range is included in the third preset range; S4: When the position of the tracking target exceeds the third preset range, unlocking the pan / tilt camera angle and executing S2; The third preset range does not overlap with the real-time shooting picture.
2. The method according to claim 1, wherein The tracking target is at least one of a player, a crowd or a ball.
3. The method according to claim 1, wherein When the position of the tracked target exceeds a first preset range in the real-time shooting picture, adjusting the pan / tilt camera angle includes: When the position of the tracking target is outside the left side of the first preset range, moving the pan / tilt camera angle to the left until the position of the tracking target is again within the first preset range; When the position of the tracking target is outside the right side of the first preset range, the pan / tilt camera angle is moved rightward until the position of the tracking target is again within the first preset range.
4. The method according to claim 2, wherein When the tracking target is a player, identifying the position of the tracking target in the real-time shooting picture includes: Pre-acquire jersey features of the tracking target, wherein the jersey features include a target jersey number and a target jersey color; Acquire all human targets in the real-time shooting picture, crop the jersey number area of each human target and feed it into the number classification model, obtain the jersey number of each human target, and match it with the target jersey number; If the match is successful, the jersey color of the successfully matched human target is obtained and matched with the target jersey color; if the match is successful, the successfully matched human target is determined to be the tracking target.
5. The method according to claim 2, wherein When the tracking target is a crowd, the average value of the position coordinates of all targets in the crowd is used as the position of the tracking target.
6. The method according to claim 2, wherein When the tracking target is a ball, identifying the position of the tracking target in the real-time shooting picture includes: When the tracking target cannot be identified in the real-time shooting picture, the first position of the tracking target when the tracking target was last identified in a preset number of frames before the real-time shooting picture is traced back, and the first position is used as the position of the tracking target.
7. An automatic tracking shooting device, characterized in that: The invention comprises a shooting module, an analysis module and a rotation module, wherein the shooting module is physically connected to the rotation module, the rotation module is suitable for horizontal rotation, the shooting module is suitable for continuously acquiring real-time shooting images and sending the real-time shooting images to the analysis module; the analysis module is suitable for executing the method described in any one of claims 1 to 6 and sending a rotation instruction to the rotation module; the rotation module is suitable for changing the angle of the shooting module according to the rotation instruction.
8. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for controlling pan-tilt camera to automatically track target
CN119653240A
System and method for optical player tracking in sports venues
CN107005654A
Athlete identification method based on multi-target tracking
CN115640423A