CN103631698A - Camera PTZ (pan/tilt/zoom) control method and device for target tracking - Google Patents

Camera PTZ (pan/tilt/zoom) control method and device for target tracking Download PDF

Info

Publication number
CN103631698A
CN103631698A CN201310712883.4A CN201310712883A CN103631698A CN 103631698 A CN103631698 A CN 103631698A CN 201310712883 A CN201310712883 A CN 201310712883A CN 103631698 A CN103631698 A CN 103631698A
Authority
CN
China
Prior art keywords
video camera
camera
angular speed
grade
speed
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.)
Granted
Application number
CN201310712883.4A
Other languages
Chinese (zh)
Other versions
CN103631698B (en
Inventor
张甜甜
王军
陈先开
吴金勇
聂志辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Security and Fire Technology Co Ltd
Original Assignee
China Security and Fire Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Security and Fire Technology Co Ltd filed Critical China Security and Fire Technology Co Ltd
Priority to CN201310712883.4A priority Critical patent/CN103631698B/en
Publication of CN103631698A publication Critical patent/CN103631698A/en
Application granted granted Critical
Publication of CN103631698B publication Critical patent/CN103631698B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Closed-Circuit Television Systems (AREA)

Abstract

The invention belongs to the field of video monitoring, and provides a camera PTZ (pan/tilt/zoom) control method and device for target tracking. The method comprises the steps of obtaining the relative position of a tracked target in a video frame; setting the camera grade speed in each region, wherein the setting of the grade speed is determined according to the relative position of the tracked target deviating from the center point of the frame image in the video frame, and the farther the relative position is from the center point, the higher the camera grade speed goes; converting the camera grade speed into a camera reference angular speed; calculating the current camera actual angular speed according to the camera reference angular speed; converting the current camera actual angular speed into a camera actual output grade speed. The method and device provided by the invention can achieve an aim of accurately controlling the camera to rotate at different grade speeds in different areas so as to realize an effect of accurate positioning and smooth transition of the camera, and the phenomena of stuck, discontinuous and unsmooth movement of the existing camera are solved.

Description

A kind of video camera PTZ control methods and device for target following
Technical field
The present invention relates to field of video monitoring, more particularly to one kind is in PTZ(Pan/Tilt/Zoom writes a Chinese character in simplified form, and represents head comprehensive(Up and down, left and right)Mobile and camera lens zoom, Zoom control)The method and device being controlled during target following to video camera.
Background technology
In field of video monitoring, Pan/Tilt/Zoom camera is widely used in the target following of broad regions.Compared to the video camera of traditional fixing camera, PTZ has the multiple advantages such as wide monitoring range, the increase of tracking target scene and variable focal length, utilize these advantages, with reference to video image analysis, target following positioning and the control of Pan/Tilt/Zoom camera, tracked target can be tracked in certain scene, captured and alarm linkage.
Current PTZ tracking techniques lay particular emphasis on the optimization and improvement of algorithm aspect mostly, But most of algorithms is to realize the prediction of target location according to the multilevel iudge of present frame and front and rear several frames, when receiving various interference, such as illumination, deformation, block, picture quality and color of object change, algorithm will be difficult to the accurate location of offer tracked target, so that the problems such as causing tracking target loss and inaccurate predicted position.The track algorithm that so places one's entire reliance upon carries out the control of Pan/Tilt/Zoom camera, will cause larger error.
And, current most of PTZ tracking techniques be it is single calculate target location by algorithm and be available to video camera make with reference to determine moving direction, and actual conditions are when the object moves, if do not take any strategy in whole picture only can cause various problems by single video camera move, if such as camera motion speed is excessively slow, it can cause to track the area of visual field that target disappears in PTZ video pictures, lose tracking target.Picture weave phenomenon can be produced if the overall motion amplitude of video camera or moving step sizes are excessive, while influenceing track algorithm in turn again, causes track algorithm unstable.In the case of producing cumulative errors during algorithm prediction simultaneously, the positional information for continuing to calculate according to algorithm can also produce serious tracking mistake and tracking target loss situation to manipulate video camera.And also easily there is video camera interim card or video camera drift, beyond drawbacks such as the visuals field of tracked target in the existing method that camera motion is only directly controlled by video camera move.
The content of the invention
In view of this, the present invention proposes a kind of video camera PTZ control methods and device for target following, it can reach that precise control video camera is rotated according to different zones with the step velocitys such as different, make video camera reach be accurately positioned, the effect of smooth transition, solve interim card and discontinuous, unsmooth phenomenon that existing video camera occurs when mobile.
The present invention provides a kind of video camera PTZ control methods for target following, comprises the following steps:
Obtain the relative position of tracked target in the video frame;
Subregion sets camera grade speed;
The relative position that setting etc. step velocity deviates the two field picture central point according to tracked target in the video frame determines that relative position distance center point is more remote, and camera grade speed is bigger;
It is video camera reference angular speed by camera grade rate conversion;
Current camera actual angular speed is calculated with reference to turn meter according to the video camera;
Current camera actual angular speed is converted into the step velocitys such as video camera reality output.
Wherein, subregion setting camera grade speed, formula is as follows:
The step velocitys such as X-direction
Wherein XMOVERepresent the step velocitys such as video camera minimum movement, for constant, variable a, b, c......z are the corresponding video camera empirical value in each region, and posx is the x coordinate of tracked target position point, width represents picture traverse, and abs refers to take absolute value to the content in bracket;
The step velocitys such as Y direction
Wherein YMOVEThe step velocitys such as video camera minimum movement are represented, are constant, variables A, B, C.....Z are the corresponding video camera empirical value in each region, and posy is the y-axis coordinate of tracked target position point, and height represents picture altitude.
Wherein, when being divided into 3 regions, video camera empirical value a=50, b=30 in the X-direction grade speed formula;Video camera empirical value A=40, B=30 in Y direction grade speed formula.
Wherein, described is video camera reference angular speed by camera grade rate conversion, and formula is as follows:
Horizontal direction:
Vxpan=p1Pan0 2+p2Pan0+p3
Wherein, the coefficient that p1, p2, p3 draw for actual test, the coefficient that different cameras is tested and calculated is different;
Vertical direction:
Vytilt=t1Tilt0 2+t2Tilt0+t3
The coefficient that wherein t1, t2, t3 draw for actual test, the coefficient that different cameras is tested and calculated is different.
Wherein, described to calculate current camera actual angular speed with reference to turn meter according to video camera, formula is as follows:
Horizontal direction:
V x _ new = 2 * arctan ( tan ( V x 2 ) * d 0 d 1 )
Vertical direction:
V y _ new = 2 * arctan ( tan ( V y 2 ) * d 0 d 1 )
Wherein d0For initialization object distance, scope is 5-8 meters, d1For current object distance.
Wherein, the d0Initialization object distance is set to 6 meters.
Wherein, described that current camera actual angular speed is converted into the step velocitys such as video camera reality output, formula is as follows:
Solve horizontal direction video camera actual angular speed:
Vx_newpan=p1Pan0 2+p2Pan0+p3
Obtain the step velocitys such as horizontal direction video camera reality output:
Pan new = - p 2 + p 2 2 - 4 p 1 ( p 3 - V x _ new ) 2 p 1
Solve vertical direction video camera actual angular speed:
Vy_newpan=t1Tilt0 2+t2Tilt0+t3
Obtain the step velocitys such as vertical direction video camera reality output:
Tilt new = - t 2 + t 2 2 - 4 t 1 ( t 3 - V y _ new ) 2 t 1
Wherein, the division between the subregion setting camera grade speed, region can be that equidistant partition or Unequal distance are divided.
Wherein, the region of the division is three regions, and the movement velocity that range image central point respectively is video camera between first area, second area, the 3rd region, each region from the near to the remote is different;The step velocity such as what video camera was moved in first area be less than second area move etc. step velocity, video camera second area move etc. step velocity less than the 3rd regional movement etc. step velocity.
The present invention also provides a kind of video camera PTZ control devices for target following, including:
Target location acquisition module, for obtaining the relative position of tracked target in the video frame;
Etc. step velocity setting module, camera grade speed is set for subregion, the distance that the setting etc. step velocity deviates the two field picture central point according to tracked target in the video frame determines that distance center point is more remote, and camera grade speed is bigger;
Reference angle rate conversion module, for being video camera reference angular speed by camera grade rate conversion;
Actual angular speed computing module, for calculating current camera actual angular speed with reference to turn meter according to video camera;
Actual grade rate conversion module, for current camera actual angular speed to be converted into the step velocitys such as video camera reality output.
The method of the invention and device are by detecting tracked target relative position apart from image center in video frame images, and according to relative position information calculate video camera different zones etc. step velocity, it is video camera reference angular speed by grade rate conversion, and current camera actual angular speed is calculated with reference to turn meter according to video camera, current camera actual angular speed is converted into the step velocitys such as video camera reality output again, so as to reach purpose that precise control video camera is rotated according to different zones with the step velocitys such as different, video camera is reached to be accurately positioned, the effect of smooth transition, solve interim card that existing video camera occurs when mobile and discontinuous, unsmooth phenomenon.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing to be used needed for embodiment or description of the prior art will be briefly described below, apparently, drawings in the following description are only some embodiments of the present invention, for those of ordinary skill in the art, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of video camera PTZ control method flow charts for target following of the embodiment of the present invention one;
Fig. 2 is a kind of video camera PTZ control method flow charts for target following of the embodiment of the present invention two;
Fig. 3 is the region division schematic diagram of the embodiment of the present invention two;
Fig. 4 is the horizontal direction conic fitting schematic diagram of the embodiment of the present invention two;
Fig. 5 is the vertical direction conic fitting schematic diagram of implementation two of the invention;
Fig. 6 is a kind of video camera PTZ control device schematic diagrames for target following of the embodiment of the present invention three.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained under the premise of creative work is not made belongs to the scope of protection of the invention.
Embodiment one:
Referring to Fig. 1, it is a kind of flow chart of video camera PTZ control methods for target following provided in an embodiment of the present invention, following steps are specifically included:
S101, the relative position of acquisition tracked target in the video frame.
In the present embodiment, relative position refers to tracked target in the video frame apart from the relative position of the two field picture central point;
X-axis horizontal direction relative position can pass through formula
Figure BDA0000443108220000061
Calculate;
Wherein, posx is the x coordinate of tracked target position point, and widt represents picture traverse, and abs refers to take absolute value to the content in bracket;
Y-axis vertical direction relative position can pass through formula
Figure BDA0000443108220000062
Calculate;
Wherein, posy is the y-axis coordinate of tracked target position point, and teight represents picture altitude.
S102, subregion setting camera grade speed.
The relative position that setting etc. step velocity deviates the two field picture central point according to tracked target in the video frame determines that relative position distance center point is more remote, and camera grade speed is bigger.
The present invention can set 0-N region in video frame images(N is positive integer), specific region division number according to circumstances depending on, the division between region can be that equidistant partition or Unequal distance are divided.The camera grade speed set by region that the equidistant or Unequal distance is divided is calculated using equation below:
The step velocitys such as X-direction
Wherein XMOVEThe step velocitys such as video camera minimum movement are represented, are constant, variable a, b, c......z are different zones(It is divided into N number of region)Corresponding video camera empirical value, posx is the x coordinate of tracked target position point, and width represents picture traverse, and abs refers to take absolute value to the content in bracket;
It is tracked target in the video frame apart from the horizontal relative position of X-axis of the two field picture central point;
The step velocitys such as Y direction
Figure BDA0000443108220000071
Wherein YMOVEThe step velocitys such as video camera minimum movement are represented, are constant, variables A, B, C......Z are different zones(It is divided into N number of region)Corresponding video camera empirical value, posy is the y-axis coordinate of tracked target position point, and height represents picture altitude;
Figure BDA0000443108220000072
It is tracked target in the video frame apart from the Y-axis vertical direction relative position of the two field picture central point.
S103, by camera grade rate conversion it is video camera with reference to angular speed.
Specifically, formula is as follows:
Horizontal direction:
Vxpan=p1Pan0 2+p2Pan0+p3
Wherein, the coefficient that p1, p2, p3 draw for actual test, the coefficient that different cameras is tested and calculated is different;
Vertical direction:
Vytilt=t1Tilt0 2+t2Tilt0+t3
Wherein, the coefficient that t1, t2, t3 draw for actual test, the coefficient that different cameras is tested and calculated is different.
S104, current camera actual angular speed calculated with reference to turn meter according to video camera.
Specifically, formula is as follows:
Horizontal direction:
V x _ new = 2 * arctan ( tan ( V x 2 ) * d 0 d 1 )
Vertical direction:
V y _ new = 2 * arctan ( tan ( V y 2 ) * d 0 d 1 )
Wherein d0For initialization object distance, scope is 5-8 meters, d1Current object distance.
S105, current camera actual angular speed is converted into the step velocitys such as video camera reality output.
Specifically, formula is as follows;
Solve horizontal direction video camera actual angular speed:
Vx_newpan=p1Pan0 2+p2Pan0+p3
Obtain the step velocitys such as horizontal direction video camera reality output:
Pan new = - p 2 + p 2 2 - 4 p 1 ( p 3 - V x _ new ) 2 p 1
Solve vertical direction video camera actual angular speed:
Vy_newpan=t1Tilt0 2+t2Tilt0+t3
Obtain the step velocitys such as vertical direction video camera reality output:
Tilt new = - t 2 + t 2 2 - 4 t 1 ( t 3 - V y _ new ) 2 t 1
Provided by the present invention for target following video camera PTZ control methods by detecting tracked target relative position apart from image center in video frame images, and according to relative position information calculate video camera different zones etc. step velocity, it is video camera reference angular speed by grade rate conversion, and current camera actual angular speed is calculated with reference to turn meter according to video camera, current camera actual angular speed is converted into the step velocitys such as video camera reality output again, so as to reach purpose that precise control video camera is rotated according to different zones with the step velocitys such as different, video camera is reached to be accurately positioned, the effect of smooth transition, solve the existing interim card occurred in mobile camera and discontinuous, unsmooth phenomenon.
Embodiment two:
Referring to Fig. 2, describing concrete methods of realizing of the present invention in detail exemplified by the region of three ranks is set in video frame images below.
S201, in range image central point divide first area successively from the near to the remote(Hereinafter referred to as 1st area), second area(Hereinafter referred to as 2nd area), the 3rd region(Hereinafter referred to as 3rd area)As shown in figure 3, in the region of each rank, camera motion etc. step velocity it is different.Intuitively, the step velocity such as what video camera was moved in first area be less than second area move etc. step velocity, video camera second area move etc. step velocity be less than the 3rd regional movement etc. step velocity, that is movement velocity of the video camera in 3rd area is fast, and movement velocity of the video camera in 2nd area is slow with respect to 3rd area, 1st area is camera motion stop area.Thus, realizing tracked target in the different strategy of different zones camera motion speed.
For convenience of description, we provide that 3 → 2 expression video cameras are moved from 3rd area to 2nd area;2 → 1 expression video cameras are moved from 2nd area to 1st area.In the present embodiment, the length for choosing 2 region picture frames is 30 pixels, and the length of 3 region picture frames is 40 pixels, the point centered on video frame images center.
Specifically, when tracked target passes through different zones, the motion state of video camera is also different, described in detail below:
When tracked target is by 1 → 2 motion process, i.e., tracked target is at 1,2nd area, video camera stop motion.
When tracked target is by 3 → 2 motion processes, camera motion speed is determined that distance center point is more remote, and camera grade speed is bigger by the off-center point distance of tracked target.
S202, calculating camera grade speed,
Formula is as follows:
The step velocitys such as X-direction
Figure BDA0000443108220000091
Wherein XMOVEThe step velocitys such as video camera minimum movement are represented, are constant, variable a, b are video camera empirical value, and posx is the x coordinate of tracked target position point, and width represents picture traverse, and abs refers to take absolute value to the content in bracket;
It is tracked target in the video frame apart from the horizontal relative position of X-axis of the two field picture central point.
In the present embodiment, video camera the empirical value a=50, b=30.
The step velocitys such as Y direction
Figure BDA0000443108220000101
Wherein YMOVEThe step velocitys such as video camera minimum movement are represented, are constant, variables A, B are video camera empirical value, and posy is the y-axis coordinate of tracked target position point, and height represents picture altitude;
Figure BDA0000443108220000102
It is tracked target in the video frame apart from the horizontal relative position of Y-axis of the two field picture central point.
In the present embodiment, video camera empirical value A=40, B=30.
S203, by camera grade rate conversion it is video camera with reference to angular speed.
The relation that can draw the position relationship of camera grade speed and video camera in quadratic polynomial is fitted by test data of experiment.
Horizontal direction reference angle velocity fitting relational result is as follows:
Vxpan=p1Pan0 2+p2Pan0+p3
Wherein, the coefficient that p1, p2, p3 draw for actual test
Specific experiment step is as follows:
1st, by testing the method for sampling, the numerical value pair for the angular speed that the step velocity such as acquisition camera and video camera are rotated.Specifically numerical value is to as shown in the table:
2nd, carried out by MATLAB after conic fitting as shown in figure 4, horizontal direction quadratic polynomial coefficient can be obtained by carrying out curve parametric solution.
The measured coefficient of this experiment is p1=0.0146882198460146;P2=0.177564108309657;P3=0.384162267296462, the coefficient is only for reference, and the system that different cameras is calculated is different.
Vertical direction reference angle velocity fitting relational result is as follows:
Vytilt=t1Tilt0 2+t2Tilt0+t3
Wherein, the coefficient that t1, t2, t3 draw for actual test.
Specific experiment step is as follows:
1st, by testing the method for sampling, the numerical value pair for the angular speed that the step velocity such as acquisition camera and video camera are rotated.Numerical value is to as shown in the table:
Figure BDA0000443108220000111
2nd, carried out by MATLAB after conic fitting as shown in figure 5, vertical direction quadratic polynomial coefficient can be obtained by carrying out curve parametric solution.
The measured coefficient of this experiment is t1=0.0157007973259717;
t2=0.131463431400743;T3=0.848592317219867, only for reference, the coefficient that different cameras is calculated is different.
S204, current camera actual angular speed calculated with reference to turn meter according to video camera.
Specifically, formula is as follows:
Horizontal direction:
V x _ new = 2 * arctan ( tan ( V x 2 ) * d 0 d 1 )
Vertical direction:
V y _ new = 2 * arctan ( tan ( V y 2 ) * d 0 d 1 )
Wherein d0For initialization object distance, scope is 5-8 meters, d1Current object distance.
In the present embodiment, the d0It it is 6 meters for initialization object distance.
S205, current camera actual angular speed is converted into the step velocitys such as video camera reality output.
Specifically, formula is as follows;
Solve horizontal direction video camera actual angular speed:
Vx_newpan=p1Pan0 2+p2Pan0+p3
Obtain the step velocitys such as horizontal direction video camera reality output:
Pan new = - p 2 + p 2 2 - 4 p 1 ( p 3 - V x _ new ) 2 p 1
Finally give PannewFor camera horizon direction reality output etc. step velocity.
Solve vertical direction video camera actual angular speed:
Vy_newpan=t1Tilt0 2+t2Tilt0+t3
Obtain the step velocitys such as vertical direction video camera reality output:
Tilt new = - t 2 + t 2 2 - 4 t 1 ( t 3 - V y _ new ) 2 t 1
Finally give TiltnewFor video camera vertical direction reality output etc. step velocity.
S206, by the level obtained in S205, vertical direction reality output etc. step velocity export and give video camera the corresponding interface, pass through pelco-d agreements and serial port protocol control video camera to rotate.
The embodiment of the present invention is by detecting tracked target relative position apart from image center in video frame images, and according to relative position information calculate video camera different zones etc. step velocity, and be video camera reference angular speed by grade rate conversion, and the actual angular speed of current camera is calculated with reference to turn meter according to video camera, current camera actual angular speed is converted into the step velocitys such as video camera reality output again, so as to reach purpose that precise control video camera is rotated according to different zones with the step velocitys such as different, video camera is reached to be accurately positioned, the effect of smooth transition, solve the existing interim card occurred in mobile camera and discontinuous, unsmooth phenomenon.
The method of the invention achieves the progress on Pan/Tilt/Zoom camera Precise control direction, the effect that PTZ controls and control by stages camera grade speed are carried out independent of algorithm is reached, the degree of accuracy of tracking target is improved, is that the more stable calculating of algorithm provides the foundation.The method of the invention solve it is existing only by video camera move come direct mobile camera easily occur video camera interim card or video camera drift about, beyond the visual field of tracked target the drawbacks of.
Embodiment three:
The present invention also provides a kind of video camera PTZ control devices for target following, refer to Fig. 6, its be a kind of video camera PTZ control device schematic diagrames for target following provided in an embodiment of the present invention, specifically include target location acquisition module 601, etc. step velocity setting module 602, angular speed modular converter 603, actual angular speed modular converter 604, actual grade rate conversion module 605, etc. step velocity output module 606;Each module concrete function is as follows:
Target location acquisition module 601, for obtaining the relative position of tracked target in the video frame.
Specifically, the target for needing to track can be selected by two ways, one kind is to manually select tracked target;Another is that regular score line is carried out in designated area, is such as hovered, the formulation of reverse and warning region, and correspondence target following detection is carried out after respective rule is triggered.Determine that tracking position of object refers to export target location after object detection method or method for tracking target processing.Target following detection is carried out by many algorithms fusion in the present invention, target following is carried out including optical flow tracking algorithm, average drifting track algorithm, dynamic background frames difference algorithm etc..
Etc. step velocity setting module 602, camera grade speed is set for subregion, the relative position that setting etc. step velocity deviates the two field picture central point according to tracked target in the video frame determines that relative position distance center point is more remote, and camera grade speed is bigger.
The present invention can actually set 0-N region in video frame images(N is positive integer), specific region division number according to circumstances depending on, the division between region can be that equidistant partition or Unequal distance are divided.
Formula etc. step velocitys such as the settings of step velocity setting module 602 is as follows:
The step velocitys such as X-direction
Wherein XMOVEThe step velocitys such as video camera minimum movement are represented, are constant, variable a, b......z are different zones(It is divided into N number of region)Corresponding video camera empirical value, posx is the x coordinate of tracked target position point, and width represents picture traverse, and abs refers to take absolute value to the content in bracket;
It is tracked target in the video frame apart from the horizontal relative position of X-axis of the two field picture central point;
The step velocitys such as Y direction
Figure BDA0000443108220000141
Wherein YMOVEThe step velocitys such as video camera minimum movement are represented, are constant, variables A, B......Z are different zones(It is divided into N number of region)Corresponding video camera empirical value, posy is the y-axis coordinate of tracked target position point, and height represents picture altitude;
Figure BDA0000443108220000142
It is tracked target in the video frame apart from the horizontal relative position of Y-axis of the two field picture central point.
Reference angle rate conversion module 603, for being video camera reference angular speed by camera grade rate conversion.
Specifically, the computing formula of angular speed modular converter 603 is as follows:
Horizontal direction:
Vxpan=p1Pan0 2+p2Pan0+p3
Wherein, the coefficient that p1, p2, p3 draw for actual test, the coefficient that different cameras is tested and calculated is different;
Vertical direction:
Vytilt=t1Tilt0 2+t2Tilt0+t3
Wherein, the coefficient that t1, t2, t3 draw for actual test, the coefficient that different cameras is tested and calculated is different.
Actual angular speed computing module 604, for calculating current camera actual angular speed with reference to turn meter according to video camera.
Specifically, the computing formula of actual angular speed computing module 604 is as follows:
Horizontal direction:
V x _ new = 2 * arctan ( tan ( V x 2 ) * d 0 d 1 )
Vertical direction:
V y _ new = 2 * arctan ( tan ( V y 2 ) * d 0 d 1 )
Wherein d0For initialization object distance, scope is 5-8 meters, d1Current object distance.
In one embodiment, the d0It is 6 meters to initialize object distance.
Actual grade rate conversion module 605, for current camera actual angular speed to be converted into the step velocitys such as video camera reality output.
Specifically, the conversion formula that current camera actual angular speed is converted to the step velocitys such as video camera reality output by actual grade rate conversion module 605 is as follows;
Solve horizontal direction video camera actual angular speed:
Vx_newpan=p1Pan0 2+p2Pan0+p3
Obtain the step velocitys such as horizontal direction video camera reality output:
Pan new = - p 2 + p 2 2 - 4 p 1 ( p 3 - V x _ new ) 2 p 1
Finally give PannewFor camera horizon direction reality output etc. step velocity.
Solve vertical direction video camera actual angular speed:
Vy_newpan=t1Tilt0 2+t2Tilt0+t3
Obtain the step velocitys such as vertical direction video camera reality output:
Tilt new = - t 2 + t 2 2 - 4 t 1 ( t 3 - V y _ new ) 2 t 1
Finally give TiltnewFor video camera vertical direction reality output etc. step velocity.
Etc. step velocity output module 606, the level that actual grade rate conversion module 605 is obtained, vertical direction reality output etc. step velocity send video camera the corresponding interface to, pass through pelco-d agreements and serial port protocol and control video camera to rotate.
The purpose that precise control video camera is rotated according to tracked target slip chart as the distance of centerline with the step velocitys such as different can be reached using device of the present invention, make video camera reach be accurately positioned, the effect of smooth transition, solve the existing interim card occurred in mobile camera and discontinuous, unsmooth phenomenon.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, computer program is can be by instruct the hardware of correlation to complete, described program can be stored in a computer read/write memory medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic disc, CD, read-only memory(Read-Only Memory, ROM)Or random access memory(Random Access Memory, RAM)Deng.
Above disclosure is only preferred embodiment of present invention, can not limit the interest field of the present invention, therefore the equivalent variations made according to the claims in the present invention with this certainly, still belongs to the scope that the present invention is covered.

Claims (10)

1. a kind of video camera PTZ control methods for target following, it is characterised in that comprise the following steps: 
Obtain the relative position of tracked target in the video frame; 
Subregion sets camera grade speed; 
The relative position that setting etc. step velocity deviates the two field picture central point according to tracked target in the video frame determines that relative position distance center point is more remote, and camera grade speed is bigger; 
It is video camera reference angular speed by camera grade rate conversion; 
Current camera actual angular speed is calculated with reference to turn meter according to the video camera; 
Current camera actual angular speed is converted into the step velocitys such as video camera reality output. 
2. the video camera PTZ control methods according to claim 1 for target following, it is characterised in that subregion sets camera grade speed, formula is as follows: 
The step velocitys such as X-direction
Wherein XMOVERepresent the step velocitys such as video camera minimum movement, for constant, variable a, b, c......z are the corresponding video camera empirical value in each region, and posx is the x coordinate of tracked target position point, Width represents picture traverse, and abs refers to take absolute value to the content in bracket; 
The step velocitys such as Y direction
Figure FDA0000443108210000021
Wherein YMOVEThe step velocitys such as video camera minimum movement are represented, are constant, variables A, B, C.....Z are the corresponding video camera empirical value in each region, and posy is the y-axis coordinate of tracked target position point, and height represents picture altitude. 
3. the video camera PTZ control methods according to claim 2 for target following, it is characterised in that when being divided into 3 regions, video camera empirical value a=50, b=30 in the X-direction grade speed formula;Video camera empirical value A=40, B=30 in Y direction grade speed formula. 
4. the video camera PTZ control methods for target following according to any one of claims 1 to 3, it is characterised in that described is video camera reference angular speed by camera grade rate conversion, and formula is as follows: 
Horizontal direction: 
Vxpan=p1Pan0 2+p2Pan0+p3 
Wherein, the coefficient that p1, pl, p3 draw for actual test, the coefficient that different cameras is tested and calculated is different; 
Vertical direction: 
Vytilt=t1Tilt0 2+t2Tilt0+t3 
The coefficient that wherein t1, tl, t3 draw for actual test, the coefficient that different cameras is tested and calculated is different. 
5. the video camera PTZ control methods according to claim 4 for target following, it is characterised in that described to calculate current camera actual angular speed with reference to turn meter according to video camera, formula is as follows: 
Horizontal direction: 
Figure FDA0000443108210000031
Vertical direction: 
Figure FDA0000443108210000032
Wherein d0For initialization object distance, scope is 5-8 meters, d1For current object distance. 
6. the video camera PTZ control methods according to claim 5 for target following, it is characterised in that the d0Initialization object distance is set to 6 meters. 
7. the video camera PTZ control methods according to claim 4 for target following, it is characterised in that described that current camera actual angular speed is converted into the step velocitys such as video camera reality output, formula is as follows: 
Solve horizontal direction video camera actual angular speed: 
Vx_newpan=p1Pan0 2+p2Pan0+p3 
Obtain the step velocitys such as horizontal direction video camera reality output: 
Figure FDA0000443108210000033
Solve vertical direction video camera actual angular speed: 
Vy_newpan=t1Tilt0 2+t2Tilt0+t3 
Obtain the step velocitys such as vertical direction video camera reality output: 
Figure FDA0000443108210000034
8. the video camera PTZ control methods according to claim 7 for target following, it is characterised in that the division that the subregion sets between camera grade speed, region can be that equidistant partition or Unequal distance are divided. 
9. the video camera PTZ control methods according to claim 7 for target following, it is characterized in that, the region of the division is three regions, the movement velocity that range image central point respectively is video camera between first area, second area, the 3rd region, each region from the near to the remote is different;The step velocity such as what video camera was moved in first area be less than second area move etc. step velocity, video camera second area move etc. step velocity less than the 3rd regional movement etc. step velocity. 
10. a kind of video camera PTZ control devices for target following, it is characterised in that including: 
Target location acquisition module, for obtaining the relative position of tracked target in the video frame; 
Etc. step velocity setting module, camera grade speed is set for subregion, the distance that the setting etc. step velocity deviates the two field picture central point according to tracked target in the video frame determines that distance center point is more remote, and camera grade speed is bigger; 
Reference angle rate conversion module, for being video camera reference angular speed by camera grade rate conversion; 
Actual angular speed computing module, for calculating current camera actual angular speed with reference to turn meter according to video camera; 
Actual grade rate conversion module, for current camera actual angular speed to be converted into the step velocitys such as video camera reality output. 
CN201310712883.4A 2013-12-20 2013-12-20 Camera PTZ (pan/tilt/zoom) control method and device for target tracking Expired - Fee Related CN103631698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310712883.4A CN103631698B (en) 2013-12-20 2013-12-20 Camera PTZ (pan/tilt/zoom) control method and device for target tracking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310712883.4A CN103631698B (en) 2013-12-20 2013-12-20 Camera PTZ (pan/tilt/zoom) control method and device for target tracking

Publications (2)

Publication Number Publication Date
CN103631698A true CN103631698A (en) 2014-03-12
CN103631698B CN103631698B (en) 2017-04-19

Family

ID=50212783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310712883.4A Expired - Fee Related CN103631698B (en) 2013-12-20 2013-12-20 Camera PTZ (pan/tilt/zoom) control method and device for target tracking

Country Status (1)

Country Link
CN (1) CN103631698B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007761A (en) * 2014-04-30 2014-08-27 宁波韦尔德斯凯勒智能科技有限公司 Visual servo robot tracking control method and device based on pose errors
CN105100621A (en) * 2015-07-31 2015-11-25 小米科技有限责任公司 Method and apparatus for outputting shot video, and terminal
CN105321162A (en) * 2014-07-23 2016-02-10 中国人民解放军国防科学技术大学 Real-time single and multiple object optimized positioning method for moving objects
CN106403951A (en) * 2016-08-26 2017-02-15 观宇能源科技(上海)有限公司 Computer vision based positioning system and positioning method thereof
CN106716989A (en) * 2014-09-10 2017-05-24 富士胶片株式会社 Imaging device, imaging method, and program
CN107977981A (en) * 2016-10-21 2018-05-01 杭州海康威视数字技术股份有限公司 A kind of motion target tracking method and device
CN108206941A (en) * 2017-09-27 2018-06-26 深圳市商汤科技有限公司 Method for tracking target, system, terminal device and storage medium
CN108259703A (en) * 2017-12-31 2018-07-06 深圳市秦墨科技有限公司 A kind of holder with clapping control method, device and holder
CN108304001A (en) * 2018-02-09 2018-07-20 成都新舟锐视科技有限公司 A kind of Face datection tracking, ball machine head rotation control method and ball machine
CN108647638A (en) * 2018-05-09 2018-10-12 东软集团股份有限公司 A kind of vehicle location detection method and device
CN113114939A (en) * 2021-04-12 2021-07-13 南京博蓝奇智能科技有限公司 Target tracking method and system and electronic equipment
WO2022082442A1 (en) * 2020-10-20 2022-04-28 深圳市大疆创新科技有限公司 Gimbal control method and gimbal
CN114815912A (en) * 2021-01-28 2022-07-29 北京猎户星空科技有限公司 Cloud deck control method and device and robot equipment
CN115174861A (en) * 2022-07-07 2022-10-11 广州后为科技有限公司 Method and device for automatically tracking moving target by pan-tilt camera
EP4369730A1 (en) * 2022-11-09 2024-05-15 Canon Kabushiki Kaisha Control apparatus, imaging system, control method, program, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888479A (en) * 2009-05-14 2010-11-17 汉王科技股份有限公司 Method and device for detecting and tracking target image
CN102082908A (en) * 2010-11-23 2011-06-01 天津市亚安科技电子有限公司 Method for adaptively adjusting tripod head rotating speed according to camera zoom
CN102223522A (en) * 2011-05-20 2011-10-19 杭州数尔电子有限公司 Intelligent automatic tracker module
CN103024276A (en) * 2012-12-17 2013-04-03 沈阳聚德视频技术有限公司 Positioning and focusing method of pan-tilt camera

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888479A (en) * 2009-05-14 2010-11-17 汉王科技股份有限公司 Method and device for detecting and tracking target image
CN102082908A (en) * 2010-11-23 2011-06-01 天津市亚安科技电子有限公司 Method for adaptively adjusting tripod head rotating speed according to camera zoom
CN102223522A (en) * 2011-05-20 2011-10-19 杭州数尔电子有限公司 Intelligent automatic tracker module
CN103024276A (en) * 2012-12-17 2013-04-03 沈阳聚德视频技术有限公司 Positioning and focusing method of pan-tilt camera

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
宗伟伟: ""基于PTZ摄像机的运动目标跟踪算法研究与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
王伟超: ""智能视频监控中目标跟踪算法的研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑 2012年》 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007761B (en) * 2014-04-30 2016-05-11 宁波韦尔德斯凯勒智能科技有限公司 Tracking control method and the device of the Visual Servo Robot based on position and attitude error
CN104007761A (en) * 2014-04-30 2014-08-27 宁波韦尔德斯凯勒智能科技有限公司 Visual servo robot tracking control method and device based on pose errors
CN105321162A (en) * 2014-07-23 2016-02-10 中国人民解放军国防科学技术大学 Real-time single and multiple object optimized positioning method for moving objects
CN105321162B (en) * 2014-07-23 2018-07-27 中国人民解放军国防科学技术大学 A kind of more mesh real-time optimization localization methods of the list of moving target
CN106716989A (en) * 2014-09-10 2017-05-24 富士胶片株式会社 Imaging device, imaging method, and program
CN106716989B (en) * 2014-09-10 2020-02-28 富士胶片株式会社 Imaging device, imaging method, and program
CN105100621B (en) * 2015-07-31 2018-07-20 小米科技有限责任公司 The method, apparatus and terminal of output shooting video
CN105100621A (en) * 2015-07-31 2015-11-25 小米科技有限责任公司 Method and apparatus for outputting shot video, and terminal
CN106403951A (en) * 2016-08-26 2017-02-15 观宇能源科技(上海)有限公司 Computer vision based positioning system and positioning method thereof
CN107977981A (en) * 2016-10-21 2018-05-01 杭州海康威视数字技术股份有限公司 A kind of motion target tracking method and device
CN107977981B (en) * 2016-10-21 2020-05-29 杭州海康威视数字技术股份有限公司 Moving target tracking method and device
CN108206941A (en) * 2017-09-27 2018-06-26 深圳市商汤科技有限公司 Method for tracking target, system, terminal device and storage medium
CN108259703A (en) * 2017-12-31 2018-07-06 深圳市秦墨科技有限公司 A kind of holder with clapping control method, device and holder
CN108304001A (en) * 2018-02-09 2018-07-20 成都新舟锐视科技有限公司 A kind of Face datection tracking, ball machine head rotation control method and ball machine
CN108647638A (en) * 2018-05-09 2018-10-12 东软集团股份有限公司 A kind of vehicle location detection method and device
US10783657B2 (en) 2018-05-09 2020-09-22 Neusoft Corporation Method and apparatus for vehicle position detection
CN108647638B (en) * 2018-05-09 2021-10-12 东软睿驰汽车技术(上海)有限公司 Vehicle position detection method and device
WO2022082442A1 (en) * 2020-10-20 2022-04-28 深圳市大疆创新科技有限公司 Gimbal control method and gimbal
CN114815912A (en) * 2021-01-28 2022-07-29 北京猎户星空科技有限公司 Cloud deck control method and device and robot equipment
CN113114939A (en) * 2021-04-12 2021-07-13 南京博蓝奇智能科技有限公司 Target tracking method and system and electronic equipment
CN113114939B (en) * 2021-04-12 2022-07-12 南京博蓝奇智能科技有限公司 Target tracking method and system and electronic equipment
CN115174861A (en) * 2022-07-07 2022-10-11 广州后为科技有限公司 Method and device for automatically tracking moving target by pan-tilt camera
CN115174861B (en) * 2022-07-07 2023-09-22 广州后为科技有限公司 Method and device for automatically tracking moving target by holder camera
EP4369730A1 (en) * 2022-11-09 2024-05-15 Canon Kabushiki Kaisha Control apparatus, imaging system, control method, program, and storage medium

Also Published As

Publication number Publication date
CN103631698B (en) 2017-04-19

Similar Documents

Publication Publication Date Title
CN103631698A (en) Camera PTZ (pan/tilt/zoom) control method and device for target tracking
CN110322702B (en) Intelligent vehicle speed measuring method based on binocular stereo vision system
CN110285793B (en) Intelligent vehicle track measuring method based on binocular stereo vision system
US9965870B2 (en) Camera calibration method using a calibration target
CN106681353B (en) The unmanned plane barrier-avoiding method and system merged based on binocular vision with light stream
CN103826103A (en) Cruise control method for tripod head video camera
CN103686065A (en) Cloud mirror cluster control method and device of monitoring equipment based on GIS (geographic information system) interoperability
CN104299240A (en) Method and system for calibrating camera for lane offset early warning
CN104184932A (en) Spherical camera control method and device thereof
CN102168954A (en) Monocular-camera-based method for measuring depth, depth field and sizes of objects
CN112798811B (en) Speed measurement method, device and equipment
CN105160703A (en) Optical flow computation method using time domain visual sensor
CN103226814A (en) Medicine bottle foreign matter detection method based on medical visual detection robot image correction
TW202033932A (en) Data processing method, apparatus, device and machine readable medium
CN105181082A (en) Liquid level detection method and liquid level detection device based on visible laser and image processing
CN102927917A (en) Multi-view vision measurement method of iron tower
CN102221331A (en) Measuring method based on asymmetric binocular stereovision technology
CN104133076A (en) Speed measurement device and method and terminal
CN103148832A (en) Detection method of installation inclination angle of video camera
CN106530328A (en) Method for detecting and smoothly following moving object based on video images
CN103606147A (en) Coordinate system transformation and calibration method of multiple measurement cameras with different fields of view
CN106558069A (en) A kind of method for tracking target and system based under video monitoring
CN113365028A (en) Method, device and system for generating routing inspection path
CN104376323A (en) Object distance determining method and device
CN110809118A (en) Rapid focusing method for gun and ball linkage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170419

Termination date: 20191220