A kind of method of compressed video image and video monitoring system
Technical field
The present invention relates to video processing technique, particularly relate to a kind of method and video monitoring system of compressed video image.
Background technology
The major function of video monitoring system is that auxiliary security system monitors various on-the-spot circumstances and records a video, for the operation and the personnel activity of bank, fire-fighting and various field apparatuss provides supervision and recording means.Supervisory control system commonly used at present mainly comprises camera part and monitor portion.Camera part generally is installed in the scene, and it comprises video camera, camera lens, protective cover, support and electric platform.Its effect is that monitor area is made a video recording and converted thereof into the signal of telecommunication.Along with the rotation of electric platform, the video camera on it can photograph the picture of different angles.
In the existing video monitoring system, no matter video camera turns to any angle, all needs video image is compressed, to save the space of transmission bandwidth or storage medium.But general supervisory control system is when doing image compression, and the image frame of being caught when video camera is turned to diverse location is to adopt identical compression recently to encode.Like this, limited code stream has much by mean allocation on some unimportant visual field scenes.
And in the actual monitored environment, often having greatly, the zone is abnormal conditions may occur hardly, for example, certain rig camera can cover two crossing A and B, and the two row trees in the road between two crossings, green grassland, roadside, between crossing A and B, also have a bus stop.The main task of supposing this rig camera is in order to clap illegal making a dash across the red light and the illegal bus zone that takies, and so certainly, in two these zones of row tree in green grassland, roadside, is above-mentioned violation of law can not occur.Therefore, if system's mean allocation code stream, then can waste a lot of code streams on some inessential visual field scene areas, on scenes such as green grassland, trees, and cause image quality because code stream is limited be not optimum level in most interested some hot spot regions (crossing A and B, bus stop).
Summary of the invention
The method and the video monitoring system that the purpose of this invention is to provide a kind of compressed video image, the coding resource priority allocation can there be the image of monitor event to shooting, solves prior art because the not good technical problem of focus scene graph image planes matter that the mean allocation coding resource causes.
To achieve these goals, on the one hand, provide a kind of method of compressed video image, having comprised:
Step 1, to each attitude of video monitoring system The Cloud Terrace, attitude weights of all corresponding distribution, described attitude weights representative: in the monitoring visual field scope of corresponding attitude, the generation frequency of monitor event;
Step 2, for every width of cloth picture of the shot by camera on the described The Cloud Terrace, the corresponding attitude weights of described The Cloud Terrace attitude of living in carry out image compression during all according to this width of cloth picture of shooting.
Preferably, in the described method, in described step 1, described monitor event is the predefined incident of described video monitoring system, comprising: moving target occurs, have target to pass through presumptive area and/or the target of pre-motion orientation occurs.
Preferably, in the described method, in described step 1,,, determine described frequency by the frequency of described monitor event in the statistics predetermined amount of time in the mode of motion detection.
Preferably, in the described method, described step 2 specifically comprises: residing attitude of The Cloud Terrace and corresponding attitude weights when determine taking current picture to be encoded; Whether judge described attitude weights greater than predetermined threshold, be then to adopt first compression multiple to compress described current picture to be encoded, otherwise adopt second compression multiple to compress described current picture to be encoded that described first compression multiple is less than described second compression multiple.
Preferably, in the described method, described step 1 also comprises: determine described attitude by the level angle of The Cloud Terrace and/or the pitching corner of The Cloud Terrace.
One aspect of the present invention provides a kind of video monitoring system, comprises The Cloud Terrace and the video camera that is arranged on the described The Cloud Terrace, also comprises in the described video camera:
The weights module is used for: to each attitude of described The Cloud Terrace, and attitude weights of all corresponding distribution, described attitude weights representative: in the monitoring visual field scope of corresponding attitude, the generation frequency of monitor event;
Compression module is used for: for every width of cloth picture of described shot by camera, the corresponding attitude weights of described The Cloud Terrace attitude of living in carry out image compression during all according to this width of cloth picture of shooting.
Preferably, in the described video monitoring system, described monitor event is described predefined incident, comprising: moving target occurs, have target to pass through presumptive area and/or the target of pre-motion orientation occurs.
Preferably, in the described video monitoring system, described weights module comprises statistic unit, is used for: in the mode of motion detection, by the frequency of described monitor event in the statistics predetermined amount of time, determine described frequency.
Preferably, in the described video monitoring system, described compression module comprises:
The weights determining unit is used for: residing attitude of The Cloud Terrace and corresponding attitude weights when determine taking current picture to be encoded;
Judge and compression unit, be used for: judge that whether described attitude weights are greater than predetermined threshold, be then to adopt first compression multiple to compress described current picture to be encoded, otherwise adopt second compression multiple to compress described current picture to be encoded, described first compression multiple is less than described second compression multiple.
Preferably, in the described video monitoring system, described weights module also is used for: identify described attitude by the level angle of The Cloud Terrace and/or the pitching corner of The Cloud Terrace.
There is following technique effect at least in the embodiment of the invention:
1) indicates the frequency that monitor event takes place under the corresponding attitude by the attitude weights, can predict the possibility that monitor event takes place once more.
2) to the image under the high attitude of monitor event generation frequency, adopt less compression ratio, more clear, can clearer reservation take the image that monitor event is arranged.And, can increase the compression ratio of image to the attitude of the infrequent field range of monitor event, reduce the code stream size that will transmit or preserve,
Description of drawings
The flow chart of steps of the method that Fig. 1 provides for the embodiment of the invention;
The motion densogram that Fig. 2 provides for the embodiment of the invention;
The compression ratio distribution diagram that Fig. 3 provides for the embodiment of the invention;
The structure chart of the supervisory control system that Fig. 4 provides for the embodiment of the invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer, specific embodiment is described in detail below in conjunction with accompanying drawing.
In the embodiment of the invention, be, all compose, represent within the past period the frequency information of the events of interest that is taken place in the monitoring visual field scope corresponding to this The Cloud Terrace attitude with weights to each the possible The Cloud Terrace attitude in the video monitoring system.Video monitoring system can dynamically be adjusted the compression parameters to different attitudes picture pointed according to this information.In the frequent generation of those events of interest within sweep of the eye, can reduce the compression ratio of image, make image quality more better; To the infrequent field range of events of interest, can increase the compression ratio of image, reduce the code stream size that will transmit or preserve.
The flow chart of steps of the method that Fig. 1 provides for the embodiment of the invention, as shown in the figure, the method for compressed video image comprises:
Step 101, to each attitude of video monitoring system The Cloud Terrace, attitude weights of all corresponding distribution, described attitude weights representative: in the monitoring visual field scope of corresponding attitude, the generation frequency of monitor event;
Step 102, for every width of cloth picture of the shot by camera on the described The Cloud Terrace, the corresponding attitude weights of described The Cloud Terrace attitude of living in carry out image compression during all according to this width of cloth picture of shooting.
In the step 101, monitor event is the predefined incident of described video monitoring system, comprising: moving target occurs, have target to pass through presumptive area and/or the target of pre-motion orientation occurs.Monitor event can (detect in the scheduled time in the past the image that moving target is arranged in the encoded video streams by motion detection, be already present technology) mode detect, by the frequency of described monitor event in the statistics predetermined amount of time, determine described frequency again.
Described step 102 specifically comprises:
Residing attitude of The Cloud Terrace and corresponding attitude weights when determine taking current picture to be encoded;
Whether judge described attitude weights greater than predetermined threshold, be then to adopt first compression multiple to compress described current picture to be encoded, otherwise adopt second compression multiple to compress described current picture to be encoded that described first compression multiple is less than described second compression multiple.
Certainly, a corresponding lists can be set, the corresponding compression multiple of each attitude weights, the attitude weights are big more, and the possibility that monitor event occurs is just high more, and then the compression multiple of Cai Yonging is just more little, and image is also just clear more.
Therefore, present embodiment is based on " all that describe certain rig camera within sweep of the eye; in the past in a period of time; the model of the frequency that events of interest takes place ", the method of the image/video compression that is proposed, it can distribute limited code stream better, more code stream is thrown within sweep of the eye interested, thereby resource is optimized.
Still be example below, come the embodiment of the invention is set forth with this index of motion density with the motion detection.Utilize existing motion detection technique, can obtain following information: under certain attitude of monitoring camera machine head, whether moving target is arranged in the image sequence of current shooting.To all possible attitude of The Cloud Terrace, in a period of time, can count the frequency that moving target occurs under this attitude in the past.For example, certain The Cloud Terrace rotates to spend in level 20 in the angular range of 180 degree only, and rotating step-length is 5 degree, does not support pitch rotation.In 1 minute, The Cloud Terrace is constantly scanning in horizontally rotating scope, and in real time the image sequence that captures is carried out moving object detection in the past.Through statistics, obtain motion density curve as shown in Figure 2: as can be known according to the statistics of Fig. 2, in the past in 1 minute, The Cloud Terrace is under level 40 degree and pairing these two attitudes of 120 degree, it is maximum to capture the motion event number of times that occurs in the visual field, in the visual field under other attitudes, then do not find to have any moving target.
According to above-mentioned statistical information, system can be conscious at level 40 degree and 120 these two some code streams of position overabsorption of degree, for example shown in Figure 3 when distributing code stream, as can be seen, video camera is in level 40 degree and two positions of 120 degree, and corresponding scene image compression multiple is 20:1, at 45 degree and 115 degree, compression multiple is 30:1, in other angles, the compression multiple maximum is 40:1.
Above embodiment because combine in the video monitoring process the part historical information as a reference, therefore distribute rig camera when pointing to the code stream of different scene lower compression images, more purposive, also more efficient.
Certainly, the above-mentioned embodiment is an example to horizontally rotate just, those skilled in the art can be used for more complicated rig camera with the present invention under the prerequisite of spirit of the present invention, for example the video camera of support level rotation simultaneously and pitch rotation.
In addition, corresponding above method also provides the embodiment of video monitoring system, the structure chart of the supervisory control system that Fig. 4 provides for the embodiment of the invention, as figure, supervisory control system comprises The Cloud Terrace 210 and the video camera 220 that is arranged on the described The Cloud Terrace, also comprises in the described video camera:
Weights module 221 is used for: to each attitude of described The Cloud Terrace, and attitude weights of all corresponding distribution, described attitude weights are represented in the monitoring visual field scope of corresponding attitude, the generation frequency of monitor event;
Compression module 222 is used for: for every width of cloth picture of described shot by camera, the corresponding attitude weights of described The Cloud Terrace attitude of living in carry out image compression during all according to this width of cloth picture of shooting.
Described weights module comprises statistic unit, is used for: in the mode of motion detection, by the frequency of described monitor event in the statistics predetermined amount of time, determine described frequency.
Described compression module can comprise: the weights determining unit is used for: residing attitude of The Cloud Terrace and corresponding attitude weights when determine taking current picture to be encoded; Judge and compression unit, be used for: judge that whether described attitude weights are greater than predetermined threshold, be then to adopt first compression multiple to compress described current picture to be encoded, otherwise adopt second compression multiple to compress described current picture to be encoded, described first compression multiple is less than described second compression multiple.
As from the foregoing, the present invention has following advantage:
1) indicates the frequency that monitor event takes place under the corresponding attitude by the attitude weights, can predict the possibility that monitor event takes place once more.
2) to the image under the high attitude of monitor event generation frequency, adopt less compression ratio, more clear, can more keep and take the image that monitor event is arranged.And, can increase the compression ratio of image to the attitude of the infrequent field range of monitor event, reduce the code stream size that will transmit or preserve.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.