CN102263956B - Mobile detecting method based on motion vector - Google Patents
Mobile detecting method based on motion vector Download PDFInfo
- Publication number
- CN102263956B CN102263956B CN 201110206836 CN201110206836A CN102263956B CN 102263956 B CN102263956 B CN 102263956B CN 201110206836 CN201110206836 CN 201110206836 CN 201110206836 A CN201110206836 A CN 201110206836A CN 102263956 B CN102263956 B CN 102263956B
- Authority
- CN
- China
- Prior art keywords
- macro block
- macro
- motion vector
- frame
- moving object
- 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
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention provides a mobile detecting method based on a motion vector. The method is characterized by: carrying out a motion object detecting on a P frame every fixed frame numbers in a video sequence; extracting all macro-block motion vectors of the P frame, wherein all the macro blocks of the P frame divides a frame image into a motion-vector macro-block table; searching in rows from a macro block which is in a top left corner of the motion-vector macro-block table; calculating the motion vector of each macro block and determining so as to obtain a vertex macro block of a moving object; comparing the vertex macro block with 3x3 macro blocks which regard the vertex macro block as a center, finding the macro block which is closest to the vertex macro block and taking the macro block as a marginal macro block of the moving object; taking the marginal macro block of the moving object as the center to continuously search the next marginal macro block which is similar to the marginal macro block; continuously searching the next marginal macro block as the above steps till finding a setting threshold number of macro blocks. By using the invention, operation is simple; whether the moving object exists can be effectively determined; the threshold can be adjusted so as to adjust sensitivity.
Description
[technical field]
The present invention relates to a kind of intelligent video technology field, relate in particular to a kind of mobile detection method of based on motion vector.
[background technology]
Moving object detection refers to by the image change of identification monitored picture target be extracted from monitoring scene.It is the committed step of video monitoring.Moving object detection is in the bottom of whole video monitoring system, is the basis of various follow-up senior application such as target following, target classification, goal behavior analysis etc.Therefore moving object detection is the key link that video image is processed.
The moving target detecting method of main flow has following three kinds now:
1. frame differential method is in continuous image sequence between two or three consecutive frames, adopts based on difference and thresholding between the picture frame of pixel and extracts moving region in the image.
2. the background subtraction method at first makes up the background image of guarded region, then utilizes present image and background image to subtract each other to detect moving target.
3. optical flow calculates the size and Orientation of each pixel motion according to continuous several two field pictures, utilizes sports ground to distinguish background and Moving Objects.
These three kinds of methods all are based on the pixel value of entire image and need multiple image, cause like this computation complexity excessive and also very high to the requirement of memory space.
Motion vector is the data of a two dimension, generally is expressed as (MV in the rectangular coordinate system the inside
X, MV
Y), what its represented is motion amplitude and the direction of motion of macro block.Motion vector (MV) is the value that produces in Video coding, and we can by the analysis to the MV value, judge whether it is that moving object is arranged.So not only reduce to get computation complexity, and not high to the requirement of memory space yet.That moving object shows in motion vector macro block figure is a slice motion vector macro block group, and moving object macro block group must have the motion macro block at moving object edge.
Mobile detection method is provided in the prior art, as open day be 2010.11.24 day, publication number is the Chinese patent " a kind of mobile detection method and device " of CN101895675A, its description be: a kind of mobile detection method of block, it is characterized in that, comprise: when current block is carried out encoding operation, sensitivity gear sensitivity (sensitivity) the calculating auxiliary parameter of utilizing coding parameter and presetting; Described coding parameter comprises current block motion vector MV at least; Described auxiliary parameter comprise at least described MV absolute value and with the first threshold value; By the judgment models corresponding with described coding parameter and auxiliary parameter, determine the motion state of current block; Described block comprises one or more macro block.This invention is the motion state of determining the block (its block is to comprise one or more macro block) of present encoding by calculating auxiliary parameter and coding parameter, thereby judges the situation of movement of block; The calculating more complicated of the mobile detection of the method.
Prior art also provides the sub-pix method for fast searching of a kind of Motion Adaptive, its open day is 2010.04.28, publication number is the patent of CN101699865A, its description be: belong to the motion estimation techniques field in the Video coding, this invention step is: 1) beginning; 2) motion-vector prediction; 3) integer pixel search; 4) beginning sub-pix search; 5) 1/2 and 1/4 picture element interpolation; 6) the motion severe degree of judgement current macro; 7) carry out large diamond search; 8) carry out the little diamond search of the first order; 9) judge that optimum point is whether at the center of little rhombus; 10) carry out the little diamond search in the second level; 11) the sub-pix search finishes; 12) return MV, the motion cost that sub-pix is searched for the optimum point position, macro block (piece) estimation finishes.The method is a kind of new for the adaptive sub-pix searching method of macro block (piece) movement degree, and it has reduced the time of Video coding and the complexity of calculating effectively.
Because moving object is in MV macro block figure, all MV of moving object integral body are connected together usually, therefore can be by seeking the effective MV value that links to each other in MV macro block figure, i.e. moving object edge, the present invention uses exactly and detects the moving object edge, has judged whether moving object.
[summary of the invention]
The technical problem to be solved in the present invention is to provide a kind of mobile detection method of based on motion vector, has realized having determined whether moving object by seeking the border movement macro block.
The present invention is achieved in that a kind of mobile detection method of based on motion vector, comprises the steps:
Step 10, every fixing frame number the P frame is carried out detecting moving object one time in video sequence, extract all macroblock motion vectors of this P frame, all macro blocks of this P frame are divided into a motion vector macro block table with a two field picture;
Step 20, setting first threshold T
1, T
1As judging whether macro block is the standard of motion macro block; Begin to search by row from the macro block in the upper left corner of described motion vector macro block table, the motion vector of each macro block is calculated and judges: calculate
Whether value is more than or equal to T
1, MV wherein
X, MV
YBe the macroblock motion vector in the rectangular coordinate system; When the motion vector computation value that a macro block is arranged more than or equal to T
1, be designated as then the summit macro block of this macro block as moving object, and with the motion vector of this macro block
Enter step 30; The motion vector computation of all macro blocks in the image of a frame
Value is less than T
1, then this frame is not motion frame, does not namely have moving object, take off one fixedly the P frame in the frame number judge again;
Step 30, from
Macro block begins to seek in a clockwise direction moving object edge macro block, sets Second Threshold T
2, will
One by one with
Centered by 3 * 3 macro blocks do to judge relatively, find with
Similar macro block, namely similar macro block is the moving object edge macro block that will look for, and the motion vector of this edge macro block is designated as
If do not find similar macro block, then find
Be the error amount of Video coding, the P frame of getting in other 4 frames is judged again;
Step 40, again with
Centered by, continue with the process of step 30 seek next with
Similar edge macro block; By that analogy, constantly seek next edge macro block; Set the 3rd threshold value T
3, T
3Find the threshold value of edge macroblock number as judgement; If the edge macroblock number that finds is more than or equal to T
3, illustrate that then this frame has moving object; If can not find the edge macro block or the edge macro block is given initial point for change
And the macroblock number that finds is less than T
3, illustrate that then this frame does not have moving object, continue to take off one fixedly the P frame in the frame number judge again.
Wherein, will in the described step 30
One by one with
Centered by 3 * 3 macro blocks do to judge relatively, find with
Similar macro block is specially:
With (X=X
Top) set up rectangular coordinate system, X<X in the macroblock motion vector that will compare for axis
iThe time, then preferentially choose clockwise that macro block calculates one by one and relatively from the lower right corner direction of 3 * 3 macro blocks: calculate
Whether value is less than T
2, wherein
Be the macroblock motion vector of current comparison, i is { 1,2,3...8}; After 3 * 3 macro blocks are all complete, from calculated value diff wherein less than T
2And that macro block that the diff value of its calculating is less is will look for moving object edge macro block; If after 3 * 3 macro blocks were all complete, its each macro block calculated value diff was more than or equal to T
2, then do not find similar macro block;
X>X in the macroblock motion vector that will compare
iThe time, then preferentially choose clockwise that macro block calculates one by one and relatively from the upper left corner direction of 3 * 3 macro blocks: calculate
Whether value is less than T
2, wherein
Be the macroblock motion vector of current comparison, i is { 1,2,3...8}; After 3 * 3 macro blocks are all complete, from calculated value diff wherein less than T
2And that macro block that the diff value of its calculating is less is will look for moving object edge macro block; If after 3 * 3 macro blocks were all complete, its each macro block calculated value diff was more than or equal to T
2, then do not find similar macro block.
Wherein all macroblock size of P frame are 8 * 8 block of pixels, and it is described to be every 4 fixing frame numbers every fixing frame number.
The present invention has following advantage: the present invention carries out detecting moving object every 4 frames one time to the P frame in video sequence, extracts all macroblock motion vectors of this P frame, and all macro blocks of this P frame are divided into a motion vector macro block table with a two field picture; Begin to search by row from the macro block in the upper left corner of motion vector macro block table, the motion vector of each macro block is calculated and judges the summit macro block that obtains moving object; Summit macro block and 3 * 3 macro blocks centered by the macro block of summit are compared, find and the immediate macro block of summit macro block, and with it as moving object edge macro block, again centered by this moving object edge macro block, continue to seek next similar to it edge macro block; By that analogy, constantly seek next edge macro block; Until find the individual macroblock number of setting threshold.The present invention need not come video motion is detected based on pixel value and the multiple image of entire image, but utilizes the motion vector that generates in the video coding process, seeks moving object border movement macro block and has determined whether moving object; The method has reduced the memory space of computing and system, and can be by regulating threshold value to regulate the sensitivity of the inventive method.
[description of drawings]
Fig. 1 is the inventive method schematic flow sheet.
Fig. 2 is that 3 * 3 macro blocks make to judge structural representation relatively in the motion vector macro block table of the present invention.
[embodiment]
Please refer to shown in Figure 1ly, the mobile detection method of based on motion vector of the present invention comprises the steps:
Step 10, (wherein general video sequence is I frame and P frame mixing forms every fixing frame number (wherein being 4 anchor-frame in the present embodiment) the P frame to be carried out detecting moving object in video sequence, its I frame does not have motion vector), extract all macroblock motion vectors of this P frame, all macroblock size of the P frame here are 8 * 8 block of pixels; All macro blocks of this P frame are divided into a motion vector macro block table with a two field picture.
Step 20, setting first threshold T
1, T
1As judging whether macro block is the standard of motion macro block; Begin to search by row from the macro block in the upper left corner of described motion vector macro block table, the motion vector of each macro block is calculated and judges: calculate
Whether value is more than or equal to T
1, MV wherein
X, MV
YBe the macroblock motion vector in the rectangular coordinate system; When the motion vector computation value that a macro block is arranged more than or equal to T
1, be designated as then the summit macro block of this macro block as moving object, and with the motion vector of this macro block
Enter step 30; The motion vector computation of all macro blocks in the image of a frame
Value is less than T
1, then this frame is not motion frame, does not namely have moving object, take off one fixedly the P frame in the frame number judge again;
Step 30, from
Macro block begins to seek in a clockwise direction moving object edge macro block, sets Second Threshold T
2, will
One by one with
Centered by 3 * 3 macro blocks do to judge relatively (removing the motion macro block that has before found), find with
Similar macro block, its find with
Similar macro block is specially:
With (X=X
Top) set up rectangular coordinate system for axis, as shown in Figure 2, in the present embodiment, (zone 1, zone 2, zone 3, zone 4, zone 5, the zone 6 of the regional on the parabola in the coordinate system wherein, each zone is comprised of 3 * 3 macro blocks, 6 zones are present embodiment one preferred example herein, and its zone that will compare is not limit 6) be 3 * 3 macro blocks will doing to judge; X<X in the macroblock motion vector that will compare
iThe time, then preferentially choose clockwise that macro block calculates one by one and relatively from the lower right corner direction of 3 * 3 macro blocks: calculate
Whether value is less than T
2, wherein
Be the macroblock motion vector of current comparison, i is { 1,2,3...8}; After 3 * 3 macro blocks are all complete, from calculated value diff wherein less than T
2And that macro block that the diff value of its calculating is less is will look for moving object edge macro block; If after 3 * 3 macro blocks were all complete, its each macro block calculated value diff was more than or equal to T
2, then do not find similar macro block;
X>X in the macroblock motion vector that will compare
iThe time, then preferentially choose clockwise that macro block calculates one by one and relatively from the upper left corner direction of 3 * 3 macro blocks: calculate
Whether value is less than T
2, wherein
Be the macroblock motion vector of current comparison, i is { 1,2,3...8}; After 3 * 3 macro blocks are all complete, from calculated value diff wherein less than T
2And that macro block that the diff value of its calculating is less is will look for moving object edge macro block; If after 3 * 3 macro blocks were all complete, its each macro block calculated value diff was more than or equal to T
2, then do not find similar macro block.The motion vector of this edge macro block of finding is designated as
If do not find similar macro block, then find
Be the error amount of Video coding, the P frame of getting in other 4 frames is judged again;
Step 40, again with
Centered by, continue with the process of step 30 seek next with
Similar edge macro block; By that analogy, constantly seek next edge macro block; Set the 3rd threshold value T
3, T
3Find the threshold value of edge macroblock number as judgement; If the edge macroblock number that finds is more than or equal to T
3, illustrate that then this frame has moving object; If can not find the edge macro block or the edge macro block is given initial point for change
And the macroblock number that finds is less than T
3, illustrate that then this frame does not have moving object, continue to take off one fixedly the P frame in the frame number carry out again above-mentioned judgement.
Here it is worth mentioning that: all motion vectors generate in video coding process; Principle of the present invention is: seek the object edge motion macro block of moving object in motion vector macro block figure, purpose is to find the boundary curve of moving object, has determined whether moving object.
The above only is preferred embodiment of the present invention, and all equalizations of doing according to the present patent application claim change and modify, and all should belong to covering scope of the present invention.
Claims (4)
1. the mobile detection method of a based on motion vector is characterized in that: comprise the steps:
Step 10, every fixing frame number the P frame is carried out detecting moving object one time in video sequence, extract all macroblock motion vectors of this P frame, all macro blocks of this P frame are divided into a motion vector macro block table with a two field picture;
Step 20, setting first threshold T
1, T
1As judging whether macro block is the standard of motion macro block; Begin to search by row from the macro block in the upper left corner of described motion vector macro block table, the motion vector of each macro block is calculated and judges: calculate
Whether value is more than or equal to T
1, MV wherein
x, MV
yBe the macroblock motion vector in the rectangular coordinate system; When the motion vector computation value that a macro block is arranged more than or equal to T
1, be designated as then the summit macro block of this macro block as moving object, and with the motion vector of this macro block
Enter step 30; The motion vector computation of all macro blocks in the image of a frame
Value is less than T
1, then this frame is not motion frame, does not namely have moving object, take off one fixedly the P frame in the frame number judge again;
Step 30, from
Macro block begins to seek in a clockwise direction moving object edge macro block, sets Second Threshold T
2, will
One by one with
Centered by 3 * 3 macro blocks do to judge relatively, find with
Similar macro block, namely similar macro block is the moving object edge macro block that will look for, and the motion vector of this edge macro block is designated as
If do not find similar macro block, then find
The error amount of Video coding, take off one fixedly the P frame in the frame number judge again;
Step 40, again with
Centered by, continue with the process of step 30 seek next with
Similar edge macro block; By that analogy, constantly seek next edge macro block; Set the 3rd threshold value T
3, T
3Find the threshold value of edge macroblock number as judgement; If the edge macroblock number that finds is more than or equal to T
3, illustrate that then this frame has moving object; If can not find the edge macro block or the edge macro block is given initial point for change
And the macroblock number that finds is less than T
3, illustrate that then this frame does not have moving object, continue to take off one fixedly the P frame in the frame number judge again.
2. the mobile detection method of based on motion vector according to claim 1 is characterized in that: will in the described step 30
One by one with
Centered by 3 * 3 macro blocks do to judge relatively, find with
Similar macro block is specially:
With (x=x
Top) set up rectangular coordinate system, x<x in the macroblock motion vector that will compare for axis
iThe time, then preferentially choose clockwise that macro block calculates one by one and relatively from the lower right corner direction of 3 * 3 macro blocks: calculate
Whether value is less than T
2, wherein
Be the macroblock motion vector of current comparison, i is { 1,2,3 ... 8}; After 3 * 3 macro blocks are all complete, from calculated value diff wherein less than T
2And that macro block that the diff value of its calculating is less is will look for moving object edge macro block; If after 3 * 3 macro blocks were all complete, its each macro block calculated value diff was more than or equal to T
2, then do not find similar macro block;
X in the macroblock motion vector that will compare〉x
iThe time, then preferentially choose clockwise that macro block calculates one by one and relatively from the upper left corner direction of 3 * 3 macro blocks: calculate
Whether value is less than T
2, wherein
Be the macroblock motion vector of current comparison, i is { 1,2,3 ... 8}; After 3 * 3 macro blocks are all complete, from calculated value diff wherein less than T
2And that macro block that the diff value of its calculating is less is will look for moving object edge macro block; If after 3 * 3 macro blocks were all complete, its each macro block calculated value diff was more than or equal to T
2, then do not find similar macro block.
3. the mobile detection method of based on motion vector according to claim 1, it is characterized in that: all macroblock size of P frame are 8 * 8 block of pixels in the described step 10.
4. the mobile detection method of based on motion vector according to claim 1 is characterized in that: described in the described step 10 every fixing frame number for every 4 fixing frame numbers.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110206836 CN102263956B (en) | 2011-07-21 | 2011-07-21 | Mobile detecting method based on motion vector |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110206836 CN102263956B (en) | 2011-07-21 | 2011-07-21 | Mobile detecting method based on motion vector |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102263956A CN102263956A (en) | 2011-11-30 |
CN102263956B true CN102263956B (en) | 2013-03-20 |
Family
ID=45010384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201110206836 Expired - Fee Related CN102263956B (en) | 2011-07-21 | 2011-07-21 | Mobile detecting method based on motion vector |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102263956B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108495073B (en) * | 2018-03-29 | 2020-11-06 | 瑞芯微电子股份有限公司 | Video image frame field detection method, storage medium and computer |
CN110532837B (en) * | 2018-05-25 | 2023-07-21 | 杭州九阳小家电有限公司 | Image data processing method in article picking and placing process and household appliance |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7868946B2 (en) * | 2003-12-10 | 2011-01-11 | Samsung Electronics Co., Ltd. | Adaptive motion compensated interpolating method and apparatus |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TR199700058A2 (en) * | 1997-01-29 | 1998-08-21 | Onural Levent | Moving object segmentation based on rules. |
WO2005022922A1 (en) * | 2003-09-02 | 2005-03-10 | Koninklijke Philips Electronics N.V. | Temporal interpolation of a pixel on basis of occlusion detection |
CN101119480A (en) * | 2007-09-13 | 2008-02-06 | 中兴通讯股份有限公司 | Method for detecting video shelter in network video monitoring |
CN101895675B (en) * | 2010-07-26 | 2012-10-03 | 杭州海康威视软件有限公司 | Motion detection method and device |
-
2011
- 2011-07-21 CN CN 201110206836 patent/CN102263956B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7868946B2 (en) * | 2003-12-10 | 2011-01-11 | Samsung Electronics Co., Ltd. | Adaptive motion compensated interpolating method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN102263956A (en) | 2011-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101299237B1 (en) | Apparatus and method for detecting object using PTZ camera | |
Zhou et al. | Efficient road detection and tracking for unmanned aerial vehicle | |
CN105574891B (en) | The method and system of moving target in detection image | |
CN100589561C (en) | Dubious static object detecting method based on video content analysis | |
CN102263955B (en) | Method for detecting video occlusion based on motion vectors | |
CN105096321B (en) | A kind of low complex degree Motion detection method based on image border | |
CN103077539A (en) | Moving object tracking method under complicated background and sheltering condition | |
CN103700087A (en) | Motion detection method and device | |
CN102799883A (en) | Method and device for extracting movement target from video image | |
CN104537688A (en) | Moving object detecting method based on background subtraction and HOG features | |
US20170220894A1 (en) | Image processing device, image processing method, and program | |
CN112561951B (en) | Motion and brightness detection method based on frame difference absolute error and SAD | |
CN105427292A (en) | Salient object detection method based on video | |
Šilar et al. | The obstacle detection on the railway crossing based on optical flow and clustering | |
CN105740751A (en) | Object detection and identification method and system | |
CN105654505A (en) | Collaborative tracking algorithm based on super-pixel and system thereof | |
CN103793921A (en) | Moving object extraction method and moving object extraction device | |
CN104717402A (en) | Space-time domain joint noise estimation system | |
CN103475800A (en) | Method and device for detecting foreground in image sequence | |
CN110853077B (en) | Self-adaptive infrared dynamic frame feature extraction method based on morphological change estimation | |
CN102263956B (en) | Mobile detecting method based on motion vector | |
Lee et al. | Crowd behavior representation using motion influence matrix for anomaly detection | |
Piérard et al. | A probabilistic pixel-based approach to detect humans in video streams | |
CN107564029B (en) | Moving target detection method based on Gaussian extreme value filtering and group sparse RPCA | |
JP2014071482A (en) | Object detection device |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130320 Termination date: 20210721 |