The video intelligent control method
[technical field]
The present invention relates to a kind of video data process control system, refer in particular to a kind of video intelligent control method.
[background technology]
Traditional video monitoring system is to the PTZ control of video camera, it mainly is dual mode, the one, control by rocking bar and the engages button of keyboard, the 2nd, by video control client software, control with direction control knob and focus adjustment button that mouse is clicked on the software interface.Even if also can there be the low problem of speed control in these two kinds of control modes for skilled monitor, and the sight line that will ask for help must back and forth conversion between image and monitoring (video control client software interface, keyboard).So this dual mode all exists camera control both inconvenient, also problem intuitively not.
[summary of the invention]
The object of the invention is to overcome defects, a kind of video intelligent control method that can directly pass through mouse operation and control at the video window of choosing is provided.
The object of the present invention is achieved like this: it comprises step:
A), control preparation, wait for that video window is activated;
B), prerecord, detect in video window mouse and whether press, press instantly mouse position of rear record;
C), adjust the angle precomputation, according to mouse position instantly, obtain the anglec of rotation and velocity information through calculating;
D), the camera angular setting, the signal of controlling of the anglec of rotation and velocity information is sent to the far-end camera, control its The Cloud Terrace rotation and adjust the map location that video acquisition is clicked to corresponding mouse;
E), whether mouse roller rolls;
F), adjust the zoom precomputation, according to the roller situation, calculate current map location convergent-divergent size;
G), the camera zoom adjusts, and puts required zoom ratio rate control information and is sent to the far-end camera, controls its zoom to corresponding convergent-divergent multiple.
Calculating among the described step C comprises step, catch mousebutton information, then mouse position is converted to video window self-defining coordinate system positional information from screen coordinate, by positional information in this self-defined coordinate, obtains angle and speed and determine that according to following table instruction sends
X>0, Y>0,0<A<45 send instruction to the right
X>0, Y>0,45<A<90 send upwards instruction
X<0, Y>0,90<A<135 send upwards instruction
X<0, Y>0,135<A<180 send instruction left
X<0, Y<0,180<A<225 send instruction left
X<0, Y<0,225<A<270 send to giving an order
X>0, Y<0,270<A<315 send to giving an order
X>0, Y<0,315<A<360 send instruction to the right
Above-mentioned X, Y, A, S are the self-defining coordinate system positional information, and wherein X represents that abscissa value, Y represent that ordinate value, A represent that angle, S represent speed.
Calculating in the described step F comprises step, is activating on the video window, and during slider roller, system returns mouse rollovers value V, when V>0 expression to outer rolling, send to pushing away instruction far away, inwardly roll when V<0 expression, send the instruction that furthers.
Beneficial effect of the present invention is by video intelligent control method of the present invention, can carry out three-dimensional control to monitor video, the monitor is on the video window of choosing, press at an arbitrary position left mouse button, video scene can carry out one section conversion according to direction and the position of mouse, when monitor's roll mouse pulley, video scene can automatically push away far, further, after discharging mouse, the control function finishes automatically, and its control operation is simple, the speed of control and video scene conversion is fast, so that monitor procedure becomes simply, reduced workload, improved work efficiency.
[description of drawings]
Fig. 1 is method flow diagram of the present invention
Fig. 2 is the schematic diagram of video window coordinate system definition
[embodiment]
Below in conjunction with accompanying drawing the specific embodiment of the invention is described in detail.
As shown in Figure 1 and Figure 2, the present invention relates to a kind of video intelligent control method, it comprises step:
A), control preparation, wait for that video window is activated; The user only needs any one video window in the mouse-click screen can activate this video window.
B), prerecord, detect in video window mouse and whether press, press instantly mouse position of rear record.
C), adjust the angle precomputation, according to mouse position instantly, through calculating, obtain the anglec of rotation and velocity information;
Described video window coordinate system definition as shown in Figure 2, after catching mousebutton information, mouse position is converted to video window self-defining coordinate system positional information from screen coordinate, and (X represents abscissa value, Y represents ordinate value), by positional information in the self-defined coordinate, obtain angle and speed (A represents angle, and S represents speed)
X>0, Y>0,0<A<45 send instruction to the right;
X>0, Y>0,45<A<90 send upwards instruction;
X<0, Y>0,90<A<135 send upwards instruction;
X<0, Y>0,135<A<180 send instruction left;
X<0, Y<0,180<A<225 send instruction left;
X<0, Y<0,225<A<270 send to giving an order;
X>0, Y<0,270<A<315 send to giving an order;
X>0, Y<0,315<A<360 send instruction to the right;
D), camera angular setting, the signal of controlling of the anglec of rotation and velocity information is sent to the far-end camera, the corresponding video camera of each video window, when the mouse-click video window, activate video window and record corresponding video camera ID, control its The Cloud Terrace rotation and adjust the map location that video acquisition is clicked to corresponding mouse;
E), whether mouse roller rolls;
F), adjust the zoom precomputation, according to the rolling situation of mouse roller, calculate the convergent-divergent size of current map location, calculation procedure is:
Activating on the video window, during slider roller, system returns mouse rollovers value (V):
V>0 expression sends to pushing away instruction far away to outer rolling;
V<0 expression is inwardly rolled, and sends the instruction that furthers;
G), the camera zoom adjusts, and required zoom ratio rate control information is sent to the far-end camera, controls its zoom to corresponding convergent-divergent multiple;
Video-mouse button or stop mouse roller and slide and namely to discharge mouse, the video control operation finishes.
To sum up, video intelligent control method of the present invention, when the user carries out control operation at needs to some video windows, only need to click with mouse and activate this window, in the window of this activation, mouse is clicked some positions, system just records the positional information of this position, and when calculating video and be transformed into this position, the anglec of rotation that the far-end camera is required and speed, and then system is sent to the far-end camera with this anglec of rotation and velocity information, and camera just rotates the map location of clicking to mouse, when mouse rolls in this position, system is just according to the roll value of roller, calculate current map location the corresponding multiple that zooms in or out, the zoom ratio that the multiple that again this is zoomed in or out converts camera to is sent to camera, control zooms in or out.Its control operation is simple, and the speed of control and video scene conversion is fast, so that monitor procedure becomes simply, has reduced workload, has improved work efficiency.
It is pointed out that to the invention is not restricted to above-mentioned embodiment, any simple modification, equivalent variations and modification that any those skilled in the art do above-described embodiment in based on technical solution of the present invention all belong in protection scope of the present invention.