CN111757011A - PID algorithm-based ball machine high-precision tracking system and method - Google Patents
PID algorithm-based ball machine high-precision tracking system and method Download PDFInfo
- Publication number
- CN111757011A CN111757011A CN202010676555.3A CN202010676555A CN111757011A CN 111757011 A CN111757011 A CN 111757011A CN 202010676555 A CN202010676555 A CN 202010676555A CN 111757011 A CN111757011 A CN 111757011A
- Authority
- CN
- China
- Prior art keywords
- unit
- camera
- dome camera
- offset
- moving target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000004891 communication Methods 0.000 claims description 31
- 238000000605 extraction Methods 0.000 claims description 9
- 230000001186 cumulative effect Effects 0.000 claims description 7
- 238000001514 detection method Methods 0.000 claims description 6
- 230000011218 segmentation Effects 0.000 claims description 6
- 238000013527 convolutional neural network Methods 0.000 claims description 5
- 239000000284 extract Substances 0.000 claims description 4
- 238000012545 processing Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 12
- 238000012549 training Methods 0.000 description 7
- 241001465754 Metazoa Species 0.000 description 6
- 238000013135 deep learning Methods 0.000 description 5
- 238000009825 accumulation Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000012827 research and development Methods 0.000 description 3
- 238000013136 deep learning model Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/69—Control of means for changing angle of the field of view, e.g. optical zoom objectives or electronic zooming
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B11/00—Automatic controllers
- G05B11/01—Automatic controllers electric
- G05B11/36—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
- G05B11/42—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Studio Devices (AREA)
- Closed-Circuit Television Systems (AREA)
Abstract
The invention relates to a high-precision ball machine tracking system and method based on a PID algorithm, wherein the system comprises: the system comprises a dome camera, an algorithm server and a logic control server; the method comprises the following steps: the algorithm server intelligently analyzes real-time video data acquired by the camera of the dome camera and provides identification result information and auxiliary information of a moving target; the logic control server adjusts proportion, integral, differential and proportion according to the moving target identification result information and the auxiliary information, and sends a control instruction to the camera of the dome camera according to the adjustment result; and the camera of the dome camera controls the camera to rotate and/or focus according to the control instruction, so that the high-precision tracking of the moving target is realized. The high-precision tracking system and method for the dome camera based on the PID algorithm, provided by the invention, realize the precise control of the rotating speed of the dome camera based on the PID algorithm, thereby realizing the high-precision stable tracking of the dome camera on the moving target.
Description
Technical Field
The invention relates to the field of camera application, in particular to a high-precision tracking system and method of a dome camera based on a PID algorithm.
Background
In the field of camera application, tracking of a moving object by a dome camera is always a technical problem, and under the traditional technical means, tracking of the moving object by the dome camera is realized either based on the performance of the dome camera or based on the identification of a machine vision algorithm on the object, the PTZ function of the dome camera is started, and tracking of the moving object is realized. When the moving speed of the moving object is suddenly high or slow, the problem that the moving object is blocked or easily separated from the video of the ball machine exists.
Disclosure of Invention
In view of the defects of the implementation mode of the prior art, the invention provides a high-precision tracking system and method of a ball machine based on a PID algorithm, which realize the precise control of the rotating speed of the ball machine based on the PID algorithm, thereby realizing the high-precision and stable tracking of the ball machine on a moving target.
The technical scheme provided by the invention is as follows:
a ball machine high-precision tracking system based on a PID algorithm, wherein the system comprises:
the camera of the ball machine is used for acquiring real-time video data and tracking a moving target; the camera of the dome camera is a camera which can rotate up and down, left and right and adjust the focal length according to a control instruction; the moving object refers to a moving object in a real-time video shot by a camera.
The algorithm server is used for identifying the moving target and providing identification result information and auxiliary information; the machine vision algorithm for the identification of the moving object is based on a deep convolutional neural network; the identification result information refers to identification result information of the moving target; the auxiliary information refers to the relevant information of the camera of the dome camera.
The logic control server is used for adjusting proportion, integral, differential and proportion based on the identification result information and the auxiliary information of the algorithm server and sending a control instruction to the camera of the dome camera according to an adjustment result; the proportion, the integral and the differential are adjusted, so that a camera of the dome camera can stably track a moving target; the ratio can be adjusted to ensure that the moving target accounts for a specific ratio in the camera video of the dome camera.
Further, the high-precision tracking system of the dome camera based on the PID algorithm, wherein the dome camera specifically includes:
and the video acquisition unit is used for acquiring real-time video data.
And the PTZ control unit is used for controlling the rotation of the motor and the zooming of the focal length.
And the motor unit is used for rotating up, down, left and right to drive the video acquisition unit to rotate to different positions to acquire real-time video data.
And the focusing unit is used for adjusting the focal length of the lens of the video acquisition unit.
And the communication unit is used for transmitting the real-time video data and the control instruction.
Further, the high-precision tracking system of the dome camera based on the PID algorithm, wherein the algorithm server specifically includes:
and the streaming media service unit is used for receiving and processing the real-time video data.
And the image extraction unit is used for extracting the image data from the real-time video data.
And the object identification unit is used for carrying out object detection and segmentation on the image data and outputting identification result information and auxiliary information.
The machine vision algorithm of the object recognition unit is based on a deep convolutional neural network.
And the communication unit is used for receiving the real-time video data and sending the identification result information and the auxiliary information.
Further, the high-precision ball machine tracking system based on the PID algorithm, wherein the logic control server specifically includes:
and the communication unit is used for receiving the identification result information and the auxiliary information and sending a PTZ control command to the camera of the dome camera.
And the position deviation information unit is used for calculating and obtaining the deviation offset of the center position of the moving target and the center position of the dome camera according to the identification result information and the auxiliary information.
And the frame difference information unit is used for calculating a numerical value dif _ offset obtained by subtracting the deviation between the center position of the moving target in the last frame and the center position of the dome camera from the deviation between the center position of the moving target in the latest frame and the center position of the dome camera according to the identification result information and the auxiliary information.
And the offset accumulated information unit is used for calculating the accumulated sum _ offset of all the deviations of the center position of the moving target and the center position of the ball machine.
And a deviation resetting unit for resetting the offset, dif _ offset and sum _ offset to 0 when the deviation offset of the moving target center position and the ball machine center position is within a certain threshold range.
And the proportion adjusting unit is used for multiplying the offset by a proportion coefficient P.
And the integral adjusting unit is used for multiplying the sum _ offset by an integral coefficient I.
A differential adjustment unit for multiplying the dif _ offset by a differential coefficient D.
And the proportion adjusting unit is used for calculating the proportion of the moving target in the video of the dome camera according to the identification result information and the auxiliary information.
And the PTZ control unit is used for adjusting the PT control parameter according to the numerical values provided by the proportion adjusting unit, the integral adjusting unit and the differential adjusting unit and adjusting the Z control parameter according to the numerical value provided by the ratio adjusting unit.
Further, the invention also discloses a high-precision ball machine tracking method based on the PID algorithm, wherein the method comprises the following steps:
the algorithm server carries out intelligent analysis on the real-time video data collected by the camera of the dome camera and provides identification result information and auxiliary information of the moving target.
And the logic control server adjusts the proportion, the integral, the differential and the ratio according to the moving target identification result information and the auxiliary information, and sends a control instruction to the camera of the dome camera according to the adjustment result.
And the camera of the dome camera controls the camera to rotate and/or focus according to the control instruction, so that the high-precision tracking of the moving target is realized.
Further, the high-precision tracking method for the dome camera based on the PID algorithm, wherein the algorithm server intelligently analyzes real-time video data collected by the camera of the dome camera and provides identification result information and auxiliary information of a moving target, specifically comprising:
and the communication unit of the algorithm server receives real-time video data of the camera of the dome camera.
And the streaming media service unit of the algorithm server analyzes and processes the acquired real-time video data based on a streaming media protocol.
The image extraction unit of the algorithm server extracts image data from real-time video data.
And the object identification unit of the algorithm server performs object detection and segmentation on the image data and outputs identification result information and auxiliary information.
And the communication unit of the algorithm server sends the identification result information and the auxiliary information to the logic control server.
Further, the method for tracking a dome camera with high precision based on a PID algorithm, wherein the logic control server adjusts the proportion, the integral, the differential and the proportion according to the moving target identification result information and the auxiliary information, and sends a control instruction to the dome camera according to the adjustment result, specifically includes:
the communication unit of the logic control server receives identification result information and auxiliary information from the algorithm server.
And the position deviation information unit of the logic control server calculates the deviation offset of the center position of the moving target and the center position of the dome camera according to the identification result information and the auxiliary information.
And the frame difference information unit of the logic control server calculates a numerical value dif _ offset obtained by subtracting the deviation between the center position of the moving target in the last frame and the center position of the dome camera from the deviation between the center position of the moving target in the latest frame and the center position of the dome camera according to the identification result information and the auxiliary information.
The offset cumulative information unit of the logic control server calculates cumulative sum _ offset of all deviations between the moving target center position and the ball machine center position.
The offset resetting unit of the logic control server resets the offset, dif _ offset, and sum _ offset to 0 when the offset of the moving target center position and the ball machine center position is within a certain threshold range.
The scaling unit of the logic control server is configured to multiply the offset by a scaling factor P.
The integral adjustment unit of the logic control server multiplies the sum _ offset by an integral coefficient I.
The logic control server's differential adjustment unit multiplies the dif _ offset by a differential coefficient D.
And the proportion adjusting unit of the logic control server calculates the proportion of the moving target in the video of the dome camera according to the identification result information and the auxiliary information.
And the PTZ control unit of the logic control server adjusts the PT control parameters according to the numerical values provided by the proportion adjusting unit, the integral adjusting unit and the differential adjusting unit, and adjusts the Z control parameters according to the numerical values provided by the ratio adjusting unit.
And the communication unit of the logic control server sends a PTZ control instruction to the camera of the dome camera.
Further, the high-precision tracking method for the dome camera based on the PID algorithm, wherein the camera of the dome camera controls the camera to rotate and/or focus according to the control command, so as to realize high-precision tracking of the moving target, specifically includes:
and the communication unit of the dome camera receives the PTZ control instruction sent by the logic control server.
And the PTZ control unit of the camera of the dome camera controls the rotation of the motor and the zooming of the focal length according to the PTZ control instruction.
The motor unit of the dome camera rotates the motor up and down, left and right according to the PT control instruction of the PTZ control unit so as to drive the video acquisition unit to rotate to different positions to acquire real-time video data.
And the focusing unit of the camera of the dome camera adjusts the focal length of the lens of the video acquisition unit according to the Z control instruction of the PTZ control unit.
The invention provides a high-precision tracking system and method of a dome camera based on a PID algorithm, which realize the precise control of the rotating speed of the dome camera based on the PID algorithm, thereby realizing the high-precision stable tracking of the dome camera on a moving target.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments are briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a system architecture diagram of a high-precision ball machine tracking system based on a PID algorithm according to the present invention.
FIG. 2 is a diagram of functional modules of a camera of a ball machine in a system architecture of a high-precision tracking system of a ball machine based on a PID algorithm.
FIG. 3 is a functional module structure diagram of an algorithm server in the system architecture of the PID algorithm-based high-precision tracking system of the present invention.
Fig. 4 is a functional module structure diagram of a logic control server in the system architecture of the high-precision ball machine tracking system based on the PID algorithm.
FIG. 5 is a flowchart of an embodiment of the present invention for a high-precision tracking method of a ball machine based on PID algorithm.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is described in further detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a system architecture diagram of a high-precision ball machine tracking system based on a PID algorithm, which is shown in figure 1. The method specifically comprises the following steps:
the system comprises a dome camera 100, an algorithm server 200 and a logic control server 300.
The dome camera 100 is used for acquiring real-time video data and tracking a moving target; the camera of the dome camera is a camera which can rotate up and down, left and right and adjust the focal length according to a control instruction; the camera of the ball machine rotates up, down, left and right and the focal length is adjusted to track the moving target in real time; the moving target refers to a moving target in a real-time video shot by a camera; the moving objects include, but are not limited to: personnel, vehicles, animals, aircraft, boats.
The algorithm server 200 is used for identifying the moving target and providing identification result information and auxiliary information; the machine vision algorithm for the identification of the moving object is based on a deep convolutional neural network; the identification of the moving target needs to carry out deep learning model training based on the actual moving target; the identification result information refers to identification result information of the moving object, and includes but is not limited to: type and position information of the moving target; the auxiliary information refers to the relevant information of the camera of the dome camera, and specifically is the video pixel information of the camera.
The logic control server 300 adjusts the proportion, the integral, the differential and the proportion based on the identification result information and the auxiliary information of the algorithm server, and sends a control instruction to the camera of the dome camera according to the adjustment result; the proportion, the integral and the differential are adjusted, so that a camera of the dome camera can stably track a moving target; the ratio can be adjusted to ensure that the moving target accounts for a specific ratio in the camera video of the dome camera.
More specifically, the invention provides a functional module diagram of a ball machine camera in a system architecture of a high-precision tracking system of a ball machine based on a PID algorithm, as shown in fig. 2. The method specifically comprises the following steps:
the device comprises a video acquisition unit 101, a PTZ control unit 102, a motor unit 103, a focusing unit 104 and a communication unit 105.
The video acquisition unit 101 of the dome camera 100 is configured to acquire real-time video data; the video acquisition unit encodes the acquired real-time video data; the encoding includes but is not limited to: h.264, h.265, SVAC; the real-time video generally comprises a moving object; the moving objects include, but are not limited to: personnel, vehicles, animals, aircraft, boats.
The PTZ control unit 102 of the dome camera 100 is configured to control rotation of a motor and zooming of a focal length; the rotation of the motor comprises up-down rotation and left-right rotation; the up-down rotation and the left-right rotation respectively use different motors; the scaling of the focal length refers to scaling of the focal length of the video capture unit 101.
The motor unit 103 of the dome camera 100 is configured to rotate up and down, left and right to drive the video acquisition unit 101 to rotate to different positions to acquire real-time video data; the motor units 103 comprise two, one for rotating up and down and one for rotating left and right; the up-and-down rotating motor unit 103 drives the video acquisition unit 101 to rotate up and down; the left-right rotating motor unit 103 rotates left and right of the video acquisition unit 101; the video acquisition unit 101 rotates up, down, left and right, and can acquire real-time video data at different positions.
The focusing unit 104 of the dome camera 100 is configured to adjust a focal length of a lens of the video capturing unit 101; the adjustment of the focal length is divided into zooming-in and zooming-out; when the moving target is far away from the video acquisition unit 101, the focal length is adjusted to be enlarged so that the moving target can be conveniently presented in a certain proportion in the video of the dome camera; when the moving target is closer to the video acquisition unit 101, the focal length is adjusted to be reduced, so that the moving target can be conveniently presented in a certain proportion in the video of the dome camera; the proportion of the moving target in the video of the dome camera can be adjusted according to actual conditions, and is generally recommended to be 1/5-1/4.
The communication unit 105 of the dome camera 100 is configured to transmit real-time video data and a control instruction; the transmission of the real-time video data is based on the ONVIF protocol and/or the GB28181 protocol which are the standard protocols commonly used in the camera industry; the control instruction refers to a PTZ control instruction sent by the logic control server.
More specifically, the invention provides a structure diagram of an algorithm server functional module in a system architecture of a high-precision tracking system of a ball machine based on a PID algorithm, as shown in fig. 3. The method specifically comprises the following steps:
streaming media service section 201, image extraction section 202, object identification section 203, and communication section 204.
The streaming media service unit 201 of the algorithm server 200 receives and processes real-time video data; the streaming media service unit 201 receives and processes the real-time video data based on the ONVIF protocol and/or the GB28181 protocol, which are standard protocols commonly used in the camera industry, and more specifically, based on the streaming media protocol RTSP/RTP, realizes the receiving and processing of the real-time video data; the encoding format of the received real-time video data includes but is not limited to: h.264, H.265, SVAC.
The image extraction unit 202 of the algorithm server 200 extracts image data from real-time video data; the image extraction unit 202 obtains a picture from the real-time video data with the encoding format of h.264, h.265 or SVAC; the process of acquiring the picture is actually a process of decoding and then encoding the real-time video data; the frequency of the acquired picture data is related to the frame rate of the real-time video; the frame rate of the real-time video includes but is not limited to: 25 frames/second, 30 frames/second, 50 frames/second, 60 frames/second; the frame rate refers to the number of picture frames contained per second.
The object recognition unit 203 of the algorithm server 200 is configured to perform object detection and segmentation on the image data, and output recognition result information and auxiliary information; the machine vision algorithm of the object recognition unit 203 for the recognition of the moving target is based on a deep convolutional neural network; the identification of the moving target needs to carry out deep learning model training based on the actual moving target; the moving objects include, but are not limited to: personnel, vehicles, animals, airplanes, boats; the object recognition unit 203 is used for performing model training of deep learning aiming at the recognition of the personnel when the personnel are recognized; the object recognition unit 203 is used for performing model training of deep learning aiming at vehicle recognition when a vehicle is recognized; the object recognition unit 203 is used for performing model training of deep learning aiming at specific animal recognition when the specific animal is recognized; the object recognition unit 203 is used for performing model training of deep learning aiming at airplane recognition when the airplane is recognized; the object recognition unit 203 is used for carrying out model training of deep learning aiming at ship recognition when a person carries out ship; the identification result information refers to identification result information of the moving object, and includes but is not limited to: type and position information of the moving target; the type of the moving object includes but is not limited to: personnel, vehicles, animals, airplanes, boats; the position information refers to position information of a target identification frame in a video of the dome camera, and specifically comprises the following steps: the method comprises the steps that the coordinates of pixel points at the upper left corner of an identification frame, the coordinates of pixel points at the upper right corner of the identification frame, the coordinates of pixel points at the lower left corner of the identification frame, the coordinates of pixel points at the lower right corner of the identification frame and the coordinates of pixel points at the center point of the identification frame are determined; the pixel point coordinates are represented by an abscissa X and an ordinate Y; the pixel point coordinate unit is a pixel; the auxiliary information refers to the relevant information of a camera of the dome camera, and specifically is the video pixel information of the camera; the camera video pixel information refers to the number of pixels contained in the abscissa and the number of pixels contained in the ordinate of the camera video.
The communication unit 204 of the algorithm server 200 is configured to receive real-time video data and send identification result information and auxiliary information; the communication unit 204 communicates with the dome camera 100 and the logic control server 300 through RJ45 and/or WiFi; the identification result information refers to identification result information of the moving target; the identification result information includes, but is not limited to: type and position information of the moving target; the auxiliary information refers to video pixel information of a camera; the camera video pixel information refers to the number of pixels contained in the abscissa and the number of pixels contained in the ordinate of the camera video.
More specifically, the present invention provides a functional module structure diagram of a logic control server in a system architecture of a high-precision tracking system of a ball machine based on a PID algorithm, as shown in fig. 4. The method specifically comprises the following steps:
a communication unit 301, a positional deviation information unit 302, a frame difference information unit 303, an offset amount accumulation information unit 304, a deviation resetting unit 305, a proportion adjustment unit 306, an integral adjustment unit 307, a differential adjustment unit 308, a proportion adjustment unit 309, and a PTZ control unit 310.
The communication unit 301 of the logic control server 300 is configured to receive the identification result information and the auxiliary information, and send a PTZ control instruction to a camera of the dome camera; the identification result information and the auxiliary information are provided by the algorithm server 200; the identification result information and the auxiliary information are already described in detail in the structural diagram part of the functional module of the algorithm server in the system architecture of the high-precision tracking system of the dome camera based on the PID algorithm in FIG. 3, and are not described again here; the PTZ control instruction is used for controlling the up-down and left-right rotation of the dome camera and the adjustment of the focal length; the PTZ control instruction meets the requirements of a universal standard protocol ONVIF protocol and/or a GB28181 protocol of the camera industry.
The position deviation information unit 302 of the logic control server 300 calculates a deviation offset between the center position of the moving target and the center position of the dome camera according to the identification result information and the auxiliary information; the moving target center position is uniquely identified by the pixel point coordinate of the center point of the identification frame center identification frame in the identification result; the center position of the dome camera is uniquely identified by the pixel point coordinates of the video center point of the dome camera; the deviation offset specifically refers to the distance between the pixel point coordinate of the center position of the moving target and the pixel point coordinate of the center position of the dome camera.
The frame difference information unit 303 of the logic control server 300 calculates, according to the identification result information and the auxiliary information, a value dif _ offset obtained by subtracting a deviation between the center position of the moving target in the last frame and the center position of the ball machine from a deviation between the center position of the moving target in the last frame and the center position of the ball machine; more specifically, the value dif _ offset is obtained by subtracting the distance between the pixel coordinate of the center position of the moving target in the previous frame and the pixel coordinate of the center position of the dome camera from the distance between the pixel coordinate of the center position of the moving target in the latest frame and the pixel coordinate of the center position of the dome camera.
The offset cumulative information unit 304 of the logic control server 300 is configured to calculate cumulative sum _ offset of all deviations between the moving target center position and the ball machine center position; more specifically, the cumulative sum _ offset of all the deviations is obtained by cumulatively adding the distance between the pixel coordinate of the center position of the moving target in each frame and the pixel coordinate of the center position of the dome camera.
The offset resetting unit 305 of the logic control server 300 is configured to reset the offset, dif _ offset, and sum _ offset to 0 when the offset between the target center position of the movement and the center position of the ball machine is within a certain threshold range; when the difference between the pixel point coordinates of the center position of the moving target and the pixel point coordinates of the center position of the dome camera is within a certain threshold range, the offset resetting unit 305 resets the offset, the dif _ offset, and the sum _ offset to 0; the threshold range is typically a few pixels.
The scaling unit 306 of the logic control server 300, configured to multiply the offset by a scaling factor P; the proportionality coefficient P is obtained according to research and development design experience values, and is different according to application scenes of different moving targets.
The integral adjustment unit 307 of the logic control server 300, configured to multiply the sum _ offset by an integral coefficient I; the integral coefficient I is obtained according to research and development design empirical values, and is different according to application scenes of different moving targets.
The differential adjustment unit 308 of the logic control server 300, configured to multiply the dif _ offset by a differential coefficient D; the differential coefficient D is obtained according to research and development design empirical values, and is different according to application scenes of different moving targets.
The proportion adjusting unit 309 of the logic control server 300 is configured to calculate, according to the identification result information and the auxiliary information, a proportion of the moving object in the video of the dome camera; more specifically, the occupation ratio is the proportion of the area of the identification frame of the moving target in the video area of the dome camera; the area of the identification frame of the moving target is obtained by multiplying the distance between the coordinate of the pixel point at the upper left corner of the identification frame and the coordinate of the pixel point at the upper right corner of the identification frame in the identification result information by the distance between the coordinate of the pixel point at the upper left corner of the identification frame and the coordinate of the pixel point at the lower left corner of the identification frame; the video area of the dome camera is obtained by multiplying the length of the abscissa of the video picture of the dome camera by the width of the ordinate.
The PTZ control unit 310 of the logic control server 300 is configured to adjust the PT control parameter according to the values provided by the proportional adjustment unit, the integral adjustment unit, and the derivative adjustment unit, and adjust the Z control parameter according to the values provided by the ratio adjustment unit.
The PT control parameter V = P × offset + I × sum _ offset + D × dif _ offset; and the PT control parameters are used for providing up-down and left-right rotation instructions of the dome camera and rotation speed information of the dome camera.
The Z control parameter controls the focal length zooming of the video acquisition unit 101 of the dome camera 100; zooming in the focal length when the ratio is less than the optimal ratio of the moving object to present in the dome camera video (typically 1/5 to 1, 4); when the ratio is greater than the optimal ratio for the moving object to present in the dome camera video (typically 1/5 to 1/4), the focal length is reduced.
More specifically, the present invention provides a flow chart of an embodiment of a high-precision tracking method for a ball machine based on a PID algorithm, as shown in fig. 5. The method specifically comprises the following steps:
step S100: the algorithm server 200 intelligently analyzes real-time video data collected by the dome camera 100 and provides identification result information and auxiliary information of a moving target.
The communication unit 204 of the algorithm server 200 receives real-time video data of the dome camera 100.
The streaming media service unit 201 of the algorithm server 200 analyzes and processes the acquired real-time video data based on a streaming media protocol.
The image extraction unit 202 of the algorithm server 200 extracts image data from real-time video data.
The object recognition unit 203 of the algorithm server 200 performs object detection and segmentation on image data, and outputs recognition result information and auxiliary information.
The communication unit 204 of the algorithm server 200 transmits the identification result information and the auxiliary information to the logic control server.
The streaming media service unit 201, the image extraction unit 202, the object identification unit 203, and the communication unit 204 of the algorithm server 200 are already described in detail in the structure diagram of the functional module of the algorithm server in the system architecture of the PID algorithm-based ball machine high-precision tracking system in fig. 3, and are not described herein again.
Step S200: and the logic control server adjusts the proportion, the integral, the differential and the ratio according to the moving target identification result information and the auxiliary information, and sends a control instruction to the camera of the dome camera according to the adjustment result.
The communication unit 301 of the logic control server 300 receives identification result information and auxiliary information from the algorithm server.
The position deviation information unit 302 of the logic control server 300 calculates a deviation offset between the center position of the moving target and the center position of the ball machine according to the identification result information and the auxiliary information.
The frame difference information unit 303 of the logic control server 300 calculates, according to the identification result information and the auxiliary information, a value dif _ offset obtained by subtracting the deviation between the center position of the moving target in the last frame and the center position of the ball machine from the deviation between the center position of the moving target in the last frame and the center position of the ball machine.
The offset amount accumulation information unit 304 of the logic control server 300 calculates an accumulated sum _ offset of all deviations between the movement target center position and the ball machine center position.
The offset resetting unit 305 of the logic control server 300 resets the offset, dif _ offset, and sum _ offset to 0 when the offset between the movement target center position and the ball machine center position is within a certain threshold range.
The scaling unit 306 of the logic control server 300 is configured to multiply the offset by a scaling factor P.
The integral adjustment unit 307 of the logic control server 300 multiplies the sum _ offset by an integral coefficient I.
The differential adjustment unit 308 of the logic control server 300 multiplies the dif _ offset by a differential coefficient D.
The proportion adjusting unit 309 of the logic control server 300 calculates the proportion of the moving object in the video of the dome camera according to the identification result information and the auxiliary information.
The PTZ control unit 310 of the logic control server 300 adjusts the PT control parameter according to the values provided by the proportional adjustment unit, the integral adjustment unit, and the derivative adjustment unit, and adjusts the Z control parameter according to the values provided by the ratio adjustment unit.
The communication unit 301 of the logic control server 300 sends a PTZ control instruction to the camera of the dome camera.
The communication unit 301, the position deviation information unit 302, the frame difference information unit 303, the offset accumulation information unit 304, the deviation resetting unit 305, the proportion adjusting unit 306, the integral adjusting unit 307, the differential adjusting unit 308, the proportion adjusting unit 309, and the PTZ control unit 310 of the logic control server 300 are already described in detail in the functional module structure diagram of the logic control server in the system architecture of the PID algorithm-based ball machine high-precision tracking system in fig. 4, and are not described herein again.
Step S300: and the camera of the dome camera controls the camera to rotate and/or focus according to the control instruction, so that the high-precision tracking of the moving target is realized.
The communication unit 105 of the dome camera 100 receives the PTZ control instruction transmitted from the logic control server 300.
The PTZ control unit 102 of the dome camera 100 controls the rotation of the motor and the zooming of the focal length according to the PTZ control command.
The motor unit 103 of the dome camera 100 rotates the motor up and down, left and right according to the PT control instruction of the PTZ control unit to drive the video acquisition unit to rotate to different positions to acquire real-time video data.
The focusing unit 104 of the dome camera 100 adjusts the focal length of the lens of the video capturing unit according to the Z control instruction of the PTZ control unit.
The video acquisition unit 101, the PTZ control unit 102, the motor unit 103, the focusing unit 104, and the communication unit 105 of the camera 100 of the dome camera are described in detail in the structure diagram of the functional module of the camera in the system architecture of the high-precision tracking system of the dome camera based on the PID algorithm in fig. 2, and are not described herein again.
The invention provides a high-precision tracking system and method of a dome camera based on a PID algorithm, which realize the precise control of the rotating speed of the dome camera based on the PID algorithm, thereby realizing the high-precision stable tracking of the dome camera on a moving target.
It should be understood that the invention is not limited to the embodiments described above, but that modifications and variations can be made by one skilled in the art in light of the above teachings, and all such modifications and variations are intended to be included within the scope of the invention as defined in the following claims.
Claims (8)
1. A ball machine high accuracy tracking system based on PID algorithm, characterized in that, the system includes:
the camera of the ball machine is used for acquiring real-time video data and tracking a moving target;
the algorithm server is used for identifying the moving target and providing identification result information and auxiliary information;
and the logic control server is used for adjusting proportion, integral, differential and ratio based on the identification result information and the auxiliary information of the algorithm server and sending a control instruction to the camera of the dome camera according to an adjustment result.
2. The high-precision tracking system of the ball machine based on the PID algorithm as claimed in claim 1, wherein the camera of the ball machine specifically comprises:
the video acquisition unit is used for acquiring real-time video data;
the PTZ control unit is used for controlling the rotation of the motor and the zooming of the focal length;
the motor unit is used for rotating up, down, left and right to drive the video acquisition unit to rotate to different positions to acquire real-time video data;
the focusing unit is used for adjusting the focal length of the lens of the video acquisition unit;
and the communication unit is used for transmitting the real-time video data and the control instruction.
3. The PID algorithm-based ball machine high-precision tracking system according to claim 1, wherein the algorithm server specifically includes:
the streaming media service unit is used for receiving and processing real-time video data;
an image extraction unit for extracting image data from the real-time video data;
an object recognition unit for performing object detection and segmentation on the image data and outputting recognition result information and auxiliary information;
the machine vision algorithm of the object recognition unit is based on a deep convolutional neural network;
and the communication unit is used for receiving the real-time video data and sending the identification result information and the auxiliary information.
4. The PID algorithm-based ball machine high-precision tracking system according to claim 1, wherein the logic control server specifically includes:
the communication unit is used for receiving the identification result information and the auxiliary information and sending a PTZ control instruction to the camera of the dome camera;
the position deviation information unit is used for calculating and obtaining the deviation offset of the center position of the moving target and the center position of the dome camera according to the identification result information and the auxiliary information;
the frame difference information unit is used for calculating to obtain a numerical value dif _ offset obtained by subtracting the deviation between the center position of the moving target in the last frame and the center position of the dome camera from the deviation between the center position of the moving target in the latest frame and the center position of the dome camera according to the identification result information and the auxiliary information;
the offset accumulated information unit is used for calculating the accumulated sum _ offset of all the deviations of the center position of the moving target and the center position of the dome camera;
a deviation resetting unit, which is used for resetting the offset, dif _ offset and sum _ offset to 0 when the deviation offset of the center position of the moving target and the center position of the ball machine is within a certain threshold value range;
a scaling unit for multiplying the offset by a scaling factor P;
an integral adjustment unit for multiplying the sum _ offset by an integral coefficient I;
a differential adjustment unit for multiplying the dif _ offset by a differential coefficient D;
the proportion adjusting unit is used for calculating the proportion of the moving target in the video of the dome camera according to the identification result information and the auxiliary information;
and the PTZ control unit is used for adjusting the PT control parameter according to the numerical values provided by the proportion adjusting unit, the integral adjusting unit and the differential adjusting unit and adjusting the Z control parameter according to the numerical value provided by the ratio adjusting unit.
5. A high-precision ball machine tracking method based on a PID algorithm is characterized by comprising the following steps:
the algorithm server intelligently analyzes real-time video data acquired by the camera of the dome camera and provides identification result information and auxiliary information of a moving target;
the logic control server adjusts proportion, integral, differential and proportion according to the moving target identification result information and the auxiliary information, and sends a control instruction to the camera of the dome camera according to the adjustment result;
and the camera of the dome camera controls the camera to rotate and/or focus according to the control instruction, so that the high-precision tracking of the moving target is realized.
6. The PID algorithm-based high-precision tracking method for a ball machine according to claim 5, wherein the algorithm server intelligently analyzes real-time video data collected by the camera of the ball machine and provides identification result information and auxiliary information of a moving target, specifically comprising:
the communication unit of the algorithm server receives real-time video data of the camera of the dome camera;
the streaming media service unit of the algorithm server analyzes and processes the acquired real-time video data based on a streaming media protocol;
the image extraction unit of the algorithm server extracts image data from real-time video data;
the object identification unit of the algorithm server performs object detection and segmentation on the image data and outputs identification result information and auxiliary information;
and the communication unit of the algorithm server sends the identification result information and the auxiliary information to the logic control server.
7. The PID algorithm-based high-precision tracking method for a dome camera according to claim 5, wherein the logic control server adjusts the ratio, the integral, the differential and the proportion according to the moving target recognition result information and the auxiliary information, and sends a control command to the dome camera according to the adjustment result, specifically comprising:
the communication unit of the logic control server receives identification result information and auxiliary information from the algorithm server;
the position deviation information unit of the logic control server calculates the deviation offset of the center position of the moving target and the center position of the dome camera according to the identification result information and the auxiliary information;
the frame difference information unit of the logic control server calculates a numerical value dif _ offset obtained by subtracting the deviation between the center position of the moving target in the last frame and the center position of the dome camera from the deviation between the center position of the moving target in the latest frame and the center position of the dome camera according to the identification result information and the auxiliary information;
the offset cumulative information unit of the logic control server calculates cumulative sum _ offset of all deviations of the center position of the moving target and the center position of the dome camera;
the deviation resetting unit of the logic control server resets the offset, dif _ offset, and sum _ offset to 0 when the deviation offset of the moving target center position and the ball machine center position is within a certain threshold range;
the scaling unit of the logic control server for multiplying the offset by a scaling factor P;
the integral adjustment unit of the logic control server multiplies the sum _ offset by an integral coefficient I;
the differential adjustment unit of the logic control server multiplying the dif _ offset by a differential coefficient D;
the proportion adjusting unit of the logic control server calculates the proportion of the moving target in the video of the dome camera according to the identification result information and the auxiliary information;
the PTZ control unit of the logic control server adjusts the PT control parameters according to the numerical values provided by the proportion adjusting unit, the integral adjusting unit and the differential adjusting unit and adjusts the Z control parameters according to the numerical values provided by the ratio adjusting unit;
and the communication unit of the logic control server sends a PTZ control instruction to the camera of the dome camera.
8. The PID algorithm-based high-precision tracking method for a dome camera according to claim 5, wherein the dome camera controls the camera to rotate and/or focus according to the control command, so as to realize high-precision tracking of the moving target, specifically comprising:
the communication unit of the dome camera receives a PTZ control instruction sent by the logic control server;
the PTZ control unit of the dome camera controls the rotation of a motor and the zooming of a focal length according to the PTZ control instruction;
the motor unit of the camera of the dome camera rotates a motor up, down, left and right according to a PT control instruction of the PTZ control unit so as to drive the video acquisition unit to rotate to different positions to acquire real-time video data;
and the focusing unit of the camera of the dome camera adjusts the focal length of the lens of the video acquisition unit according to the Z control instruction of the PTZ control unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010676555.3A CN111757011A (en) | 2020-07-14 | 2020-07-14 | PID algorithm-based ball machine high-precision tracking system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010676555.3A CN111757011A (en) | 2020-07-14 | 2020-07-14 | PID algorithm-based ball machine high-precision tracking system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111757011A true CN111757011A (en) | 2020-10-09 |
Family
ID=72710550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010676555.3A Pending CN111757011A (en) | 2020-07-14 | 2020-07-14 | PID algorithm-based ball machine high-precision tracking system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111757011A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115348385A (en) * | 2022-07-06 | 2022-11-15 | 深圳天海宸光科技有限公司 | Gun-ball linkage football detection method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107016367A (en) * | 2017-04-06 | 2017-08-04 | 北京精英智通科技股份有限公司 | A kind of tracking and controlling method and tracking control system |
CN107807664A (en) * | 2017-11-29 | 2018-03-16 | 天津聚飞创新科技有限公司 | Method for tracking target, device and unmanned plane |
CN108304001A (en) * | 2018-02-09 | 2018-07-20 | 成都新舟锐视科技有限公司 | A kind of Face datection tracking, ball machine head rotation control method and ball machine |
CN111340857A (en) * | 2020-02-20 | 2020-06-26 | 浙江大华技术股份有限公司 | Camera tracking control method and device |
-
2020
- 2020-07-14 CN CN202010676555.3A patent/CN111757011A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107016367A (en) * | 2017-04-06 | 2017-08-04 | 北京精英智通科技股份有限公司 | A kind of tracking and controlling method and tracking control system |
CN107807664A (en) * | 2017-11-29 | 2018-03-16 | 天津聚飞创新科技有限公司 | Method for tracking target, device and unmanned plane |
CN108304001A (en) * | 2018-02-09 | 2018-07-20 | 成都新舟锐视科技有限公司 | A kind of Face datection tracking, ball machine head rotation control method and ball machine |
CN111340857A (en) * | 2020-02-20 | 2020-06-26 | 浙江大华技术股份有限公司 | Camera tracking control method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115348385A (en) * | 2022-07-06 | 2022-11-15 | 深圳天海宸光科技有限公司 | Gun-ball linkage football detection method and system |
CN115348385B (en) * | 2022-07-06 | 2024-03-01 | 深圳天海宸光科技有限公司 | Football detection method and system with gun-ball linkage |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112164015B (en) | Monocular vision autonomous inspection image acquisition method and device and power inspection unmanned aerial vehicle | |
CN110764537B (en) | Automatic tripod head locking system and method based on motion estimation and visual tracking | |
CN108363946B (en) | Face tracking system and method based on unmanned aerial vehicle | |
EP3488603B1 (en) | Methods and systems for processing an image | |
WO2020107372A1 (en) | Control method and apparatus for photographing device, and device and storage medium | |
CN109934108B (en) | Multi-target and multi-type vehicle detection and distance measurement system and implementation method | |
JP2019526950A (en) | Multi-sensor image stabilization technology | |
CN105676880A (en) | Control method and system of holder camera device | |
CN108549413A (en) | A kind of holder method of controlling rotation, device and unmanned vehicle | |
CN111708042B (en) | Robot method and system for predicting and following pedestrian track | |
CN110009675B (en) | Method, apparatus, medium, and device for generating disparity map | |
CN109299656B (en) | Scene depth determination method for vehicle-mounted vision system | |
CN112207821B (en) | Target searching method of visual robot and robot | |
CN105096346B (en) | A kind of moving target shooting processing system of stabilization | |
CN103544714A (en) | Visual tracking system and method based on high-speed image sensor | |
CN114556879A (en) | Time delay detection method, device, system, movable platform and storage medium | |
CN110708461B (en) | Camera focusing and zooming method suitable for unmanned mobile carrier | |
CN111757011A (en) | PID algorithm-based ball machine high-precision tracking system and method | |
CN114199235B (en) | Positioning system and positioning method based on sector depth camera | |
CN117197695B (en) | Unmanned aerial vehicle holder camera target identification tracking method and system based on artificial intelligence | |
CN117572885B (en) | Night tracking method, system and related device based on thermal infrared camera of unmanned aerial vehicle | |
CN108347577B (en) | Imaging system and method | |
WO2022151473A1 (en) | Photographing control method, photographing control apparatus and gimbal assembly | |
CN113743286A (en) | Target monitoring system and method for multi-source signal fusion | |
CN111526283B (en) | Method and system for acquiring upper limit threshold of exposure time of aerial camera |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20201009 |
|
WD01 | Invention patent application deemed withdrawn after publication |