CN108833928A - Traffic Surveillance Video coding method - Google Patents
Traffic Surveillance Video coding method Download PDFInfo
- Publication number
- CN108833928A CN108833928A CN201810720989.1A CN201810720989A CN108833928A CN 108833928 A CN108833928 A CN 108833928A CN 201810720989 A CN201810720989 A CN 201810720989A CN 108833928 A CN108833928 A CN 108833928A
- Authority
- CN
- China
- Prior art keywords
- vehicle
- encoded
- current
- background
- block
- 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.)
- Granted
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/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
- G06V20/54—Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
-
- 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/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/08—Detecting or categorising vehicles
Abstract
The invention discloses a kind of Traffic Surveillance Video coding methods, this method is based on vehicle and background database realizes Traffic Surveillance Video coding, after the cost for paying certain memory space, Traffic Surveillance Video can be effectively removed in redundancy global present on time dimension, finally, overall effect is effectively to improve the binary encoding performance of Traffic Surveillance Video in the case where being not apparent from increase coding and decoding end complexity.
Description
Technical field
The present invention relates to technical field of video coding more particularly to a kind of Traffic Surveillance Video coding methods.
Background technique
In recent years, with the rapid development of wisdom traffic, the data volume of monitor video has showed volatile growth.For
Effective storage and transmitting, monitoring video data, first have to solve the problems, such as be exactly monitor video encoded question.
H.264/AVC or H.265/HEVC currently, the compression of monitor video generallys use universal video coding standard.So
And, it is contemplated that some characteristics that monitor video has, such as monitoring camera are static, are directly used in generic video coding techniques
On the coding of monitor video, the characteristic that monitor video is own cannot be made full use of.In order to further increase monitor video coding
Performance, many researchers have invented a series of coding techniques for monitor video.
In general, the content in monitor video can be roughly divided into background content and foreground content.Correspondingly, for prison
The coding for controlling video can design in terms of optimization background coding and optimization prospect encode two respectively.In view of monitoring camera
This static feature, optimization background coding usually first generate a high quality background frames, then improve by mass transfer
The code efficiency of integral monitoring video.Optimization prospect encoding context, researcher successively propose some based on model and object point
The prospect coding techniques cut.
There is a few thing to also proposed other monitor video coding techniques, such as:
Adaptive forecasting technique (Xianguo Zhang, Tiejun Huang, Yonghong based on background modeling
Tian,andWenGao,“Background-modeling-based adaptive predictionfor surveillance
video coding,”IEEE Transactions on ImageProcessing,vol.23,no.2,pp.769–784,
2014.)
Global vehicle code technology (Jing Xiao, Ruimin Hu, Liang based on vehicle 3D model database
Liao,Yu Chen,ZhongyuanWang,and ZixiangXiong,“Knowledge-based coding ofobjects
for multisource surveillance video data,”IEEETransactions on Multimedia,
vol.18,no.9,pp.1691–1706,2016.)
The shortcomings that above method:
1, the surge of code stream can be caused when generating high quality background frames based on the background coding techniques of high quality background frames,
Adverse effect is caused to network transmission, and coding efficiency is also to be improved.
2, the prospect coding techniques based on model and object segmentation is in terms of the fine segmentation for carrying out pixel scale to prospect
Itself has difficulties, and the prospect due to being partitioned into may be in irregular shape, and the code rate for indicating it is very huge.
3, the background frames of reconstruction are subtracted simultaneously on present frame and reference frame based on the adaptive forecasting technique of background modeling,
Inter-prediction is directly done on reference frame foreground pixel with obtained present frame foreground pixel when then encoding prospect.Current scene
When the segmentation effect of element is bad, adverse effect is be easy to cause to the promotion of prospect code efficiency.
4, caused based on the global vehicle code technology of vehicle 3D model database due to the texture information of not stored vehicle
The reconstruction quality of vehicle can not improve.In addition to this, the inner parameter of vehicle 3D model, monitoring camera needed for the technology with
The position of vehicle and posture information are difficult to obtain or estimate on external parameter, road, thus for the technology functionization bring it is tired
It is difficult.
Summary of the invention
The object of the present invention is to provide a kind of Traffic Surveillance Video coding methods, and the coding of Traffic Surveillance Video can be improved
Performance.
The purpose of the present invention is what is be achieved through the following technical solutions:
(corresponding with claim).
As seen from the above technical solution provided by the invention, traffic monitoring view is realized based on vehicle and background database
Frequency encodes, and after the cost for paying certain memory space, can effectively remove Traffic Surveillance Video present on time dimension
Global redundancy, finally, overall effect are effectively to improve friendship in the case where being not apparent from increase coding and decoding end complexity
The binary encoding performance of logical monitor video.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment
Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this
For the those of ordinary skill in field, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of flow chart of Traffic Surveillance Video coding method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of Traffic Surveillance Video coding framework provided in an embodiment of the present invention;
Fig. 3 is that vehicle region background SIFT feature provided in an embodiment of the present invention removes flow chart;
Fig. 4 is vehicle provided in an embodiment of the present invention and context similarity analysis flow chart diagram;
Fig. 5 is reference key bit change information schematic diagram provided in an embodiment of the present invention;
Fig. 6 is cycle tests screenshot provided in an embodiment of the present invention.
Specific embodiment
With reference to the attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this
The embodiment of invention, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, belongs to protection scope of the present invention.
The embodiment of the present invention provides a kind of Traffic Surveillance Video coding method, as shown in Figure 1, it mainly includes walking as follows
Suddenly:
Step 1 is handled original traffic monitor video sequence using preceding background segment method, isolates vehicle and back
Scape, and remove be put into database after existing redundancy between the vehicle isolated and background respectively.
Step 2 equally uses preceding background segment method for Traffic Surveillance Video to be encoded, isolates vehicle to be encoded
With background to be encoded;Vehicle to be encoded is selected from database by the way of characteristic matching and fast motion estimation and is matched
Vehicle;Absolute difference is based on for background to be encoded and selects matching background from database.
Step 3, when using inter-frame forecast mode or intra prediction mode, judge vehicle to be encoded using predetermined way
Or whether background to be encoded needs to carry out rate-distortion optimization processing on matching vehicle or matching background;It is carried out according to judging result
Respective handling, and encoded using corresponding prediction mode.
The schematic diagram of entire coding framework is as shown in Fig. 2, its middle line lower part divides namely above-mentioned step 1, on line partially
That is 2~step 3 of above-mentioned steps.
In order to make it easy to understand, doing detailed introduction below for above three step.
One, vehicle and background database are established.
In the embodiment of the present invention, for original traffic monitor video sequence, using preceding background segment method (for example,
SuBSENSE method) vehicle therein is isolated, it is extracted from reasons for its use model when background is separated from prospect, video will be belonged to
The vehicle and background of sequence leading portion are for constructing database.Main realization process is referred to following manner:
1, vehicle database is established.
The better embodiment that vehicle database is established is as follows:
After isolating vehicle and remove redundancy from original traffic monitor video sequence leading portion, vehicle is compiled from 1 to N
Number;N is the number of vehicles isolated.
When initial, vehicle is sky in database;For the vehicle v after some removal redundancyi, using the side based on inverted list
Method is from except vehicle viSimilar vehicle { v is retrieved in remaining outer all vehiclei1,vi2,…,vim, wherein m is similar vehicle
Number.
In order to determine the size of m, vehicle v is considerediAnd vjWhether matched SIFT feature number determines two SIFT features
Matched mode can use routine techniques, realize by the way of can also being previously mentioned when introducing vehicle match hereinafter.
When retrieving similar vehicle, compare vehicle viWith vehicle v any in remaining vehiclejMatched SIFT feature number, works as vehicle
ViWith vehicle vjWhen matched SIFT feature number meets following formula, by vehicle vjIt is put into { vi1,vi2,…,vimIn:
Nij≥β×Ni;
Nij≥min(N0,Ni);
In above formula, NijFor vehicle viWith vehicle vjMatched SIFT feature number, NiFor vehicle viIn SIFT feature number
Mesh, β and N0For constant;Illustratively, β and N0It can be respectively set to 0.1 and 4.It is available after handling through the above way
Vehicle viCorresponding similar vehicle { vi1,vi2,…,vim}。
Later, the comparison of pixel scale similarity is carried out to vehicle:For vehicle viIf the vehicle in database is
Sky, then by vehicle viIt is put into database;Otherwise, by vehicle viWith { vi1,vi2,…,vimIn have been placed in the vehicle of database into
The comparison of row pixel scale similarity, uses fast motion estimation mode when similarity-rough set, loss function using absolute difference and
(Sum of Absolute Difference, SAD).
Referring herein to fast motion estimation mode can be realized by routine techniques, can also be using introducing vehicle hereinafter
Used specific fast motion estimation mode when matching.
If the absolute difference and average value that are calculated are less than setting value (such as 5), determine to judge two cars in pixel
Rank is similar.It will be understood by those skilled in the art that computing object each time is vehicle when carrying out similarity calculation
viWith { vi1,vi2,…,vimIn have been placed in a certain vehicle of database, when carrying out absolute difference and calculating, by vehicle viIt divides
At the block of certain size, vehicle viOn some block quick movement is done in the whole image of a certain vehicle in being put into database
Estimation;Such as the block of the 16x16 mentioned hereinafter, a sad value can be obtained for the block of each 16x16;It is contemplated herein that it is exhausted
To difference and average value namely viIn all 16x16 block absolute difference sum average value.
If { vi1,vi2,…,vimIn have been placed in continuous more (for example, 10) of the vehicle of database without and vehicles
viIt is similar in pixel scale, by vehicle viIt is put into database, conversely, vehicle viIt is not put into database.
If vehicle v will be determined finallyiIt is put into database, then by { vi1,vi2,…,vimIn have been placed in database
Vehicle and vehicle viCarry out pixel scale similarity comparison, if there is with vehicle viIn the similar vehicle of pixel scale, then will
The similar vehicle being put into database eliminates database;If accumulative is more than more vehicles and vehicle viIn pixel scale
Dissmilarity, above-mentioned checking process stop.
Each vehicle is handled using aforesaid way, determine the vehicle being finally put into database and is put into number after being encoded
According to library.
2, background database is established
For the background after removal redundancy, (for example, 20s) takes a frame background and is put into after being encoded at regular intervals
Database.
In practical applications, after monitoring camera is installed, encoder carries out building for vehicle and background database first
Vertical work.For vehicle, establishment step of the encoder according to aforementioned vehicle database, will prepare the vehicle being put into database into
Row high quality coding, and the vehicle after coding is put into database.Code is also incorporated into for identifying the information of these vehicles simultaneously
Stream after decoding end solves reconstruction image, carries out identical vehicle database establishment process according to the vehicle identification information solved;It is right
In background, establishment step of the encoder according to foregoing background database is at regular intervals carried out the background frames of generation high-quality
Amount coding, and the background after coding is put into database.Simultaneously high quality coding background and for identifying these backgrounds
Information is also incorporated into code stream and puts it into database after decoder solves the background frames of high quality according to above- mentioned information.This
Sample can establish identical vehicle and background database at encoding and decoding end.
In the embodiment of the present invention, original traffic monitor video sequence can be divided, front portion data are used to build
Vertical vehicle and background database;Rear portion is as Traffic Surveillance Video to be encoded.It is of course also possible to by traffic in first day
Monitor video establishes vehicle and background database, and the data since second day are as Traffic Surveillance Video to be encoded.It compiles
Decoder carries out the encoding and decoding work of Traffic Surveillance Video according to the method described in the present invention.General Traffic Surveillance Video is usual
The time limit for saving some months repeats above-mentioned work after emptying the data of preservation.
Two, vehicle and background retrieval
1, vehicle retrieval.
1) separation of vehicle and background and de-redundancy operation.
In the embodiment of the present invention, the separation for carrying out vehicle and background is also needed for Traffic Surveillance Video to be encoded,
And de-redundancy operation;Operation when this part operation process is established with vehicle and background database is similar.This operation process
Better embodiment is as follows:
Monitor video sequence (original traffic monitor video sequence or friendship to be encoded are isolated using SuBSENSE method
Logical monitor video) in vehicle after, since the shape of vehicle may be irregular, by the upper left corner for the vehicle isolated to the lower right corner
Square region in pixel as vehicle, remainder is as background.The SIFT feature for extracting vehicle, by background therein
The process of SIFT feature removal, the removal of background SIFT feature is shown in Fig. 3.
While separating vehicle using SuBSENSE method, cleaner background frames can be gradually generated.From monitor video
While extracting vehicle in sequence, the background extracting of corresponding position on background frames is come out.
By taking Traffic Surveillance Video to be encoded as an example, for the current vehicle to be encoded isolated and corresponding background, point
The SIFT feature for indescribably taking the two, for each SIFT feature extracted from current vehicle to be encoded, using following formula in correspondence
It is retrieved in certain position contiguous range in background:
(xsc-xsb)2+(ysc-ysb)2≤d2;
Wherein, xscAnd yscIndicate the coordinate for the SIFT feature extracted from current vehicle to be encoded, xsbAnd ysbIndicate from
The coordinate for the SIFT feature extracted in corresponding background;D is the confining spectrum of position neighborhood;Illustratively, d=5 can be set.
If a certain SIFT of the smallest SIFT feature of Euclidean distance and current vehicle to be encoded after the normalization retrieved
The distance of feature is less than certain threshold value:Dmin≤D1;Wherein, DminFor normalization after the smallest SIFT feature of Euclidean distance with work as
The Euclidean distance after normalization between a certain SIFT feature of preceding vehicle to be encoded, D1For threshold value, D illustratively can be set1
=1.1;Then illustrate the SIFT feature for having alike with the SIFT feature of current vehicle to be encoded in background area, it is current to be encoded
The corresponding SIFT feature of vehicle is background SIFT feature, it is removed from vehicle SIFT.
2) coarse search is carried out using characteristic matching.
In the embodiment of the present invention, the SIFT feature of vehicle (comprising vehicle and vehicle to be encoded in database), data are extracted
Vehicle in library is based on SIFT feature and establishes inverted list index, for vehicle to be encoded, is matched based on SIFT feature from database
In rough retrieve several candidate vehicles.This process better embodiment is as follows:
It is rough from database by the way of characteristic matching to select several candidate vehicles:By vehicle each in database
SIFT feature vision text is quantized into using k-means algorithm, for each vision text, calculate corresponding mapping mean value to
Amount;Each SIFT feature of vehicle each in database is mapped to the vision text of arest neighbors again, the SIFT for comparing mapping is special
Vector mapping mean vector corresponding with arest neighbors vision text is levied, the binaryzation characterization of each SIFT feature vector is obtained;Together
When, each vehicle in database is indicated with the frequency histogram of the corresponding vision text of its SIFT feature, using inverted list
Mode tissue database in each vehicle frequency histogram.
It is also according to the method for vehicle in above-mentioned processing database, its every SIFT is special for current vehicle to be encoded
Sign is assigned to the vision text of arest neighbors, obtains the frequency histogram of current vehicle to be encoded, while calculating each SIFT feature
Binaryzation characterization.
In relatively more current vehicle to be encoded and database when the similarity of some vehicle, it is being mapped to same vision text
SIFT feature binaryzation characterization Hamming distance be less than certain threshold value under conditions of, with tf-idf (term frequency-
Inverse document frequency, item frequency-anti-document frequency) item weighting frequency histogram distance as similar
The evaluation index of degree obtains the comparison result of the similarity of each vehicle in current vehicle to be encoded and database;According to calculating
The comparison result of similarity be ranked up, select similarity several vehicles in the top as candidate vehicle.
Illustratively, in concrete implementation, 10 candidate vehicles can be retrieved.
3) using the mode of fast motion estimation, to carry out vehicle selected.
In the embodiment of the present invention, a matching vehicle is chosen from several candidate vehicles using the mode of fast motion estimation
?;This process better embodiment is as follows:
A, current vehicle to be encoded is aligned with each candidate vehicle.
The better embodiment of alignment is as follows:
For some SIFT feature of current vehicle to be encoded, itself and all SIFT features of each candidate vehicle are calculated
Distance after calculated distance sorts in the way of from small to large, if meeting following formula, determines current vehicle to be encoded
Corresponding SIFT feature matching SIFT feature is had found in corresponding candidate vehicle:
d1≤D2;
d1/d2≤α;
Wherein, d1And d2Respectively minimum and the second small distance, D2It is constant with α;
The each SIFT feature for calculating current vehicle to be encoded in the manner described above, obtain current vehicle to be encoded with it is each
The SIFT matching pair of candidate vehicle;According to obtained SIFT feature matching pair as a result, calculate current vehicle to be encoded with it is each
The positional shift of candidate vehicle, is shown below:
Wherein, MVxAnd MVyFor the horizontal component and vertical component of offset, n is the number of matched SIFT feature pair, xci
And yciFor the coordinate of the SIFT feature of current vehicle to be encoded, xviAnd yviFor the coordinate of the SIFT feature of candidate vehicle;I is
The serial number of SIFT feature matching pair;
Abnormal point is removed by the way of iteration again, obtains final positional shift result;According to the position being calculated
Current vehicle to be encoded is aligned by migration result with corresponding candidate vehicle.
Abnormal point can determine in the following way:If matched by certain to SIFT inclined to the motion vector being calculated
Farther out (being more than setting value) from average motion vector, then the SIFT feature is paired into abnormal point.
B, current vehicle to be encoded is divided into the block that fixed size is 16x16 again, the block of every 16x16 is in a certain candidate
The smallest piece of hunting loss function in vehicle, wherein loss function by absolute difference and and the encoder bit rate of motion vector form;It searches
The mode of rope be using the position of the block of current 16x16 as starting point, around the starting point up and down in 64 pixel coverages into
8 brilliant search of row, the loss function of the block of all 16x16 is added up as entire current vehicle to be encoded in a certain time
Select the whole loss function on vehicle;The final the smallest candidate vehicle of whole loss function that retains is as matching vehicle.
2, background is retrieved.
In the embodiment of the present invention, absolute difference is based on for background to be encoded and selects matching background from database, this
Process better embodiment is as follows:
It is quasi- with the absolute difference of background corresponding position pixel in database and as similarity evaluation using current background to be encoded
Then, calculate in current background to be encoded and database the absolute difference of each background and, be shown below:
SAD=∑k∈B|pck-plk|;
Wherein, pckWith plkThe value of k-th of pixel of background in respectively current background to be encoded and database, B be currently to
The set of encoding background pixel;
Calculated result is sorted from small to large, using absolute difference and the smallest background as the matching back of current background to be encoded
Scape.
Three, it encodes.
1, similarity analysis.
In the embodiment of the present invention, after determining current vehicle to be encoded and the matching vehicle and background of background, front truck is worked as in determination
And background whether matching vehicle and background on do rate-distortion optimization (RDO).Current vehicle and background take inter-prediction side
When formula, by matching vehicle and background compared with the existing reference frame information of current vehicle and background makees RDO;Current vehicle and background
When taking intra prediction mode, the rough intra prediction mode of candidate vehicle and background and current vehicle and background is made into RDO ratio
Compared with.Vehicle and the detailed process of context similarity analysis are shown in Fig. 4.It will be discussed in detail respectively under interframe, intra prediction mode below
The comparison of RDO.
1) under inter-frame forecast mode RDO comparison.
The comparison criterion of rate-distortion optimization is under inter-frame forecast mode:
Wherein, J is Lagrangian loss function, D be prediction block and match block absolute difference and, R is for intermediate scheme
The bit number of information, λ are Lagrange multiplier;
It makes comparisons in order to which vehicle will be matched with background and existing reference frame, current vehicle and back to be encoded is first calculated
The Lagrangian loss function of scape and existing reference frame, then after calculating and considering the obtained matching vehicle of retrieval and background, obtain more
New Lagrangian loss function compares the Lagrangian loss function for updating front and back, it is determined whether in matched vehicle and back
RDO is on scape.This process better embodiment is as follows:
A, the Lagrangian loss function of current vehicle to be encoded and current background to be encoded and existing reference frame is calculated:
For each existing reference frame of current vehicle to be encoded, current vehicle is estimated first on existing reference frame
Displacement, then obtain optimal RDO of the current vehicle on existing reference frame as a result, finally by itself and current vehicle at candidate
It makes comparisons with the optimal RDO result on vehicle, it is determined whether RDO is on candidate matches vehicle, correlated process is as follows:
Using 4 × 4 block as unit, obtain on current vehicle corresponding position to be encoded using the fortune of the block of inter-prediction 4 × 4
Dynamic vector (Motion Vector, MV) and and its reference frame picture number (POC) information, based on this, estimation currently to
The motion vector information of corresponding 4 × 4 block on vehicle is encoded, the formula of estimation is as follows:
Wherein, MVXrefAnd MVYrefThe horizontal component of the block motion vector of inter-prediction 4 × 4 on respectively existing reference frame
And vertical component;POCcur、POCrefAnd POCcolrefThe POC of frame where respectively current vehicle to be encoded, existing reference frame
The POC of the block reference frame of inter-prediction 4 × 4 on POC and existing reference frame;MVXcurAnd MVYcurThat respectively estimates is current
The horizontal component and vertical component of the block motion vector of vehicle to be encoded corresponding 4 × 4;It traverses each in current vehicle to be encoded
A 4x4 small block records the movement of the number of the block of inter-prediction 4 × 4 and its block of corresponding current vehicle 4 × 4 to be encoded
Vector, horizontal component and the vertical component for the current vehicle movement vector to be encoded finally estimated are that all inter-prediction 4x4 are small
Block motion vector average value;
It, later, will current vehicle to be encoded to obtain current displacement of the vehicle to be encoded on each existing reference frame
It is divided into the block that fixed size is 16x16, successively hunting loss function is minimum in all existing reference frames for the block of every 16x16
Block, wherein loss function by absolute difference and and the encoder bit rate of motion vector form;The mode of search is with current 16x16's
Position after the displacement translation that block is obtained by estimation is starting point, is carried out in 64 pixel coverages around the starting point up and down
8 brilliant search;As unit of the block of 16x16, record in current vehicle to be encoded all pieces in all existing reference frames
The least disadvantage function of match block;The block of each 16x16 in current vehicle to be encoded is successively traversed, adding up, it records to obtain minimum damage
It loses function and obtains current Lagrangian loss function of the vehicle to be encoded relative to existing reference frame
For current background to be encoded, it is divided into the block of 16x16;For the block of current 16x16, from all existing ginsengs
It examines and searches for the corresponding match block of least disadvantage function in frame;The mode of search is the 16x16 of more all reference frame corresponding positions
Block and current background to be encoded in current 16x16 block absolute difference and, select the smallest absolute difference and as currently wait compile
The loss function of the block of current 16x16 in code background;The block for traversing all 16x16 in current background to be encoded adds up all
The loss function of the block of 16x16, the Lagrangian loss function as current background to be encoded
B, matching vehicle and background are taken into account, calculates updated Lagrangian loss function:
For the block of each 16x16 in current vehicle to be encoded, in Lagrangian loss functionThe base of calculated result
On plinth, using the method for fast motion estimation, calculate its with match the loss function of vehicle;Again by the block of every 16x16 with
Loss function with vehicle, with the Lagrangian loss function of calculatingWhen the obtained least disadvantage function ratio with existing reference frame
Compared with taking smaller is the least disadvantage function of the block of corresponding 16x16;The block of each 16x16 in current vehicle to be encoded is traversed,
Add up each 16x16 block least disadvantage function, obtain the Lagrangian loss function of current vehicle to be encodedMeanwhile
For current vehicle to be encoded, cause the variation of bit number contain the location index information matched vehicle in the database,
The expression of location information, reference key (index of reference frame) bit change information and CTU rank with vehicle in reference frame
Information, by the variation of these bit numbers and Lagrangian loss functionIt combines, obtains updated Lagrange loss letter
Number
For the block of each 16x16 in current background to be encoded, in Lagrangian loss functionThe basis of calculated result
On, it calculates and the loss function that matches background;Again by the block of every 16x16 and the loss function that matches background, and glug is calculated
Bright daily loss functionWhen obtain compared with the least disadvantage function of existing reference frame, take smaller be corresponding 16x16 block
Least disadvantage function;Traverse the block of each 16x16 in current background to be encoded, the minimum damage of the block for each 16x16 that adds up
Function is lost, the loss function of current background to be encoded is obtainedMeanwhile for current background to be encoded, cause the change of bit number
Change and contain the location index information and reference key bit change information of matching background in the database, these bit numbers are become
Change and Lagrangian loss functionIt combines, obtains updated Lagrangian loss function
It is introduced by taking the bit number calculation of reference key bit change information as an example:
As shown in figure 5, for the block of each 16x16 in current vehicle to be encoded and background, calculate its with it is existing
When reference frame and matching vehicle and the least disadvantage function of background, if the corresponding match block index of its least disadvantage function is n-
1, then bit number adds 1, wherein n is existing reference frame number;Otherwise, if its corresponding match block of least disadvantage function exists
On matched vehicle or background, then bit number increase n-1-idx, wherein idx be when not considering matched vehicle and background,
The corresponding match block index of the block least disadvantage function of the 16x16.In addition to this, bit number is constant.Traverse current vehicle to be encoded
And each 16x16 in background block, the block of each 16x16 of bit numerical digit of final reference key bit change information becomes
Change the summation of bit number.The Lagrangian loss function that bit number changes and is the previously calculated is combined, is updated
The Lagrangian loss function for corresponding to current vehicle to be encoded and background afterwards.
Finally, more Lagrangian loss functionWith updated Lagrangian loss functionBetween size, ifThen rate-distortion optimization processing is carried out on matching vehicle;Compare Lagrangian loss functionIt is bright with updated glug
Daily loss functionBetween size, ifThen rate-distortion optimization processing is carried out in matching background.
2, under intra prediction mode RDO comparison.
The comparison criterion of rate-distortion optimization is similar with inter-frame forecast mode under intra prediction mode, also is indicated as:
Wherein, J is Lagrangian loss function, D be prediction block and match block absolute difference and, R is for intermediate scheme
The bit number of information, λ are Lagrange multiplier.
A, for current background to be encoded, under intra prediction mode, rate-distortion optimization is carried out in matching background always
Processing.
B, for current vehicle to be encoded, firstly, roughly estimating damage of the current vehicle to be encoded using intra prediction when
Lose function:Current vehicle to be encoded is divided into the block that fixed size is 16x16, for the block of each 16x16, is successively carried out equal
The estimation of value mode (DC), smooth mode (planar), horizontal and vertical intra prediction mode, obtains the block pair of each 16x16
Should in each pattern absolute difference and;When intra prediction mode is estimated, the reference pixel value of the block of current 16x16 is by neighbouring
The original value of the block of 16x16 is released;For the block of each 16x16, it is estimated under all modes absolute difference and by
According to sequence sequence from small to large, using absolute difference and the smallest result as the Optimum Matching result of the block of current 16x16;Traversal
The block of all 16x16 in current vehicle to be encoded, the Optimum Matching of the block for each 16x16 that adds up is as a result, obtain current to be encoded
The Lagrangian loss function of vehicle
Matching vehicle is taken into account, updated Lagrangian loss function is calculated:For in current vehicle to be encoded
Each 16x16 block, in Lagrangian loss functionOn the basis of calculated result, using the method for fast motion estimation,
The loss function (absolute difference and) for calculating and matching vehicle;Again by the block of every 16x16 and the loss function that matches vehicle, with meter
Calculate Lagrangian loss functionWhen the minimum absolute difference that estimates of obtained its intra prediction and compare, it is corresponding for taking smaller
The least disadvantage function of the block of 16x16;Traverse the block of each 16x16 in current vehicle to be encoded, the block for each 16x16 that adds up
Least disadvantage function, obtain the loss function of current vehicle to be encodedMeanwhile for current vehicle to be encoded, cause to compare
The variation of special number contains the location information of location index information, matching vehicle in reference frame of matching vehicle in the database
With the expression information of CTU rank, these bit numbers are changed and Lagrangian loss functionIt combines, after obtaining update
Lagrangian loss function
Compare Lagrangian loss functionWith updated Lagrangian loss functionBetween size, ifThen rate-distortion optimization processing is carried out on matching vehicle.
2, the coding of vehicle and background.
1) when using inter-frame forecast mode, if it is decided that need to carry out rate distortion on matching vehicle or matching background excellent
Change processing, then the new space of one reference frame of application, will matching vehicle or matching background be affixed on the reference frame newly applied with it is existing
Some reference frames do inter-prediction for current vehicle to be encoded or background to be encoded together;After inter-prediction, traversal is current
The block of vehicle to be encoded or each 4x4 of current background covering to be encoded, if the block of some 4x4 is with reference to current vehicle to be encoded
Or current background to be encoded information, then corresponding syntactic element is incorporated into code stream;
2) when using intra prediction mode, if it is decided that need to carry out rate distortion on matching vehicle or matching background excellent
Change processing, then newly apply for the space of a reference frame, will match vehicle or matching background is affixed on the reference frame newly applied for working as
Preceding vehicle to be encoded or background to be encoded do intra prediction.
In above-mentioned two parts, the position that matching vehicle is affixed on the reference frame newly applied is determined by following formula:
x0=xc+MVx;
y0=yc+MVy;
Wherein, x0And y0Indicate that matching vehicle is attached to the position on the reference frame newly applied, xcAnd ycIndicate current to be encoded
Vehicle is in the position of present frame, MVxAnd MVyFor current vehicle to be encoded relative to the horizontal component for matching vehicle shift and vertically
Component (is obtained) by aforementioned fast motion estimation;
When matching background is attached on reference frame, with reference frame aligned in position.
3, encoding code stream structure
In the embodiment of the present invention, the structure of encoding code stream is divided into piece (slice) and two layers of tree-like coding unit (CTU);Its
In:
Slice layers:For current vehicle to be encoded, slice layers indicate whether there is matching in current slice layers comprising one
The label (flag) that vehicle is referenced;The block for traversing the 4x4 of all vehicle coverings in slice layers current, judges whether it refers to
Matching vehicle, if there is some 4x4 block with reference to matching vehicle, then labeled as true, otherwise labeled as vacation;If label
It is that very, then slice layers will also include the syntactic element for indicating to be referenced matching number of vehicles in current slice layers;For each
Match vehicle, location index in the database, its be attached to the position on the reference frame newly applied and be incorporated into code stream together, joined
The index and each matching vehicle of the matching number of vehicles, each matching vehicle examined are attached to the position on the reference frame newly applied
It sets and is encoded using block code mode;
For current background to be encoded, slice layers indicate whether have matching background to be joined in current slice layers comprising one
The label examined;The block for traversing the 4x4 of had powerful connections covering in slice layers current, judge its whether with reference to matching background, if
There are the blocks of some 4x4 with reference to matching background, then labeled as very, is otherwise labeled as vacation;If labeled as true, slice layer
Will also be comprising the location index syntactic element of the matching background that is referenced in the database, the syntactic element is using block code side
Formula is encoded;
CTU layers:For current vehicle to be encoded, whether CTU layers comprising current CTU layers an of expression with reference to matching vehicle
The label of pixel;The block for traversing each 4x4 in CTU layers current, if there is some 4x4 block with reference to matching vehicle pixel,
Then labeled as very, it is otherwise labeled as vacation;When labeled as true, CTU layers will also include an expression matching vehicle index (index)
Syntactic element;
For current background to be encoded, whether CTU layers comprising current CTU layers an of expression with reference to matching background pixel
Label.
On the other hand, dependence test has also been carried out in order to illustrate the coding efficiency of above scheme of the present invention.
Test condition includes:1) interframe configures:Random access, that is, Random Access, RA;Low delay B, that is, Low-delay
B, LDB;Low delay P, that is, Low-delay P, LDP.2) basic quantization step-length (QP) is set as { 27,32,37,42 }, based on it is soft
Part is HM16.7, and cycle tests is 14 sections of cycle tests of oneself shooting, and screenshot is as shown in Figure 6.Experimental result is shown in Table 1 and table 2.
Wherein table 1 is the lower performance comparison of RA, LDB, LDP setting as a result, table 2 is the encoding and decoding under RA, LDB, LDP are arranged
Hold complexity comparing result.
Performance comparison result under table 1RA, LDB, LDP setting
Encoding and decoding end complexity comparing result under table 2RA, LDB, LDP setting
Above scheme of the embodiment of the present invention be can be seen that from 1~table of table 2 relative to HM16.7 in RA, LDB and LDP mould
The code rate that 35.1%, 31.3% and 28.8.0% can be obtained under formula respectively is saved, and the increase of the complexity at encoding and decoding end exists
In zone of reasonableness.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment can
The mode of necessary general hardware platform can also be added to realize by software by software realization.Based on this understanding,
The technical solution of above-described embodiment can be embodied in the form of software products, which can store non-easy at one
In the property lost storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions are with so that a computer is set
Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,
Within the technical scope of the present disclosure, any changes or substitutions that can be easily thought of by anyone skilled in the art,
It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with the protection model of claims
Subject to enclosing.
Claims (10)
1. a kind of Traffic Surveillance Video coding method, which is characterized in that including:
Original traffic monitor video sequence is handled using preceding background segment method, isolates vehicle and background, and respectively
Database is put into after existing redundancy between the removal vehicle isolated and background;
Preceding background segment method is equally used for Traffic Surveillance Video to be encoded, isolates vehicle to be encoded and back to be encoded
Scape;Matching vehicle is selected from database by the way of characteristic matching and fast motion estimation for vehicle to be encoded;For
Background to be encoded is based on absolute difference and selects matching background from database;
When using inter-frame forecast mode or intra prediction mode, vehicle to be encoded or back to be encoded are judged using predetermined way
Whether scape needs to carry out rate-distortion optimization processing on matching vehicle or matching background;Respective handling is carried out according to judging result,
And it is encoded using corresponding prediction mode.
2. a kind of Traffic Surveillance Video coding method according to claim 1, which is characterized in that described using preceding background point
Segmentation method handles original traffic monitor video sequence, isolates vehicle and background, and removes the vehicle isolated respectively
Being put into database after existing redundancy between background includes:
For the vehicle after removal redundancy, it is numbered from 1 to N;
When initial, vehicle is sky in database;For the vehicle v after some removal redundancyi, using the method based on inverted list from
Except vehicle viSimilar vehicle { v is retrieved in remaining outer all vehiclei1,vi2,…,vim, wherein m is the number of similar vehicle;
When retrieving similar vehicle, compare vehicle viWith vehicle v any in remaining vehiclejMatched SIFT feature number, as vehicle vi
With vehicle vjWhen matched SIFT feature number meets following formula, by vehicle vjIt is put into { vi1,vi2,…,vimIn:
Nij≥β×Ni;
Nij≥min(N0,Ni);
In above formula, NijFor vehicle viWith vehicle vjMatched SIFT feature number, NiFor vehicle viIn SIFT feature number, β and
N0For constant;
Later, the comparison of pixel scale similarity is carried out to vehicle:For vehicle viIt, will if the vehicle in database is sky
Vehicle viIt is put into database;Otherwise, by vehicle viWith { vi1,vi2,…,vimIn have been placed in database vehicle carry out Pixel-level
The comparison of other similarity, uses fast motion estimation mode when similarity-rough set, loss function using absolute difference and, if calculated
Obtained absolute difference and average value is less than setting value, then determines to judge that two cars in pixel scale are similar;If { vi1,
vi2,…,vimIn have been placed in continuous more of the vehicle of database not with vehicle viIt is similar in pixel scale, by vehicle viIt puts
Enter database, conversely, vehicle viIt is not put into database;If vehicle v will be determined finallyiIt is put into database, then by { vi1,
vi2,…,vimIn have been placed in database vehicle and vehicle viCarry out pixel scale similarity comparison, if there is with vehicle
ViIn the similar vehicle of pixel scale, then the similar vehicle being put into database is eliminated into database;If accumulative
More than more vehicles and vehicle viIn pixel scale dissmilarity, above-mentioned checking process stops;
Each vehicle is handled using aforesaid way, determine the vehicle being finally put into database and is put into data after being encoded
Library;
For the background after removal redundancy, a frame background is taken at regular intervals and is put into database after being encoded.
3. a kind of Traffic Surveillance Video coding method according to claim 1 or 2, which is characterized in that using preceding background point
When segmentation method separates vehicle and background, using the pixel in the square region in the upper left corner for the vehicle isolated to the lower right corner as vehicle
, remainder is as background;
For the current vehicle to be encoded isolated and corresponding background, the SIFT feature both extracted respectively, for from current
The each SIFT feature extracted on vehicle to be encoded, using being examined in following formula position contiguous range certain in corresponding background
Rope:
(xsc-xsb)2+(ysc-ysb)2≤d2;
Wherein, xscAnd yscIndicate the coordinate for the SIFT feature extracted from current vehicle to be encoded, xsbAnd ysbIt indicates from correspondence
The coordinate for the SIFT feature extracted in background, d are the confining spectrum of position neighborhood;
If a certain SIFT feature of the smallest SIFT feature of Euclidean distance and current vehicle to be encoded after the normalization retrieved
Distance be less than certain threshold value, then illustrate there is the SIFT alike with the SIFT feature of current vehicle to be encoded in background area
The corresponding SIFT feature of feature, current vehicle to be encoded is background SIFT feature, it is removed from vehicle SIFT.
4. a kind of Traffic Surveillance Video coding method according to claim 1, which is characterized in that vehicle to be encoded is adopted
It is selected from database with characteristic matching with the mode of fast motion estimation and matches vehicle and include:
Firstly, rough from database by the way of characteristic matching select several candidate vehicles:By vehicle each in database
SIFT feature vision text is quantized into using k-means algorithm, for each vision text, calculate corresponding mapping mean value
Vector;Each SIFT feature of vehicle each in database is mapped to the vision text of arest neighbors again, compares the SIFT of mapping
Feature vector mapping mean vector corresponding with arest neighbors vision text obtains the binaryzation characterization of each SIFT feature vector;
Meanwhile indicating each vehicle in database with the frequency histogram of the corresponding vision text of its SIFT feature, using the row of falling
The frequency histogram of each vehicle in the mode tissue database of table;For current vehicle to be encoded, also according to above-mentioned processing
Its each SIFT feature is assigned to the vision text of arest neighbors by the method for vehicle in database, obtains current vehicle to be encoded
Frequency histogram, while calculate each SIFT feature binaryzation characterization;In relatively more current vehicle to be encoded and database
When the similarity of some vehicle, in the Hamming distance that the binaryzation for being mapped to the SIFT feature of same vision text characterizes less than one
Under conditions of determining threshold value, the distance of the frequency histogram weighted using tf-idf obtains current as the evaluation index of similarity
The comparison result of the similarity of each vehicle in vehicle to be encoded and database;It is carried out according to the comparison result of the similarity of calculating
Sequence selects similarity several vehicles in the top as candidate vehicle;
Then, a matching vehicle is chosen from several candidate vehicles using the mode of fast motion estimation:First will currently to
Coding vehicle is aligned with each candidate vehicle, then current vehicle to be encoded is divided into the block that fixed size is 16x16, often
The block of one 16x16 is the smallest piece of hunting loss function in a certain candidate vehicle, and wherein loss function is by absolute difference and and movement
The encoder bit rate of vector forms;The mode of search be using the position of the block of current 16x16 as starting point, around the starting point on
8 brilliant search are carried out in lower 64 pixel coverage of left and right, and cumulative be used as of the loss function of the block of all 16x16 is entirely worked as
Whole loss function of the preceding vehicle to be encoded on a certain candidate vehicle;It is final to retain the smallest candidate vehicle of whole loss function
As matching vehicle.
5. a kind of Traffic Surveillance Video coding method according to claim 4, which is characterized in that will current vehicle to be encoded
The mode being aligned with each candidate vehicle is as follows:
For some SIFT feature of current vehicle to be encoded, calculate its with all SIFT features of each candidate vehicle away from
From, after calculated distance is sorted in the way of from small to large, if meeting following formula, the current vehicle to be encoded of judgement
Corresponding SIFT feature has found matching SIFT feature in corresponding candidate vehicle:
d1≤D2;
d1/d2≤α;
Wherein, d1And d2Respectively minimum and the second small distance, D2It is constant with α;
The each SIFT feature for calculating current vehicle to be encoded in the manner described above, obtains current vehicle to be encoded and each candidate
The SIFT matching pair of vehicle;According to obtained SIFT feature matching pair as a result, calculating current vehicle to be encoded and each candidate
The positional shift of vehicle, is shown below:
Wherein, MVxAnd MVyFor the horizontal component and vertical component of offset, n is the number of matched SIFT feature pair, xciAnd yci
For the coordinate of the SIFT feature of current vehicle to be encoded, xviAnd yviFor the coordinate of the SIFT feature of candidate vehicle;I is SIFT special
The serial number of sign matching pair;
Abnormal point is removed by the way of iteration again, obtains final positional shift result;According to the positional shift being calculated
As a result, current vehicle to be encoded is aligned with corresponding candidate vehicle.
6. a kind of Traffic Surveillance Video coding method according to claim 1, which is characterized in that for background base to be encoded
It selects in absolute difference and from database matching background and includes:
Using the absolute difference of background corresponding position pixel in current background to be encoded and database and as similarity evaluation criterion, count
Calculate in current background to be encoded and database the absolute difference of each background and, be shown below:
SAD=∑k∈B|pck-plk|;
Wherein, pckWith plkThe value of k-th of pixel of background in respectively current background to be encoded and database, B are current to be encoded
The set of background pixel;
Calculated result is sorted from small to large, using absolute difference and the smallest background as the matching background of current background to be encoded.
7. a kind of Traffic Surveillance Video coding method according to claim 1, which is characterized in that when using inter-prediction mould
When formula, judge whether vehicle to be encoded or background to be encoded need to carry out on matching vehicle or matching background using predetermined way
Rate-distortion optimization is handled:
The comparison criterion of rate-distortion optimization is under inter-frame forecast mode:
Wherein, J is Lagrangian loss function, D be prediction block and match block absolute difference and, R is for intermediate scheme information
Bit number, λ is Lagrange multiplier;
Firstly, calculating the Lagrangian loss function of current vehicle to be encoded and current background to be encoded and existing reference frame:
For each existing reference frame of current vehicle to be encoded, using 4 × 4 block as unit, current vehicle to be encoded is obtained
On corresponding position using inter-prediction 4 × 4 block motion vector and and its reference frame picture number information, as base
Plinth estimates that the motion vector information of corresponding 4 × 4 block on current vehicle to be encoded, the formula of estimation are as follows:
Wherein, MVXrefAnd MVYrefThe horizontal component of the block motion vector of inter-prediction 4 × 4 and perpendicular on respectively existing reference frame
Straight component;POCcur、POCrefAnd POCcolrefThe picture number of frame where respectively current vehicle to be encoded, existing reference frame
Picture number and existing reference frame on inter-prediction 4 × 4 block reference frame picture number;MVXcurAnd MVYcurRespectively estimate
Count the horizontal component and vertical component of the block motion vector of obtained current vehicle to be encoded corresponding 4 × 4;Traversal is current to be encoded
Each of vehicle 4x4 small block, record the block of inter-prediction 4 × 4 number and its corresponding current vehicle to be encoded 4 ×
The motion vector of 4 block, the horizontal component and vertical component for the current vehicle movement vector to be encoded finally estimated are all frames
Between the small block motion vector of prediction 4x4 average value;
To obtain current displacement of the vehicle to be encoded on each existing reference frame, later, current vehicle to be encoded is divided
The block for being 16x16 at fixed size, successively hunting loss function is the smallest in all existing reference frames for the block of every 16x16
Block, wherein loss function by absolute difference and and the encoder bit rate of motion vector form;The mode of search is with the block of current 16x16
Position after the displacement translation obtained by estimation is starting point, carries out eight in 64 pixel coverages up and down around the starting point
Point brilliant search;As unit of the block of 16x16, record in current vehicle to be encoded all pieces and its from all existing references
The least disadvantage function of match block in frame;The block of each 16x16 in current vehicle to be encoded is successively traversed, adding up, it records most
Small loss function and, obtain current Lagrangian loss function of the vehicle to be encoded relative to existing reference frame
For current background to be encoded, it is divided into the block of 16x16;For the block of current 16x16, from all existing reference frames
The corresponding match block of middle search least disadvantage function;The mode of search is the block of the 16x16 of more all reference frame corresponding positions
With the absolute difference of the block of 16x16 current in current background to be encoded and, select the smallest absolute difference and as currently back to be encoded
The loss function of the block of current 16x16 in scape;The block for traversing all 16x16 in current background to be encoded, adds up all 16x16's
The loss function of block, the Lagrangian loss function as current background to be encoded
Then, matching vehicle and background are taken into account, calculates updated Lagrangian loss function:
For the block of each 16x16 in current vehicle to be encoded, in Lagrangian loss functionOn the basis of calculated result,
Using the method for fast motion estimation, calculate its with match the loss function of vehicle;Again by the block of every 16x16 with match vehicle
Loss function, and calculate Lagrangian loss functionWhen obtain compared with the least disadvantage function of existing reference frame, take
Smaller is the least disadvantage function of the block of corresponding 16x16;The block for traversing each 16x16 in current vehicle to be encoded, adds up
The least disadvantage function of the block of each 16x16 obtains the Lagrangian loss function of current vehicle to be encodedMeanwhile for
Current vehicle to be encoded causes the variation of bit number to contain the location index information matched vehicle in the database, matching vehicle
The expression information of location information, reference key bit change information and CTU rank in reference frame, these bit numbers are become
Change and Lagrangian loss functionIt combines, obtains updated Lagrangian loss function
For the block of each 16x16 in current background to be encoded, in Lagrangian loss functionOn the basis of calculated result,
The loss function for calculating and matching background;Again by the block of every 16x16 and the loss function that matches background, and Lagrange is calculated
Loss functionWhen obtain compared with the least disadvantage function of existing reference frame, take smaller be corresponding 16x16 block most
Small loss function;Traverse the block of each 16x16 in current background to be encoded, the least disadvantage letter of the block for each 16x16 that adds up
Number obtains the loss function of current background to be encodedMeanwhile for current background to be encoded, cause the variation packet of bit number
Contained matching background location index information and reference key bit change information in the database, by the variation of these bit numbers with
Lagrangian loss functionIt combines, obtains updated Lagrangian loss function
Finally, more Lagrangian loss functionWith updated Lagrangian loss functionBetween size, ifThen rate-distortion optimization processing is carried out on matching vehicle;Compare Lagrangian loss functionWith updated glug
Bright daily loss functionBetween size, ifThen rate-distortion optimization processing is carried out in matching background.
8. a kind of Traffic Surveillance Video coding method according to claim 1, which is characterized in that when using intra prediction mould
When formula, judge whether vehicle to be encoded or background to be encoded need to carry out on matching vehicle or matching background using predetermined way
Rate-distortion optimization is handled:
The comparison criterion of rate-distortion optimization is under intra prediction mode:
Wherein, J is Lagrangian loss function, D be prediction block and match block absolute difference and, R is for intermediate scheme information
Bit number, λ is Lagrange multiplier;
For current background to be encoded, under intra prediction mode, rate-distortion optimization processing is carried out in matching background always;
For current vehicle to be encoded, firstly, roughly estimating loss function of the current vehicle to be encoded using intra prediction when:
Current vehicle to be encoded is divided into the block that fixed size is 16x16, for the block of each 16x16, successively carry out DC,
The estimation of planar, horizontal and vertical intra prediction mode, the block for obtaining each 16x16 correspond to the absolute difference of each pattern
With;When intra prediction mode is estimated, the reference pixel value of the block of current 16x16 is released by the original value of the block of neighbouring 16x16;It is right
It in the block of each 16x16, it is estimated under all modes absolute difference and sorts according to sequence from small to large, with exhausted
To difference and Optimum Matching result of the smallest result as the block of current 16x16;Traverse all 16x16 in current vehicle to be encoded
Block, the Optimum Matching of the block for each 16x16 that adds up is as a result, obtain the Lagrangian loss function of current vehicle to be encoded
Then, matching vehicle is taken into account, calculates updated Lagrangian loss function:For in current vehicle to be encoded
Each 16x16 block, in Lagrangian loss functionOn the basis of calculated result, using the method for fast motion estimation,
The loss function for calculating and matching vehicle;Again by the block of every 16x16 and the loss function that matches vehicle, and Lagrange is calculated
Loss functionWhen the minimum absolute difference that estimates of obtained its intra prediction and compare, taking smaller is the block of corresponding 16x16
Least disadvantage function;Traverse the block of each 16x16 in current vehicle to be encoded, the minimum damage of the block for each 16x16 that adds up
Function is lost, the loss function of current vehicle to be encoded is obtainedMeanwhile for current vehicle to be encoded, cause the change of bit number
Change the location information and CTU grades of the location index information contained matching vehicle in the database, matching vehicle in reference frame
Other expression information, by the variation of these bit numbers and Lagrangian loss functionIt combines, it is bright to obtain updated glug
Daily loss function
Finally, more Lagrangian loss functionWith updated Lagrangian loss functionBetween size, ifThen rate-distortion optimization processing is carried out on matching vehicle.
9. a kind of Traffic Surveillance Video coding method described according to claim 1 or 7 or 8, which is characterized in that the basis is sentenced
The matching vehicle that disconnected result is carried out respective handling, and encoded, while will be referenced to when encoding using corresponding prediction mode
Or the information of matching background is incorporated into code stream together
When using inter-frame forecast mode, if it is decided that need to carry out at rate-distortion optimization on matching vehicle or matching background
Reason, then newly application one reference frame space, will matching vehicle or matching background be affixed on the reference frame newly applied with it is existing
Reference frame does inter-prediction for current vehicle to be encoded or background to be encoded together;After inter-prediction, traverse currently wait compile
The block of code vehicle or each 4x4 of current background covering to be encoded, if the block of some 4x4 with reference to current vehicle to be encoded or
The information of current background to be encoded, then be incorporated into code stream for corresponding syntactic element;
When using intra prediction mode, if it is decided that need to carry out at rate-distortion optimization on matching vehicle or matching background
Reason, then the new space of one reference frame of application, vehicle will be matched or match background be affixed on the reference frame newly applied for currently to
Coding vehicle or background to be encoded do intra prediction;
The position that matching vehicle is affixed on the reference frame newly applied is determined by following formula:
x0=xc+MVx;
y0=yc+MVy;
Wherein, x0And y0Indicate that matching vehicle is attached to the position on the reference frame newly applied, xcAnd ycIndicate current vehicle to be encoded
In the position of present frame, MVxAnd MVyHorizontal component and vertical component for current vehicle to be encoded relative to matching vehicle shift;
When matching background is attached on reference frame, with reference frame aligned in position.
10. a kind of Traffic Surveillance Video coding method according to claim 9, which is characterized in that the structure of encoding code stream
It is divided into piece slice and two layers of coding unit CTU tree-like;Wherein:
Slice layers:For current vehicle to be encoded, slice layers indicate whether there is matching vehicle in current slice layers comprising one
The label being referenced;The block for traversing the 4x4 of all vehicles covering in slice layers current, judge its whether with reference to matching vehicle,
If there is some 4x4 block with reference to matching vehicle, then labeled as true, otherwise labeled as vacation;If labeled as true,
Slice layers will also be comprising indicating to be referenced the syntactic element for matching number of vehicles in current slice layers;For each matching vehicle
, location index in the database, its be attached to the position on the reference frame newly applied and be incorporated into code stream together, being referenced
It is attached to the position on the reference frame newly applied with number of vehicles, the index of each matching vehicle and each matching vehicle and uses
Block code mode is encoded;
For current background to be encoded, whether slice layers in one current slice layers of expression comprising having matching background to be referenced
Label;The block for traversing the 4x4 of had powerful connections covering in slice layers current, judge its whether with reference to matching background, if there is
The block of some 4x4, then labeled as very, is otherwise labeled as vacation with reference to matching background;If slice layers are also wanted labeled as true
Location index syntactic element comprising the matching background that is referenced in the database, the syntactic element using block code mode into
Row coding;
CTU layers:For current vehicle to be encoded, whether CTU layers comprising current CTU layers an of expression with reference to matching vehicle pixel
Label;The block for traversing each 4x4 in CTU layers current, if there is some 4x4 block with reference to matching vehicle pixel, then mark
It is denoted as very, otherwise labeled as vacation;When labeled as true, the CTU layers of syntactic element that also indicate that matching vehicle indexes comprising one;
For current background to be encoded, whether CTU layers comprising current CTU layers an of expression with reference to the mark for matching background pixel
Note.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810720989.1A CN108833928B (en) | 2018-07-03 | 2018-07-03 | Traffic monitoring video coding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810720989.1A CN108833928B (en) | 2018-07-03 | 2018-07-03 | Traffic monitoring video coding method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108833928A true CN108833928A (en) | 2018-11-16 |
CN108833928B CN108833928B (en) | 2020-06-26 |
Family
ID=64135268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810720989.1A Active CN108833928B (en) | 2018-07-03 | 2018-07-03 | Traffic monitoring video coding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108833928B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109871024A (en) * | 2019-01-04 | 2019-06-11 | 中国计量大学 | A kind of UAV position and orientation estimation method based on lightweight visual odometry |
CN111582251A (en) * | 2020-06-15 | 2020-08-25 | 江苏航天大为科技股份有限公司 | Method for detecting passenger crowding degree of urban rail transit based on convolutional neural network |
CN112714322A (en) * | 2020-12-28 | 2021-04-27 | 福州大学 | Inter-frame reference optimization method for game video |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009111498A3 (en) * | 2008-03-03 | 2009-12-03 | Videoiq, Inc. | Object matching for tracking, indexing, and search |
CN104301735A (en) * | 2014-10-31 | 2015-01-21 | 武汉大学 | Method and system for global encoding of urban traffic surveillance video |
CN104539962A (en) * | 2015-01-20 | 2015-04-22 | 北京工业大学 | Layered video coding method fused with visual perception features |
CN105849771A (en) * | 2013-12-19 | 2016-08-10 | Metaio有限公司 | SLAM on a mobile device |
-
2018
- 2018-07-03 CN CN201810720989.1A patent/CN108833928B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009111498A3 (en) * | 2008-03-03 | 2009-12-03 | Videoiq, Inc. | Object matching for tracking, indexing, and search |
CN105849771A (en) * | 2013-12-19 | 2016-08-10 | Metaio有限公司 | SLAM on a mobile device |
CN104301735A (en) * | 2014-10-31 | 2015-01-21 | 武汉大学 | Method and system for global encoding of urban traffic surveillance video |
CN104539962A (en) * | 2015-01-20 | 2015-04-22 | 北京工业大学 | Layered video coding method fused with visual perception features |
Non-Patent Citations (4)
Title |
---|
CHANGYUE MA: "Surveillance video coding with vehicle library", 《2017 IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING (ICIP)》 * |
JING XIAO: "Global coding of multi-source surveillance video data", 《DATA COMPRESSION CONFERENCE (DCC)》 * |
JING XIAO: "Knowledge-based coding of objects for multisource surveillance video data", 《IEEE TRANSACTIONS ON MULTIMEDIA》 * |
XIANGUO ZHANG: "Background-modeling-based adaptive prediction for surveillance video coding", 《IEEE TRANSACTIONS ON IMAGE PROCESSING》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109871024A (en) * | 2019-01-04 | 2019-06-11 | 中国计量大学 | A kind of UAV position and orientation estimation method based on lightweight visual odometry |
CN111582251A (en) * | 2020-06-15 | 2020-08-25 | 江苏航天大为科技股份有限公司 | Method for detecting passenger crowding degree of urban rail transit based on convolutional neural network |
CN112714322A (en) * | 2020-12-28 | 2021-04-27 | 福州大学 | Inter-frame reference optimization method for game video |
CN112714322B (en) * | 2020-12-28 | 2023-08-01 | 福州大学 | Inter-frame reference optimization method for game video |
Also Published As
Publication number | Publication date |
---|---|
CN108833928B (en) | 2020-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111698506B (en) | Motion information candidate list construction method, triangle prediction decoding method and device | |
CN108833928A (en) | Traffic Surveillance Video coding method | |
US7142602B2 (en) | Method for segmenting 3D objects from compressed videos | |
CN110351556B (en) | Method for determining coding cost of coding unit and related device | |
CN113557552A (en) | Information processing apparatus and method | |
CN103873861A (en) | Coding mode selection method for HEVC (high efficiency video coding) | |
Cuevas | Block-matching algorithm based on harmony search optimization for motion estimation | |
KR20140068013A (en) | Depth map encoding and decoding | |
CN109040764B (en) | HEVC screen content intra-frame rapid coding algorithm based on decision tree | |
CN112437310B (en) | VVC intra-frame coding rapid CU partition decision method based on random forest | |
WO2017126292A1 (en) | Method for processing keypoint trajectories in video | |
Chen et al. | A novel fast intra mode decision for versatile video coding | |
Ma et al. | Traffic surveillance video coding with libraries of vehicles and background | |
CN106507106A (en) | Video interprediction encoding method based on reference plate | |
Song et al. | An efficient low-complexity block partition scheme for VVC intra coding | |
CN107547902B (en) | Adaptive rate distortion optimization method for surveillance video coding | |
Chen et al. | A fast inter coding algorithm for HEVC based on texture and motion quad-tree models | |
US20100239019A1 (en) | Post processing of motion vectors using sad for low bit rate video compression | |
CN112770116B (en) | Method for extracting video key frame by using video compression coding information | |
Chen et al. | Early merge mode decision for depth maps in 3D-HEVC | |
CN110312129B (en) | Method and device for constructing most probable mode list, intra-frame prediction and coding | |
Wen et al. | Paired decision trees for fast intra decision in H. 266/VVC | |
Shi et al. | An efficient fast motion estimation in H. 264/AVC by exploiting motion correlation character | |
CN109618152A (en) | Depth divides coding method, device and electronic equipment | |
Díaz-Cortés et al. | Motion estimation algorithm using block-matching and harmony search optimization |
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 |