A kind of presetting bit method and control system
Technical field
The present invention relates to video camera and field of video monitoring, specifically refer to a kind of presetting bit method and control system.
Background technology
The operation conditions of the key area being monitored and ball machine need to be linked together in protection and monitor field, need in back-end controller, arrange and store multiple specifically monitored regional locations, in the time that needs are monitored these regions, controller will call above-mentioned certain presetting bit setting by transmission order.And this presetting bit setting and method of calling, conventionally need in the time that presetting bit arranges, store ball machine directional information, Zoom(multiplication factor simultaneously) and Focus(gathering), and when calling only under these specific Zoom, could carry out fast and accurately presetting bit calls, in the time that arranging, presetting bit stores like this data volume large, but information is less, in the time that presetting bit is called, need accurately location of specific Z oom.
Summary of the invention
The object of the present invention is to provide a kind of presetting bit method and control system, solve the problem that can accurately carry out accurate presetting bit under the different Zoom of ball machine any direction.
Object of the present invention realizes by following technical method:
A kind of presetting bit method, comprises the following steps: presetting bit setting steps and presetting bit invocation step,
Presetting bit setting steps comprises following steps:
(A1), after system initialization, intended target is aimed in camera review center,
(A2) send out multiplication factor Zoom value under golf emitter directional information and given range to all-in-one, directional information comprises ball machine level angle and ball machine vertical angle,
(A3) all-in-one is under this Zoom value, utilizes focusing automatically to make image object clear and obtain current Focus value,
(A4) utilize current Zoom value and Focus value, according to the wire size that calculates current preset point in online number storehouse by linear interpolation method, wire size comprises Zoom value and Focus value corresponding under current directional information,
(A5) store current directional information and wire size,
(A6), according to the number in preset site, repeat (A1) step to (A5) step, the wire size formation presetting bit information table of storing directional information corresponding to all presetting bits set-point and calculating;
Presetting bit invocation step comprises following steps:
(B1), after system initialization, intended target is aimed in camera review center,
(B2) send out golf emitter directional information and arbitrary multiplication factor Zoom value to all-in-one,
(B3) when inquiry presetting bit arranges, whether directional information and the wire size of storage, there is current correspondence direction information,
(B4) if (B3) can inquire corresponding directional information, directly find out current wire size,
(B5) if (B3) can not inquire corresponding directional information, search and calculate wire size by the method for interpolation calculation,
(B6), after the wire size by (B4) or (B5) obtaining, the multiplication factor Zoom value according to wire size and (B1) is calculated corresponding Focus value, thereby obtains fast picture rich in detail,
(B7) according to specifying presetting bit to call number, repeat (B1) step to (B6) step.
Presetting bit arranges: according to the multiplication factor Zoom in ball machine directional information and given range, set current wire size.
Presetting bit is called: the ball machine directional information receiving according to all-in-one and current arbitrary multiplication factor, search the wire size of current correspondence according to correlation technique.
Specifically: aim at when intended target when camera review center, obtain directional information according to ball machine control appliance to ball machine, and Zoom value under given range, directional information comprises ball machine level angle and vertical angle.All-in-one movement, under this Zoom value, utilizes automatically focusing to make image object clear and obtain current Focus value, then utilizes current Zoom value and Focus value to calculate the wire size of current preset point according to database.Wire size is now Zoom value and the Focus value under present level angle and vertical angle, because the Focus value of the difference correspondence of Zoom value is also different, and therefore corresponding multiple corresponding Zoom value and the Focus values of shining upon one by one of this wire size information.
Described presetting bit setting need to be stored all presetting bits set-point corresponding ball machine level angle, vertical angle and the wire size calculating.
Described presetting bit is called and is included in given ball machine level, vertical angle and Zoom value, while setting according to described presetting bit, the ball machine angle information of storage and the relation of wire size are obtained current wire size, and calculate corresponding Focus value according to Zoom value and the wire size that finds, make all-in-one can clearly aim at presetting bit point of invocation.Therefore the present invention does not need to store Focus value, and Zoom value while calling can be also any Zoom value.
As can be seen from above, the present invention utilizes Zoom value and Focus value curved line relation to draw wire size, utilize the mode of storage wire size to change the mode of conventional store Zoom value and Focus value, so only need to call wire size and arbitrary Zoom value can realize the clear of image and call, therefore multiplication factor when multiplication factor when described presetting bit is called and presetting bit arrange is without any relation, the constraint of multiplication factor while not arranged by presetting bit can be any multiplication factor.
When described presetting bit is called, in storage list, differ and find surely all ball machine angle informations, therefore, need to adopt the method for interpolation calculation to search and calculate wire size, interpolation method, for adopting this ball machine direction level angle and vertical angle in immediate wire size, calculates more accurate wire size now by the method for linear interpolation.
Zoom value scope in described (A2) is
.
Presetting bit information table comprises wire size data and ball machine level angle data and ball machine vertical angle data.
(B5) in by the method for interpolation calculation search and calculate wire size adopt formula be:
Wherein,
x,yrepresent wire size,
with
respectively horizontal and vertical interpolation coefficient,
it is basis
arrive
with
between distance decide,
it is basis
arrive
with
between distance decide, specific as follows:
;
;
Described computing formula all realizes by fixed-point processing in processor the inside,
with
all to be normalized to 128 or 256,
,
,
all represent level angle
,
,
,
all represent vertical angle
.
The corresponding wire size of a directional information of ball machine level angle data and a ball machine vertical angle data composition, corresponding multiple multiplication factor Zoom value of wire size and the Focus value under corresponding multiplication factor Zoom value.
Obtaining current Focus value is to go to calculate current Focus value according to directional information and multiplication factor Zoom value, and its computational methods are to make target image clear under the Zoom of given range value, record Focus value now.
The control system generating according to described presetting bit method,
Comprise the ball machine control appliance that can send to ball machine order,
Comprise the command analysis module of energy resolve command head,
Comprise the Focus computing module that can calculate Focus value,
Comprise that the presetting bit that can calculate wire size arranges wire size computing module,
Comprise the preset information memory module that can store level angle, vertical angle, wire size,
Comprise that the presetting bit that can call wire size calls wire size module,
Comprise and can call Focus computing module according to the presetting bit of wire size and multiplication factor Zoom value calculating Focus value,
Comprise the locating module that can position according to Focus value and Zoom value,
Also comprise the motor control module of moving according to Focus value and Zoom value,
The command format that ball machine control appliance sends is defined as follows:
Comprise 2 byte command heads, the multiplication factor Zoom value of 2 bytes, the ball machine level angle of 2 bytes and 1 byte vertical angle, it is that presetting bit setting or presetting bit are called that command header is determined.
Command analysis module analyzes presetting bit setting according to the command header of presetting bit order or presetting bit is called.
When command analysis module is that presetting bit is while arranging according to command header analysis, mentioned order is transferred in Focus computing module, Focus computing module goes to calculate current Focus value according to the level angle in order and vertical angle and multiplication factor Zoom value, draw after Focus value, by Focus computing module by data [Zoom, Focus] send to presetting bit that wire size computing module is set, presetting bit arranges wire size computing module according to current data [Zoom, Focus] in number storehouse, calculate current wire size by linear interpolation method online, finally, present level angle, vertical angle and wire size are stored in preset information memory module,
When command analysis module is that presetting bit is while calling according to command header analysis, mentioned order is transferred to presetting bit and calls wire size module, presetting bit is called wire size module and is inquired the wire size corresponding with present level angle and vertical angle according to the level angle in order with vertical angle, call Focus computing module by presetting bit and just can calculate current Focus value according to wire size and Zoom value, utilize Zoom value and Focus value by Camera Positioning module controls motor control module
When command analysis module is that presetting bit is while calling according to command header analysis, mentioned order is transferred to presetting bit and calls wire size module, presetting bit is called wire size module and is inquired about less than the wire size corresponding with present level angle and vertical angle with vertical angle according to the level angle in order, search and calculate current wire size by the method for interpolation calculation, call Focus computing module by presetting bit and just can calculate current Focus value according to wire size and Zoom value, utilize Zoom value and Focus value by Camera Positioning module controls motor control module
Multiplication factor Zoom value when presetting bit arranges, must meet in given range, and multiplication factor Zoom value when presetting bit is called can be any multiplication factor.
Because the present invention has adopted presetting bit method described above, presetting bit precision and efficiency are improved greatly.Therefore,, compared with background technology method, tool of the present invention has the following advantages:
1, can preset larger amount of information, can call the presetting bit under any multiple under this angle of ball machine;
2, Zoom value when Zoom value when presetting bit is called and presetting bit arrange is irrelevant, can be any Zoom value;
3, be convenient to from motion tracking, when Zoom value can realize from motion tracking to timing;
4, according to special scenes, carry out angle presetting bit setting and tracking, when angle changes, by controller, the change information of ball machine is sent to all-in-one, provide angle and Zoom value prediction value, can greatly improve speed and flatness that presetting bit is followed the tracks of.
Accompanying drawing explanation
Fig. 1 is the structured flowchart of a kind of presetting bit method of providing of the embodiment of the present invention;
Fig. 2 is the particular flow sheet of a kind of presetting bit method of providing of the embodiment of the present invention;
Fig. 3 is that in a kind of presetting bit method of providing of the embodiment of the present invention, interpolation is searched the schematic diagram of wire size;
Fig. 4 is the structural representation of a kind of presetting bit system of providing of the embodiment of the present invention.
Embodiment
Below in conjunction with embodiment, the present invention is described in further detail, but embodiments of the present invention are not limited to this.
Embodiment 1:
As Fig. 1,
Fig. 1 has provided the structured flowchart of the embodiment of presetting bit method of the present invention, specifically comprise that presetting bit setting and presetting bit call, it is mainly to determine current wire size according to the current directional information of ball machine and multiplication factor that presetting bit arranges, and directional information and wire size are stored, and presetting bit to call be to search wire size according to the current directional information of ball machine, and according to ball machine send to video camera multiplication factor determine work as front focal length, call thereby carry out presetting bit quickly and accurately.
As Fig. 2,
A kind of presetting bit method, comprises the following steps: presetting bit setting steps and presetting bit invocation step,
As the flow process of a-quadrant in Fig. 2, presetting bit setting steps comprises following steps:
(A1), after system initialization, intended target is aimed in camera review center,
(A2) send out multiplication factor Zoom value under golf emitter directional information and given range to all-in-one, directional information comprises ball machine level angle and ball machine vertical angle,
(A3) all-in-one is under this Zoom value, utilizes focusing automatically to make image object clear and obtain current Focus value,
(A4) utilize current Zoom value and Focus value, according to the wire size that calculates current preset point in online number storehouse by linear interpolation method, wire size comprises Zoom value and Focus value corresponding under current directional information,
(A5) store current directional information and wire size,
(A6), according to the number in preset site, repeat (A1) step to (A5) step, the wire size formation presetting bit information table of storing directional information corresponding to all presetting bits set-point and calculating; Hypothesis has N preset site like this, and so, will store a length is N, and has ball machine level angle and ball machine vertical angle, these three element data presetting bit information tables of wire size.
As the flow process in B region in Fig. 2, presetting bit invocation step comprises following steps:
(B1), after system initialization, intended target is aimed in camera review center,
(B2) send out golf emitter directional information and arbitrary multiplication factor Zoom value to all-in-one,
(B3) when inquiry presetting bit arranges, whether directional information and the wire size of storage, there is current correspondence direction information,
(B4) if (B3) can inquire corresponding directional information, directly find out current wire size,
(B5) if (B3) can not inquire corresponding directional information, search and calculate wire size by the method for interpolation calculation,
(B6), after the wire size by (B4) or (B5) obtaining, the multiplication factor Zoom value according to wire size and (B1) is calculated corresponding Focus value, thereby obtains fast picture rich in detail,
(B7) according to specifying presetting bit to call number, repeat (B1) step to (B6) step.
Presetting bit arranges: according to the multiplication factor Zoom in ball machine directional information and given range, set current wire size.
Presetting bit is called: the ball machine directional information receiving according to all-in-one and current arbitrary multiplication factor, search the wire size of current correspondence according to correlation technique.
Specifically: aim at when intended target when camera review center, obtain directional information according to ball machine control appliance to ball machine, and Zoom value under given range, directional information comprises ball machine level angle and vertical angle.All-in-one movement, under this Zoom value, utilizes automatically focusing to make image object clear and obtain current Focus value, then utilizes current Zoom value and Focus value to calculate the wire size of current preset point according to database.Wire size is now Zoom value and the Focus value under present level angle and vertical angle, because the Focus value of the difference correspondence of Zoom value is also different, and therefore corresponding multiple corresponding Zoom value and the Focus values of shining upon one by one of this wire size information.
Described presetting bit setting need to be stored all presetting bits set-point corresponding ball machine level angle, vertical angle and the wire size calculating.
Described presetting bit is called and is included in given ball machine level, vertical angle and Zoom value, while setting according to described presetting bit, the ball machine angle information of storage and the relation of wire size are obtained current wire size, and calculate corresponding Focus value according to Zoom value and the wire size that finds, make all-in-one can clearly aim at presetting bit point of invocation.Therefore the present invention does not need to store Focus value, and Zoom value while calling can be also any Zoom value.
As can be seen from above, the present invention utilizes Zoom value and Focus value curved line relation to draw wire size, utilize the mode of storage wire size to change the mode of conventional store Zoom value and Focus value, so only need to call wire size and arbitrary Zoom value can realize the clear of image and call, therefore multiplication factor when multiplication factor when described presetting bit is called and presetting bit arrange is without any relation, the constraint of multiplication factor while not arranged by presetting bit can be any multiplication factor.
When described presetting bit is called, in storage list, differ and find surely all ball machine angle informations, therefore, need to adopt the method for interpolation calculation to search and calculate wire size, interpolation method, for adopting this ball machine direction level angle and vertical angle in immediate wire size, calculates more accurate wire size now by the method for linear interpolation.
Zoom value scope in described (A2) is
.
Presetting bit information table comprises wire size data and ball machine level angle data and ball machine vertical angle data.
As Fig. 3, (B5) in by the method for interpolation calculation search and calculate wire size adopt formula be:
Wherein,
x,yrepresent wire size,
with
respectively horizontal and vertical interpolation coefficient,
it is basis
arrive
with
between distance decide,
it is basis
arrive
with
between distance decide, specific as follows:
Described computing formula all realizes by fixed-point processing in processor the inside,
with
all to be normalized to 128 or 256,
,
,
all represent level angle
,
,
,
all represent vertical angle
.
The corresponding wire size of a directional information of ball machine level angle data and a ball machine vertical angle data composition, corresponding multiple multiplication factor Zoom value of wire size and the Focus value under corresponding multiplication factor Zoom value.
Obtaining current Focus value is to go to calculate current Focus value according to directional information and multiplication factor Zoom value, and its computational methods are to make target image clear under the Zoom of given range value, record Focus value now.
Embodiment 2
As Fig. 4, the control system generating according to described presetting bit method,
Comprise the ball machine control appliance that can send to ball machine order,
Comprise the command analysis module of energy resolve command head,
Comprise the Focus computing module that can calculate Focus value,
Comprise that the presetting bit that can calculate wire size arranges wire size computing module,
Comprise the preset information memory module that can store level angle, vertical angle, wire size,
Comprise that the presetting bit that can call wire size calls wire size module,
Comprise and can call Focus computing module according to the presetting bit of wire size and multiplication factor Zoom value calculating Focus value,
Comprise the locating module that can position according to Focus value and Zoom value,
Also comprise the motor control module of moving according to Focus value and Zoom value,
The command format that ball machine control appliance sends is defined as follows:
Comprise 2 byte command heads, the multiplication factor Zoom value of 2 bytes, the ball machine level angle of 2 bytes and 1 byte vertical angle, it is that presetting bit setting or presetting bit are called that command header is determined.For example: presetting bit order:
.
Command analysis module analyzes presetting bit setting according to the command header of presetting bit order or presetting bit is called.
When command analysis module is that presetting bit is while arranging according to command header analysis, mentioned order is transferred in Focus computing module, Focus computing module goes to calculate current Focus value according to the level angle in order and vertical angle and multiplication factor Zoom value, draw after Focus value, by Focus computing module by data [Zoom, Focus] send to presetting bit that wire size computing module is set, presetting bit arranges wire size computing module according to current data [Zoom, Focus] in number storehouse, calculate current wire size by linear interpolation method online, finally, present level angle, vertical angle and wire size are stored in preset information memory module,
When command analysis module is that presetting bit is while calling according to command header analysis, mentioned order is transferred to presetting bit and calls wire size module, presetting bit is called wire size module and is inquired the wire size corresponding with present level angle and vertical angle according to the level angle in order with vertical angle, call Focus computing module by presetting bit and just can calculate current Focus value according to wire size and Zoom value, utilize Zoom value and Focus value by Camera Positioning module controls motor control module
When command analysis module is that presetting bit is while calling according to command header analysis, mentioned order is transferred to presetting bit and calls wire size module, presetting bit is called wire size module and is inquired about less than the wire size corresponding with present level angle and vertical angle with vertical angle according to the level angle in order, search and calculate current wire size by the method for interpolation calculation, call Focus computing module by presetting bit and just can calculate current Focus value according to wire size and Zoom value, utilize Zoom value and Focus value by Camera Positioning module controls motor control module
Multiplication factor Zoom value when presetting bit arranges, must meet in given range, and multiplication factor Zoom value when presetting bit is called can be any multiplication factor.
Because the present invention has adopted presetting bit method described above, presetting bit precision and efficiency are improved greatly.Therefore,, compared with background technology method, tool of the present invention has the following advantages:
1, can preset larger amount of information, can call the presetting bit under any multiple under this angle of ball machine;
2, Zoom value when Zoom value when presetting bit is called and presetting bit arrange is irrelevant, can be any Zoom value when presetting bit is called;
3, be convenient to from motion tracking, when Zoom value can realize from motion tracking to timing;
4, according to special scenes, carry out angle presetting bit setting and tracking, when angle changes, by controller, the change information of ball machine is sent to all-in-one, provide angle and Zoom value prediction value, can greatly improve speed and flatness that presetting bit is followed the tracks of.
The above, be only preferred embodiment of the present invention, not the present invention done to any pro forma restriction, and any simple modification, the equivalent variations in every foundation technical spirit of the present invention, above embodiment done, within all falling into protection scope of the present invention.