Football event determination method and device based on dual-view video analysis, equipment and medium
The method for determining football shooting events through dual-view video analysis solves the problems of instability in manual determination and high cost of automation solutions in existing technologies. It achieves low-cost and highly robust determination of football shooting events, meeting the requirements of fairness and verifiability in sports examinations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 恒鸿达(福建)体育科技有限公司
- Filing Date
- 2026-03-18
- Publication Date
- 2026-07-31
AI Technical Summary
The existing football shooting assessment model suffers from unstable results due to manual judgment, which is easily affected by subjective factors. Automated solutions are costly and difficult to adapt to various scenarios, failing to meet the requirements of fairness, accuracy, and verifiability in sports examinations.
A dual-view video analysis method is adopted, which performs target detection and multi-target tracking through collaborative analysis of videos from the main viewpoint and the auxiliary viewpoint. Combined with perspective mapping and the line-crossing state machine, it realizes the spatiotemporal reconstruction of the football trajectory and the robust determination of goal events, and outputs structured judgment results.
It achieves low-cost and robust determination of football shooting events, accurately identifies compliance in complex scenarios, supports temporary deployment, provides interpretable determination results, and improves examination efficiency and fairness.
Smart Images

Figure CN122493347A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method, apparatus, device, and medium for determining football events based on dual-view video analysis. Background Technology
[0002] Dribbling and shooting in soccer is a core assessment item in physical education tests, primarily used to evaluate students' mastery of basic soccer skills and their physical coordination. The assessment criteria for this item are clearly defined: candidates are required to complete a series of dribbling movements within a designated area and ultimately shoot the ball into the goal. Examiners must visually observe each shot to determine its validity, whether the ball crossed the boundary line, and whether the candidate's movements conform to the assessment standards. However, in actual testing and daily training scenarios, the manual judging model has many inherent drawbacks. Influenced by factors such as uneven lighting conditions, limited camera angles, differences in examinee movements and postures, and the unpredictable trajectory of a high-speed soccer ball, manual judging is highly susceptible to subjective bias, resulting in unstable judgments and a lack of objective evidence, making subsequent score review difficult. Especially in scenarios where multiple examinees participate in continuous testing or multiple testing rooms conduct simultaneous parallel assessments, the manpower and time costs of manual score statistics and result review increase significantly, and real-time feedback of assessment results cannot be achieved, severely impacting assessment efficiency and fairness. To address the aforementioned issues, several automated judgment solutions have been introduced both domestically and internationally. Most mainstream solutions rely on hardware triggering devices such as infrared light curtains, sensor arrays, and ground pressure detection modules for detection. While these solutions can improve the detection accuracy of some assessment events to a certain extent, they have significant drawbacks: high overall deployment costs, complex and cumbersome on-site wiring, and high requirements for site flatness and stability. They are unsuitable for the temporary and flexible setup requirements of sports examination venues, and also fail to meet the requirements of standardized and regulated management of examination venues. In addition, most shot detection solutions relying on image recognition technology use a single camera to capture the viewpoint or rely solely on pixel changes in the ball's crossing of the line for judgment. These solutions have significant limitations in practical applications. They are prone to misjudgments and missed judgments when faced with scenarios involving image occlusion, lens distortion, or high-speed movement of the football. Furthermore, they cannot accurately identify whether the candidate's dribbling and shooting process complies with the examination rules, making it difficult to achieve comprehensive and compliant assessment. In summary, existing assessment and judgment models and automation solutions cannot simultaneously achieve accuracy, practicality, and cost-effectiveness, failing to meet the core requirements of sports examinations for fairness, precision, and verifiability. Therefore, the development of an automatic judgment method and system for soccer shooting events based on dual-view computer vision is urgently needed. Summary of the Invention
[0003] The technical problem to be solved by this invention is to provide a method, device, equipment and medium for determining football events based on dual-view video analysis, which can run on the end device and complete the detection of shot crossing the line, confirmation of goal event and compliance judgment through video input. It achieves low-cost deployment, high robustness and interpretable feedback to meet the requirements of fairness, accuracy and verifiability in sports examinations.
[0004] In a first aspect, the present invention provides a method for determining football events based on dual-view video analysis, comprising the following steps: Step 1: Acquire two video streams, one from the main viewpoint and one from the auxiliary viewpoint, and perform frame-level synchronization to form a dual-view image pair; Step 2: Simultaneously perform target detection and multi-target tracking on the dual-view image pairs to obtain the main view soccer target trajectory sequence and the auxiliary view soccer target trajectory sequence in parallel; Step 3: Transform the sequence of football trajectory from the main perspective to a preset field coordinate system through perspective mapping to obtain the continuous ball trajectory coordinates in the field coordinate system; Step 4: In the field coordinate system, based on the preset key judgment line and the coordinates of the continuous ball trajectory, construct a line crossing state machine to impose staged constraints on the dribbling and shooting process, and output the compliance judgment result. Step 5: Trigger a candidate goal event based on whether the sequence of the main-view football target trajectory enters the preset candidate area; Step 6: In response to the triggering of the candidate goal event, perform consistency confirmation on the candidate goal event based on the auxiliary view football target trajectory sequence, and output the goal determination result; Step 7: Combine the goal determination result and the compliance determination result to output the final event identification and compliance conclusion.
[0005] Secondly, the present invention provides a football event determination device based on dual-view video analysis, comprising: The video acquisition module acquires two video streams, one from the main viewpoint and the other from the auxiliary viewpoint, and performs frame-level synchronization to form a dual-view image pair. The target detection and tracking module simultaneously performs target detection and multi-target tracking on the dual-view image pair, and obtains the main view soccer target trajectory sequence and the auxiliary view soccer target trajectory sequence in parallel. The perspective mapping module transforms the sequence of football target trajectories from the main perspective to a preset field coordinate system through perspective mapping, thereby obtaining the continuous ball trajectory coordinates in the field coordinate system. The compliance determination module, under the field coordinate system, constructs a line-crossing state machine based on the preset key determination line and the coordinates of the continuous ball trajectory to impose phased constraints on the dribbling and shooting process, and outputs the compliance determination result. The event triggering module triggers a candidate goal event based on whether the sequence of the main-view football target trajectory enters a preset candidate area; The event confirmation module, in response to the triggering of the candidate goal event, performs consistency confirmation on the candidate goal event based on the auxiliary view football target trajectory sequence, and outputs the goal determination result; The result fusion module merges the goal determination result and the compliance determination result, and outputs the final event identification and compliance conclusion.
[0006] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.
[0007] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0008] One or more technical solutions provided by this invention have at least the following technical effects or advantages: 1. This invention employs dual-channel video collaborative analysis using a primary viewpoint and an auxiliary viewpoint. The primary viewpoint filters out single-frame jitter and occasional false detections by stable triggering of candidate regions and continuous frames, while the auxiliary viewpoint confirms continuous hits through region of interest coverage measurement, forming a dual constraint mechanism. Even under complex conditions such as high-speed sphere movement, occlusion, strong reflection, and detection box jumps, it can still stably output judgment conclusions, significantly reducing errors such as "edge-grabbing false judgments" and "doorway false detections," and improving the system's environmental adaptability and judgment reliability.
[0009] 2. This invention unifies the ball trajectory to the field coordinate system through perspective mapping and constructs a line-crossing state machine that includes key lines such as the starting line and the turnaround line. It performs staged modeling and constraints on the line-crossing sequence of "starting line → turnaround line → starting line". It can accurately distinguish between "valid goal" and "goal but non-compliant process" and output specific reasons for violations (such as going out of bounds, failure to complete the turnaround, etc.), making the judgment results interpretable and meeting the requirements of sports examinations for process fairness and result verification.
[0010] 3. This invention relies solely on ordinary camera video input and software algorithms, eliminating the need for additional hardware triggering devices such as infrared light curtains and pressure sensors. By solving the homography matrix through calibration points, it can quickly adapt to different examination room layouts, supporting temporary setup and rapid deployment, significantly reducing the overall cost of equipment procurement, installation, maintenance, and site modification.
[0011] 4. The overall algorithm of this invention can be deployed on edge devices to process dual video streams in real time and output structured judgment results (including goal count, compliance mark, violation type, etc.), which facilitates the connection with the examination management system, realizes automated scoring and data traceability, and improves the efficiency of examination organization.
[0012] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0013] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0014] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the device in Embodiment 2 of the present invention. Detailed Implementation
[0015] The overall concept of the technical solution in this application is as follows: This application uses two video feeds, a primary view and an auxiliary view, as input. Stable dual-view frame pairs are obtained through frame-level synchronization, and target detection and multi-target tracking are performed separately to form a continuous and traceable ball trajectory, reducing the impact of high-speed motion, short-term missed detections, and jitter on the judgment. On the primary view side, a calibration-based perspective mapping is introduced to transform the ball's pixel coordinates to a unified field coordinate system. Key lines such as goal lines, sidelines, and process control lines are defined in this coordinate system, and a compliance state machine is constructed to impose phased constraints on the ball's crossing sequence and direction. This ensures that the judgment not only outputs the result but also provides process evidence and reasons for violations. Simultaneously, a two-stage consistency mechanism is adopted: "primary view continuous frame threshold triggering candidate events—auxiliary view ROI overlap continuous hit confirmation," to perform secondary verification of key events such as candidate goals, thereby significantly reducing the risk of single-view misjudgment and improving robustness. Finally, the system outputs goal / non-goal / candidate status, compliance conclusions, violation prompts, and statistics in a structured manner, meeting the needs of different scenarios for low-cost and rapid deployment, verifiable results, and interpretable feedback.
[0016] This invention utilizes collaborative analysis of primary and secondary viewpoint videos to achieve spatiotemporal reconstruction of the ball's trajectory, tracking of line-crossing states, and robust determination of goal-scoring events. This replaces traditional manual judgment methods, enabling standardized, automated, and verifiable exam scoring. The overall process includes six main stages: target detection and tracking, field spatial mapping, line-crossing compliance determination, candidate event triggering, auxiliary consistency confirmation, and result fusion output.
[0017] Preliminary Site and Equipment Setup: Before the sports detection begins, fix the main and auxiliary cameras in their designated positions. The main camera is 2.3 meters high with a 21-degree shooting angle, and the auxiliary camera is 2 meters high with a 0-degree shooting angle. Each camera should maintain a preset distance from the baseline, turnaround line, shooting area, ball placement line, etc., and the equipment should be set up according to the site layout diagram. Specific steps include: Step 1: Target Detection Module The system receives video streams from both the primary and secondary viewpoints and reads the current frame image from each stream at a preset sampling frequency, forming a pair of dual-view images to be processed. Object detection is performed independently on each image stream. The detection model uses a self-trained YOLOv5s object detection network to identify the spatial location of a soccer ball in the image. The detection output includes a set of bounding boxes (boxes), a set of classes (classes), and corresponding confidence scores (scores). Each bounding box represents a rectangular region of the target in the image coordinate system in the form [x1, y1, x2, y2]. To ensure the generality and reusability of subsequent business logic, the system standardizes and filters the detection results: this includes filtering non-target categories by preset categories, eliminating low-reliability detections by preset confidence thresholds, and implementing suppression strategies for redundant boxes within the same frame (e.g., selecting the highest confidence box or using non-maximum suppression). Finally, the two detection results are uniformly encapsulated into structured input (boxes / classes / scores).
[0018] Step 2: Target Tracking Module To improve the temporal continuity of soccer targets under conditions of high-speed movement, short-term occlusion, and intermittent detection gaps, the system introduces multi-target tracking modules in both the main and auxiliary viewpoints. These modules perform cross-frame correlation on the frame-by-frame detection results obtained in step 1, generating a stable and traceable target trajectory sequence. The input is the set of detection results for the current frame {b}. i c i s i}, where is the target bounding box (e.g., [x1,y1,x2,y2], c i For category, s iThe confidence level is used for tracking. The basic principle of the module is a temporal recursion of "prediction-matching-update": First, a motion model is constructed based on the position information and motion trend (e.g., velocity) of the trajectory at the previous moment to predict the target position in the current frame. Then, the detection box of the current frame is associated with the predicted positions of each trajectory. The association cost can be comprehensively composed of indicators such as bounding box overlap (IoU), center point distance, and motion consistency, and a one-to-one allocation is achieved through a minimum cost matching strategy. Finally, the predicted state of the successfully matched trajectory is updated using detection observations (forming a fused position and updated velocity / stability indicators). For short-term unmatched trajectories, "prediction maintenance" is maintained within a preset loss threshold to overcome occlusion or missed detection. Long-term unmatched trajectories are terminated. At the same time, unassigned detection boxes are initialized as new trajectory candidates and confirmed as valid trajectories after meeting conditions such as continuous observation. The output of this module is a set of targets with trajectory IDs (containing the current frame position, trajectory state, and confidence information). Step 3: Perspective mapping from main view pixel coordinates to site coordinates The perspective mapping from the main viewpoint pixel coordinates to the field coordinates uses the target trajectory output by the tracker as input. Its purpose is to transform the "continuous ball trajectory over time" from the image coordinate system to the field coordinate system, facilitating subsequent keyline-based boundary crossing detection and state machine updates. Specifically, the tracker outputs the ball target result with trajectory markers in each frame. The system first extracts representative points from the tracking box (preferably the box center point, but the bottom edge center point can also be used to more closely approximate the ground projection): ; Subsequently, using the pre-defined site markers to determine the location... Find the identity matrix , will pixel point ( x i , y i Mapped to site coordinates ( X i , Y i The mapping uses homogeneous coordinates: ; In this project, to reduce the impact of perspective distortion differences in different depth regions on keyline determination, two sets of homography matrices can be constructed based on multi-point calibration. H near and H far and with vertical threshold Y switch (Corresponding to "matrix switching line") Adaptive selection: ; Ultimately, the transformed coordinates (X) of the current frame can be obtained. t Y t).
[0019] Step 4: Modeling and Compliance Determination of Cross-Line Status The "crossing line state modeling and compliance determination" module applies phased constraints to the ball's motion process in the field coordinate system to determine whether the dribbling-shooting sequence meets preset rules. This module uses the continuous trajectory (X) after perspective mapping. t Y t As input, predefine key decision lines in the site coordinate system, such as the starting line Y. s With turnback line Y r The system maintains a stage variable q∈{1,2,3} to represent the process progress. Stage updates are triggered by comparing the vertical coordinates of two adjacent frames to see if they cross the keyline: when a ball is detected to have crossed from outside the starting line to inside the starting line (e.g., satisfying Y...). t-1 <Y s And Y t ≥Y s When in stage 1 and the ball is detected to have retreated across the turnaround line (e.g., Y), the stage is updated from 0 / 3 to 1; when in stage 1 and the ball is detected to have retreated across the turnaround line in the forward area (e.g., Y), the stage is updated from 0 / 3 to 1. t-1 <Y r And Y t ≤Y r Update to stage 2 when the ball crosses the starting line again (e.g., Y). t-1 <Y s And Y t ≥Y s When the system updates to Phase 3, it sets the compliance flag to true, indicating that a compliance sequence of "starting line → turning line → starting line" has been completed. Simultaneously, the system imposes constraints on out-of-bounds behavior: if the sphere's horizontal coordinate... X t If the violation exceeds the preset boundary range (such as the width of the field), it is recorded as an "out-of-bounds" violation, and the compliance flag is invalidated or the system enters a violation state. Ultimately, the state machine output includes the current stage, the compliance flag, and the reason for the violation, which can be used for subsequent event integration. For example, after a goal is confirmed, it is judged as a "valid goal" only if the compliance flag is true; otherwise, it outputs "goal but process is not compliant," thereby achieving an interpretable and verifiable compliance determination.
[0020] Step 5: Candidate Goal Triggering and First-Person View Prediction The candidate goal triggering and main-view prediction are used to robustly trigger "potential goals" from the main viewpoint and provide a clear candidate window for subsequent auxiliary viewpoint confirmation, thus achieving a balance between real-time performance and accuracy. This module predefines a goal candidate region (also called the shot determination region, determined by pre-set calibration points and obtainable by polygon circumscribing) in the field coordinate system. This region is typically defined by the two side posts and the two goalposts, and is mostly described as a rectangular / polygonal area. The system determines whether the ball has fallen into this candidate region in each frame: for each frame within the candidate window, the system obtains the ball's tracking bounding box (Ball_Box) in the auxiliary viewpoint and calculates the coverage ratio of the ROI (Region of Interest) where the ball falls into the calibration region (using a coverage metric oriented towards "whether the ball has entered the confirmation area"). ; Aera represents area calculation. When the IoU is greater than a preset threshold of 0.8, it is recorded as a "hit". If the threshold is not reached, the frame is considered a miss and the continuous count is reset (or cleared to zero according to a strategy) to suppress false confirmations caused by jitter and occasional overlap. Only when the ball remains in the candidate area for 3 consecutive frames (or meets the consistency condition of "entering the area and staying there") is the trajectory set to the "candidate goal" state, and the candidate's starting frame number / timestamp is recorded as the starting point of the subsequent auxiliary view confirmation window. If the hit is interrupted (the ball leaves the area or the detection is unstable), the continuous count is cleared to zero or decayed according to a preset strategy to avoid occasional false detections triggering the candidate. After entering the candidate state, the system outputs a "candidate in progress" flag on the main view side and continuously tracks the target, while simultaneously initiating the auxiliary view confirmation process. If the auxiliary view meets the confirmation conditions within a preset waiting window (within 20 frames), the candidate is upgraded to a final goal event; otherwise, the candidate times out and is canceled, and a "no goal" is output or observation continues.
[0021] Step 6: Determining whether a goal is valid or invalid After the candidate goal triggering is confirmed by the auxiliary perspective (step 5), the system first obtains the determination result of "whether the goal is valid", and further combines it with the compliance flag output in step 4 to determine the validity of the goal. For this purpose, the system defines the goal confirmation flag g∈{0,1} and the compliance flag... v ∈{0,1}; where g=1 indicates that the candidate event is confirmed through the auxiliary perspective within the preset waiting window (i.e., the goal is achieved), and g=0 indicates that the candidate timeout or confirmation failure; v =1 indicates that the crossing state machine has completed the preset crossing sequence without triggering any violations such as going out of bounds. v =0 indicates that the process is non-compliant or has a history of violations. Based on the above two flags, the system provides the following fusion judgment for each candidate event: Valid goals: ; Disallowed goal: ; No goals scored: ; When g=1 and v When g=1, the system outputs "Valid Goal" and updates the valid goal count; when g=1 but... v When g=0, the system outputs "Invalid Goal (Goal achieved but process non-compliant)" and simultaneously outputs the reason for the violation recorded in step 4 (e.g., failure to complete the "starting line → turning line → starting line" phase sequence, or lateral boundary crossing, etc.); when g=0, the system outputs "No Goal" and cancels the candidate status. Statistical updates follow the same logic: the total number of goals is only incremented once when g=1, while valid / invalid goals are updated separately by... G vaild and G invaild Driven by accumulation, the count of goals not scored is in G miss When =1, accumulate.
[0022] Example 1 like Figure 1 As shown, this embodiment provides a method for determining football events based on dual-view video analysis, including the following steps: Step 1: Acquire two video streams, one from the main viewpoint and one from the auxiliary viewpoint, and perform frame-level synchronization to form a dual-view image pair; Step 2: Simultaneously perform target detection and multi-target tracking on the dual-view image pairs to obtain the main view soccer target trajectory sequence and the auxiliary view soccer target trajectory sequence in parallel; Step 3: Transform the sequence of football trajectory from the main perspective to a preset field coordinate system through perspective mapping to obtain the continuous ball trajectory coordinates in the field coordinate system; Step 4: In the field coordinate system, based on the preset key judgment line and the coordinates of the continuous ball trajectory, construct a line crossing state machine to impose staged constraints on the dribbling and shooting process, and output the compliance judgment result. Step 5: Trigger a candidate goal event based on whether the sequence of the main-view football target trajectory enters the preset candidate area; Step 6: In response to the triggering of the candidate goal event, perform consistency confirmation on the candidate goal event based on the auxiliary view football target trajectory sequence, and output the goal determination result; Step 7: Combine the goal determination result and the compliance determination result to output the final event identification and compliance conclusion.
[0023] In this embodiment, preferably, the step of transforming the main-view football target trajectory sequence to a preset field coordinate system through perspective mapping specifically involves: The football target tracking box of the current frame is obtained from the sequence of football target trajectories from the main viewpoint. The tracking box is the target position of the current frame confirmed by multi-target tracking association after target detection. Extract representative points from the tracking box, the representative points including the box center point or the bottom edge center point; Using at least one pre-calibrated homography matrix, the pixel coordinates of the representative point are mapped to the site coordinates; The homography matrix is obtained by solving for the fixed point pairs of the field landmarks.
[0024] In this embodiment, preferably, the homography matrix includes a first homography matrix and a second homography matrix calibrated for different depth regions, and is selected for use according to a preset longitudinal switching threshold.
[0025] In this embodiment, preferably, the construction of the cross-line state machine applies staged constraints to the dribbling and shooting processes, specifically as follows: The predefined criteria include at least the starting line, the turnaround line, the critical decision line, and at least the boundary constraints that limit out of bounds. Maintain a stage variable q∈{1,2,3}, which respectively represent the three process stages of crossing the starting line, crossing the turnaround line and returning, and crossing the starting line again to enter the shooting area, and maintain a compliance flag v∈{0,1}; By comparing the positional relationship between the site coordinates of adjacent frames and the key decision line, the stage variables are updated according to preset stage transition rules: When the ball is detected to have crossed from the outside to the inside of the starting line, update the stage variable to 1; When in stage 1 and the ball is detected crossing from in front of the turnaround line to behind, update the stage variable to 2; When in phase 2 and the ball is detected crossing from the outside to the inside of the starting line again, update the phase variable to 3 and set the compliance flag to 1; If the lateral coordinates of the ball are detected to exceed the preset boundary constraints, the compliance flag will be set to 0 and an out-of-bounds violation will be recorded. The state machine continues to track the ball's trajectory after determining that the process is non-compliant, and the compliance flag and stage variables are used together for subsequent determination of the validity of the goal.
[0026] In this embodiment, preferably, step 5 specifically comprises: Predefine the goal candidate region in the field coordinate system or image coordinate system; Determine whether the soccer target from the main viewpoint falls into the candidate region for multiple consecutive frames; When the number of consecutive frames reaches a preset threshold, a candidate goal event is triggered, and the candidate start time is recorded.
[0027] In this embodiment, preferably, the step of confirming the consistency of the candidate goal events based on the auxiliary perspective football target trajectory sequence and outputting the goal determination result specifically involves: In the auxiliary viewpoint image, predefine the region of interest corresponding to the candidate region of the main viewpoint; In response to the triggering of a candidate goal event, within the subsequent preset number of frames N, the coverage metric between the auxiliary viewpoint football target tracking box and the region of interest is calculated frame by frame. The coverage metric is the intersection-union ratio, which is the ratio of the intersection area of the football target tracking box and the region of interest to the area of the football target tracking box. If, within the N frames, there are M consecutive frames where the coverage metric value exceeds the preset hit threshold, then the goal event is confirmed, where M≤N; If the consecutive M-frame hit condition is not met within the N frames, the candidate goal event is cancelled.
[0028] In this embodiment, preferably, step 7 specifically comprises: Define a goal confirmation flag g, where g=1 indicates that the goal is valid, and g=0 indicates that the goal is invalid; Define a compliance flag v, where v=1 indicates process compliance and v=0 indicates process non-compliance; Based on the combination of g and v, output the result of whether the goal is valid, invalid, or not scored, and associate it with the corresponding violation reason. The violation reason includes at least one of the following: going out of bounds violation or failure to complete the preset crossing sequence.
[0029] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2.
[0030] Example 2 like Figure 2 As shown, this embodiment provides a football event determination device based on dual-view video analysis, including: The video acquisition module acquires two video streams, one from the main viewpoint and the other from the auxiliary viewpoint, and performs frame-level synchronization to form a dual-view image pair. The target detection and tracking module simultaneously performs target detection and multi-target tracking on the dual-view image pair, and obtains the main view soccer target trajectory sequence and the auxiliary view soccer target trajectory sequence in parallel. The perspective mapping module transforms the sequence of football target trajectories from the main perspective to a preset field coordinate system through perspective mapping, thereby obtaining the continuous ball trajectory coordinates in the field coordinate system. The compliance determination module, under the field coordinate system, constructs a line-crossing state machine based on the preset key determination line and the coordinates of the continuous ball trajectory to impose phased constraints on the dribbling and shooting process, and outputs the compliance determination result. The event triggering module triggers a candidate goal event based on whether the sequence of the main-view football target trajectory enters a preset candidate area; The event confirmation module, in response to the triggering of the candidate goal event, performs consistency confirmation on the candidate goal event based on the auxiliary view football target trajectory sequence, and outputs the goal determination result; The result fusion module merges the goal determination result and the compliance determination result, and outputs the final event identification and compliance conclusion.
[0031] In this embodiment, preferably, the step of transforming the main-view football target trajectory sequence to a preset field coordinate system through perspective mapping specifically involves: The football target tracking box of the current frame is obtained from the sequence of football target trajectories from the main viewpoint. The tracking box is the target position of the current frame confirmed by multi-target tracking association after target detection. Extract representative points from the tracking box, the representative points including the box center point or the bottom edge center point; Using at least one pre-calibrated homography matrix, the pixel coordinates of the representative point are mapped to the site coordinates; The homography matrix is obtained by solving for the fixed point pairs of the field landmarks.
[0032] In this embodiment, preferably, the homography matrix includes a first homography matrix and a second homography matrix calibrated for different depth regions, and is selected for use according to a preset longitudinal switching threshold.
[0033] In this embodiment, preferably, the construction of the cross-line state machine applies staged constraints to the dribbling and shooting processes, specifically as follows: The predefined criteria include at least the starting line, the turnaround line, the critical decision line, and at least the boundary constraints that limit out of bounds. Maintain a stage variable q∈{1,2,3}, which respectively represent the three process stages of crossing the starting line, crossing the turnaround line and returning, and crossing the starting line again to enter the shooting area, and maintain a compliance flag v∈{0,1}; By comparing the positional relationship between the site coordinates of adjacent frames and the key decision line, the stage variables are updated according to preset stage transition rules: When the ball is detected to have crossed from the outside to the inside of the starting line, update the stage variable to 1; When in stage 1 and the ball is detected crossing from in front of the turnaround line to behind, update the stage variable to 2; When in phase 2 and the ball is detected crossing from the outside to the inside of the starting line again, update the phase variable to 3 and set the compliance flag to 1; If the lateral coordinates of the ball are detected to exceed the preset boundary constraints, the compliance flag will be set to 0 and an out-of-bounds violation will be recorded. The state machine continues to track the ball's trajectory after determining that the process is non-compliant, and the compliance flag and stage variables are used together for subsequent determination of the validity of the goal.
[0034] In this embodiment, preferably, the event triggering module specifically comprises: Predefine the goal candidate region in the field coordinate system or image coordinate system; Determine whether the soccer target from the main viewpoint falls into the candidate region for multiple consecutive frames; When the number of consecutive frames reaches a preset threshold, a candidate goal event is triggered, and the candidate start time is recorded.
[0035] In this embodiment, preferably, the step of confirming the consistency of the candidate goal events based on the auxiliary perspective football target trajectory sequence and outputting the goal determination result specifically involves: In the auxiliary viewpoint image, predefine the region of interest corresponding to the candidate region of the main viewpoint; In response to the triggering of a candidate goal event, within the subsequent preset number of frames N, the coverage metric between the auxiliary viewpoint football target tracking box and the region of interest is calculated frame by frame. The coverage metric is the intersection-union ratio, which is the ratio of the intersection area of the football target tracking box and the region of interest to the area of the football target tracking box. If, within the N frames, there are M consecutive frames where the coverage metric value exceeds the preset hit threshold, then the goal event is confirmed, where M≤N; If the consecutive M-frame hit condition is not met within the N frames, the candidate goal event is cancelled.
[0036] In this embodiment, preferably, the result fusion module specifically comprises: Define a goal confirmation flag g, where g=1 indicates that the goal is valid, and g=0 indicates that the goal is invalid; Define a compliance flag v, where v=1 indicates process compliance and v=0 indicates process non-compliance; Based on the combination of g and v, output the result of whether the goal is valid, invalid, or not scored, and associate it with the corresponding violation reason. The violation reason includes at least one of the following: going out of bounds violation or failure to complete the preset crossing sequence.
[0037] Since the apparatus described in Embodiment 2 of the present invention is an apparatus used to implement the method of Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in Embodiment 1 of the present invention, and therefore will not be described again here. All apparatuses used in the method of Embodiment 1 of the present invention fall within the scope of protection of the present invention.
[0038] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to Embodiment 1, as detailed in Embodiment 3.
[0039] Example 3 This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement any of the implementation methods in Embodiment 1.
[0040] Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application.
[0041] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 4.
[0042] Example 4 This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1.
[0043] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0044] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0045] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0046] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0047] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for determining a football event based on dual-view video analysis, characterized in that, Includes the following steps: Step 1: Acquire two video streams, one from the main viewpoint and one from the auxiliary viewpoint, and perform frame-level synchronization to form a dual-view image pair; Step 2: Simultaneously perform target detection and multi-target tracking on the dual-view image pairs to obtain the main view soccer target trajectory sequence and the auxiliary view soccer target trajectory sequence in parallel; Step 3: Transform the sequence of football trajectory from the main perspective to a preset field coordinate system through perspective mapping to obtain the continuous ball trajectory coordinates in the field coordinate system; Step 4: In the field coordinate system, based on the preset key judgment line and the coordinates of the continuous ball trajectory, construct a line crossing state machine to impose staged constraints on the dribbling and shooting process, and output the compliance judgment result. Step 5: Trigger a candidate goal event based on whether the sequence of the main-view football target trajectory enters the preset candidate area; Step 6: In response to the triggering of the candidate goal event, perform consistency confirmation on the candidate goal event based on the auxiliary view football target trajectory sequence, and output the goal determination result; Step 7: Combine the goal determination result and the compliance determination result to output the final event identification and compliance conclusion.
2. The method of claim 1, wherein, The step of transforming the sequence of main-view football target trajectories to a preset field coordinate system through perspective mapping specifically involves: The football target tracking box of the current frame is obtained from the sequence of football target trajectories from the main viewpoint. The tracking box is the target position of the current frame confirmed by multi-target tracking association after target detection. Extract representative points from the tracking box, the representative points including the box center point or the bottom edge center point; Using at least one pre-calibrated homography matrix, the pixel coordinates of the representative point are mapped to the site coordinates; The homography matrix is obtained by solving for the fixed point pairs of the field landmarks.
3. The method of claim 2, wherein, The homography matrix includes a first homography matrix and a second homography matrix calibrated for different depth regions, and is selected for use according to a preset longitudinal switching threshold.
4. The method of claim 1, wherein, The construction of the over-line state machine applies staged constraints to the dribbling and shooting processes, specifically as follows: The predefined criteria include at least the starting line, the turnaround line, the critical decision line, and at least the boundary constraints that limit out of bounds. Maintain a stage variable q∈{1,2,3}, which represents the three process stages of crossing the starting line, crossing the turnaround line and returning, and crossing the starting line again to enter the shooting area, respectively. Also maintain a compliance flag v∈{0,1}. By comparing the positional relationship between the site coordinates of adjacent frames and the key decision line, the stage variables are updated according to preset stage transition rules: When the ball is detected to have crossed from the outside to the inside of the starting line, update the stage variable to 1; When in stage 1 and the ball is detected crossing from in front of the turnaround line to behind, update the stage variable to 2; When in phase 2 and the ball is detected crossing from the outside to the inside of the starting line again, update the phase variable to 3 and set the compliance flag to 1; If the lateral coordinates of the ball are detected to exceed the preset boundary constraints, the compliance flag will be set to 0 and an out-of-bounds violation will be recorded. The state machine continues to track the ball's trajectory after determining that the process is non-compliant, and the compliance flag and stage variables are used together for subsequent determination of the validity of the goal.
5. The method of claim 1, wherein, Step 5 specifically involves: Predefine the goal candidate region in the field coordinate system or image coordinate system; Determine whether the soccer target from the main viewpoint falls into the candidate region for multiple consecutive frames; When the number of consecutive frames reaches a preset threshold, a candidate goal event is triggered, and the candidate start time is recorded.
6. The method according to claim 1, characterized in that, The process of confirming the consistency of the candidate goal events based on the auxiliary perspective football target trajectory sequence and outputting the goal determination result is as follows: In the auxiliary viewpoint image, predefine the region of interest corresponding to the candidate region of the main viewpoint; In response to the triggering of a candidate goal event, within the subsequent preset number of frames N, the coverage metric between the auxiliary viewpoint football target tracking box and the region of interest is calculated frame by frame. The coverage metric is the intersection-union ratio, which is the ratio of the intersection area of the football target tracking box and the region of interest to the area of the football target tracking box. If, within the N frames, there are M consecutive frames where the coverage metric value exceeds the preset hit threshold, then the goal event is confirmed, where M≤N; If the consecutive M-frame hit condition is not met within the N frames, the candidate goal event is cancelled.
7. The method according to claim 1, characterized in that, Step 7 specifically involves: Define a goal confirmation flag g, where g=1 indicates that the goal is valid, and g=0 indicates that the goal is invalid; Define a compliance flag v, where v=1 indicates process compliance and v=0 indicates process non-compliance; Based on the combination of g and v, output the result of whether the goal is valid, invalid, or not scored, and associate it with the corresponding reason for the violation.
8. A football event determination device based on dual-view video analysis, characterized in that: include: The video acquisition module acquires two video streams, one from the main viewpoint and the other from the auxiliary viewpoint, and performs frame-level synchronization to form a dual-view image pair. The target detection and tracking module simultaneously performs target detection and multi-target tracking on the dual-view image pair, and obtains the main view soccer target trajectory sequence and the auxiliary view soccer target trajectory sequence in parallel. The perspective mapping module transforms the sequence of football target trajectories from the main perspective to a preset field coordinate system through perspective mapping, thereby obtaining the continuous ball trajectory coordinates in the field coordinate system. The compliance determination module, under the field coordinate system, constructs a line-crossing state machine based on the preset key determination line and the coordinates of the continuous ball trajectory to impose phased constraints on the dribbling and shooting process, and outputs the compliance determination result. The event triggering module triggers a candidate goal event based on whether the sequence of the main-view football target trajectory enters a preset candidate area; The event confirmation module, in response to the triggering of the candidate goal event, performs consistency confirmation on the candidate goal event based on the auxiliary view football target trajectory sequence, and outputs the goal determination result; The result fusion module merges the goal determination result and the compliance determination result, and outputs the final event identification and compliance conclusion.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.