Gun-dome coordinate linkage tracking-based motion control system in security field
By designing a motion control system based on gun ball coordinate linkage, the problems of low accuracy of target detection and tracking, slow response speed and limited application scenarios in the prior art are solved, and more efficient and accurate target tracking and monitoring effects are achieved.
Patent Information
- Application Number
- CN202411238438.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-03-14
AI Technical Summary
The existing gun ball linkage tracking system has tracking interruptions caused by low target detection accuracy, poor tracking accuracy, slow response speed, limited application scenarios and blind spots in the monitoring perspective.
A motion control system based on gun ball coordinate linkage is designed, including a motion detection module, a coordinate calibration module, a target tracking module and a motion compensation module. By capturing adjacent frame image data, dividing areas, evaluating area weights, positioning motion areas, identifying grayscale values differences, converting coordinate information, generating ball machine control parameters, controlling motor movement and zooming operations, and adjusting motor movement parameters in real time for compensation.
It improves the accuracy and efficiency of target detection and tracking, enhances the practicality of the system, reduces the error of the tracking screen, and ensures the synchronization of the bolt and ball machine during the tracking process.
Smart Images

Figure CN119620786A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of security monitoring, and in particular relates to a motion control system based on gun-ball coordinate linkage tracking in the security field. Background Art
[0002] As a new type of monitoring technology, the gun-ball linkage tracking system has been widely used in various security scenarios. Early monitoring systems were mainly based on analog signals, with poor image quality, limited transmission distance, and single functions. With the development of digital technology, digital monitoring systems have gradually replaced analog systems, with significantly improved image quality, longer transmission distance, and richer functions. In recent years, with the rise of technologies such as artificial intelligence and cloud computing, intelligent monitoring systems have become a new development trend, with multiple functions such as target detection, tracking, and recognition.
[0003] The gun-ball linkage tracking system is a video surveillance system that combines a fixed gun camera (gun camera) with an intelligent ball camera (ball camera). The gun camera is responsible for monitoring the large scene and providing a global view; the ball camera is responsible for capturing target details and tracking accurately. Through the linkage of the two, a monitoring effect with both panoramic and detailed can be achieved.
[0004] The existing gun-ball linkage has some problems with low target detection accuracy, and low tracking accuracy after successful detection, resulting in target tracking loss. The system response speed is too slow, and the ball camera cannot quickly respond to changing tracking needs during the tracking stage. In addition, the existing gun-ball linkage has few application scenarios, and the lack of intelligent scene applications is also a major problem in the development of existing technologies; when the monitoring perspective encounters a blind spot, the real-time monitoring capability of the original area will be seriously affected, and may even lead to tracking interruption. In addition, in complex scenes involving multiple objects, traditional monocular algorithms often find it difficult to respond quickly and accurately track, capture, and record. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides a motion control system based on gun-ball coordinate linkage tracking in the security field, comprising: a motion detection module, a coordinate calibration module, a target tracking module, and a motion compensation module;
[0006] The motion detection module is used to capture two consecutive adjacent frame image data, divide the adjacent frame image data into regions to obtain a regional image set, perform weighted evaluation on the regional image set to obtain a regional weight corresponding to each region, locate the motion region according to the gray value difference of the adjacent frame image data and the regional weight, identify the gray value difference of the motion region of adjacent frames to identify the moving target;
[0007] The coordinate calibration module is used to convert the coordinate information of the moving target identified by the gun into the observation coordinates in the coordinate system of the ball camera, match the moving target point of the ball camera with the coordinate information of the moving target through the observation coordinates to obtain the moving coordinates, and form the moving coordinates corresponding to the moving target into a moving target set, and generate the ball camera control parameters according to the moving target set;
[0008] The target tracking module is used to send the ball camera control parameters to the motion control unit of the ball camera through serial communication, and the motion control unit controls the movement and zoom operation of the motor according to the ball camera control parameters, and adjusts the rotation of the ball camera in the horizontal and vertical directions and the focal length change;
[0009] The motion compensation module is used to perform center edge motion compensation on the gun movement by adjusting the motor motion parameters in real time.
[0010] Specifically, the moving target recognition method evaluates the feasibility of the moving target movement through the number of motion macroblocks: the number of motion macroblocks is the regional pixel blocks whose position offset and residual of the pixel area of the regional image set corresponding to the previous frame and the next frame image are greater than a reference threshold.
[0011] Specifically, the coordinate information conversion method is: calculating a mapping coordinate matrix according to the initialization coordinate points of the gun camera and the calibrated coordinate points of the ball camera, and converting the coordinate information into the observation coordinates through the mapping coordinate matrix; the mapping coordinate matrix calculation formula is:
[0012]
[0013] Among them, (x, y) is the initialization coordinate point in the gun coordinate system, (c x ,c y ) is the coordinate of the origin of the image plane in the gun coordinate system, f x is the unit focal length of the pixel in the horizontal direction, f y is the unit focal length of the pixel in the ordinate direction, A is the mapping coordinate matrix, α is the vertical altitude angle of the ball camera coordinates, and β is the horizontal azimuth angle of the ball camera coordinates.
[0014] Specifically, the ball camera control parameters include the ball camera angle coordinates and the zoom parameter; the ball camera angle coordinates are obtained by coordinate conversion based on the coordinate information of the moving object, and the zoom parameter is obtained based on the image sensor size of the monitoring device and the size of the monitoring screen, and the calculation formula is:
[0015]
[0016] Among them, f1 is the focal length of the ball camera, d1 is the full-frame screen size of the ball camera, s1 is the diagonal length of the ball camera image sensor, f2 is the focal length of the gun camera, d2 is the full-frame screen size of the gun camera, and s2 is the diagonal length of the gun camera image sensor.
[0017] Specifically, the motion control unit determines the monitoring area residence time by analyzing the motion speed and coordinate position of the mobile target in the motion target set, sets the tracking target weight according to the monitoring area residence time and the motion parameters of the mobile target, sets the ball camera tracking target according to the tracking target weight, controls the motor operating parameters according to the ball camera tracking target, and the tracking target weight calculation formula is:
[0018] r=a1T r +a2T t +a3S+a4V,
[0019] Among them, r is the tracking target weight, (a1, a2, a3, a4) is the weight coefficient vector, T r is the residence time in the monitoring area, T t is the monitoring time of the moving target, S is the size of the target shape, and V is the target movement speed.
[0020] Specifically, the center edge motion compensation method is: presetting a center area coordinate range and an edge area coordinate range, within the center area coordinate range, the ball camera terminates the target tracking task, and within the edge area coordinate range, the ball camera movement speed is increased by an adaptive controller.
[0021] Specifically, the speed of the ball camera is increased by an acceleration and deceleration algorithm controlled by a stepper motor.
[0022] The beneficial effects of the present invention are:
[0023] By systematically optimizing and improving the original monocular tracking algorithm, introducing two devices, gun camera and ball camera, the modular design of monitoring and tracking is realized. Based on the gun and ball format, this technology not only ensures the accuracy of detection through precise image processing algorithms, but also greatly improves the detection efficiency and practicality of the system. In the motion detection stage, the system continuously captures the image data of the previous and next two frames, and determines the motion state of the object by comparing the grayscale value difference between adjacent frames. Compared with the traditional detection method based on pixel brightness or color, this method based on grayscale value difference is more stable and reliable, and can effectively resist the interference of environmental factors such as light changes. The whole picture is divided into regions, and each region is independently weighted. This strategy not only improves the accuracy of detection, but also enables the system to perform differentiated processing according to factors such as the importance of different regions, the size and speed of moving objects, etc. By assigning different weight values to different regions, the system can more accurately locate the moving area and effectively track and analyze it. At the same time, the macroblocks with the greatest possibility of motion are screened and judged according to the number of moving macroblocks. By comparing the number of moving macroblocks of different pixels, the moving target is determined, thereby achieving accurate analysis and recognition of the video content. By adjusting the motor's motion parameters in real time to compensate for the errors caused by backlash and lag, the gun camera and ball camera can maintain a high degree of synchronization during the tracking process, thereby reducing the error of the tracking image. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0025] Figure 1 The present invention is a flow chart of a motion control system based on gun-ball coordinate linkage tracking in the security field. DETAILED DESCRIPTION
[0026] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.
[0027] See also Figure 1 , a motion control system based on gun-ball coordinate linkage tracking in the security field, including: a motion detection module, a coordinate calibration module, a target tracking module, and a motion compensation module;
[0028] The motion detection module is used to capture two consecutive adjacent frame image data, divide the adjacent frame image data into regions to obtain a regional image set, perform weighted evaluation on the regional image set to obtain a regional weight corresponding to each region, locate the motion region according to the gray value difference of the adjacent frame image data and the regional weight, identify the gray value difference of the motion region of adjacent frames to identify the moving target;
[0029] The coordinate calibration module is used to convert the coordinate information of the moving target identified by the gun into the observation coordinates in the coordinate system of the ball camera, match the moving target point of the ball camera with the coordinate information of the moving target through the observation coordinates to obtain the moving coordinates, and form the moving coordinates corresponding to the moving target into a moving target set, and generate the ball camera control parameters according to the moving target set;
[0030] The target tracking module is used to send the ball camera control parameters to the motion control unit of the ball camera through serial communication, and the motion control unit controls the movement and zoom operation of the motor according to the ball camera control parameters, and adjusts the rotation of the ball camera in the horizontal and vertical directions and the focal length change;
[0031] The motion compensation module is used to perform center edge motion compensation on the gun movement by adjusting the motor motion parameters in real time.
[0032] In this embodiment, based on the hardware structure of the camera, an external main control board and an image processing algorithm program are added. The gun camera analyzes and locks multiple targets, and sends the corresponding target information to the main control board through the RS485 interface of the product. The main control board locks the gun camera to the target to be tracked, and converts the target information into coordinate information. Through the RS485 interface of the high-definition ball camera, the rotation direction, speed and target zoom of the ball camera are controlled. Set a fixed time to start the tracking operation, and the linkage system will not track during the non-monitoring period, which will extend the service life of the equipment.
[0033] Specifically, the moving target recognition method evaluates the feasibility of the moving target movement through the number of motion macroblocks: the number of motion macroblocks is the regional pixel blocks whose position offset and residual of the pixel area of the regional image set corresponding to the previous frame and the next frame image are greater than a reference threshold.
[0034] Specifically, the coordinate information conversion method is: calculating a mapping coordinate matrix according to the initialization coordinate points of the gun camera and the calibrated coordinate points of the ball camera, and converting the coordinate information into the observation coordinates through the mapping coordinate matrix; the mapping coordinate matrix calculation formula is:
[0035]
[0036] Among them, (x, y) is the initialization coordinate point in the gun coordinate system, (cx ,c y ) is the coordinate of the origin of the image plane in the gun coordinate system, f x is the unit focal length of the pixel in the horizontal direction, f y is the unit focal length of the pixel in the ordinate direction, A is the mapping coordinate matrix, α is the vertical altitude angle of the ball camera coordinates, and β is the horizontal azimuth angle of the ball camera coordinates.
[0037] Specifically, the ball camera control parameters include the ball camera angle coordinates and the zoom parameter; the ball camera angle coordinates are obtained by coordinate conversion based on the coordinate information of the moving object, and the zoom parameter is obtained based on the image sensor size of the monitoring device and the size of the monitoring screen, and the calculation formula is:
[0038]
[0039] Among them, f1 is the focal length of the ball camera, d1 is the full-frame screen size of the ball camera, s1 is the diagonal length of the ball camera image sensor, f2 is the focal length of the gun camera, d2 is the full-frame screen size of the gun camera, and s2 is the diagonal length of the gun camera image sensor.
[0040] Specifically, the motion control unit determines the monitoring area residence time by analyzing the motion speed and coordinate position of the mobile target in the motion target set, sets the tracking target weight according to the monitoring area residence time and the motion parameters of the mobile target, sets the ball camera tracking target according to the tracking target weight, controls the motor operating parameters according to the ball camera tracking target, and the tracking target weight calculation formula is:
[0041] r=a1T r +a2T t +a3S+a4V,
[0042] Among them, r is the tracking target weight, (a1, a2, a3, a4) is the weight coefficient vector, T r is the residence time in the monitoring area, T t is the monitoring time of the moving target, S is the size of the target shape, and V is the target movement speed.
[0043] In this embodiment, the alert priority of the monitoring area is set according to the tracking target weight, and the automatic tracking target duration and the maximum and minimum target pixels are set to limit the size of the gun camera locking and tracking of the moving target in the alert area. The alert area can be arbitrarily defined in the gun camera screen according to customer needs.
[0044] Specifically, the center edge motion compensation method is: presetting a center area coordinate range and an edge area coordinate range, within the center area coordinate range, the ball camera terminates the target tracking task, and within the edge area coordinate range, the ball camera movement speed is increased by an adaptive controller.
[0045] Specifically, the speed of the ball camera is increased by an acceleration and deceleration algorithm controlled by a stepper motor.
[0046] In this embodiment, the motor is subdivided and controlled by a subdivided driver to improve the resolution and accuracy of the motor. The subdivision technology can enable the motor to achieve precise rotation within a smaller angle range, thereby more accurately controlling the position and speed of the motor. By accelerating and decelerating in a linear manner (from the starting speed to the target speed), acceleration and deceleration are performed at a certain ratio. This algorithm is mainly divided into three stages: acceleration stage, uniform speed stage and deceleration stage. In the acceleration stage, the stepper motor starts from a stationary state and gradually increases the speed at a fixed acceleration until the target speed is reached. In this process, the speed curve of the motor shows an upward trend. Its control algorithm is simple, takes up less time, has a fast response, high efficiency, and is relatively easy to implement.
[0047] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
[0048] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0049] The program code included on the computer readable medium can be transmitted with any appropriate medium, including but not limited to wireless, electric wire, optical cable, RF, etc., or any suitable combination of the above. The computer program code for performing the operation of the present invention can be written in one or more programming languages or their combinations, and the programming language includes object-oriented programming languages-such as Java, Smalltalk, C++, and also includes conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0050] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A motion control system based on gun-ball coordinate linkage tracking in the security field, characterized in that: include: Motion detection module, coordinate calibration module, target tracking module, motion compensation module; The motion detection module is used to capture two consecutive adjacent frame image data, divide the adjacent frame image data into regions to obtain a regional image set, perform weighted evaluation on the regional image set to obtain a regional weight corresponding to each region, locate the motion region according to the gray value difference of the adjacent frame image data and the regional weight, identify the gray value difference of the motion region of adjacent frames to identify the moving target; The coordinate calibration module is used to convert the coordinate information of the moving target identified by the gun into the observation coordinates in the coordinate system of the ball camera, match the moving target point of the ball camera with the coordinate information of the moving target through the observation coordinates to obtain the moving coordinates, and form the moving coordinates corresponding to the moving target into a moving target set, and generate the ball camera control parameters according to the moving target set; The target tracking module is used to send the ball camera control parameters to the motion control unit of the ball camera through serial communication, and the motion control unit controls the movement and zoom operation of the motor according to the ball camera control parameters, and adjusts the rotation of the ball camera in the horizontal and vertical directions and the focal length change; The motion compensation module is used to perform center edge motion compensation on the gun movement by adjusting the motor motion parameters in real time.
2. The system according to claim 1, characterized in that The mobile target recognition method evaluates the feasibility of the mobile target movement through the number of motion macroblocks: the number of motion macroblocks is the regional pixel blocks whose position offset and residual of the pixel area of the regional image set corresponding to the previous frame and the next frame image are greater than a reference threshold.
3. The system according to claim 1, characterized in that The coordinate information conversion method is: calculate the mapping coordinate matrix according to the initialization coordinate points of the gun camera and the calibrated coordinate points of the ball camera, and convert the coordinate information into the observation coordinates through the mapping coordinate matrix; the mapping coordinate matrix calculation formula is: Among them, (x, y) is the initialization coordinate point in the gun coordinate system, (c x ,c y ) is the coordinate of the origin of the image plane in the gun coordinate system, f x is the unit focal length of the pixel in the horizontal direction, f y is the unit focal length of the pixel in the ordinate direction, A is the mapping coordinate matrix, α is the vertical altitude angle of the ball camera coordinates, and β is the horizontal azimuth angle of the ball camera coordinates.
4. The system according to claim 1, characterized in that The ball camera control parameters include the ball camera angle coordinates and the zoom parameter; the ball camera angle coordinates are obtained by coordinate conversion through the coordinate information of the moving object, and the zoom parameter is obtained according to the image sensor size of the monitoring device and the size of the monitoring screen, and the calculation formula is: Among them, f1 is the focal length of the ball camera, d1 is the full-frame screen size of the ball camera, s1 is the diagonal length of the ball camera image sensor, f2 is the focal length of the gun camera, d2 is the full-frame screen size of the gun camera, and s2 is the diagonal length of the gun camera image sensor.
5. The system according to claim 1, characterized in that The motion control unit determines the monitoring area residence time by analyzing the motion speed and coordinate position of the moving target in the moving target set, sets the tracking target weight according to the monitoring area residence time and the motion parameters of the moving target, sets the ball camera tracking target according to the tracking target weight, and controls the motor operating parameters according to the ball camera tracking target. The tracking target weight calculation formula is: r=a1T r +a2T t +a3S+a4V, Among them, r is the tracking target weight, (a1, a2, a3, a4) is the weight coefficient vector, T r is the residence time in the monitoring area, T t is the monitoring time of the moving target, S is the size of the target shape, and V is the target movement speed.
6. The system according to claim 1, characterized in that The center edge motion compensation method is: presetting a center area coordinate range and an edge area coordinate range, within the center area coordinate range, the ball camera terminates the target tracking task, and within the edge area coordinate range, the adaptive controller is used to increase the ball camera's motion speed.
7. The system according to claim 7, characterized in that The speed of the ball machine is increased by an acceleration and deceleration algorithm controlled by a stepper motor.
8. 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, a motion control system based on gun-ball coordinate linkage tracking in the security field as described in any one of claims 1-7 is implemented.
9. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the motion control system based on gun-ball coordinate linkage tracking in the security field as described in any one of claims 1-7.