CN107404653B - A kind of Parking rapid detection method of HEVC code stream - Google Patents
A kind of Parking rapid detection method of HEVC code stream Download PDFInfo
- Publication number
- CN107404653B CN107404653B CN201710367626.XA CN201710367626A CN107404653B CN 107404653 B CN107404653 B CN 107404653B CN 201710367626 A CN201710367626 A CN 201710367626A CN 107404653 B CN107404653 B CN 107404653B
- Authority
- CN
- China
- Prior art keywords
- motion vector
- coding unit
- flag
- calibrated bolck
- intraframe coding
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/513—Processing of motion vectors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/96—Tree coding, e.g. quad-tree coding
Abstract
The invention discloses a kind of Parking rapid detection method based on HEVC code stream, this method extracts the information such as image coding unit partition mode, motion vector, intra prediction by partial decoding of h compressed video bit stream.On this basis, a kind of intraframe coding unit virtual motion vector distribution method based on intraframe coding dividing elements and prediction residual is provided.This method can effectively make up the intraframe coding unit for the without motion vector for including in motion vector field, make good place mat for the processing of subsequent motion vector field.Then more stable motion vector field is obtained by pretreatment operations such as motion vector field spatial criterion, temporal criterions.The quick detection of Parking is finally carried out according to the relationship of moving target motion vector in adjacent two frames video.Method proposed by the present invention can quickly and effectively detect the Parking in traffic surveillance videos under conditions of endless full decoder HEVC video compression data.
Description
Technical field
The invention belongs to the fields of video processing, are related in the compressed domain knowing the vehicle behavior event that video includes
Not, and in particular to a kind of Parking rapid detection method of HEVC code stream.
Background technique
The automatic discrimination of monitoring and the behavior of vehicle is in terms of prevention traffic accident, ensureing property safety with important meaning
Justice.Monitoring camera mainly currently is arranged by each traffic intersection to be monitored road vehicle, advanced traffic monitoring view
Frequency has the characteristics that clarity is high, data volume is big.Vehicle behavior detection technique be exactly utilize computer how automatic identification video
In include vehicle behavior event.
The behavior of vehicle is generally divided into individual vehicle behavior and the accumulation behavior of a large amount of vehicles.In terms of the Activity recognition of vehicle
Research is concentrated mainly in pixel domain, i.e., the video code flow after coding is first decoded to pixel domain, then passes through the place to pixel
Manage further recognition detection vehicle behavior.The vehicle behavior detection of pixel domain is broadly divided into two classes: trajectory-based Activity recognition
Method and Activity recognition method based on topic model.The former main research object is the behavior of individual vehicle, and the latter is main
Research object be the accumulation of a large amount of vehicles behavior.
Vehicle behavior detection based on video belongs to an application of Video Events processing, although at current major video
Reason technology is pixel domain processing method, but also results in scholar to mitigate the compressed domain video processing technique of computation complexity
Concern.What it is due to com- pressed-domain processing technical treatment is data after video compress, and data volume is relatively much smaller, while effectively
Available information content is also relatively fewer, therefore certainly exists the low problem of event detection precision.
Vehicle behavior event detection technology in the video of conventional pixel domain is broadly divided into three modules, i.e. moving vehicle target
Detection, target vehicle tracking, track fitting and behavior event analysis.It is actually by the vehicle behavior event detection in video
It is divided into the progress of the standalone modules such as object detection and recognition traditional in computer vision technique, motion target tracking and trajectory analysis
Research and realization respectively.And the video treatment research in current compression domain be concentrated mainly on moving Object Segmentation, target identification and
Tracking etc., therefore the vehicle behavior event detection of compression domain can also continue to use the vehicle behavior event detection system of pixel domain
System, however the vehicle characteristics and environmental characteristic information that can provide in compression domain are fewer, cause not to be vehicle all in pixel domain
Behavior event detecting method is all effective.But compression domain includes the no useful information of some pixel domains, such as coding unit
Division, the motion vector of predictive coding unit, prediction residual etc..HEVC video encoding standard is newest video compression standard,
Future will be widely used.Therefore information realization vehicle is compressed by the coding unit division etc. for directly HEVC code stream being used to provide
The detection of Parking, it will be able to avoid the above problem.But there is presently no disclose this detection method in the prior art.
Summary of the invention
Present invention aims at directly utilize motion vector information in HEVC code stream, coding unit division, intraframe coding list
The information such as first prediction residual carry out vehicle parking event detection.A kind of HEVC code stream is provided and carries out the Parking quickly side of detection
Method avoids unnecessary video decoding process, to reduce the complexity of calculating, and is not destroying original compressed video data
On the basis of carry out quick vehicle parking event detection.
The present invention is to achieve the goals above the technical solution adopted is that (such as to the compressed video stream data that will be analyzed
HEVC bit stream data) it carries out partial decoding of h analysis the movement for including in bit stream data is extracted by simple entropy decoding process
The information such as vector, coding unit division, residual error data carry out confluence analysis to these data, extract the feature letter of vehicular events
Breath, then detects vehicle parking behavior event by characteristic.The present invention is mainly utilized to be sent out in parking behavior event
When raw, the motion vector in vehicle target region is what this entirely different feature carried out in adjacent video frames, i.e. Parking
Before generation, the motion vector in vehicle target region is usually bigger.After parking, the motion vector in vehicle target region is general
For zero motion vector.
Above-mentioned technical proposal is specifically, comprising the following steps:
Step 1: coding unit structure, motion vector and the intraframe coding of kth frame encoded video are extracted from HEVC code stream
Unit residual error data;
Step 2: empty for the configuration of each intraframe coding unit according to coding unit structure and intraframe coding unit residual error data
Quasi- motion vector;
Step 3: different size of coding unit being uniformly divided into the square of NxN, and by the fortune of coding unit before dividing
Dynamic vector is that each calibrated bolck configures motion vector, then the motion vector of different reference frames is converted to the fortune of unified reference frame
Dynamic vector constitutes motion vector field
Step 4: to motion vector fieldDenoising is carried out, is constituted new
Step 5: given threshold Thstart, for distinguishing motion vector fieldThe background block and moving vehicle block of Plays block,
Method is as follows: configuring mark a flag_start, flag_start for each calibrated bolck indicates that the calibrated bolck belongs to fortune for 1
Motor-car block, flag_start indicate that the calibrated bolck belongs to background block for 0, judge motion vector fieldIn each calibrated bolck Bi k, i
It indicatesThe serial number of Plays block, k expression frame number, motion vector MV, if | MV | >=Thstart, then the marker of the calibrated bolck
Flag_start is set to 1, and otherwise, flag_start is set to 0, by motion vector fieldIn each flag_start be 1 mark
The all pixels that all pixels of quasi- block are set to the calibrated bolck that 1, flag_start is 0 are set to 0, and counting flag_start is 1
Calibrated bolck number N umstart;
Step 6: coding unit structure, the motion vector, intraframe coding list of k+1 frame video data are extracted from HEVC code stream
First residual error data carries out motion vector processing according to above-mentioned steps 2 to step 4, obtains motion vector fieldIt willMiddle movement arrow
The amplitude for measuring MV is more than or equal to threshold value ThstartCalibrated bolck Bi k+1Kth frame, which is moved to, by MV retrospect obtains Bm k, and willMiddle Bm kIt is interior
Bi k+1The pixel of block corresponding position is set to 0, and other positions pixel is constant;
Step 7: setting threshold value Thstop, for distinguishing the type of calibrated bolck, and a mark is configured for each calibrated bolck
Flag_end, flag_end indicate that the block belongs to possible parking area for 1, and flag_end indicates that the block belongs to non-parking area for 0
Domain, the calibrated bolck that traversal all flag_start of kth frame are 1Counting flag_start is 1Middle pixel value is 1 pixel
Point number Numnext, calculate NumnextWithThe percentage of size block_size determines the type of calibrated bolck, and calculation method is such as
Under:
Step 8: askingThe calibrated bolck number N um that middle flag_end is 1stopIt is the minimum external square in 1 region with flag_end
Shape includes calibrated bolck number N umtotalRatio, and according to the following formula realize Parking judgement:
State_car indicates this there are Parking for 1, and state_car is that Parking, state_ is not present in 0 expression
Car is 1, and detection terminates, state_car 0, removes a frame data, continues step 1 and arrives step 8.
It further, is each intraframe coding unit configuration virtual motion vector described in above-mentioned steps 2 of the present invention, including with
Lower step:
Step 1: initialization frame interior coding unit failure allocation result counts mark Intra_flag=0, and according in frame
Coding unit divides size and is divided into following grade:
The intraframe coding unit that motion vector is not configured in note is BnoMV;
Step 2: traversal BnoMV, and the prediction residual res of intraframe coding unit is calculated, specific calculation method is as follows:
(1) the residual error data r of pixel in current intraframe coding unit is readi k, wherein k indicates current coded unit whole
The index ID of a division unit, is integer, and i indicates current pixel point in the size of the index ID, i of current intraframe coding unit
Current coded unit size c_size is arrived for 1;
(2) residual error of current coded unit is calculatedWherein
Step 3: virtual motion vector is distributed to intraframe coding unit, specific distribution method is as follows:
(1) if BnoMVIntra_level be less than or equal to ThB, then by BnoMVIt is considered as background environment part, while will be right
Answer BnoMVMotion vector be set to (0,0);
(2) if BnoMVIntra_level be more than or equal to ThFOr BnoMVResidual error res be greater than threshold value Thres, then will
BnoMVIt is considered as moving vehicle part, meanwhile, extract BnoMVThe motion vector of surrounding interframe encode unit, makes non-zero motion vectors
Median motion vector is extracted with polar coordinates median filtering method, assigns current B with thisnoMVBlock, if adjacent encoder unit is all
Motion vector using intra-frame encoding mode or neighboring prediction coding unit is zero, then retains current intraframe coding unit mould
Formula wouldn't configure virtual motion vector;
(3) if BnoMVIntra_level be greater than ThBAnd it is less than ThF, while res is less than Thres, then B is extractednoMVWeek
The motion vector for enclosing adjacent interframe coding unit extracts median motion using polar coordinates median filtering method to motion vector and swears
Amount, assigns current BnoMVBlock retains current intraframe coding unit mould if adjacent encoder unit is all intra-frame encoding mode
Formula wouldn't configure virtual motion vector;
Step 4: judging whether the distribution of intraframe coding unit motion vector succeeds, enable Intra_ if distribution is failed
Flag=Intra_flag+1;Otherwise, it performs the next step;
Step 5: judging whether current intraframe coding unit traverses completion, if current intraframe coding unit has not traversed
At then jump procedure 2;Otherwise, it performs the next step;
Step 6: if Intra_flag > 0, jump procedure 1;Otherwise circulation is terminated.
Further, it includes following step that use polar coordinates median filtering method of the present invention, which extracts median motion vector,
It is rapid:
Step 1: by the inter prediction encoding unit universal formulation in current 4 neighborhood of intraframe coding unit to 4 × 4 sizes
Cell level, and the motion vector after division is allocated according to the motion vector of original predictive unit;
Step 2: the motion vector after division being saved in memory, the angle, θ of all motion vectors is soughti, range value |
|vi||2, and respectively by the two by sequence from small to large;
Step 3: angle, θ is sought using median filteringiAnd range value | | vi||2Intermediate value, and using the median vector as working as
The motion vector of preceding intraframe coding unit.
Further, motion vector is handled described in above-mentioned steps 3 of the present invention, composition motion vector field, including with
Lower step:
Step 1: different size coding unit and corresponding motion vector are divided by the processing of motion vector Spatial normalization
The calibrated bolck and respective motion vectors of unified size 4 × 4, the method is as follows: it is greater than 4 × 4 part for coding unit size, it will
The coding unit is divided into the calibrated bolck of 4 × 4 sizes, and the motion vector of all calibrated bolcks is the coding unit movement arrow before dividing
Amount;
Step 2: the processing of motion vector temporal criterionization converts the motion vector based on multi-reference frame extracted in HEVC
The motion vector of calibrated bolck is corresponded to for same adjacent video frames, it is assumed that current video P frame is designated as Ic, IcIn the i-th predictive coding
Unit is denoted as Bi, predictive coding unit BiMotion vector be denoted as MV (Bi), reference frame is denoted as Ir, subscript c, i, r are whole here
Number number mark, the motion vector of temporal criterion
Further, motion vector field denoising described in above-mentioned steps 4 of the present invention, comprising the following steps:
Step 1: calculating the lateral MV of motion vector MVxWith longitudinal component MVyThe sum of absolute value SumMV, according to SumMVWith
The comparison of threshold value T determines the value of MV, the method is as follows:
The selection of T is related with the motion estimation techniques used in HEVC video encoding standard;
Step 2: using 3 × 3 templates pairMotion vector carry out median filter process.
Further, it includes calibrated bolck number N um that the present invention, which calculates region minimum circumscribed rectangle described in step 8,total's
Method are as follows:
Step 1: seeking motion vector fieldThe calibrated bolck number N um that middle flag_end marker is 1stop;
Step 2: seeking the minimum circumscribed rectangle rect for the calibrated bolck for being 1 comprising flag_end marker;
Step 3: seeking the number N um for all calibrated bolcks that rect includestotal。
Compared with prior art, beneficial outcomes of the invention:
1, the present invention does not need complete decoding compressed video data, when being significantly reduced a large amount of calculating that video decoding needs
Between;Handling data simultaneously is mainly motion vector, greatly reduces the complexity issue of calculating.
2, the present invention does not need to carry out vehicle target detection and tracking according to the motion vector distribution of moving vehicle in video
Deng complicated calculating step, it is directly realized by the detection of Parking, is had a good application prospect.
Detailed description of the invention
Vehicle parking event quickly detects block diagram in Fig. 1 HEVC code stream.
The partition structure schematic diagram of Fig. 2 HEVC coding tree unit.
The data structure result figure extracted in Fig. 3 super expressway monitor video code stream.
Fig. 4 is divided based on coding unit and the intraframe coding unit motion vector of prediction residual distributes block diagram.
Fig. 5 intraframe coding modular movement vector distributes schematic diagram.
Fig. 6 motion vector and coding unit divide schematic diagram.
Fig. 7 motion vector temporal criterion processing schematic.
Fig. 8 moves block matching schematic diagram.
Fig. 9 minimum circumscribed rectangle schematic diagram.
Specific embodiment
The present invention provides a kind of quick Parking detection algorithm based on HEVC code stream, is not decoding HEVC code stream number
The quick detection of Parking is realized under the premise of.Meanwhile it providing in data processing a kind of based on coding unit
It divides and intraframe coding unit prediction residual is the method that intraframe coding unit configures virtual motion vector, realize that Parking is fast
Speed detection.
As shown in Figure 1, specific implementation needs to be implemented following steps:
Step 101, it is compiled out of coding unit structure, motion vector and frame that extract kth frame encoded video in HEVC code stream
Code unit residual error data.The corresponding code stream position of information above is oriented according to HEVC video compression coding standard syntax semanteme,
Then the information is decoded by entropy decoding.Fig. 2 is that the coding tree unit partition structure of HEVC video encoding standard shows
It is intended to, HEVC uses coding unit tissue structure of the quad-tree structure as video frame, and the smallest coding unit (CU) size is 8
×8.Coding unit is as shown in Figure 2.The CU that wherein size is 16 × 16 in Fig. 2 can continue to be divided into according to division rule
8×8.And the division of predicting unit (PU) and converter unit (TU) is further division on the basis of CU in HEVC coding standard
, but its minimum division unit size is 4 × 4.Fig. 3 is to test the division result extracted in certain high speed monitor video code stream
Figure, grey arrow indicates the size and Orientation of motion vector in figure, and black box is coding unit division result, in experiment due to
HEVC inter-frame prediction techniques are handled using a quarter pixel precision, i.e., are carried out by interpolation processing operation between adjacent pixel
Pixel filling, so the motion vector information extracted is about four times of original image pixels size;
Step 102, it according to coding unit structure and intraframe coding unit residual error data, is configured for each intraframe coding unit
Virtual motion vector.As shown in figure 4, concrete configuration process is as follows:
Step 401, initialization frame interior coding unit failure allocation result counts mark Intra_flag=0.And according to frame
Interior coding dividing elements size is divided into following grade:
Here P () indicates the division size of intraframe coding unit, and 1-5 is respectively indicated to be compiled according to intraframe coding dividing elements
Code cell level.After by intraframe coding dividing elements being five grades, the resolution ratio of video is read.For different videos
Different threshold value Th is arranged in resolution ratio and monitor videoBAnd ThF.According to the grade of intraframe coding unit compared with threshold value, just
Step division target code unit belongs to moving vehicle prospect or background environment.The intraframe coding list of motion vector is not configured in note
Member is BnoMV;
Step 402, B is traversednoMV, and calculate the prediction residual res of intraframe coding unit.Specific calculation method is as follows:
(1) the residual error data r of pixel in current intraframe coding unit is readi k, wherein k indicates current coded unit whole
The index ID (for integer) of a division unit, i indicate current pixel point in the index ID (size of i of current intraframe coding unit
Current coded unit size c_size is arrived for 1);
(2) residual error of current coded unit is calculatedWherein
Step 403, virtual motion vector is distributed to intraframe coding unit.Specific distribution method is as follows:
(1) if BnoMVIntra_level be less than or equal to ThB, then by BnoMVIt is considered as background environment part, while will be right
Answer BnoMVMotion vector be set to (0,0);
(2) if BnoMVIntra_level be more than or equal to ThFOr BnoMVResidual error res be greater than threshold value Thres, then will
BnoMVIt is considered as moving vehicle part.Meanwhile extracting BnoMVThe motion vector of surrounding interframe encode unit, makes non-zero motion vectors
Median motion vector is extracted with polar coordinates median filtering method, assigns current B with thisnoMVBlock.If adjacent encoder unit is all
Motion vector using intra-frame encoding mode or neighboring prediction coding unit is zero, then retains current intraframe coding unit mould
Formula wouldn't configure virtual motion vector.Wherein res indicate current coded unit in residual error be greater than certain threshold value number of pixels,
ThresIndicate current coded unit whether be target vehicle square threshold value, since the size of coding unit in practice is inconsistent
, so threshold value Th hereresAlso different settings should be carried out according to different coding unit sizes, here by ThresConversion
For Thres=block_size × th, th ∈ (0,1), it is 0.3 that th is chosen in experiment;
(3) if BnoMVIntra_level be greater than ThBAnd it is less than ThF, while res is less than Thres, then B is extractednoMVWeek
The motion vector for enclosing adjacent interframe coding unit extracts median motion using polar coordinates median filtering method to motion vector and swears
Amount, assigns current BnoMVBlock.If adjacent encoder unit is all intra-frame encoding mode, retain current intraframe coding unit mould
Formula wouldn't configure virtual motion vector.
Step 404, judge whether the distribution of intraframe coding unit motion vector succeeds.Intra_ is enabled if distribution is failed
Flag=Intra_flag+1.Otherwise, it performs the next step;
Step 405, judge whether current intraframe coding unit traverses completion.If current intraframe coding unit has not traversed
At then jump procedure 2.Otherwise, it performs the next step;
Step 406, if Intra_flag > 0, jump procedure 1;Otherwise circulation is terminated.
For polar coordinates median filter method used in step 403, specific calculating process is as shown in Figure 5.It is specific to calculate
Process is as follows:
The storage list list of MV is expressed as V=(v in Fig. 51,v2,v3,v3,v4,v4,v5,v5,v6,v6,v6,v6).Wherein
v6Occur 4 times, because its coding unit can be divided into 4 minimum code squares adjacent with intraframe coding unit to be processed
(such as 4 × 4 squares chosen in experiment).Similarly, v3,v4,v5Occur twice respectively, and v1,v2Only occur primary.This MV column
Table at most may include 16 MV, i.e., intraframe coding unit to be processed it is adjacent be interframe encode unit entirely.And it is to be processed in Fig. 5
BnoMVThere are intraframe coding units for adjacent encoder unit.
Assuming that V=(vi)I=1:nIt is input motion vector, if θiIndicate motion vector viAnd vi+1Between angle (it is assumed that
v1≡vn+1).Then it can define and choose m motion vector composition set from motion vector setWherein
viBe chosen from input motion set of vectors, and m and I can be expressed as beWith For the meaning being rounded downwards.New motion vector set known to from above-mentioned two formulaInclude
Angle and the smallest half motion vector in original motion vector set.Finally the MV for intraframe coding unit to be processed distribution can
To be sought by following two mathematic(al) representationWith
Step 103, different size of coding unit is uniformly divided into square (hereinafter referred to as calibrated bolck, the calibrated bolck of 4x4
Size block_size can be 4x4 or 8x8, specifically determine that the present invention is with 4x4 size by the division of HEVC coding unit
Example), and be that each calibrated bolck configures motion vector by the motion vector of coding unit before dividing, then by the fortune of different reference frames
Dynamic vector is converted to the motion vector (present invention uses neighboring reference frame) of unified reference frame, constitutes motion vector field V0.Specifically
Calculating process is broadly divided into motion vector Spatial normalization and time standard:
(1) motion vector Spatial normalization is handled.As shown in fig. 6, black square is intraframe coding unit in figure, so its
There is no motion vectors.And do not have in figure arrow coding unit be not indicate the coding unit there is no motion vector, and
It is to say that the motion vector of the coding unit is zero motion vector.The coding unit of all sizes and corresponding motion vector are converted
For the calibrated bolck and respective motion vectors of unified size 4 × 4.Specifically, it is greater than 4 × 4 part for coding unit size, it will
The coding unit is converted into the calibrated bolck of 4 × 4 sizes, and the motion vector of all substandard blocks is the coding unit movement before dividing
Vector.As shown in fig. 6, above processing is pressed, and it first will be to intraframe coding unit assigned motion vector, it then will be shown in Fig. 6 (a)
Different coding unit is converted into the calibrated bolck of unified size shown in Fig. 6 (b), and distributes corresponding motion vector.It is not transported in figure
The calibrated bolck of dynamic vector arrow logo is because its motion vector is zero motion vector;
(2) motion vector temporal criterionization is handled.As shown in fig. 7, HEVC inter frame motion estimation is handled using multi-reference frame
Technology.Current video P frame is designated as Ic, IcIn the i-th square be denoted as Bi, square BiMotion vector be denoted as MV (Bi), reference
Frame is denoted as Ir, subscript c, i, r are integer number mark here.The motion vector of temporal criterionization processingTable
Now in fig. 7, it is the motion vector of different reference frames to be converted to the motion vector of same reference frame.
Step 104, to motion vector fieldDenoising is carried out, is constituted newSpecific calculating process:
(1) the horizontal and vertical component (MV of motion vector MV is calculatedxAnd MVy) absolute value and SumMV, according to SumMVWith
The comparison of threshold value T determines the value of MV, specific as follows:
The selection of T is related with the motion estimation techniques used in HEVC video encoding standard, such as a quarter pixel motion
Estimation, the estimation of half pixel motion etc. will lead to the difference of T;
(2) 3 × 3 size templates pair are usedCarry out median filter process.Centered on current square, in 3 × 3 squares
Motion vector sorted from small to large with MV range value, select median replace current square motion vector.
Step 105, given threshold Thstart, for distinguishing motion vector fieldThe background block and moving vehicle of Plays block
Block.Method is as follows: configuring mark a flag_start, flag_start for each calibrated bolck indicates the calibrated bolck category for 1
In moving vehicle block, flag_start indicates that the calibrated bolck belongs to background block for 0.Judge motion vector fieldIn each calibrated bolck
Bi k(i is indicatedThe serial number of Plays block, k indicate frame number) motion vector MV, if | MV | >=Thstart, then the mark of the calibrated bolck
Know position flag_start and be set to 1, otherwise, flag_start is set to 0.By dynamic vector fieldIn each flag_start be 1
The all pixels that all pixels of calibrated bolck are set to the calibrated bolck that 1, flag_start is 0 are set to 0.And it counts flag_start and is
1 calibrated bolck number N umstart;
Step 106, coding unit structure, the motion vector, intraframe coding of k+1 frame video data are extracted from HEVC code stream
Unit residual error data.Motion vector processing is carried out according to above-mentioned steps 2 to step 4, obtains motion vector fieldIt willMiddle movement
The amplitude of vector MV is more than or equal to threshold value ThstartCalibrated bolckKth frame, which is moved to, by MV retrospect obtains Bm k, and willIn
Bm kInterior Bi k+1The pixel of block corresponding position is set to 0, and other positions pixel is constant.It is specific as shown in figure 8, black mark in k+1 frame
Quasi- block movement square to be processed, is moved to k frame by motion vector MV for it and obtains black standard block, the block and B1, B2, B3, B4
There is intersection, the partial pixel position of intersection is set 0, other positions pixel is constant;;
Step 107, threshold value Th is setstop, for distinguishing the type of calibrated bolck, and a mark is configured for each calibrated bolck
Flag_end, flag_end indicate that the block belongs to possible parking area for 1, and flag_end indicates that the block belongs to non-parking area for 0
Domain.Traverse the calibrated bolck that all flag_start of kth frame are 1Counting flag_start is 1Middle pixel value is 1 pixel
Point number Numnext, calculate NumnextWithThe percentage of size block_size determines the type of calibrated bolck, and calculation method is such as
Under:
Step 108, as shown in figure 9, seekingThe calibrated bolck number N um and flag_end that middle flag_end is 1 are 1 region
Minimum circumscribed rectangle includes calibrated bolck number N umtotalPercentage, in Fig. 9, the calibrated bolck of gray area part is flag_
The calibrated bolck that end is 1, so Num in the figurestopIt is 12.The calibrated bolck that the region minimum circumscribed rectangle includes then includes white
With grey two parts calibrated bolck, Num in figuretotalIt is 25.And the judgement of Parking is realized according to the following formula:
State_car indicates this there are Parking for 1, and state_car is that Parking is not present in 0 expression.The present invention
Middle selected threshold ThcarIt is 0.5, ThsIt is 0.65.Here state_car indicates that the square is Parking, state_car for 1
Indicate not there is no Parking for 0.
Claims (6)
1. a kind of Parking rapid detection method based on HEVC code stream, it is characterised in that the following steps are included:
Step 1: coding unit structure, motion vector and the intraframe coding unit of kth frame encoded video are extracted from HEVC code stream
Residual error data;
Step 2: according to coding unit structure and intraframe coding unit residual error data, for the virtual fortune of each intraframe coding unit configuration
Dynamic vector;
Step 3: different size of coding unit being uniformly divided into the square of NxN, and by the movement arrow of coding unit before dividing
Amount is that each calibrated bolck configures motion vector, then swears the movement that the motion vector of different reference frames is converted to unified reference frame
Amount constitutes motion vector field
Step 4: to motion vector fieldDenoising is carried out, is constituted new
Step 5: given threshold Thstart, for distinguishing motion vector fieldThe background block and moving vehicle block of Plays block, method
As follows: configuring mark a flag_start, flag_start for each calibrated bolck indicates that the calibrated bolck belongs to moving vehicle for 1
Block, flag_start indicate that the calibrated bolck belongs to background block for 0, judge motion vector fieldIn each calibrated bolck Bi k, i expressionThe serial number of Plays block, k expression frame number, motion vector MV, if | MV | >=Thstart, then the marker of the calibrated bolck
Flag_start is set to 1, and otherwise, flag_start is set to 0, by motion vector fieldIn each flag_start be 1 mark
The all pixels that all pixels of quasi- block are set to the calibrated bolck that 1, flag_start is 0 are set to 0, and counting flag_start is 1
Calibrated bolck number N umstart;
Step 6: the coding unit structure of extraction k+1 frame video data, motion vector, intraframe coding unit are residual from HEVC code stream
Difference data carries out motion vector processing according to above-mentioned steps 2 to step 4, obtains motion vector fieldIt willMiddle motion vector MV
Amplitude be more than or equal to threshold value ThstartCalibrated bolck Bi k+1Kth frame, which is moved to, by MV retrospect obtains Bm k, and willMiddle Bm kInterior Bi k +1The pixel of block corresponding position is set to 0, and other positions pixel is constant;
Step 7: setting threshold value Thstop, for distinguishing the type of calibrated bolck, and a mark flag_ is configured for each calibrated bolck
End, flag_end indicate that the block belongs to possible parking area for 1, and flag_end indicates that the block belongs to non-parking area for 0, time
Go through the calibrated bolck that all flag_start of kth frame are 1Counting flag_start is 1Middle pixel value is 1 pixel number
Mesh Numnext, calculate NumnextWithThe percentage of size block_size determines that the type of calibrated bolck, calculation method are as follows:
Step 8: askingThe calibrated bolck number N um that middle flag_end is 1stopIt is that 1 region minimum circumscribed rectangle includes with flag_end
Calibrated bolck number N umtotalRatio, and according to the following formula realize Parking judgement:
State_car indicates this there are Parking for 1, and state_car is that Parking is not present in 0 expression, and state_car is
1, detection terminates, state_car 0, removes a frame data, continues step 1 and arrives step 8.
2. the Parking rapid detection method according to claim 1 based on HEVC code stream, it is characterised in that step 2 institute
It states and configures virtual motion vector for each intraframe coding unit, comprising the following steps:
Step 1: initialization frame interior coding unit failure allocation result counts mark Intra_flag=0, and according to intraframe coding
Dividing elements size is divided into following grade:
Here P () indicates the division size of intraframe coding unit, and 1-5, which is respectively indicated, encodes list according to intraframe coding dividing elements
First grade;After by intraframe coding dividing elements being five grades, the resolution ratio of video is read;Different videos is differentiated
Different threshold value ThB and ThF is arranged in rate and monitor video;It is preliminary to draw according to the grade of intraframe coding unit compared with threshold value
Partial objectives for coding unit belongs to moving vehicle prospect or background environment;Remember that the intraframe coding unit that motion vector is not configured is
BnoMV;
Step 2: traversal BnoMV, and the prediction residual res of intraframe coding unit is calculated, specific calculation method is as follows:
(1) the residual error data r of pixel in current intraframe coding unit is readi k, wherein k indicates that current coded unit is entirely being drawn
The index ID of sub-unit, is integer, and i expression current pixel point is 1 in the size of the index ID, i of current intraframe coding unit
To current coded unit size c_size;
(2) residual error of current coded unit is calculatedWherein
Step 3: virtual motion vector is distributed to intraframe coding unit, specific distribution method is as follows:
(1) if BnoMVIntra_level be less than or equal to ThB, then by BnoMVIt is considered as background environment part, while will corresponding BnoMV
Motion vector be set to (0,0);
(2) if BnoMVIntra_level be more than or equal to ThFOr BnoMVResidual error res be greater than threshold value Thres, then by BnoMVDepending on
For moving vehicle part, meanwhile, extract BnoMVThe motion vector of surrounding interframe encode unit sits non-zero motion vectors using pole
Mark median filtering method extracts median motion vector, assigns current B with thisnoMVBlock, if adjacent encoder unit is all using frame
The motion vector of interior coding mode or neighboring prediction coding unit is zero, then retains current intraframe coding unit mode, temporarily
Do not configure virtual motion vector;
(3) if BnoMVIntra_level be greater than ThBAnd it is less than ThF, while res is less than Thres, then B is extractednoMVSurrounding is adjacent
The motion vector of interframe encode unit extracts median motion vector using polar coordinates median filtering method to motion vector, assigns
Current BnoMVBlock retains current intraframe coding unit mode, Zan Bupei if adjacent encoder unit is all intra-frame encoding mode
Set virtual motion vector;
Step 4: judging whether the distribution of intraframe coding unit motion vector succeeds, enable Intra_flag=if distribution is failed
Intra_flag+1;Otherwise, it performs the next step;
Step 5: judge whether current intraframe coding unit traverses completion, if current intraframe coding unit does not traverse completion,
Jump procedure 2;Otherwise, it performs the next step;
Step 6: if Intra_flag > 0, jump procedure 1;Otherwise circulation is terminated.
3. the Parking rapid detection method according to claim 2 based on HEVC code stream, it is characterised in that described to make
Median motion vector is extracted with polar coordinates median filtering method to comprise the steps of:
Step 1: by the unit of the inter prediction encoding unit universal formulation in current 4 neighborhood of intraframe coding unit to 4 × 4 sizes
Grade, and the motion vector after division is allocated according to the motion vector of original predictive unit;
Step 2: the motion vector after division being saved in memory, the angle, θ of all motion vectors is soughti, range value | | vi|
|2, and respectively by the two by sequence from small to large;
Step 3: angle, θ is sought using median filteringiAnd range value | | vi||2Intermediate value, and using the median vector as present frame
The motion vector of interior coding unit.
4. the Parking rapid detection method according to claim 1 based on HEVC code stream, it is characterised in that step 3 institute
The motion vector that the motion vector of different reference frames is converted to unified reference frame is stated, motion vector field, including following step are constituted
It is rapid:
Step 1: different size coding unit and corresponding motion vector are divided into unification by the processing of motion vector Spatial normalization
The calibrated bolck and respective motion vectors of size 4 × 4, the method is as follows: be greater than 4 × 4 part for coding unit size, by the volume
Code unit is divided into the calibrated bolck of 4 × 4 sizes, and the motion vector of all calibrated bolcks is the coding unit motion vector before dividing;
Step 2: the processing of motion vector temporal criterionization converts the motion vector based on multi-reference frame extracted in HEVC to together
One adjacent video frames correspond to the motion vector of calibrated bolck, it is assumed that current video P frame is designated as Ic, IcIn the i-th predictive coding unit
It is denoted as Bi, predictive coding unit BiMotion vector be denoted as MV (Bi), reference frame is denoted as Ir, subscript c, i, r are integer number here
Word mark, the motion vector of temporal criterion
5. the Parking rapid detection method according to claim 1 based on HEVC code stream, it is characterised in that step 4 institute
The motion vector field denoising stated, comprising the following steps:
Step 1: calculating the lateral MV of motion vector MVxWith longitudinal component MVyThe sum of absolute value SumMV, according to SumMVWith threshold value
The comparison of T determines the value of MV, the method is as follows:
The selection of T is related with the motion estimation techniques used in HEVC video encoding standard;
Step 2: using 3 × 3 templates pairMotion vector carry out median filter process.
6. the Parking rapid detection method according to claim 1 based on HEVC code stream, it is characterised in that calculate step
Region minimum circumscribed rectangle described in rapid 8 includes calibrated bolck number N umtotalMethod are as follows:
Step 1: seeking motion vector fieldThe calibrated bolck number N um that middle flag_end marker is 1stop;
Step 2: seeking the minimum circumscribed rectangle rect for the calibrated bolck for being 1 comprising flag_end marker;
Step 3: seeking the number N um for all calibrated bolcks that rect includestotal。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710367626.XA CN107404653B (en) | 2017-05-23 | 2017-05-23 | A kind of Parking rapid detection method of HEVC code stream |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710367626.XA CN107404653B (en) | 2017-05-23 | 2017-05-23 | A kind of Parking rapid detection method of HEVC code stream |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107404653A CN107404653A (en) | 2017-11-28 |
CN107404653B true CN107404653B (en) | 2019-10-18 |
Family
ID=60404717
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710367626.XA Active CN107404653B (en) | 2017-05-23 | 2017-05-23 | A kind of Parking rapid detection method of HEVC code stream |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107404653B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107742313B (en) * | 2017-09-26 | 2021-02-09 | 华勤技术股份有限公司 | Data compression method and device applied to vector space |
CN108256511B (en) * | 2018-03-15 | 2022-03-29 | 太原理工大学 | Human motion detection method based on video coding code stream |
CN110163107B (en) * | 2019-04-22 | 2021-06-29 | 智慧互通科技股份有限公司 | Method and device for recognizing roadside parking behavior based on video frames |
CN112714316B (en) * | 2020-12-21 | 2023-01-31 | 太原智林信息技术股份有限公司 | Regular mark detection and classification identification method based on video code stream |
CN113014925B (en) * | 2021-01-27 | 2022-08-23 | 重庆邮电大学 | H.266/VVC inter-frame coding CU fast dividing method and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103491334A (en) * | 2013-09-11 | 2014-01-01 | 浙江大学 | Video transcode method from H264 to HEVC based on region feature analysis |
CN104301735A (en) * | 2014-10-31 | 2015-01-21 | 武汉大学 | Method and system for global encoding of urban traffic surveillance video |
CN104599502A (en) * | 2015-02-13 | 2015-05-06 | 重庆邮电大学 | Method for traffic flow statistics based on video monitoring |
CN105409222A (en) * | 2013-07-17 | 2016-03-16 | 索尼公司 | Image processing device and method |
CN106340031A (en) * | 2015-07-07 | 2017-01-18 | 香港生产力促进局 | Method and device for detecting moving object |
-
2017
- 2017-05-23 CN CN201710367626.XA patent/CN107404653B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105409222A (en) * | 2013-07-17 | 2016-03-16 | 索尼公司 | Image processing device and method |
CN103491334A (en) * | 2013-09-11 | 2014-01-01 | 浙江大学 | Video transcode method from H264 to HEVC based on region feature analysis |
CN104301735A (en) * | 2014-10-31 | 2015-01-21 | 武汉大学 | Method and system for global encoding of urban traffic surveillance video |
CN104599502A (en) * | 2015-02-13 | 2015-05-06 | 重庆邮电大学 | Method for traffic flow statistics based on video monitoring |
CN106340031A (en) * | 2015-07-07 | 2017-01-18 | 香港生产力促进局 | Method and device for detecting moving object |
Non-Patent Citations (4)
Title |
---|
HEVC Compressed Domain Moving Object Detection and Classfication;Liang Zhao等;《IEEE explore》;20161231;全文 * |
交通监控视频中的车辆异常行为检测;宋耀;《中国优秀硕士学位论文全文数据库》;20160531;全文 * |
适于交通监控的内容自适应空间可伸缩视频编码算法;时秀波;《计算机应用与软件》;20150731;全文 * |
面向新一代移动通信的视频监控系统研究与设计;吕小军;《中国优秀硕士学位论文全文数据库》;20170228;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN107404653A (en) | 2017-11-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107404653B (en) | A kind of Parking rapid detection method of HEVC code stream | |
AU2020207857B2 (en) | Image encoding method and apparatus, and image decoding method and apparatus | |
CN102917225B (en) | HEVC intraframe coding unit fast selecting method | |
CN101266132B (en) | Running disorder detection method based on MPFG movement vector | |
CN107371022B (en) | Inter-frame coding unit rapid dividing method applied to HEVC medical image lossless coding | |
CN101873500A (en) | Interframe prediction encoding method, interframe prediction decoding method and equipment | |
CN104732236B (en) | A kind of crowd's abnormal behaviour intelligent detecting method based on layered shaping | |
CN106791828B (en) | Video transcoding method and its transcoder based on machine learning | |
CN109672896A (en) | Utilize the method for video coding and device of depth information | |
Zhang et al. | Quadtree decision for depth intra coding in 3D-HEVC by good feature | |
KR102261669B1 (en) | Artificial Neural Network Based Object Region Detection Method, Device and Computer Program Thereof | |
CN106507110A (en) | Court's trial witness picture and video motion picture guard method, device and system | |
CN108769696A (en) | A kind of DVC-HEVC video transcoding methods based on Fisher discriminates | |
CN104104948B (en) | Video transcoding method and video code translator | |
CN102984524A (en) | Video coding and decoding method based on block layer decomposition | |
CN105791863B (en) | 3D-HEVC depth map intra-frame predictive encoding method based on layer | |
Solana-Cipres et al. | Real-time moving object segmentation in H. 264 compressed domain based on approximate reasoning | |
CN106165425B (en) | Utilize the method for video coding and device of depth information | |
Luo et al. | Fast intra coding unit size decision for HEVC with GPU based keypoint detection | |
CN101626505B (en) | Mode processing method and device thereof of duplex-prediction | |
CN112861698B (en) | Compressed domain behavior identification method based on multi-scale time sequence receptive field | |
CN102592130A (en) | Target identification system aimed at underwater microscopic video and video coding method thereof | |
CN109618152A (en) | Depth divides coding method, device and electronic equipment | |
KR102592089B1 (en) | Moving Frame Detecting Method, Device and Computer Program Thereof | |
KR102530635B1 (en) | Object Region Detection Method, Device and Computer Program For Traffic Information and Pedestrian Information Thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |