Summary of the invention
The present invention provides a kind of mobile detection method and system, to solve the above problems.
The present invention provides a kind of mobile detection method.The above method the following steps are included:
During multimedia-data procession, the continuous transition frame between key frame is obtained;
It is respectively compared the size of First Transition frame and other continuous transition frames in continuous transition frame, if being all larger than preset shifting
Dynamic detecting threshold value, then extract parsing motion vector, according to Dynamic Control Strategy, obtain the dynamic result of moving object.
The present invention also provides a kind of moving sensing systems, including obtain module, strategic control module;The acquisition module with
The strategic control module is connected;
The acquisition module, for during multimedia-data procession, obtaining the continuous transition frame between key frame simultaneously
The transition frames are sent to the strategic control module;
The strategic control module, for being respectively compared First Transition frame and other continuous transition frames in continuous transition frame
Size extracts parsing motion vector if being all larger than preset mobile detection threshold value, according to Dynamic Control Strategy, obtains movement
The dynamic result of object.
Parsing movement is extracted present invention discloses according to the size variation between continuous transition frame compared to prior art
Vector, to describe the motion conditions of moving object.
In addition, passing through following scheme: obtaining the big of First Transition frame and other continuous transition frames in continuous transition frame respectively
Small absolute value of the difference counts the quantity of the continuous transition frame and according to even if being all larger than preset mobile detection threshold value
Continuous transition number of frames and the calculating dynamic parameter table of comparisons, obtain the dynamic result of moving object, so that calculating the feelings of moving object
Condition is more accurate.
Specific embodiment
Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and in combination with Examples.It should be noted that not conflicting
In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
Fig. 1 show the mobile detection method flow chart of the embodiment of the present invention 1, comprising the following steps:
Step 101: during multimedia-data procession, obtaining the continuous transition frame between key frame;
Wherein, multi-medium data refers to video data;The transition frames refer to P frame;Treatment process refers to compression process.
Step 102: the size of First Transition frame and other continuous transition frames in continuous transition frame is respectively compared, if being all larger than
Preset mobile detection threshold value, then extract parsing motion vector, according to Dynamic Control Strategy, obtains the dynamic knot of moving object
Fruit;Wherein, the key frame refers to I frame.
Wherein, First Transition frame refer to before occur transition frames average value, the transition frames occurred below again with front
Average value compare.
Wherein, the dynamic result of moving object includes: the motion profile of moving object, the speed of moving object, moving object
The shape of body.
The absolute value of the difference for obtaining the size of First Transition frame and other continuous transition frames in continuous transition frame respectively, if
Greater than preset mobile detection threshold value, then counts the quantity of the continuous transition frame and moved according to continuous transition number of frames and calculating
State parameter lookup table obtains the dynamic result of moving object.
Continuous transition number of frames and the calculating dynamic parameter table of comparisons
Continuous transition number of frames |
Calculate the dynamic parameter of moving object |
Greater than the first preset value |
Calculate the motion profile of moving object |
Greater than the second preset value |
Calculate speed, the motion profile of moving object |
Greater than third preset value |
Calculate shape, the speed, motion profile of moving object |
Table 1
Wherein, first preset value < the second preset value < third preset value, the first preset value, the second preset value, third are pre-
If value is set according to the actual situation, such as: the first preset value be the 2, second preset value be 4, third preset value is 6, this reality
It applies example and does not limit protection scope.
According to table 1: if the quantity of the continuous transition frame of statistics is greater than the first preset value, calculating moving object
Motion profile;If more than the second preset value, then movement velocity, the motion profile of moving object are calculated;It is default if more than third
Value, then calculate shape of movement, movement velocity, the motion profile of moving object.
The absolute value of the difference for obtaining the size of First Transition frame and other continuous transition frames in continuous transition frame respectively, if
Greater than preset mobile detection threshold value, then the quantity of the continuous transition frame is counted, if the number of the continuous transition frame of statistics
Amount is greater than the first preset value, then calculates the process of the motion profile of moving object are as follows:
Moving object is extracted respectively for each transition frames according to the continuous transition frame between the key frame of acquisition
The motion vector of body, and further determine that the movement position of the moving object, to obtain the motion profile of moving object.
The absolute value of the difference for obtaining the size of First Transition frame and other continuous transition frames in continuous transition frame respectively, if
Greater than preset mobile detection threshold value, then the quantity of the continuous transition frame is counted, if more than the second preset value, then calculates movement
The process of the movement velocity of object are as follows:
Moving object is extracted respectively for each transition frames according to the continuous transition frame between the key frame of acquisition
The motion vector of body, and further determine that the movement position of the moving object;
According to the position of moving object, picture size, moving object size in each transition frames of acquisition, obtain
Take the displacement of moving object in each transition frames;
According to the displacement of acquisition and code rate, the speed of the moving object is obtained.
The absolute value of the difference for obtaining the size of First Transition frame and other continuous transition frames in continuous transition frame respectively, if
Greater than preset mobile detection threshold value, then the quantity of the continuous transition frame is counted, if more than third preset value, then calculates movement
The process of the shape of movement of object are as follows:
According to the profile that moving object in each transition frames of acquisition changes, moving object shape is obtained.
Citing is described in detail below:
Camera obtains automobile image and to be compressed driving on the road, obtain 3 transition frames (IPPPI, first
3) transition frames P quantity between I frame and the 2nd I frame is
If mobile detection threshold value be 100, the first preset value be the 2, second preset value be 4, third preset value is 6;If the first P
The size of frame be 800 bytes (if the first P frame before occur the i.e. previous P frame (size is 1000 bytes) of 2 transition frames P, the first two
P frame (size is 600 bytes), then First Transition frame P size is equal to the average value of the sum of previous P frame sign and the first two P frame sign
That is 800=(1000+600)/2), the size of the 2nd P frame be 950 bytes, the size of the 3rd P frame is 1000 bytes, then the first P frame
Magnitude difference absolute value with the 2nd P frame is 150, and the magnitude difference absolute value of the first P frame and the 3rd P frame is 200, they are big
In mobile detection threshold value 100, and consecutive variations P number of frames is greater than the first preset value 2, then combines table 1 it is found that needing to calculate fortune
The motion profile of animal body.
Calculate the process of the motion profile of moving object are as follows:
For transition frames P frame, the motion vector of automobile is extracted respectively, and further determines that the movement position of automobile, from
And obtain the motion profile of automobile.
If obtaining 5 transition frames, (5) IPPPPPI, the transition number of frames between the first I frame and the 2nd I frame are
If the size of the first P frame is 800 bytes, the size of the 2nd P frame is 1000 bytes, the 3rd P frame sign is 920 words
Section, the 4th P frame sign be 950 bytes, the 5th P frame sign be 940 bytes, then second and third, four, five P frames it is big with the first P frame
Small difference is both greater than mobile detection threshold value 100, and consecutive variations P number of frames is greater than the second preset value 4, then combine table 1 it is found that
Calculate speed, the motion profile of moving object.
For above-mentioned five transition frames P, the motion vector for parsing automobile is extracted respectively, and further determine that the fortune of automobile
Dynamic position;
According to the position of automobile, picture size, automobile size in five transition frames of acquisition, each transition frames are obtained
The displacement of middle moving object;
According to the displacement of acquisition and code rate, the speed of automobile is obtained.
Fig. 2 show the moving sensing system structure chart of the embodiment of the present invention 2, including obtains module, strategic control module;
The acquisition module is connected with the strategic control module;
The acquisition module, for during multimedia-data procession, obtaining the continuous transition frame between key frame simultaneously
The transition frames are sent to the strategic control module;
The strategic control module, for being respectively compared First Transition frame and other continuous transition frames in continuous transition frame
Size extracts parsing motion vector if being all larger than preset mobile detection threshold value, according to Dynamic Control Strategy, obtains movement
The dynamic result of object.
Parsing movement is extracted present invention discloses according to the size variation between continuous transition frame compared to prior art
Vector, to describe the motion conditions of moving object.
In addition, passing through following scheme: obtaining the big of First Transition frame and other continuous transition frames in continuous transition frame respectively
Small absolute value of the difference counts the quantity of the continuous transition frame and according to even if being all larger than preset mobile detection threshold value
Continuous transition number of frames and the calculating dynamic parameter table of comparisons, obtain the dynamic result of moving object, so that calculating the feelings of moving object
Condition is more accurate.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.