Target tracking method, system, electronic device and computer readable storage medium
By combining a binocular PTZ camera with panoramic and close-up shots, full coverage and precise positioning of sports scenes are achieved, solving the problem of unstable target tracking in existing technologies and meeting the real-time and visual effect requirements of live sports broadcasts and training data analysis.
Patent Information
- Application Number
- CN202511606061.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-05
AI Technical Summary
Existing technologies lack stability in target tracking during sports events. Monocular PTZ cameras have narrow field of view and are prone to losing targets, while multi-view stitching solutions have high hardware and computing costs and cannot achieve continuous and stable tracking.
Employing a binocular pan-tilt camera, combined with a panoramic lens and a close-up lens, the system detects, identifies, and acquires target location information by moving the panoramic lens left and right, and controls the close-up lens to track in real time, achieving full coverage and precise positioning of the sports scene.
It achieves stable and accurate tracking of targets in sports scenarios, meeting the real-time and visual effect requirements of live sports broadcasts and training data analysis, and improving the continuity and detail of target tracking.
Smart Images

Figure CN121078331B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a target tracking method and system, an electronic device and a computer readable storage medium. BACKGROUND
[0002] With the wide penetration of computer vision and deep learning technology in the sports field, in the scenarios of AI sports live broadcast, training analysis and event review, the PTZ camera with automatic tracking function has become the core device, which needs to realize continuous tracking of the target in football and other large venue events to ensure that key pictures of the event are not missing.
[0003] In the current processing method, although the multi-view stitching panoramic camera scheme can cover a wide range of view, it needs to output the picture through electronic zooming and matting, and needs to be improved to more than 12k resolution to ensure clarity, resulting in a sharp increase in hardware and computing power costs, which is not economical. Although the monocular PTZ camera can adjust the monitoring range, the field of view is narrow at the same time, and once the tracking target is lost in football and other events, it is extremely difficult to reposition the target subsequently, and it cannot be continuously and stably tracked.
[0004] In the above-mentioned manner, the core problem of the monocular and fixed binocular PTZ scheme is the lack of tracking stability, which cannot realize continuous tracking of the target in sports events. This problem directly restricts the reliable application of AI sports tracking technology in actual scenarios, and the technical problem of lack of target tracking stability in sports scenarios needs to be solved.
[0005] The above content is only used to assist in understanding the technical solutions of the present application, and does not mean that the above content is prior art. SUMMARY
[0006] The main purpose of the present application is to provide a target tracking method, system, electronic device and computer readable storage medium, which aims to improve the stability of target tracking in sports scenarios.
[0007] In order to achieve the above-mentioned purpose, the present application provides a target tracking method applied to a target tracking system, the system comprising a binocular PTZ camera, the binocular PTZ camera comprising a panoramic lens and a close-up lens, the target tracking method comprising:
[0008] starting and controlling the panoramic lens to move left and right to detect the target in the sports scene;
[0009] identifying the tracking target in the sports scene and synchronously acquiring the position information of the tracking target in the field of view range of the panoramic lens;
[0010] based on the position information, controlling the close-up lens to rotate to the direction of the tracking target, and starting the real-time tracking of the tracking target by the close-up lens.
[0011] In addition, to achieve the above object, the application further provides a target tracking system, which comprises a binocular pan-tilt camera comprising a panoramic lens and a close-up lens, and comprises:
[0012] a target detection module, configured to start and control the panoramic lens to move left and right to detect a target in a sports scene;
[0013] an information acquisition module, configured to identify a tracking target in the sports scene and synchronously acquire position information of the tracking target in a field of view of the panoramic lens;
[0014] a lens control module, configured to control the close-up lens to rotate to a direction of the tracking target based on the position information and start real-time tracking of the tracking target by the close-up lens.
[0015] The various functional modules of the target tracking system of the application realize the steps of the target tracking method of the application as described above when running.
[0016] In addition, to achieve the above object, the application further provides an electronic device, which comprises a binocular pan-tilt camera, a memory, a processor and a target tracking program stored in the memory and executable on the processor, and the target tracking program realizes the steps of the target tracking method when executed by the processor.
[0017] In addition, to achieve the above object, the application further provides a computer readable storage medium, which is a computer readable storage medium, and the computer readable storage medium stores a target tracking program, and the target tracking program realizes the steps of the target tracking method when executed by a processor.
[0018] This application provides a target tracking method. By activating and controlling the left-right movement of a panoramic lens, target detection is performed on a sports scene, achieving full-area coverage monitoring of the sports scene. This ensures that all potential tracking targets within the scene are initially captured, avoiding target omissions due to the limitations of a single lens's field of view, and providing a comprehensive scene foundation for subsequent accurate identification and tracking. The method identifies tracking targets in the sports scene and simultaneously acquires the position information of the tracking targets within the field of view of the panoramic lens, achieving precise positioning of key tracking targets and clarifying their directional coordinates within the scene. This provides accurate positional basis for the directional rotation of subsequent close-up shots, solving the problem of ambiguous positioning of key targets in multi-target scenes. Based on the position information, the close-up shot is controlled to rotate to the location of the tracking target, and real-time tracking of the target is initiated. This achieves high-definition, real-time capture of the target's motion state and action details, balancing tracking continuity with image detail presentation. This meets the dual requirements of target tracking accuracy and visual effects in scenarios such as live sports broadcasts and training data analysis, thereby improving the stability of target tracking in sports scenes. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the first embodiment of the target tracking method of this application;
[0020] Figure 2 This is a schematic diagram of target tracking in a live football match scenario covered by this application;
[0021] Figure 3 This is a flowchart of the target tracking method involved in this application;
[0022] Figure 4 This is a schematic diagram of the target tracking system involved in the embodiments of this application;
[0023] Figure 5 This is a schematic diagram of the structure of the electronic device involved in the embodiments of this application.
[0024] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0025] This application provides a target tracking method, referring to... Figure 1 As shown, Figure 1 This is a flowchart illustrating the first embodiment of the target tracking method of this application.
[0026] The exemplary embodiments will be described in detail below with reference to the drawings. In the following description, the same numbers are used to denote the same elements throughout the several views. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0027] In the live broadcast of sports events, training data analysis, etc., accurate tracking of moving targets (such as players, event balls) is a core requirement to improve content quality and analysis efficiency. The continuity and detail capture capability of target tracking directly affect the live viewing experience and the effectiveness of training data.
[0028] The current target tracking processing method in sports scenes is to use single-lens independent tracking or multi-lens manual switching tracking. This method has obvious shortcomings: single-lens tracking cannot balance wide coverage and detail capture. If a wide-angle lens is used, the target details are blurred, and if a long-focus lens is used, the field of view is narrow, and fast-moving targets are easily lost. Multi-lens manual switching relies on manual operation, has high switching delay, and cannot follow the target motion trajectory in real time, resulting in frequent interruptions in the tracking process and insufficient accuracy.
[0029] The reason is that the existing method lacks a collaborative design of "global coverage" and "detail focus", making it difficult to simultaneously meet the dual requirements of target non-loss and clear details in dynamic sports scenes. This problem is particularly prominent in high-speed confrontation sports events, restricting the development of intelligent tracking in sports scenes.
[0030] The present application provides a target tracking method, system, electronic device and computer readable storage medium, which can effectively solve the problems of insufficient tracking continuity and accuracy, and provide stable and accurate target tracking support for sports scenes.
[0031] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, a database system, etc., or a device capable of realizing the above functions, such as an electronic device, etc. The present embodiment and the following embodiments will be described below with the electronic device as an example.
[0032] The target tracking method of the present application includes the following implementation steps S10 to S30.
[0033] Step S10: Start and control the left and right movement of the panoramic lens to detect the target in the sports scene.
[0034] In the present embodiment, as an example, the application scenario can be a large-scale sports event live broadcast scene or a professional athlete training data analysis scene.
[0035] Optionally, the left-right movement refers to a movement action of controlling the panoramic lens to move along the horizontal direction, including but not limited to reciprocating movement or directional movement, the movement range is adapted to the horizontal width of the sports scene, and the movement speed can be pre-configured (in this embodiment, the value range includes but is not limited to 5° / s-15° / s); starting and controlling the left-right movement of the panoramic lens refers to synchronously triggering the lens horizontal movement control logic while starting the image acquisition function of the panoramic lens, so that the lens realizes the coverage detection of a larger range of the sports scene through horizontal movement in the process of acquiring images, and the two are cooperatively executed to ensure that the detection and movement are synchronously performed; the target tracking system: a system for identifying, locating and continuously tracking a target in a specific scene; the binocular gimbal camera integrates two lenses (panoramic lens and close-up lens), and can realize the equipment of adjusting the shooting angle through gimbal rotation; the panoramic lens refers to a lens mounted on the binocular gimbal camera, having a relatively wide preset field of view angle (in this embodiment, which can be set to but is not limited to 120°-180°), and being capable of acquiring images of a large range of scenes; the close-up lens refers to a lens mounted on the binocular gimbal camera, having a high magnification zoom capability, and being used for shooting details and real-time tracking of a specific target; the sports scene: including sports events (such as football matches, basketball matches), professional training and other activity scenes, and there are fast-moving targets (such as players, match balls) in the scene; the target detection refers to a technical process of acquiring a scene image through a lens and identifying a preset tracking object (such as a player or a match ball) in the image.
[0036] Optionally, the embodiment is applied to a large football match live scene. In the current sports event live broadcast, the existing target detection mostly uses single-lens shooting. If a general wide-angle lens is selected, although part of the field can be covered, the field of view angle is limited, and it is difficult to completely capture the targets in the two end goal areas. If a long-focus lens is selected, although the definition is high, the field of view is narrow, and the players who quickly penetrate are easy to lose. In this embodiment, as shown in FIG. 1, Figure 2 Figure 2 FIG. 1 is a schematic diagram of target tracking in a football match live broadcast scene involved in the present application. The panoramic lens of the binocular gimbal camera is started, and a control signal is synchronously sent to the gimbal driving module to control the panoramic lens to move left and right along the horizontal direction while starting the image acquisition function of the lens. The preset field of view angle of the panoramic lens is 150°, which is adapted to the width range of a standard football field. The moving range is set to be from the lens angle corresponding to the left sideline of the field to the lens angle corresponding to the right sideline (the total moving angle is 120°). The moving speed is set to be 10° / s. The lens pauses for 0.5 seconds every 10° to acquire the image of the current area, so as to ensure the definition of the image acquisition. In the process of left-right movement of the panoramic lens, the image data of the covered area is continuously acquired. Through segmented acquisition and splicing, the entire lawn area, the player activity area, the sidelines, the goals and other key positions are covered, and all potential tracking targets (players, footballs) in the scene are completely captured, so as to complete the target detection of the sports scene.
[0037] Optionally, the embodiment is applied to the basketball player training data analysis scene, and the panoramic lens of the binocular pan-tilt camera is started, and the lens is controlled to move left and right in the horizontal direction; the preset field of view angle of the panoramic lens is set to 120°, which is suitable for the range of the basketball training hall, the moving range is set to the lens angle corresponding to the left sideline of the training hall to the lens angle corresponding to the right sideline (the total moving angle is 90°), the moving speed is set to 8° / s, and the collection resolution of the panoramic lens is set to 1920x1080 pixels (balance the definition and the data processing speed). During the left and right movement of the lens, images are continuously collected at a frequency of 2 frames per second, the collection range covers the entire training field, image data is transmitted to the system terminal in real time, the players and the basketball in the training field are comprehensively captured, and target detection is completed.
[0038] In the embodiment, the panoramic lens is started and controlled to move left and right in the sports scene to perform target detection, the wide field of view angle of the panoramic lens, the moving parameters and the collection parameters suitable for the scene are used, the global coverage collection of the sports scene is realized, the problems of field of view limitation and target omission in the existing single-lens detection are solved, a reliable early data foundation is provided for subsequent target recognition, positioning and close-up tracking, and the demand of sports event live broadcast, training data analysis and the like for comprehensive target detection is met.
[0039] Step S20: identifying a tracking target in the sports scene and synchronously acquiring position information of the tracking target in the field of view range of the panoramic lens;
[0040] Optionally, the tracking target refers to an object that needs to be continuously paid attention to and tracked in the sports scene, including but not limited to a game ball, an athlete and the like with dynamic motion characteristics; the field of view range of the panoramic lens refers to a space region in which the panoramic lens can collect images, which is determined by the field of view angle of the lens; the position information refers to the azimuth data of the tracking target in the field of view range of the panoramic lens, which is used to represent the spatial position of the target in the scene; the global image refers to an image collected by the panoramic lens, which covers the whole sports scene and contains the visual information of all potential targets in the scene.
[0041] Optionally, after the panoramic lens completes the global image collection of the football field, image feature analysis is performed on the collected global image, the football and the player in the image are identified by distinguishing the shape contour, the motion state and the color feature of the target, the irrelevant personnel and equipment on the sidelines are excluded, and the football is determined as the core tracking target. When the position information is synchronously acquired, a two-dimensional coordinate system is established with the upper left corner of the field of view range of the panoramic lens as the origin, and the coordinate data of the football in the coordinate system is calculated according to the pixel position of the football in the global image. The coordinate data is the position information of the football in the field of view range of the panoramic lens, and the synchronous execution of target recognition and position acquisition is completely realized.
[0042] Optionally, after the panoramic lens captures the global image of the basketball training hall, the training athletes and sparring personnel are distinguished based on the motion trajectory and limb features of the target, and the athlete whose action needs to be analyzed is locked as the tracking target; when the position information is obtained, the pixel coordinates of the athlete in the global image are converted into the relative position data in the actual training field in combination with the focal length parameters and image pixel density of the panoramic lens, and the data is the position information of the athlete in the field of view of the panoramic lens, which ensures the accurate correspondence between the position information and the actual scene.
[0043] The embodiment synchronously implements tracking target recognition and position information acquisition in the sports scene, solves the problems of target recognition confusion and insufficient position acquisition accuracy in the prior art, provides accurate target object and position basis for subsequent control of the close-up lens to rotate to the target direction and start real-time tracking, and meets the demand of target accurate positioning in sports event live broadcast and reliability of position data in training data analysis.
[0044] Step S30: based on the position information, control the close-up lens to rotate to the direction of the tracking target, and start real-time tracking of the tracking target by the close-up lens.
[0045] Optionally, the close-up lens is a lens mounted on a binocular gimbal camera, has high-definition imaging and zooming capability; the direction of the tracking target refers to the specific direction and position of the tracking target in the physical space, which is calculated in combination with the position information based on the installation position of the binocular gimbal camera; real-time tracking refers to that the close-up lens continuously follows the motion state of the tracking target and dynamically adjusts the shooting angle and focal length.
[0046] Optionally, the embodiment is applied to the football event live broadcast scene. In the current sports events, the control of the existing close-up lens mostly depends on manual operation. The operator manually adjusts the lens direction by watching the panoramic picture, and there is a response delay of at least 1-2 seconds, which easily misses the key action of the fast-moving football or player. In the embodiment, after the position information (two-dimensional coordinate data with the binocular gimbal camera as the origin) of the football is obtained, the position information is transmitted to the control module of the camera. The control module calculates the horizontal angle and vertical angle required for the close-up lens to rotate according to the coordinate data - for example, when the position information is (X1, Y1), the horizontal rotation is 30° and the vertical rotation is 5°. The control module generates a driving signal to drive the gimbal structure of the binocular gimbal camera to rotate and drive the close-up lens to the direction of the football. After the close-up lens is aligned with the football, the shooting function of the lens is started to continuously shoot at a resolution of 1080P and a frame rate of 30 frames / second. The position of the football in the picture is detected in real time by an image recognition algorithm, the lens angle is dynamically fine-tuned to ensure that the football is always in the center of the picture, and real-time tracking is achieved.
[0047] Optionally, the embodiment is applied to the basketball player training data analysis scene. In the existing basketball training, the close-up camera tracking is mainly achieved by using the fixed track preset mode, which cannot adapt to the flexible and changeable moving route of the player, resulting in tracking interruption or target deviation from the picture. In the embodiment, after the position information (including the relative distance and angle data of the player in the training hall) of the training player is obtained, the position information is input into the motion prediction unit of the system. The unit predicts the short-term motion direction of the player based on the current position and historical moving trend of the player. The control module combines the real-time position and the predicted direction to calculate the rotation parameters of the close-up camera, drives the pan-tilt to quickly turn the close-up camera to the direction of the player, and dynamically corrects the rotation angle in the rotation process to avoid lag. Further, after the close-up camera is aligned with the player, the real-time tracking mode is started to capture images at a resolution of 720P and a frame rate of 60 frames / second, focusing on capturing the details of the player's body movements, and synchronously transmitting the image data to the analysis terminal to provide clear and continuous visual data for training action evaluation.
[0048] The embodiment realizes automatic turning and real-time tracking of the close-up camera based on accurate position information, solves the problems of high delay of manual control and poor flexibility of fixed preset tracking in the prior art, quickly locks the tracking target without manual intervention, dynamically adapts the target motion state in the tracking process, ensures that the target details are clear and continuously in the picture, meets the needs of real-time and watchability of sports event live broadcast, and meets the requirements of action capture accuracy of training data analysis.
[0049] The embodiment realizes global coverage monitoring of the sports scene by starting and controlling the left and right movement of the panoramic camera, identifies the tracking target in the sports scene, synchronously obtains the position information of the tracking target in the field of view of the panoramic camera, realizes accurate positioning of the key tracking target, controls the close-up camera to turn to the direction of the tracking target based on the position information, and starts real-time tracking of the tracking target by the close-up camera, realizes high-definition and real-time capture of the motion state and action details of the tracking target, and further realizes improving the stability of target tracking in the sports scene.
[0050] Further, based on the above content, the second embodiment of the target tracking method of the embodiment is proposed. In some feasible embodiments, the system includes a target detection model, and the step S10 includes the following implementation steps B201-B202.
[0051] Step B201: Start and control the left and right movement of the panoramic camera to collect global images of the sports scene at a preset first resolution, wherein the panoramic camera is a long-focus lens with a preset field of view angle;
[0052] Step B202: calling the target detection model to perform AI detection on the panoramic image to identify the tracking target in the sports scene.
[0053] Optionally, the target detection model refers to an algorithm model for identifying and classifying targets in an image. In this embodiment, the AI algorithm is used to analyze image features, so as to accurately identify the tracking target in the sports scene. The target detection model can be pre-trained and deployed in the target tracking system. The preset first resolution refers to the preconfigured panoramic lens image acquisition resolution, which includes but is not limited to 1920x1080 pixels to 3840x2160 pixels, and can be selected according to the size of the sports scene. The preset field of view refers to the angle range of the image that can be collected by the panoramic lens, which determines the size of the covered area. In this embodiment, the value range includes but is not limited to 120°-180°, which is suitable for different sports scene coverage requirements. The long-focus lens refers to a lens with a long focal length, which has the characteristics of clear long-distance imaging and small depth of field. In this embodiment, the long-focus lens is mounted on but not limited to a binocular gimbal camera, which can clearly collect panoramic images of the sports scene at a long distance. The panoramic image refers to an image collected by a panoramic lens, which completely covers the entire sports activity area and contains the visual information of all potential tracking targets in the scene. It is the basic data for AI detection by the target detection model. AI detection refers to the process of feature extraction, target matching and classification of the collected panoramic image by the artificial intelligence algorithm of the target detection model, which can automatically identify the tracking target in the image and distinguish the target type.
[0054] Optionally, the embodiment is applied to a football match live broadcast scene. The panoramic lens of the binocular gimbal camera is started, the lens is a long-focus lens, and a control signal is sent to the gimbal driving module to control the lens to move left and right along the horizontal direction. The preset field of view is set to 150°, the preset first resolution is set to 1920x1080 pixels, the moving range is from the left sideline to the right sideline of the field corresponding to the lens angle (total moving angle 120°), the moving speed is 10° / s, and the lens pauses for 0.5 seconds to collect images every 10°. The panoramic lens continuously collects panoramic images during the left and right movements, covering the complete field from one goal to the other goal. The collected images are transmitted to the system processing unit in real time, and the target detection model is called to perform AI detection. The model extracts the shape contour and color features (such as football black and white blocks and player jersey colors) of the target in the image, automatically identifies the football and players on the field, excludes irrelevant objects on the sidelines, and locks the tracking target.
[0055] Optionally, the embodiment is applied to a live broadcast scene of a tennis match. In the prior art, the image acquisition of a tennis match is often affected by the small venue and the fast movement of the target (tennis), and the selection of a short-focus lens easily leads to a small target proportion, and the selection of a long-focus lens for fixed shooting limits the field of view, and the general model has insufficient accuracy in identifying a small tennis target. In the embodiment, a panoramic lens (long-focus lens) is started, and the panoramic lens is controlled to move left and right along the horizontal direction. A preset field of view angle of 120°, a preset first resolution of 2560x1440 pixels, a moving range of the lens angle corresponding to the left baseline to the right baseline of the tennis court (total moving angle of 90°), and a moving speed of 8° / s are set. The panoramic lens continuously acquires global images during the movement. After the images are transmitted to the processing unit, an AI detection is performed on the images by calling a target detection model optimized for small targets. The model accurately identifies the tennis and the player by using a small target feature extraction module, and clearly tracks the target.
[0056] The embodiment realizes high-quality global image acquisition in a sports scene by starting and controlling the panoramic lens to move left and right to acquire images, combining the characteristics of the long-focus lens and the parameter configuration adapted to the scene. With the AI detection capability of the target detection model, the target is automatically and accurately tracked, the imbalance between the lens field of view and the clarity in the prior art is solved, and the problem of low target recognition accuracy or dependence on manual operation is solved. High-quality data and accurate target objects are provided for subsequent acquisition of target positions and starting of close-up tracking, and the demand of global coverage and accurate target recognition in live broadcast of sports events is met.
[0057] Further, based on the above content, in some feasible embodiments, the preset verification algorithm includes a unit root test algorithm and a periodic feature detection algorithm, and the step S20 includes the following implementation steps C301-C303.
[0058] Step C301: The multiple candidate tracking targets in the sports scene identified by the target detection are sorted according to a preset priority rule.
[0059] Step C302: The tracking target with the highest priority after the sorting is selected, and the tracking target with the highest priority is taken as an updated tracking target.
[0060] Step C303: Based on the pixel coordinate and pixel proportion information of the updated tracking target in the global image, the spatial position information of the updated tracking target in the field of view range of the panoramic lens is synchronously acquired, and the spatial position information is taken as the position information.
[0061] Optionally, the candidate tracking target refers to an object that may need to be tracked and is identified by the target detection model after detecting the global image of the sports scene, including but not limited to athletes, event balls, referees, and other subjects with dynamic characteristics; the preset priority rule refers to a criterion pre-configured for priority division of the candidate tracking target, including but not limited to an ordering standard set based on target type, scene demand, motion state, and other dimensions, which can be flexibly adjusted according to different sports scenes; the updated tracking target refers to the candidate tracking target with the highest priority selected after priority ordering; the pixel coordinate refers to the position coordinate of the tracking target in the global image, in units of image pixels; the pixel ratio information refers to the ratio of the number of pixels occupied by the tracking target in the global image to the total number of image pixels; the spatial position information refers to the position data of the tracking target in the field of view of the panoramic lens, including but not limited to the horizontal angle and vertical angle coordinates based on the installation position of the panoramic lens, or the two-dimensional plane coordinates established based on the field of view.
[0062] Optionally, in the current football event, the prior art mainly randomly selects or manually specifies multiple candidate tracking targets, random selection is easy to miss the core target (such as a football), manual specification has a delay, and cannot adapt to the rapidly changing game situation. In this embodiment, the candidate tracking targets identified by the target detection model after detecting the global image of the football field include but are not limited to a football, 22 players, and 3 referees. The preset priority rule built in the system is set based on the live broadcast demand as: football > main force player on the field > ordinary player > referee. The processing unit sorts the candidate tracking targets according to the rule, and selects the football with the highest priority as the updated tracking target after sorting. Then, the pixel coordinate (such as (800, 600), with the upper left corner of the image as the origin) and the pixel ratio information (such as a ratio of 0.5%) of the football in the global image are obtained, and the pixel coordinate is converted into spatial position information in the field of view of the panoramic lens in combination with the focal length parameter of the panoramic lens and the image pixel density (the pixel density is 10 pixels / m in this embodiment), for example, the two-dimensional coordinates of the football are calculated as (40 meters, 30 meters) with the lower left corner of the field of view of the panoramic lens as the origin, and the coordinates are the position information of the subsequent control close-up lens.
[0063] Optionally, in the basketball player training data analysis scene, in the existing basketball training, the selection of the candidate tracking target often ignores the training focus and mistakenly takes the accompanying trainer as the core tracking object, resulting in training data collection deviation. In this embodiment, after the target detection model detects the global image of the training hall, the candidate tracking targets identified include but are not limited to the target training player, the basketball, and the three accompanying trainers. The preset priority rule is set based on the training requirements: target training player > basketball > accompanying trainer. The processing unit sorts according to this rule, and selects the target training player as the updated tracking target. The pixel coordinates (such as (1200, 900)) and the pixel ratio information (such as 3%) of the player in the global image are obtained, combined with the preset field angle (120°) of the panoramic lens and the image resolution (1920x1080 pixels), the spatial position information (such as horizontal angle 25°, vertical angle 10°) of the player in the field of view of the panoramic lens is calculated, which is transmitted to the close-up lens control module as the position information.
[0064] This embodiment ensures that the core tracking target is not missed by adapting the preset priority rule of the scene, and guarantees the accuracy of the position information by combining the conversion logic of the pixel coordinates and the pixel ratio, which provides reliable target object and position basis for the accurate steering and real-time tracking of the close-up lens, and meets the needs of core target focusing in sports event live broadcast and accurate positioning of training data analysis.
[0065] Further, based on the above content, in some feasible embodiments, the step of step S30 further includes the following implementation steps D401 to D403.
[0066] Step D401: generating a driving instruction for controlling the rotation of the close-up lens based on the position information;
[0067] Step D402: controlling the step motor to drive the close-up lens to rotate to the direction of the tracking target based on the driving instruction;
[0068] Step D403: starting the close-up lens to track the tracking target in real time at a preset frame rate and a preset second resolution.
[0069] Optionally, the driving instruction refers to a control signal generated based on the position information of the tracking target for controlling the rotation of the close-up lens, including but not limited to instruction data for controlling the rotation direction, rotation angle, rotation speed, etc. of the lens; the stepper motor refers to an execution mechanism that converts an electric pulse signal into angular displacement or linear displacement, which is mounted on the binocular gimbal camera in the embodiment and used to receive the driving instruction and drive the precise rotation of the close-up lens; the preset frame rate refers to the image acquisition frequency of the close-up lens during real-time tracking, which is measured in frames per second (fps) and has a value range including but not limited to 25fps-60fps, which can be adjusted according to the movement speed of the tracking target; the preset second resolution refers to the image acquisition resolution of the close-up lens during real-time tracking, which has a value range including but not limited to 1280x720 pixels-1920x1080 pixels, and is used to balance the detail definition and data processing efficiency of the tracking picture.
[0070] Optionally, the embodiment is applied to the live broadcast scene of a football match. At present, the rotation control of the existing close-up lens in football matches mainly depends on manual operation. The operator manually adjusts the lens after judging the target direction based on the panoramic picture, which has a response delay of 1-2 seconds and is easy to miss key moments such as shooting and player breakthrough. Some solutions use a motor control scheme, but the driving instruction is generated based on rough data, the lens rotation precision is insufficient, and it is difficult to accurately aim at the fast-moving football. In the embodiment, after obtaining the position information (such as horizontal angle 35° and vertical angle 8°) of the football in the field of view of the panoramic lens, the control module of the system converts the position information into lens rotation parameters. Taking the initial zero position of the binocular gimbal camera as the reference, the control module calculates that the close-up lens needs to be rotated 35° clockwise horizontally and 8° vertically upward, and sets the rotation speed to 5° / ms. Based on the above parameters, the driving instruction is generated. After the driving instruction is transmitted to the driving module of the stepper motor, the stepper motor operates according to the instruction parameters. The stepper motor drives the close-up lens to rotate through the gear transmission structure. During the rotation process, the rotation angle is fed back to the control module in real time for deviation correction, ensuring that the close-up lens accurately rotates to the position of the football. After the lens aims at the football, the real-time tracking mode is started, the preset frame rate is set to 30fps, and the preset second resolution is set to 1920x1080 pixels. The close-up lens continuously acquires the movement picture of the football at the above parameters, ensuring that the details of the football in the live broadcast picture are clear and the movement trajectory is smooth.
[0071] Optionally, the embodiment is applied to the training data analysis scene of track and field sprint. In the existing track and field training, the close-up lens tracking is often affected by the high speed of the target (the instantaneous speed of the track and field athlete can reach more than 10 m / s), the low frame rate configuration leading to the picture lag, or the motor response lag, the lens cannot follow the target movement in time, and the motion data acquisition accuracy is affected. In the embodiment, after the position information (such as the horizontal angle 15° and the vertical angle 5°) of the track and field athlete is acquired, the control module generates an adaptive driving instruction in combination with the current motion speed (8 m / s) of the athlete, that is, the rotation speed is set to 8° / ms, so as to ensure that the lens can quickly follow the movement rhythm of the athlete, and the rotation angle parameter (the horizontal clockwise 15° and the vertical upward 5°) is included. After the driving instruction is sent to the stepping motor, the motor drives the close-up lens to quickly and accurately rotate to the position of the athlete. Then, the real-time tracking of the close-up lens is started. Considering the high speed of the athlete, the preset frame rate is set to 60 fps to ensure the smoothness of the picture, and the preset second resolution is set to 1280*720 pixels to reduce the data processing pressure. The close-up lens collects the details of the athlete's starting, accelerating and arm swinging with the parameters, and synchronously transmits the image data to the training analysis terminal, so as to provide clear and continuous data support for action optimization.
[0072] The embodiment generates accurate driving instructions based on position information, combines the high-precision rotation of the stepping motor, ensures that the lens quickly aligns with the target, and balances the smoothness of the picture and the clarity of the details by adapting the preset frame rate and the preset second resolution of the scene, thereby providing reliable technical support for capturing key moments of sports event live broadcast and accurately collecting action data for training data analysis, and meeting the needs of target tracking accuracy and real-time performance in different sports scenes.
[0073] Further, based on the content of any of the above embodiments, in some feasible embodiments, the step D403 further includes the following implementation steps E501-E504.
[0074] Step E501: starting the close-up lens, and triggering the target tracking switching mechanism when it is detected that the close-up lens continuously fails to recognize the tracking target at the preset frame rate and the preset second resolution for a time length reaching a preset time length;
[0075] Step E502: stopping the active tracking action of the close-up lens and acquiring the motion trajectory of the close-up lens before losing the tracking target when it is detected that the tracking target of the close-up lens is switched to the panoramic lens for tracking the target in the whole domain;
[0076] Step E503: determining the extension moving direction of the panoramic lens based on the motion trajectory, and controlling the panoramic lens to move towards the extension moving direction, wherein the extension moving direction is used to cover the field blind area when the close-up lens loses the tracking target;
[0077] Step E504: When detecting that the panoramic lens moves to the extension moving direction, control the panoramic lens to perform global target detection on the sports scene at a resolution greater than or equal to the preset first resolution, to continuously identify the tracking target in the sports scene.
[0078] Optionally, the length of time during which the tracking target is not continuously identified refers to a length of time during which the tracking target image is not continuously captured in the field of view of the lens during real-time tracking of the close-up lens at a preset frame rate and a preset second resolution; the target tracking switching mechanism refers to a control logic triggered when the close-up lens fails to identify the tracking target, to switch from the "close-up lens tracking mode" to the "panoramic lens global detection mode", including but not limited to mode switching instruction generation, lens working state adjustment, and the like; the active tracking action refers to a continuous action of actively adjusting the shooting angle, focal length, and the like of the close-up lens to keep the tracking target in the center of the field of view, including but not limited to lens rotation, zoom adjustment, and the like; the motion trajectory refers to path information of the tracking target in space recorded through continuous image data collection before the close-up lens loses the tracking target, including but not limited to position coordinates, moving direction, and the like of the target at different times; the extension moving direction refers to a direction in which the panoramic lens needs to move, which is predicted based on the motion trajectory before the tracking target is lost; and the field of view blind area refers to an area that cannot be imaged due to field of view angle limitation or obstacle blocking, in the current tracking direction of the close-up lens.
[0079] Optionally, the embodiment is applied to a football match live broadcast scene, and the close-up lens is started to track the football in real time. When the close-up lens fails to identify the football at a frame rate of 30 fps and a resolution of 1920x1080 pixels for a length of time reaching a preset length of time (1 second in this embodiment), the system triggers the target tracking switching mechanism. After detecting that the switching mechanism is started, the active tracking action of the close-up lens is stopped immediately, and angle adjustment and zoom operation are no longer performed, and the motion trajectory of the football recorded within 500 milliseconds before the close-up lens loses the football (including 3 sets of position coordinates of the football moving from the left side of the penalty area to the goal direction) is called. Based on the motion trajectory, it is predicted that the football is likely to continue to move to the goal direction, the extension moving direction of the panoramic lens is determined as the goal direction (horizontally turning right by 20°), and the panoramic lens is controlled to move to the direction. When detecting that the panoramic lens completes the turning, the panoramic lens is controlled to perform global target detection on the range of the field including the goal area at a resolution not lower than the preset first resolution (1920x1080 pixels), to continuously capture the football dynamics.
[0080] Optionally, the embodiment is applied to a basketball player training scene, and the close-up camera tracks the training player at a frame rate of 60 fps and a pixel resolution of 1280*720. When the duration of continuous non-identification of the player reaches a preset duration (0.8 seconds in the embodiment), the target tracking switching mechanism is triggered. The system stops the active tracking action of the close-up camera, acquires the motion trajectory of the player before the player is lost (records the motion path of the player from the three-point line to the basket), determines that the panoramic camera expands the moving direction to the basket direction (turns horizontally downward by 15°), controls the panoramic camera to move to the direction, and performs global detection on the basket and the surrounding area at a parameter greater than the preset first resolution (2560*1440 pixels), and quickly locates the player position.
[0081] When the close-up camera loses the tracking target, the embodiment can accurately adjust the detection range of the panoramic camera based on the motion trajectory of the target, avoid blind scanning of the panoramic camera, and greatly shorten the time for re-identifying the target. At the same time, by timely stopping the active tracking of the close-up camera and controlling the directional movement of the panoramic camera, the fluency of tracking switching is ensured, the problem of low re-identification efficiency after the target is lost in the prior art is solved, and the requirements of sports event live broadcast for real-time and continuity and the requirements of training scene for continuous tracking of the target are met.
[0082] Further, based on the content of any of the above embodiments, in some feasible embodiments, the target tracking method further includes the following steps F501 to F503.
[0083] Step F501: Real-time acquisition of motion parameters of the tracking target, calculation of the moving speed of the tracking target based on the motion parameters, wherein the motion parameters include the displacement distance and the motion direction of the tracking target in unit time;
[0084] Step F501: Statistics of the historical occlusion data of the tracking target, calculation of the occlusion probability of the tracking target in combination with the distribution of obstacles in the current scene;
[0085] Step F501: According to the correlation between the moving speed and the occlusion probability, the preset duration is dynamically adjusted.
[0086] Optionally, the motion parameter refers to data used to characterize the motion state of the tracking target, including but not limited to the displacement distance and the motion direction of the tracking target in a unit time; the displacement distance refers to the spatial span of the tracking target moving in the motion direction in a set unit time, and the unit includes but is not limited to meters (m) and centimeters (cm); the motion direction refers to the moving direction of the tracking target relative to the panoramic lens field of view coordinate system during the motion process, including but not limited to horizontal direction angle, vertical direction angle and other expression forms; the historical occlusion data refers to the relevant information of the tracking target being occluded by the obstacle in the scene recorded by the system before the present tracking process, including but not limited to the time point of the occlusion, the single occlusion duration, the occlusion frequency in a unit time and other data; the current obstacle distribution in the scene refers to the real-time state of the object in the sports scene where the tracking target is located, which may cause occlusion to the target imaging, including but not limited to the position, number and distribution relationship of the object relative to the target, such as other athletes, field equipment and referees; the occlusion probability refers to the possibility of the tracking target being occluded in the subsequent short time based on the historical occlusion law of the tracking target and the current scene obstacle distribution, and is expressed in percentage (%), and the value range includes but is not limited to 0%~100%; the correlation relationship refers to the corresponding rule of the moving speed of the tracking target and the occlusion probability jointly affecting the preset time length adjustment, including but not limited to the weight distribution of the two to the preset time length, the calculation logic of the numerical adjustment range and the like; the dynamic adjustment of the preset time length refers to updating the specific value of the preset time length in real time according to the real-time acquired moving speed and occlusion probability, and according to the preset correlation relationship, so that the preset time length adapts to the real-time motion state of the tracking target and the change of the scene environment.
[0087] Optionally, the embodiment is applied to the live broadcast scene of football matches. In the current football matches, the existing technology mostly uses fixed values for the preset time length (such as uniformly setting 2 seconds), without considering the football moving speed and scene occlusion changes. When the football moves at high speed (such as the moment of shooting), the fixed time length is easy to cause tracking loss and switching delay. When the scene is frequently occluded (such as the dense players in the penalty area), the short-term occlusion is easy to cause false triggering of switching. In the embodiment, the system collects the motion parameters of the football in real time: the unit time is set as 0.5 seconds, the displacement distance (such as 5 meters) and the motion direction (towards the left side of the goal) of the football in 0.5 seconds are extracted from the image data collected by the close-up lens, and the moving speed of the football is calculated as 10 m / s based on the formula “moving speed = displacement distance / unit time”. At the same time, the historical occlusion data of the football is counted: the tracking records in the past 10 minutes are called, which is occluded by the players 3 times, the average duration of single occlusion is 0.3 seconds, and the occlusion frequency per unit time is 0.3 times / minute; combined with the obstacle distribution in the current scene (3 defensive players and 1 offensive player in the penalty area, forming a local dense area around the football), the occlusion probability is calculated as 35% by “occlusion probability = (historical occlusion frequency x current obstacle density coefficient) x 100%”. According to the preset correlation: the moving speed and the preset time length are negatively correlated (the speed increases by 2 m / s, and the time length shortens by 0.1 second), and the occlusion probability and the preset time length are positively correlated (the probability increases by 10%, and the time length increases by 0.2 second), taking the basic time length of 1 second as the benchmark, the adjusted preset time length is calculated as 1.1 second, and the dynamic update of the preset time length is completed.
[0088] Optionally, the embodiment is applied to the training scene of basketball players. In the current basketball training, the preset time length is mostly set according to the average speed of the players (such as 1.5 seconds). When the players suddenly change speed (such as switching from jogging to sprinting) or the scene obstacle changes (such as the approach of the training personnel), the fixed time length cannot be adapted, and the tracking switching is easy to be not timely or false triggering. In the embodiment, the motion parameters of the training player are collected in real time: the unit time is set as 0.3 seconds, the displacement distance of the player in 0.3 seconds is 2.1 meters, and the motion direction is towards the basket, and the moving speed is calculated as 7 m / s. The historical occlusion data of the player is counted: the player is occluded by the training personnel 2 times in the past 5 minutes, the single occlusion lasts for 0.2 seconds, and the occlusion frequency per unit time is 0.4 times / minute; combined with the obstacle distribution in the current scene (such as 1 training personnel in the basket area, with a distance of about 1.5 meters from the player, and there is a potential occlusion possibility), the occlusion probability is calculated as 25%, according to the correlation: the moving speed of 7 m / s corresponds to the basic time length of 0.7 seconds, and the occlusion probability of 25% corresponds to the adjustment amount of 0.5 seconds, and the finally dynamically adjusted preset time length is 1.2 seconds, which adapts to the current motion state of the player and the scene environment.
[0089] The embodiment calculates the speed by collecting motion parameters in real time, combines the shielding probability calculated by historical and current data statistics, and adjusts the time length according to the correlation, so that the preset time length is always matched with the target motion and scene shielding, effectively balances the sensitivity and anti-mis-triggering capability of tracking switching, and guarantees the stability and accuracy of the sports event live broadcast and training tracking process.
[0090] Further, based on the content of any of the above embodiments, in some feasible embodiments, the target tracking method further includes steps G40-G50 after step E504.
[0091] Step G40: When the tracking target is re-identified by the panoramic lens, update the position information of the tracking target;
[0092] Step G50: Based on the updated position information of the tracking target, return to execute the step of controlling the close-up lens to rotate to the direction of the tracking target based on the position information, and starting the real-time tracking of the tracking target by the close-up lens.
[0093] Optionally, re-identifying the tracking target means that the panoramic lens captures the image of the previously lost tracking target again through image analysis during the global detection process, and confirms that the image matches the tracking target features before the loss, which is a prerequisite for triggering subsequent position information updating and tracking switching; updating the position information of the tracking target means that based on the image data collected when the panoramic lens re-identifies the tracking target, the original tracking target position data is recalculated and replaced to ensure that the position information is consistent with the current actual spatial direction of the target, including but not limited to updating the target pixel coordinates and two-dimensional coordinates in the field of view; returning to execute means that after completing the updating of the position information of the tracking target, the previously executed process of “controlling the close-up lens to rotate and real-time tracking based on the position information” is restarted, so that the control logic of the target tracking is switched back from “panoramic global detection mode” to “close-up lens accurate tracking mode”.
[0094] Optionally, the embodiment is applied to the live broadcast scene of football matches. In the current football matches, after the panoramic camera re-identifies the football, the prior art directly uses the position information before the loss to drive the close-up camera to rotate, or needs to manually confirm and then start tracking. The former is prone to misalignment of the camera due to position deviation, and the latter has a delay of 1-2 seconds, missing the key pictures of the subsequent movement of the football. In the embodiment, when the panoramic camera performs global detection in the expanded movement area in the direction of the goal, the target detection model captures an image matching the features of the football before the loss (black and white block texture, circular contour), and determines that the tracking target is re-identified. Then, based on the pixel coordinates of the football in the image (such as (950, 550), with the top-left corner of the global image as the origin) and the current field of view parameters of the panoramic camera (field of view angle 150°, resolution 1920x1080 pixels), the spatial position information of the football in the field of view of the panoramic camera (horizontal angle 38°, vertical angle 7°) is calculated to complete the update of the position information. Based on the updated position information, the system generates a driving instruction to control the stepper motor to drive the close-up camera to rotate to the direction. After the camera is aligned with the football, the close-up camera starts real-time tracking of the football at a frame rate of 30 fps and a resolution of 1920x1080 pixels, and the accurate tracking state is restored.
[0095] Optionally, the embodiment is applied to the training scene of basketball players. In the current basketball training, after the panoramic camera re-identifies the player, the position information update often ignores the real-time movement trend of the player, resulting in that when the close-up camera is rotated to the position, the player has moved again, and needs to be adjusted twice, affecting the continuity of the training data collection. In the embodiment, when the panoramic camera detects in the expanded direction under the basket, the target consistent with the features of the training player before the loss (specific training clothes color, body contour) is identified, and it is confirmed that the re-identification is successful. Based on the pixel coordinates of the player in the identified image (such as (1100, 600)) and the field of view parameters of the panoramic camera (field of view angle 120°, resolution 2560x1440 pixels), the spatial position information of the player (horizontal angle 22°, vertical angle 9°) is calculated, and the movement direction of the player is predicted based on the body posture (forward leaning, stepping action) in the image to dynamically correct the position information and complete the update. Based on the corrected position information, a driving instruction containing a predicted compensation angle is generated to control the stepper motor to drive the close-up camera to rotate. The rotation angle is adjusted in real time during the rotation of the camera by synchronously receiving small updates of the position information to ensure accurate alignment of the player. Then, the close-up camera starts real-time tracking at a frame rate of 60 fps and a resolution of 1280x720 pixels to continuously collect the action data of the player.
[0096] Optionally, as shown in Figure 3 Figure 3 For the flowchart of the target tracking method involved in the present application, the flow starts with "starting tracking", first enters the "close-up and panoramic tracking starting position" step, completes the initial position calibration of the dual-lens of the binocular PTZ camera; then executes "panoramic lens detects target", uses the wide field angle of the panoramic lens to detect the entire sports scene, and preliminarily identifies the potential tracking target; after obtaining the target position, enters the "turn the close-up lens to the specified position and start detection on the close-up lens" step, controls the close-up lens to accurately turn to the target based on the position data and starts high-definition detection. Subsequently, "panoramic lens reverses to ensure overall detection range" is executed, the panoramic lens reverses to expand the system detection coverage area; when "switch to panoramic lens to detect after close-up lens loses target", if the close-up lens loses the target, immediately switch to panoramic lens global detection; enter the judgment step "detection timeout 10s", if timeout, return to "close-up and panoramic tracking starting position" to reinitialize; if not timeout, return to the "turn the close-up lens to the specified position and start detection on the close-up lens" step to continue tracking; the whole process realizes continuous and accurate target tracking through double-lens cooperative switching, position calibration and timeout mechanism, and adapts to the complex environment of dynamic movement of sports scene targets.
[0097] The embodiment of the present application ensures that the close-up lens can quickly and accurately aim at the target and resume tracking by updating the position information in real time and combining scene-adaptive tracking parameters, guarantees the picture coherence of sports event live broadcast and the integrity of training data collection, and meets the needs of target tracking continuity and accuracy in different sports scenes.
[0098] In addition, the present application also provides a target tracking system, please refer to Figure 4 , Figure 4 is a structural schematic diagram of the target tracking system involved in the embodiment scheme of the present application. The target tracking system provided by the present application comprises:
[0099] The target detection module H01 is used to start and control the left and right movement of the panoramic lens, and detect the target of the sports scene;
[0100] The information acquisition module H02 is used to identify the tracking target in the sports scene and synchronously acquire the position information of the tracking target in the field of view of the panoramic lens;
[0101] The lens control module H03 is used to control the close-up lens to turn to the direction of the tracking target based on the position information, and start real-time tracking of the tracking target by the close-up lens.
[0102] The target tracking system provided in the application adopts the target tracking method in the above embodiment, and can solve the technical problem of insufficient target tracking stability of the target tracking system. Compared with the prior art, the target tracking system provided in the application has the same beneficial effects as the target tracking method provided in the above embodiment, and other technical features in the target tracking system are the same as the features disclosed in the above embodiment, which will not be repeated here.
[0103] In addition, the application also provides an electronic device. Please refer to Figure 5 Figure 5 FIG. 1 is a structural schematic diagram of an electronic device related to an embodiment of the application.
[0104] The application provides an electronic device, which comprises at least one processor, and a binocular gimbal camera, and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the target tracking method in the above embodiment one.
[0105] The following will be described with reference to Figure 5 Figure 5 FIG. 1 is a structural schematic diagram of an electronic device related to an embodiment of the application, which shows a structural schematic diagram of an electronic device suitable for implementing the embodiments of the application. The electronic device in the embodiments of the application can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 5 The electronic device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the application.
[0106] As Figure 5 FIG. 1 is a structural schematic diagram of an electronic device related to an embodiment of the application.As shown, the electronic device can include a processing device 1001 (e.g., a central processor, a graphics processor, etc.) that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1002 or loaded from a storage device 1003 into a random access memory (RAM) 1004. Various programs and data required for operation of the electronic device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following devices can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate wirelessly or wired with other devices to exchange data. Although the electronic device with various devices is shown in the figure, it should be understood that all the shown devices are not required to be implemented or possessed. More or less devices can be alternatively implemented or possessed.
[0107] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are performed.
[0108] The electronic device provided in the present application adopts the target tracking method in the above-mentioned embodiments, and can solve the technical problem of insufficient stability of target tracking of the electronic device in a sports scene. Compared with the prior art, the electronic device provided in the present application has the same beneficial effects as the target tracking method provided in the above-mentioned embodiments, and other technical features in the electronic device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0109] In addition, the present application provides a computer readable storage medium. The computer readable storage medium stores a target tracking program, and the target tracking program is executed by a processor to implement the steps of the above-mentioned target tracking method.
[0110] It should be noted that, in this document, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0111] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent advantages or disadvantages of the embodiments.
[0112] Those skilled in the art can clearly understand the above-mentioned embodiment methods from the description of the above embodiments, which can be realized by software and necessary general hardware platforms, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a computer readable storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing an apparatus (which can be a mobile phone, a computer, a server, or a network device) to perform the methods described in the embodiments of the present application.
[0113] The above are only preferred embodiments of the present application, and do not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A target tracking method, characterized in that, An application is made in a target tracking system, the target tracking system comprising a binocular pan-tilt camera, a stepper motor, and a target detection model, the binocular pan-tilt camera including a panoramic lens and a close-up lens, the target tracking method comprising: The panoramic lens is activated and controlled to move left and right at a speed of 5° / s-15° / s to capture a full-field image of the sports scene at a preset first resolution. The panoramic lens is a telephoto lens with a preset field of view, the preset field of view being in the range of 120°-180°, and the preset first resolution being in the range of 1920×1080 pixels to 3840×2160 pixels. The target detection model is invoked to perform AI detection on the global image to identify the tracking target in the sports scene; The tracking target in the sports scene is identified, and the position information of the tracking target within the field of view of the panoramic lens is acquired simultaneously. The step of identifying the tracking target in the sports scene and simultaneously acquiring the position information of the tracking target within the field of view of the panoramic lens includes: Multiple candidate tracking targets in the sports scene identified by the target detection are sorted according to a preset priority rule, wherein the preset priority rule is set based on the needs of the sports scene as follows: match ball > main players on the field > ordinary players > referee; Select the tracking target with the highest priority after sorting, and use the tracking target with the highest priority as the updated tracking target; Based on the updated pixel coordinates and pixel percentage information of the tracking target in the global image, the updated spatial position information of the tracking target within the field of view of the panoramic lens is obtained synchronously, and the spatial position information is used as the position information. Based on the position information, a drive command is generated to control the rotation of the close-up shot; Based on the driving command, the stepper motor is controlled to drive the close-up camera to rotate to the location of the tracking target; When the close-up shot is activated, and the target tracking switching mechanism is triggered when the close-up shot fails to detect the tracked target for a preset duration at a preset frame rate and a preset second resolution, the target tracking switching mechanism is activated. When the camera detects that the close-up shot is tracking the target and switches to the panoramic lens to detect the target across the entire field of view, the camera stops actively tracking the target and acquires the motion trajectory of the close-up shot before it loses track of the target. Based on the motion trajectory, the extended movement direction of the panoramic lens is determined, and the panoramic lens is controlled to move in the extended movement direction, wherein the extended movement direction is used to cover the blind spot of the field of view when the close-up shot loses the tracked target; When the panoramic lens is detected to have moved to the extended movement direction, the panoramic lens is controlled to perform global target detection on the sports scene at a resolution greater than or equal to the preset first resolution, so as to continuously identify the tracking target in the sports scene.
2. The target tracking method as described in claim 1, characterized in that, The method further includes: The motion parameters of the tracked target are collected in real time, and the moving speed of the tracked target is calculated based on the motion parameters. The motion parameters include the displacement distance and direction of movement of the tracked target per unit time. The historical occlusion data of the tracked target is statistically analyzed, and combined with the current obstacle distribution in the scene, the occlusion probability of the tracked target is calculated. The preset duration is dynamically adjusted based on the correlation between the moving speed and the occlusion probability.
3. The target tracking method as described in claim 1, characterized in that, Following the step of performing global object detection on the sports scene, the method further includes: When the panoramic lens re-identifies the tracked target, it updates the position information of the tracked target; Based on the updated location information of the tracked target, return to the step of controlling the close-up shot to rotate to the location of the tracked target based on the location information, and starting the close-up shot to track the tracked target in real time.
4. A target tracking system, characterized in that, The target tracking system includes a binocular gimbal camera, a stepper motor, and a target detection model. The binocular gimbal camera includes a panoramic lens and a close-up lens. The target tracking system includes: The target detection module is used to activate and control the panoramic lens to move left and right to detect targets in the sports scene. Specifically, the target detection module is used to activate and control the panoramic lens to move left and right at a speed of 5° / s-15° / s to acquire a full-field image of the sports scene at a preset first resolution. The panoramic lens is a telephoto lens with a preset field of view, the preset field of view being in the range of 120°-180°, and the preset first resolution being in the range of 1920×1080 pixels to 3840×2160 pixels. The module also calls the target detection model to perform AI detection on the full-field image to identify the tracking targets in the sports scene. An information acquisition module is used to identify tracking targets in the sports scene and simultaneously acquire the position information of the tracking targets within the field of view of the panoramic lens. Specifically, the information acquisition module is used to sort multiple candidate tracking targets in the sports scene identified by the target detection according to a preset priority rule, wherein the preset priority rule is set based on the needs of the sports scene as: match ball > main players on the field > ordinary players > referee; select the tracking target with the highest priority after sorting, and use the tracking target with the highest priority as the updated tracking target; based on the pixel coordinates and pixel ratio information of the updated tracking target in the global image, simultaneously acquire the spatial position information of the updated tracking target within the field of view of the panoramic lens, and use the spatial position information as the position information; The lens control module is used to control the close-up lens to rotate to the location of the tracking target based on the position information, and to start the close-up lens to track the tracking target in real time. Specifically, the lens control module is used to generate drive commands to control the rotation of the close-up lens based on the position information. Based on the driving command, the stepper motor is controlled to drive the close-up camera to rotate to the location of the tracking target; When the close-up shot is activated, and the target tracking switching mechanism is triggered when the close-up shot fails to detect the tracked target for a preset duration at a preset frame rate and a preset second resolution, the target tracking switching mechanism is activated. When the camera detects that the close-up shot is tracking the target and switches to the panoramic lens to detect the target across the entire field of view, the camera stops actively tracking the target and acquires the motion trajectory of the close-up shot before it loses track of the target. Based on the motion trajectory, the extended movement direction of the panoramic lens is determined, and the panoramic lens is controlled to move in the extended movement direction, wherein the extended movement direction is used to cover the blind spot of the field of view when the close-up shot loses the tracked target; When the panoramic lens is detected to have moved to the extended movement direction, the panoramic lens is controlled to perform global target detection on the sports scene at a resolution greater than or equal to the preset first resolution, so as to continuously identify the tracking target in the sports scene.
5. An electronic device, characterized in that, The electronic device includes a binocular pan-tilt camera, a processor, a memory, and a target tracking program stored in the memory that can be executed by the processor, wherein when the target tracking program is executed by the processor, it implements the steps of the target tracking method as described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a target tracking program, wherein when the target tracking program is executed by a processor, it implements the steps of the target tracking method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Intelligent linkage and tracking method based on panorama camera and high speed ball-head camera
CN107093188A