A basketball tracking holder short-time ball loss shielding recovery and locking state switching method
Patent Information
- Application Number
- CN202611153281.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]本发明的目的在于解决篮球跟踪云台在短时丢球、球员遮挡、锁定态和预锁定态下容易误追、误解锁、过转和抖动切换的问题,提供一种兼顾安全性、稳定性和解锁及时性的状态切换与恢复控制方法
①能够在篮球被球员短时遮挡、被接住或短时消失时识别出高风险盲追场景,并通过硬刹停即时保护云台;
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent gimbal control, moving target state machine control, and automatic basketball game shooting technology, specifically to a method for short-term ball loss and occlusion recovery and lock state switching of a basketball tracking gimbal. Background Technology
[0002] In basketball games and training scenarios, the basketball often disappears from the frame briefly due to player catching, passing, blocking under the basket, fast break sprints, and edge releases. Traditional gimbal control strategies typically employ simple delays, continued predictive tracking, or direct stopping after the basketball is lost, which easily leads to two types of problems: one is blindly continuing to track the ball when it is caught or blocked by a player, causing the gimbal to rotate erroneously; the other is repeatedly switching between lock-on and unlock-off states, resulting in image jitter and logical instability. Existing technology lacks a coordinated method that can simultaneously handle short-term obstruction, sudden stop after ball loss, lock-on unlocking, and pre-lock-on advancement, especially lacking a mechanism to identify and protect against movement patterns "like a lateral pass that is caught," making it difficult to meet the stable control requirements of high-intensity basketball scenarios. Summary of the Invention
[0003] The purpose of this invention is to solve the problems of basketball tracking PTZ devices being prone to mistracking, mislocking, over-rotation, and jitter switching in short-term ball loss, player obstruction, locked state, and pre-locked state, and to provide a state switching and recovery control method that takes into account safety, stability, and timely unlocking. Technical solutions
[0004] The method of this invention revolves around the visible branch, the ball loss branch, and the lock branch of the basketball, constructing a three-layer control logic of normal tracking state, pre-lock state, and lock state, and introducing short-term occlusion judgment and hard braking judgment when the ball is lost for a short time. The specific steps are as follows: 4.1 State Machine Establishment ① Set the normal tracking state for primary tracking control when the basketball is continuously visible; ② Set a pre-lock state for transitional control when the basketball approaches the predetermined locking condition and needs to be advanced based on the basket reference; ③ Set a locked state to keep the gimbal stationary and wait for the unlocking opportunity in specific standoff or waiting-to-release scenarios; 4.2 Short-term occlusion judgment branch ①When entering the ball loss branch and the number of ball loss frames is within the short ball loss freeze window, read the previous valid basketball snapshot, the previous frame's player information, and the current frame's basketball candidate information; ② Determine whether the previous valid basketball is a distant ball and not located at the edge of the screen to avoid incorrectly including close-range large balls or edge release scenarios in the short-term occlusion protection; ③ Statistically determine whether the previous valid basketball overlaps with the character frame in the accepted frame, whether the characters near the previous valid basketball are continuously and stably present, and whether there are strong basketball candidates in the current frame; ④ When at least two of the above three signals are hit, the current scene is determined to be a short-term occlusion scene; 4.3 Hard Braking Judgment ①When a short-term occlusion scenario is established, the hard braking condition is evaluated starting from the first frame after the basketball is lost; ② Calculate the absolute value of the maximum speed of the basketball samples received within the most recent preset window, and determine whether it has reached the sports threshold; ③ Calculate the cumulative displacement of the first and last basketball samples received within the most recent preset window in world coordinates, and determine whether it has reached the displacement threshold. ④ Count the number of times the world coordinate direction has been reversed within the most recent preset window, and determine whether it meets the monotonicity threshold; ⑤ When the overlap condition, motion threshold, displacement threshold and monotonicity threshold are met simultaneously, hard braking is performed immediately, zero angular velocity is output and the current state remains unchanged; 4.4 Locked State Unlock Control ① Defined as the formal unlock area near the release edge and the outermost quick unlock candidate area; ②When the basketball is visible while locked, first update the quick unlock candidates, and then count whether the basketball enters the unlock area for multiple consecutive frames; ③ Only when the formal unlock count reaches the confirmation frame count will the system switch back to normal tracking state from the locked state; ④ If the basketball enters the quick unlock candidate area and its direction of movement is towards the release edge, the quick unlock candidate will be suspended first, and the unlock will be confirmed when the additional conditions are met later. ⑤ In the locked state, if the unlocking conditions are not met, the gimbal will always output zero angular velocity to maintain the lock; 4.5 Pre-locking propulsion control ① In the pre-locked state, use the smoothed basket reference center and the holding window as the propulsion reference to control the gimbal to gradually move closer to the locked target; ② When the basketball is briefly lost, the decision to freeze or stop should be made based on the result of the short-term obstruction, rather than directly exiting the pre-locked state; ③ When a hard stop occurs in the pre-locked state, only the braking action is performed, and the state is not switched immediately. The next control step is still determined by the pre-locked main process. Beneficial effects
[0005] Compared with the prior art, the present invention has the following beneficial effects: ① It can identify high-risk blind chasing scenarios when the basketball is briefly blocked, caught, or disappears from the player's view, and protect the gimbal in real time by hard braking. ② By combining formal unlocking and quick unlocking in a dual-layer unlocking mechanism, the false locking and repeated switching during the locked state are reduced; ③ By assessing the hard stop conditions in the first frame after losing the ball, the risk of continuing incorrect rotations in high-confrontation scenarios is reduced; ④ By coordinating pre-locked state with basket reference control, the stability of under-basket confrontation and release scenarios is improved; ⑤ It is suitable for complex situations such as passing, confrontation, screen and roll, and under-basket blocking in basketball games and training, and is highly practical. Attached Figure Description
[0006] Figure 1 is a schematic diagram of the transition relationship between normal tracking state, pre-locked state and locked state; Figure 2 is a flowchart of short-term occlusion judgment based on character overlap, character stability, and strong basketball candidate absence; Figure 3 is a flowchart of hard braking judgment based on speed threshold, displacement threshold and directional monotonicity threshold; Figure 4 is a schematic diagram of the areas and confirmation mechanisms for formal unlocking and quick unlocking in a locked state; Figure 5 is a schematic diagram of the pre-lock propulsion of the basket reference drive. Detailed Implementation
[0007] The method of the present invention will be described below using a typical basketball game sequence as an example: Example 1: Short-term ball loss scenario after a lateral pass is caught by a player. In this example, the basketball has been moving horizontally to the left for several frames and overlaps with the player's frame in one frame. From the next frame onwards, the system does not detect any strong basketball candidates, and the player's frame remains stable in the original area. At this time, the system enters the short-term occlusion judgment branch in the first frame of the ball loss, and judges it as a scenario "like a lateral pass being caught" based on the maximum speed of the basketball in the nearest window, the world coordinate displacement, and the monotonicity of the direction. Therefore, it immediately performs a hard stop, outputs zero angular velocity, and prevents the gimbal from continuing to chase to the left incorrectly. Example 2: Locked-out edge release unlock scenario. In this example, the gimbal is in a locked state, and the basketball reappears near the release edge. The system first determines whether the basketball has entered the fast unlock candidate area and confirms that the direction of movement is towards the release edge. Then, when the basketball enters the formal unlock area in multiple consecutive confirmation frames, the system unlocks and switches back to normal tracking state. If the basketball only briefly enters the edge area and is immediately obscured, the system prioritizes evaluating hard braking logic to prevent false locking.
[0008] Application scenarios The method of this invention is applicable to various scenarios such as automatic shooting of full-court matches, half-court training footage, match tactical replay, live broadcasts of various matches, training footage in sports venues, and tactical analysis.
[0009] Summary of technical advantages This invention significantly improves the stability, security, and scene adaptability of the tracking gimbal in complex adversarial scenarios by unifying short-term occlusion judgment, hard braking, formal unlocking, fast unlocking, and pre-locking into a single state machine framework. It also enhances the stability and adaptability of the system in complex basketball scenarios, and has high patent value and industrial promotion value.
[0010] Example table of key states and determination elements of the method of the present invention Short-term occlusion judgment Character overlap, character stability, strong candidate absence Determine whether to enter freeze protection Identifying short-term occlusion rather than actual loss Hard braking judgment Maximum velocity, displacement, and directional monotonicity Output zero angular velocity and maintain the original state Prevent blind following and misdirection Locked state officially unlocked Release edge unlock zone, confirm frame rate Unlock after continuous confirmation Avoid misunderstanding lock in one frame Quickly unlock candidates Release edge candidate regions, directional consistency Candidates suspended pending further confirmation Improve unlock timeliness Pre-locking propulsion Basketball hoop reference center, keep window Maintain advance or safety interruption Improve stability in the paint The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for recovering from short-term ball loss and occlusion and switching between locked states in a basketball tracking pan-tilt unit, characterized in that, Includes the following steps: (1) Establish a basketball tracking PTZ control state machine that includes at least normal tracking state, pre-locking state and locked state; (2) When the basketball is detected to be lost in the current frame, based on the previous valid basketball snapshot in the most recent frames, the stability of the character frame, the absence of strong basketball candidates and the number of frames lost, it is determined whether to enter the short-term occlusion judgment branch. (3) After entering the short-term occlusion judgment branch, further judge whether the hard braking condition is met based on the basketball's motion speed, cumulative displacement of world coordinates and monotonicity of motion direction in the most recent few frames. (4) When the hard braking condition is met, maintain the current control state and output zero angular velocity or braking angular velocity command to the pan-tilt unit; (5) When the PTZ is in the locked state, the lock state unlock confirmation is executed based on whether the basketball has entered the formal unlock area and the quick unlock candidate area; (6) When the pan-tilt unit is in the pre-locked state, the locked advance or the safety interruption shall be maintained based on the basket reference, basketball visibility and short-term occlusion protection results; (7) Output the corresponding gimbal control command based on the state machine result.
2. The method according to claim 1, characterized in that, The basic prerequisites for entering the short-term occlusion judgment branch in step (2) include at least the following: the ball loss branch has been entered, the number of ball loss frames is within the preset short ball loss window, there is a previous valid basketball snapshot, and the previous valid basketball is a far ball and is not at the edge of the screen.
3. The method according to claim 1, characterized in that, In step (2), when determining whether to enter the short-term occlusion judgment branch, at least two of the following three signals are used: the previous valid basketball overlaps with the person frame in the accepted frame, the person is continuously and stably present near the previous valid basketball, and there is no strong basketball candidate in the current frame.
4. The method according to claim 1, characterized in that, The hard braking conditions in step (3) include at least the following: the previous valid basketball overlaps with the character frame in the accepted frame, the absolute value of the maximum speed of the basketball in the most recent preset window reaches the threshold, the cumulative displacement of the basketball's world coordinates in the most recent preset window reaches the threshold, and the number of times the basketball's world coordinates direction is reversed in the most recent preset window does not exceed the preset number.
5. The method according to claim 1, characterized in that, The hard braking condition is evaluated starting from the first frame after the basketball is lost, and a zero angular velocity command is output immediately when the condition is met, without waiting for multiple consecutive frames of lost ball.
6. The method according to claim 1, characterized in that, The formal unlocking area in step (5) is located near the release edge in the locked state. Only when the basketball enters the formal unlocking area in multiple consecutive confirmation frames will it switch back to the normal tracking state from the locked state.
7. The method according to claim 1, characterized in that, In step (5), the quick unlock candidate area is larger than the formal unlock area. When the basketball enters the quick unlock candidate area and meets the condition that the direction of movement is towards the release edge, the quick unlock candidate is suspended first, and then the unlock is confirmed after the additional conditions are met.
8. The method according to claim 1, characterized in that, Even if the basketball can be detected in the current frame while in locked state, it continues to output zero angular velocity to maintain stability until the conditions for unlocking are met, instead of immediately resuming chasing the ball.
9. The method according to claim 1, characterized in that, When the basketball is lost while locked, the logic for short-term obstruction and hard braking is evaluated first; only when the hard braking condition is not met will the logic for confirming the fast unlock candidate be evaluated.
10. The method according to claim 1, characterized in that, In step (6), the pre-locked state uses the smoothed basket reference center and the holding window as the propulsion reference, and combines short-term occlusion protection to avoid the gimbal tracking error when the basketball is briefly lost.