CN101102504B - A mixing motion detection method combining with video encoder - Google Patents
A mixing motion detection method combining with video encoder Download PDFInfo
- Publication number
- CN101102504B CN101102504B CN 200710075470 CN200710075470A CN101102504B CN 101102504 B CN101102504 B CN 101102504B CN 200710075470 CN200710075470 CN 200710075470 CN 200710075470 A CN200710075470 A CN 200710075470A CN 101102504 B CN101102504 B CN 101102504B
- Authority
- CN
- China
- Prior art keywords
- movable information
- motion vector
- frame
- motion
- video encoder
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
The method comprises: partitioning the image of monitored area into several areas, setting up the correlative feature information about the set areas; said feature information comprise: the motion information threshold, and the monitored low speed target, high speed target and target over a defined speed; getting the motion vector from video encoder, and getting the motion information about the monitored area; comparing the obtained motion information with the preset motion information threshold to determine the final motion information; reporting the final motion information.
Description
Technical field
The present invention relates to a kind of network video monitoring method, specifically a kind of motion vector of combining with video encoder (MV:motion veter) and frame difference method are carried out the method that hybrid motion detects.
Background technology
Method for testing motion common in the prior art has: frame difference method (comprising background subtraction method and time differencing method), motion vector method or the like.So-called background subtraction method is exactly to utilize the difference of present image and background image to detect a kind of technology of moving region, it generally can provide characteristic the most completely, but it is, responsive especially as the interference of illumination and external extraneous events etc. for the variation of dynamic scene.
So-called time differencing method is exactly to adopt between two or three consecutive frames based on the time difference of pixel and thresholding to extract moving region in the image in the continuous images sequence.The time difference method for testing motion has stronger adaptivity for dynamic environment, but generally can not extract all relevant feature pixels fully, is easy to generate cavitation in movement entity inside.
So-called motion vector method is exactly to press block matching algorithm on reference frame, find the position of the match block of present frame corresponding blocks, displacement between the match block on this reference frame and the corresponding blocks of present frame is exactly a motion vector, utilizes this information to judge whether this piece motion has taken place.The motion vector method is suitable for the environment that multidimensional changes, and can eliminate the vibration pixel in the background, make outstanding more the showing of motion object of a certain direction, but its computation complexity is quite big, needs special hardware to handle, and cost is too high.
Therefore, there is defective in prior art, and awaits improving and development.
Summary of the invention
The objective of the invention is to defective at the prior art existence, providing a kind of utilizes motion vector information that video encoder draws and improved frame difference method to combine to obtain the method for final movable information, overcome the existing too high shortcoming of method for testing motion computation complexity, and reduce wrong report well and fail to report phenomenon.
Technical scheme of the present invention comprises:
A kind of mixing motion detection method of combining with video encoder, it may further comprise the steps:
A, be correlated characteristic information in several regions and the setting regions with the area to be monitored image division, described characteristic information comprises: the movable information threshold value is used to monitor target, fast target at a slow speed or surpasses the target of specific speed;
B, obtain motion vector, and obtain the movable information of guarded region from video encoder;
B1, obtain reference picture, do a luminance difference computing, obtain the movable information of corresponding guarded region every some frames and reference picture;
B2, to two kinds of movable informations by predetermined weights addition, compare with the movable information threshold value of setting again, obtain final movable information, report movable information with the frequency of obtaining reference picture.
Described method, wherein, described step B also comprises: be not expressed as the I frame if present frame has motion vector, then skip this frame.
Adopt method provided by the invention, the motion vector by using video encoder to provide just needn't oneself go to carry out motion search and obtain required motion vector, has reduced hardware cost; Use motion vector simultaneously, little a lot of because a piece has only a motion vector with respect to its data operation quantity of pure frame difference method (background subtraction method, time differencing method), do not take the too much processor time; Can accurately detect object, can detect fast and at a slow speed object, be not easy to occur the phenomenon of failing to report and reporting by mistake according to different application above certain speed.
Description of drawings
Fig. 1 is the mixing motion detection method flow chart of combining with video encoder of the present invention;
Fig. 2 is the general flowchart of the mixing motion detection method whole system of combining with video encoder of the present invention;
Fig. 3 is the schematic diagram of the selection guarded region of the inventive method;
Fig. 4 is the dolly schematic diagram of rapid movement in the preferred embodiment of the inventive method;
Fig. 5 is the schematic diagram of the bird of the people of microinching in the preferred embodiment of the inventive method and rapid movement;
Fig. 6 is people's schematic diagram of rapid movement in the preferred embodiment of the inventive method.
Embodiment
Below in conjunction with accompanying drawing, will be described in more detail each preferred embodiment of the present invention.
The mixing motion detection method of combining with video encoder of the present invention, as shown in Figure 1, it comprises the steps:
The first step, with the image division of video monitoring regional is correlated characteristic information in several regions and the setting regions, and this dividing region determined by application program, such as by the artificial regional extent that needs monitoring of delimiting, and the regional number of monitoring, these zones can be overlapping; Described motion feature information comprises: the threshold value of various monitoring parameters as the movable information threshold value, comprises and monitors target at a slow speed, fast target or surpass target of specific speed or the like;
In second step, judge whether it is the monitoring rapid movement, if then obtain motion vector from video encoder;
In the 3rd step, the motion vector that utilizes previous step to obtain obtains the movable information of guarded region;
The 4th step, obtain reference picture, obtain the movable information of corresponding guarded region every luminance difference of some frames and reference picture work; The acquisition of this reference frame is the renewal of carrying out a reference frame at set intervals, and this renewal speed is relevant with concrete application, but it is littler than the frequency of pure frame difference method to be bound to;
The 5th step, at different application, two kinds of movable informations are used different weights additions, compare with preset threshold again, obtain final movable information, report movable information with the frequency of obtaining reference picture.
Above-mentioned concrete operation process is known by prior art, therefore repeats no more.Below lift the beneficial effect of specific embodiment with explanation the present invention program.
The general flowchart of the mixing motion detection method whole system of combining with video encoder of the present invention, as shown in Figure 2, the inventive method is come in image data acquiring by camera, carry out front-end processings such as convergent-divergent, Digital Image Processing, utilize motion module generation movable information in the camera, by network warning message is sent to remote video server again, which kind of processing relief application program decision carries out.
The mixing motion detection method of combining with video encoder provided by the invention can solve the problem that frame difference method can't detect the moving object of certain specific speed, can realize only detecting the object that surpasses certain speed.Concrete implementation step is as follows:
Obtain guarded region according to the needs of using, set the relevant customizing messages of guarded region.Monitoring image is divided into some, and the user wants to monitor any zone, just chooses the piece of corresponding region.For example, the user wants the upper left corner of piece image (in the viewing area that watch-dog can be seen) is monitored, and he can directly select corresponding piece in the upper left corner, as shown in Figure 3.In embodiment as shown in Figure 4 of the present invention, used full frame monitoring, monitoring be the target that surpasses specific speed.
Obtain motion vector from encoder.Encoder with h264 is an example, and each piece of 4 * 4 just has a motion vector, and one 352 * 288 image just will have 6336 motion vectors.Using brightness to ask the data number of the required calculating of difference in frame difference method then is 352 * 288=101376, and by contrast, it is ten sixths of frame difference method that the inventive method is used its operand of calculating of motion vector.Described motion vector is as the term suggests be exactly a vector that embodies motion, its reflects be a piece B1 in the displacement of present frame with respect to former frame match block B2, the piece that mates most with B1 that finds by the searching algorithm in the estimation.Be not expressed as the I frame if present frame has motion vector, then skip this frame, suppose that again the frequency of continuous some frame I frames is bigger, illustrate and this moment very large motion has taken place, directly report to move.
The motion vector that utilizes previous step to obtain carries out the movable information that computing tentatively obtains guarded region.Whole guarded region is pressed macro block (16 * 16) divide, each macro block is divided into 16 4 * 4 piece (16 motion vectors are promptly arranged).It is very simple to utilize motion vector to obtain the calculating of movable information, these motion vectors x and y component calculating quadratic sum are compared with preset threshold again, obtain one and surpass the threshold value motion vector number M ovedBlockCount of (surpass this threshold value and just represent that motion has taken place this piece)
4 * 4, this counting compares with preset threshold again, has surpassed to represent that then motion has taken place this macro block, otherwise has represented that this macro block does not move.
To these macro blocks that move a counting MovedBlockCount will be arranged also
16 * 16, this counting compares with preset threshold again, at this moment will obtain the information whether guarded region moves.Three comparisons with threshold value are arranged in this step: motion vector, surpass threshold value the motion vector number, surpass the macro block number of threshold value.Relatively the inventive method can fine elimination noise and the interference of encoder motion estimation error by these three times, reduces the possibility of wrong report.
With a size is that the guarded region of cif (352 * 288) is an example, and its threshold value is respectively 8,12,2.With the macro block is unit, and wherein motion vector is calculated.The quadratic sum of supposing two components of certain macroblock motion vector surpass 8 have 2, this value is lower than 12, at this moment can judge the motion vector that surpasses threshold value be cause by noise and filter out it, this macro block does not move.Again other macro blocks are similarly handled,, just represented that this guarded region moves if the macroblock number that moves has surpassed 2.
In addition, by setting the threshold value that compares with motion vector, the inventive method just can obtain only to detect the function of the motion that surpasses certain speed.With the car among Fig. 4 is example, be used for illustrating and have only after the speed of car surpasses a value, the inventive method is just sent warning, wherein the dolly of dotted line is represented the position at the dolly place in the previous moment, the dolly that solid line shows represents it is the dolly position of current time, and whole big solid box is represented the guarded region set.
The speed of the car among Fig. 4 is lower, and same position is just smaller in difference relative displacement (motion vector) constantly, can not surpass threshold value, and then the motion detection of the inventive method is then thought and do not moved; Otherwise the speed of car is very fast, and the relative displacement at its same position is just very big, and then the motion detection of the inventive method is then thought motion has been taken place.And the use frame difference method, two kinds of situations are then differentiated and, because the zone that brightness changes is all very big.
Obtain reference picture, utilize the luminance difference of present frame and reference frame to obtain the movable information of corresponding guarded region.This step acts on not quite in this embodiment, can not carry out the operation of this step, in this embodiment, can directly use the movable information that utilizes motion vector to obtain guarded region to get final product.
In another embodiment of the present invention, how mixing motion detection method of the present invention as can be seen reaches the effect that reduces wrong report and fail to report.Its concrete implementation step is as follows:
Obtain guarded region according to the needs of using, set various characteristic informations, what monitoring was set is target at a slow speed or fast; Obtain motion vector from encoder; Utilize motion vector to obtain the movable information of guarded region.Above-mentioned steps and last embodiment are similar.
Obtain reference picture, make the movable information that luminance difference obtains corresponding guarded region every some frames and reference picture; The movable information acquisition here and the situation comparing class of top use motion vector are seemingly, when calculating equally with macro block unit, all pixel values in the corresponding macro block with reference frame of a macro block (same position) in the present frame guarded region are subtracted each other and ask absolute value, as the number threshold value T2 of this absolute value, represent that then motion has taken place this macro block above threshold value T1.Motion macroblock number in the guarded region has surpassed threshold value T3, represents that then motion has taken place in this zone.The purpose that 3 threshold values are set here also is to eliminate interference of noise.
Target according to monitoring is the frequency of determining to get reference frame at a slow speed or fast, and slow more its frequency of target is also little, and as shown in Figure 5, the scene of supposing is that a pinnacled camera has two guarded regions, has bird to fly over once in a while.Under this scene the inventive method expectation be have the people by the time produce and report to the police, but bird masks when flying over, otherwise can report by mistake.
The people of the line of actual situation shown in Fig. 5 and the implication of bird are with shown in Figure 4, what solid line was represented is the position of working as forefathers and bird, what dotted line was represented is the position of previous moment people and bird, big solid box is represented entire image, little solid box is represented two guarded regions, and the purpose of this width of cloth figure is to illustrate how to shield the bird (shielding the interference of quick object when monitoring at a slow speed) that flies over.
As shown in Figure 6, be to have a cankered people to want to flash across from guarded region, the frequency of getting reference frame this time will be high more not good more, not then can fail to report.But according to the design of the inventive method, can detect his motion by motion vector this time, so the frequency setting that need not to obtain reference frame in this step is too high.Also having a kind of situation is exactly that the object that will monitor is in a kind of slow motion, and this moment must be low with the frequency setting that obtains reference frame, otherwise newspaper can take place to reveal.
The present invention in this step of this embodiment, get reference frame between how long be separated with, ask the interval of the difference of brightness how long just to have, finish after the difference computing present frame as the reference frame.Suppose that present frame is F
n, reference frame is F
N-m, this expression is only done a difference computing every the m frame, obtains the movable information of guarded region, after computing is finished with F
nAs the reference frame of next difference computing, when to F
N+mJust do the difference computing during frame once more.
According to the design of the inventive method, need the target velocity of monitoring slow more, the weights Q of the movable information that obtains in the 3rd step
3Just more little, and the weights Q of the movable information that obtains in the 4th step
4Just big more, vice versa.The weights here are empirical values, must obtain by test according to practical application, and above-mentioned threshold value also can obtain from practical experience.Figure 5 shows that example, suppose that per 10 frames obtain a reference frame, each guarded region obtains the movable information m in 9 the 3rd steps
1,2,3,4,5,6,7,8,9, and the movable information m in 1 the 4th step
0, then final movable information is (m
1+ m
2+ m
3+ m
4+ m
5+ m
6+ m
7+ m
8+ m
9) * Q
3+ m
0* Q
4Left side guarded region is: (1+1+1+1+1+1+1+1+1) * 1/16+1*7/16=1; The right guarded region is: (0+0+1+1+1+1+1+0+0) * 1/16+0*7/16=5/16.Given threshold is 9/16, and then 1 of left area greater than 9/16, and then motion taken place in expression, and 5/16 of zone, the right reports to not moving less than 9/16.
The mixing motion detection method of combining with video encoder of the present invention is determined movable information in the guarded region by the motion vector that is used in combination video encoder and provides and frame difference method, little a lot of with respect to its data operation quantity of pure frame difference method (background subtraction method, time differencing method), do not take the too much processor time, and hardware requirement is low, and hardware cost is low; Can accurately detect object, detection can be set fast or object at a slow speed respectively, reduce and the possibility failing to report and report by mistake occurs according to different application above certain speed.
The above only is preferred embodiment of the present invention, can not be in order to limiting scope of patent protection of the present invention, all any modifications of being done within the spirit and principles in the present invention, be equal to replacement etc., and all should be included within protection scope of the present invention.
Claims (2)
1. the mixing motion detection method of a combining with video encoder, it may further comprise the steps:
A, be correlated characteristic information in several regions and the setting regions with the area to be monitored image division, described characteristic information comprises: the movable information threshold value is used to monitor the target above specific speed;
B, obtain motion vector, and obtain the movable information of guarded region from video encoder;
B1, obtain reference picture, do a luminance difference computing, obtain the movable information of corresponding guarded region every some frames and reference picture;
B2, to two kinds of movable informations by predetermined weights addition, compare with the movable information threshold value of setting again, obtain final movable information, report movable information with the frequency of obtaining reference picture.
2. method according to claim 1 is characterized in that, described step B also comprises: be not expressed as the I frame if present frame has motion vector, then skip this frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200710075470 CN101102504B (en) | 2007-07-24 | 2007-07-24 | A mixing motion detection method combining with video encoder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200710075470 CN101102504B (en) | 2007-07-24 | 2007-07-24 | A mixing motion detection method combining with video encoder |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101102504A CN101102504A (en) | 2008-01-09 |
CN101102504B true CN101102504B (en) | 2010-09-08 |
Family
ID=39036555
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200710075470 Expired - Fee Related CN101102504B (en) | 2007-07-24 | 2007-07-24 | A mixing motion detection method combining with video encoder |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101102504B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101931738B (en) * | 2009-06-19 | 2013-02-27 | 智原科技股份有限公司 | Motion detection method and motion detector |
CN101820501A (en) * | 2010-03-22 | 2010-09-01 | 中国科学院长春光学精密机械与物理研究所 | Stable tracking method of television gate |
CN103561268A (en) * | 2010-12-29 | 2014-02-05 | 中国移动通信集团公司 | Method and device for encoding video monitoring image |
CN103327306A (en) * | 2013-06-14 | 2013-09-25 | 广东威创视讯科技股份有限公司 | Method and device for storing video surveillance image |
CN104410842B (en) * | 2014-12-25 | 2019-01-15 | 苏州智华汽车电子有限公司 | The dynamic detection of falling Cam for automobile system and method |
CN110460856B (en) * | 2019-09-03 | 2021-11-02 | 北京达佳互联信息技术有限公司 | Video encoding method, video encoding device, video encoding apparatus, and computer-readable storage medium |
CN111292354B (en) * | 2020-01-22 | 2023-07-28 | 维沃移动通信有限公司 | False detection suppression method and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1607839A (en) * | 2003-10-16 | 2005-04-20 | Lg电子株式会社 | Method and apparatus for judging lost block characteristic in video processing system |
CN1809159A (en) * | 2005-10-27 | 2006-07-26 | 复旦大学 | Method of judging motion cause by means of video motion vectors |
-
2007
- 2007-07-24 CN CN 200710075470 patent/CN101102504B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1607839A (en) * | 2003-10-16 | 2005-04-20 | Lg电子株式会社 | Method and apparatus for judging lost block characteristic in video processing system |
CN1809159A (en) * | 2005-10-27 | 2006-07-26 | 复旦大学 | Method of judging motion cause by means of video motion vectors |
Non-Patent Citations (4)
Title |
---|
何峻峰.运动检测技术在数字化监控中的实现和应用.中国安防产品信息 2004年第4期.2004,(20044),第47-49页. * |
刘军山,王汇源,张君捧.基于H.263协议的视频监控报警系统.计算机应用2003年第23卷.2003,2003年第23卷第212,213,221页. * |
田鹤,陈剑波.视频监控系统中基于MPEG编码域的运动检测方法.计算机工程第28卷 第10期.2002,第28卷(第10期),第164-166页. * |
胡师彦.基于视频监控系统的运动监测和报警.石家庄铁道学院学报第15卷 第4期.2002,15(4),第6-10页. * |
Also Published As
Publication number | Publication date |
---|---|
CN101102504A (en) | 2008-01-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101102504B (en) | A mixing motion detection method combining with video encoder | |
CN101236656B (en) | Movement target detection method based on block-dividing image | |
US7265777B2 (en) | Method for abstracting multiple moving objects | |
CN106034237B (en) | Hybrid coding method and system based on coding switching | |
Hung et al. | Speed up temporal median filter for background subtraction | |
CN100469153C (en) | Testing method of switching video scenes | |
US8306123B2 (en) | Method and apparatus to improve the convergence speed of a recursive motion estimator | |
JP2010028594A (en) | Moving object monitoring device | |
CN103096117A (en) | Video noise detecting method and device | |
Liu et al. | Scene background estimation based on temporal median filter with Gaussian filtering | |
JP2012244574A (en) | Video monitoring device | |
KR101396838B1 (en) | Video stabilization method and system by selection one of various motion models | |
US9001207B1 (en) | Apparatus and method for motion detection in video | |
JP2012257173A (en) | Tracking device, tracking method, and program | |
Laumer et al. | Moving object detection in the H. 264/AVC compressed domain | |
Srilekha et al. | A novel approach for detection and tracking of vehicles using Kalman filter | |
Fu et al. | A method of shot-boundary detection based on HSV space | |
CN113191210B (en) | Image processing method, device and equipment | |
CN100473112C (en) | A motion detection method for digital image | |
Krämer et al. | Scene similarity measure for video content segmentation in the framework of a rough indexing paradigm | |
Zul et al. | Adaptive motion detection algorithm using frame differences and dynamic template matching method | |
Vijverberg et al. | Two novel motion-based algorithms for surveillance video analysis on embedded platforms | |
CN100454338C (en) | Dynamic image processing method | |
RU2552139C1 (en) | Method for motion compensation in digital dynamic video | |
JPH11242747A (en) | Motion detecting device and image signal processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100908 Termination date: 20160724 |
|
CF01 | Termination of patent right due to non-payment of annual fee |