In general, this invention relates to video analysis, and more particularly to compact descriptors extracted from videos that can be used for image or video query, retrieval, matching, classification and other analysis tasks.
The advent of inexpensive cameras and inexpensive storage has made it practical to store images and video in very large databases. For example, it is estimated that one popular social media provider stores about 80 billion images, and processes 600,000 images per second.
The commercial viability of such databases depends in large part on the availability of search and retrieval application. Thus, a great effort has been devoted to search and retrieval mechanisms for images and images. In general, such mechanisms rely on identifying points of interest in an image, often referred to as keypoints, and then extracting features from these keypoints that remain accurate when subject to variations in translation, rotation, scaling and illumination.
Examples of such features include scale-invariant feature transform (SIFT), speeded-up robust features (SURF), binary robust invariant scalable keypoints (BRISK), fast retina keypoint (FREAK), histogram of oriented gradients (HoG), circular Fourier-HOG (CHOG), and others.
To reduce the bandwidth and complexity of such applications, while preserving matching accuracy and speed, the features are often aggregated and summarized to more compact descriptors. Approaches for compacting the feature spaces include principal component analysis (PCA), linear discriminant analysis (LDA), boosting, spectral hashing, and the Bag-of-Features (BoF) approach. The BoF is used to convert features to compact descriptors (codewords) using cluster centers produced by means clustering.
The compact descriptors extracted from a query image or video can be compared to descriptors extracted from images in the database to determine similar images. The International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC) has published a standard Compact Descriptors for Visual Search (CDVS) that is designed to address the challenges for searching image datasets. MPEG CDVS provides a standardized way on descriptors for efficient still image search applications. The major steps in the pipeline include:
1. Take an image as input;
2. Detect keypoints in the image;
3. Extract and aggregate local descriptors for the keypoints;
4. Generate a global descriptor, scalable compressed fisher vector (SCFV);
5. Compress the global descriptor;
6. Code the coordinates of the selected keypoints;
7. Compress the selected local descriptors; and
8. Output the compacted descriptor bitstream.
To extend conventional image descriptors to derive video descriptors is not straightforward. One naive method extracts image descriptors from each image in the video sequence, treating each image separately. That method fails to exploit the fact that features extracted from successive video images tend to be very similar, and describe similar keypoints, resulting in a very redundant representation. Furthermore, that method does not remove features that are not persistent from image to image, and probably does not describe the video sequence very well. Thus, simply collecting individual image descriptors is bandwidth-inefficient and significantly increase matching complexity.
Another approach is to compress the descriptors derived from each video image, exploiting interframe predictions in the video sequence. Those methods exploit an affinement transformation, to predict feature descriptors and keypoint locations. However, those methods are limited in several aspects:
1) They do not address the problem of discovering a small set of descriptors that can represent a visually salient object.
2) Such approaches generally do not provide keypoint trajectories on the video signal.
3) Affine transformation used to code the keypoint locations in the subsequent pictures involves high complexity for extraction and is likely to suffer when accurate motion details are of the concern. And it is very difficult to use a single particular motion model to cover all types of motion in a practical application.
Yet another approach utilizes low-rank non-negative matrix factorization that can exploit the near stationarity of salient object descriptors in the scene. Hence, that method can determine low dimensional clusters from the visual descriptors extracted from videos. Unfortunately, that approach quickly becomes unstable as the number of clusters increases. In addition, that approach does not provide a full representation for keypoint trajectories.
More specifically, MPEG-7 standardized motion descriptors can be classified into two categories, as shown in
The motion trajectory describes the movement of one representative point of a specific region, composing of a set of positions and a set of interpolation functions describing the path. Because the motion trajectory is for a moving region, motion blobs are typically detected and each motion blob corresponds to a trajectory descriptor. In a typical application for a sport video, each player has a single representation point and one trajectory maintained.
The motion descriptors in MPEG-7 prior art work provide high-level semantic information for video analysis tasks, and such motions are limited for rigid objects, which is inefficient for some nowadays applications, e.g., human action recognition. The motion descriptors defined by MPEG-7 for a rigid object are at object levels, and it has not been an issue to represent the object-level trajectories in an efficient way at that time.
The embodiments of the invention aims to support a video analysis method and system, e.g., video retrieval, matching, human action recognition, satisfying the following requirements when comparing to a still image analysis method and system:
1. Identify a similar object/scene of interest with a similar motion from a large scale video database;
2. Code the feature descriptors extracted from a video efficiently;
3. Support to extract high-level motion descriptors from the decoded feature descriptors;
4. Low complexity/low cost at encoder; and
5. Be compatible to image based retrieval/matching system.
In addition to analyze objects and scenes based on spatial information, the video analysis system in particularly is featured by analyzing motion information over the temporal direction. For example, introducing motion in context of visual search is to enable a new dimension/functionality compared to a still image search system.
Keypoint trajectory is essentially to arrange the keypoints across temporal directions. The trajectories of each keypoint represent low-level motion information, which can form the foundation for high level motion analysis tasks.
Two novel approaches to predictively code the keypoint trajectory are to be described to store/transmit the keypoint trajectory. One is scalable trajectory coding (STC) and the other is interframe trajectory coding (ITC).
A method extracting the keypoint trajectory using a constrained matrix factorization approach is also described.
An important goal of the invention is to limit the computing power required at the encoder, e.g., a mobile computing device or low cost camera, but still allow advanced motion analysis at the decoder and server.
With prior art approaches of interframe prediction for feature descriptors, the locations of each feature are coded using an affine motion model. Extracting such motion parameters is a typical higher level semantic understanding about motion, and thus it involves complex computations.
One embodiment, scalable trajectory coding (STC), addresses applications that do not require low-delay in response, but scalability in terms of trajectory is desired. In this approach, the locations in trajectories are coded in an order of from one trajectory to the next trajectory. Because the trajectories of neighboring keypoints are likely to be similar to each other, such redundancies are used for a predictive coding. This method provides a fine granular scalable bitstream regarding to trajectories.
With the second embodiment, interframe trajectory coding (ITC), we code the locations in the keypoint trajectory from picture to picture by removing the redundancy between neighboring pictures.
If we consider to limit the cost to implement a video analysis system on top of existing image analysis systems, the video analysis system is expected to be backward compatible with the image analysis system. That is, an image analysis system should be able to extract useful feature descriptors from a subset of images in the video and can at least perform analysis in the spatial domain.
In this invention, without sacrificing generality, we take Compact Descriptor for Visual Search (CDVS) as an example system for image analysis applications; and take an emerging Compact Descriptor for Video Analysis (CDVA) as example system for video analysis applications. The CDVA solution is proposed to be compatible to CDVS on a subset of pictures in a video signal.
To achieve the backward compatibility, the feature descriptors associated with some pictures in the video are coded in the way as defined by CDVS, and such pictures are hereinafter referenced as key pictures, anchor pictures, or Intra pictures. In other words, the coding of feature descriptors from key pictures does not rely on any other pictures, while the coding of non-key pictures can depend on key pictures and/or other non-key pictures so as to exploit the redundancy.
The detected feature descriptors and keypoint trajectories are then encoded 320 and the bitstream 325 are stored or transmitted over network 330. The received bitstream 335 can later be decoded 340. Finally, the reconstructed feature descriptors and keypoint trajectories 345 are fed to a video analysis module 350 at the decoder and output the analysis results 355, e.g., semantics understanding about the video. The steps of the method can be performed in a processor connected to memory and networks by buses as known in the art.
This invention mainly addresses the coding for keypoint trajectories. We extract trajectory information for each keypoint and have them coded and transmitted to a video data analysis server. From the decoded keypoint trajectories at the server, high-level motion descriptors, e.g., as in MPEG-7, can be generated based on the keypoint trajectories and are later used for video understanding tasks, e.g., motion segmentation, motion modelling, global motion estimation, action recognition, video searching/analysis based on motion, etc., which composes block 350 in
The following sections are organized into four parts. Section 1 describes the concept of keypoint trajectory, which is generated using a feature matching algorithm. Then, the scalable trajectory coding (STC) are described in Section 2. In Section 3, we describe the interframe trajectory coding (ITC) approach. The constrained matrix factorization is given Section 4 as a novel way to extract the keypoint trajectories.
1 Keypoint Trajectory
When dealing with a video signal, it is often desired to split the video sequence into group of pictures (GOPs) so as to limit the processing complexity and delays. In this invention, we assume that the GOP structures are split for every n pictures. Further, like in conventional video compression systems, one GOP can be ensured not to cover pictures from different scenes so as to favor the coding efficiency. This is still a useful guideline in compressing feature descriptors and their locations and hence it is enforced in this invention.
Within one GOP, the feature descriptors from certain pictures, e.g., the first picture, are coded independently from others using a conventional way, like CDVS in one example scenario. This type of picture is referred as a key picture, an anchor picture or an Intra picture.
Along the temporal direction, the trajectory of each keypoint reveals detailed motion information of a keypoint. By transmitting the keypoint trajectory, it enables capabilities at a receiver and server to extract high level motion semantics, e.g., the high level motion descriptors as defined in the MPEG-7 standard. Hence it is possible to conduct high level video analysis tasks, e.g., locate objects or scenes with similar motions or perform action recognition. The keypoint trajectory can also be used to localize, in spatial and temporal domains, a target keypoint. The temporal localization can be achieved at picture precision instead of the GOP precision.
In this invention, a trajectory for a keypoint is represented by a sorted set of positions over a temporal (t) direction,
P(tj)=(Px(tj),Py(tj)), tjε{t1,t2, . . . ,tn}. (1)
The n pictures in a GOP are associated with time stamps {t1, t2, . . . , tn}. We use Pi, iε{x,y} to denote Px or Py.
We assume that there are m keypoints that have trajectories. Let Pc, cε[1,m] denote the position in the c-th trajectory. In MPEG-7, there is only one representative point for one object, that is m=1 for a single object in the picture. However, in this invention, we typically consider the case with m>>1.
It is worthy to emphasize that one trajectory Pc(t1) represents the travel path of the c-th keypoint over time. Hence, feature matching is required to sort the keypoints from neighboring pictures, such that the same keypoint from different pictures share the same keypoint index c. In addition, beside to conventional feature matching methods, in this invention, we also describe a novel approach to form the trajectories via a constrained matrix factorization method in Section 5.
If we simply extract the feature descriptors of neighbor pictures from a CDVS bitstream, we do not obtain the trajectory information because there is no connectivity for keypoints over temporal direction. Of course, an additional process at the receiver can be used to generate the trajectory information. In this invention, we intend to detect the keypoint trajectory at the encoder, because it is helpful in removing erroneous feature descriptors and can provide superiority with coding the keypoint locations.
There are a couple options to represent the positions in a trajectory P. For the key picture, we use the coordinates relative to the image coordinate system for {P(tj), j=1}. For non-key pictures, {P(tj), ∀jε[2,n]} can be positions represented relative to the image coordinate system {P(a)(tj)}, or they can be a relative position change using its previous picture as a reference {P(b)(tj)}. They are convert-able via the following equation,
P
(a)(tj)=P(a)(tj-1)+P(b)(tj), for jε[2,n]. (2)
In this description, P can be either of the two representations, unless specified otherwise.
Moreover, let {circumflex over (P)} denote the reconstructed trajectory from a coded bitstream. For example, we use {circumflex over (P)}(t1) to denote the reconstructed position of keypoints in the first picture, which is available as a reference to code the remaining positions in the trajectory {P(tj), ∀jε[2,n]}.
In one embodiment, during the process to generate the keypoint trajectories, we could determine those keypoints that are attached to any trajectories, which are likely to be less useful for the video analysis. It is proposed to discard such isolated keypoints without affecting the video analysis.
Though we focus on coding 2D trajectories, it should be noted that the principles of this invention can be easily extended to code keypoint 3D trajectories. The 2D trajectory P=(Px,Py) is augmented by a depth direction z to have a 3D trajectory P=(Px,Py,Pz).
2 Scalable Trajectory Coding (STC)
In this section, we describe how to compress a keypoint trajectory in a predictive way, which employs the redundancy within one trajectory or between trajectories. The approach in this section is featured with a fine granular scalability when performing a video analysis task based on the trajectories, and is thus named Scalable Trajectory Coding (STC). That is, the server can return coarse results after the first trajectory is reconstructed, and the results can be refined in a fine granular manner by appending more and more trajectories. With the other approach described in Section 3, interframe trajectory coding (ITC), however, the server has to decode all trajectories before having some trajectory-based results.
With STC, we code all keypoints in one trajectory before coding another trajectory. For the example trajectories in
{P1(t2),P1(t3);P2(t2),P2(t3); . . . ;P5(t2),P5(t3)}, (3)
after {Pc(t1), ∀cε[1,5]} have been coded using CDVS.
2.1 Intra-Scalable Trajectory Coding
Some trajectories are coded in a mode called Intra-scalable Trajectory coding (Intra-STC). Such trajectories are coded independently from other trajectories and can be recovered without dependencies on any other trajectories. In this section, a trajectory P using absolute locations P(a) relative to image coordinate system is selected in the description.
Intra-STC is used to code Pi={pi(tj), ∀tjε[t2, t3, . . . , tn]} along each dimension iε{x, y}. Pseudocode for an encoder implementation is shown in
As the first position pi(t1) has already been coded in the key picture with a reconstructed position {circumflex over (p)}i(t1), it can be used to predict pi(t2). In general, the previously coded keypoints in the trajectory are used generate a predictor for a next keypoint. Let {pi′(tj), tjε[t2, t3, . . . , tn]} to be the predictors.
is the keypoint velocity along a particular direction:
is the keypoint initial velocity and ai denotes its acceleration.
Note that similar equations like Eq. 4 and 5 were used in the motion trajectory descriptor in MPEG-7. However, those were used to construct the path of a moving region, while the functions here are used to generate a position predictor in this invention.
After a predictor pi′(tj) is determined, the residual ri(tj) is then found as,
r
i(tj)=pi(tj)−pi′(tj), for tjε[t2,t3, . . . ,tn]. (6)
An Intra-STC trajectory is coded with the following series of reconstructed numbers, given some quantization scheme,
{{circumflex over (r)}i(t2),{circumflex over (r)}i(t3), . . . ,{circumflex over (r)}i(tn)}, for ∀iε{x,y}, (7)
as well as prediction mode indicator (e.g., selection of prediction function from 1-st order function and 2-nd order function) and prediction parameters e.g., initial velocity v and acceleration a when 2-nd order function in use.
The reconstructed trajectory is obtained as,
{circumflex over (p)}
i
=p
i′(tj)+{circumflex over (r)}i(tj), for ∀tjε[t2,t3, . . . ,tn]. (8)
In
The prediction parameters v and a are coded for each trajectory in the example implementation of Algorithm 1. To further improve the coding efficiency, it can be preferred to code the parameters hierarchically from sequence or GOP level to trajectory level, or they can take predefined values without coding at all if the overhead is too heavy, e.g., simply let v=1, a=1.
2.2 Inter-Scalable Trajectory Coding
As there is redundancy between keypoint trajectories, in this section, we describe how to code some trajectories by removing such redundancies, which is called Inter-scalable Trajectory Coding (Inter-STC) mode. The trajectories coded in this mode use Intra-STC trajectories or other Inter-STC trajectories as references. In this section, a trajectory P represented by relative location changes P(b) is selected for the descriptions.
2.2.1 Distance Between Trajectories
We first define a distance between two trajectories Ps and Pt. This is needed for the Inter-STC modes. Typically, such a distance is
However, during decoding a trajectory, the positions in the current trajectory, except for {circumflex over (P)}(t1) from the key picture, are unavailable, and hence it is impossible to evaluate the exact distance using the full trajectory as in Eq. 9. Thus, an estimated distance uses only the positions from key pictures as
With the distance metric defined between trajectories, we describe three approaches to generate a trajectory predictor from low to high complexity/efficiency. An encoder implementation can select one of these according to a tradeoff evaluation on complexity/efficiency.
It is noted that an angle of a previously coded keypoint trajectory to the current keypoint trajectory can also be determined based on reconstructed keypoint positions in the key pictures.
2.2.2 Simple Trajectory Predictor
With the lowest complexity, a predefined search strategy is used to determine the trajectory predictor from trajectories that have been coded in a neighborhood.
In a first step, we determine the trajectories nearest to the current trajectory using an estimated distance de as in Eq. 10. If a unique trajectory is identified, then it is used as the trajectory predictor. Otherwise, if more than one trajectories are equally near to the current trajectory, a second criteria is used with the orientation θkε[−π,π) between the current trajectory and the reference candidate in the key picture. The k-th trajectory with the largest θk is selected. The distances and orientations are illustrated in
With a predefined trajectory predictor selection strategy, we need not signal the selection of reference trajectory in the bitstream. This can reduce bitrates for some applications.
2.2.3 Mean Trajectory Predictor
A more advanced method to generate trajectory predictor is to utilize a set of trajectories that are within a given distance threshold dth to the current trajectory. If there are s trajectories {P(1), P(2), . . . , P(s)} within the neighborhood defined by the threshold dth, then each dimension of the mean trajectory predictor is defined as
P
i′=mean{{circumflex over (P)}i(1),{circumflex over (P)}i(2), . . . ,{circumflex over (P)}1(s)}. (11)
Similar to simple trajectory approach, the estimated distance de in Eq. 10 is used to select the trajectory reference candidates. With the mean trajectory predictor, one can signal the threshold dth in the bitstream, if adaptive selection is preferred, otherwise, no signaling is needed to generate the reference trajectory.
2.2.4 Trajectory Reference List
A most flexible way to derive a trajectory predictor uses a trajectory reference list, which can bring improved compression performance with a bit overhead to be signaled in bitstream. In this approach, all existing trajectories from a neighborhood are arranged into an initial reference list L, sorted first by distances relative to the current trajectory using the estimated distance measurement de in Eq. 10, then by orientations as shown in
The trajectory predictor list L can be inserted with some derived trajectories based on the existing ones. For example, we insert the mean trajectory, as in Eq. 11, at the first position of the initial trajectory list. Each trajectory is associated with an index in the list L, as
L={{circumflex over (P)}
i
(1)
,{circumflex over (P)}
i
(2)
, . . . ,{circumflex over (P)}
i
(s)}. (12)
The encoder selects the best predictor from the list L, and signal its associated reference index f in the bitstream. Finally, the trajectory predictor is given by
P
i′
={circumflex over (P)}
(f). (13)
The use of a reference trajectory is shown in
2.2.5 Inter-Scalable Trajectory Coding
After a trajectory predictor P′ is determined, the trajectory residual R is determined and coded, for each dimension respectively
R
i
=P
i
−P
i′. (14)
2.2.6 Skip-Scalable Trajectory Coding Mode
When the trajectory residual R is near to 0, the encoder can select a special inter-scalable trajectory coding mode for the current trajectory and avoid coding the residual. This method is called Skip-scalable Trajectory Coding (SsTC).
If not all residual trajectories are skipped, signalling between skip and coding need to be conveyed in the bitstream.
2.3 Bi-Scalable Trajectory Coding
The inter-scalable trajectory coding described above uses a single reference trajectory. In this subsection, we describe a bi-scalable trajectory coding mode where two reference trajectories are to be used.
Assuming the trajectory reference list L is in use, we compose a secondary trajectory list L2 in addition to L as constructed in Section 2.2.4. The encoder determines the trajectory predictor as a weighted sum of two trajectory references {circumflex over (P)}f and {circumflex over (P)}b, from L and L2, respectively,
where def and deb are distance measured from {circumflex over (P)}f, {circumflex over (P)}b to PC. The secondary trajectory reference list L2 can be composed of the same elements in L with a revised order, e.g., to swap the first two reference trajectories. f and b are the index of {circumflex over (P)}f and {circumflex over (P)}b in list L and L2, respectively.
Using two reference trajectories to predict the current trajectory is shown in
2.3.1 Direct-Scalable Trajectory Coding Mode
Similar to Inter-STC, the residual from the bi-prediction can be coded or be skipped based on a rate distortion evaluation. When the residual are not to be coded, such an Bi-scalable STC is named as a Direct-scalable Trajectory Coding (DsTC) mode.
The Inter-scalable Trajectory Coding (ITC) including Bi-scalable Trajectory Coding are implemented in an example encoder as shown in
An encoder that implements both Intra-scalable Trajectory Coding and Inter-scalable Trajectory Coding is shown in
2.4 Short- and Long-Term Reference Trajectories
In the above description, we use all trajectories that have been coded previously as potential reference trajectory candidate. This can involve high memory consumption and high computation complexity.
To address potential complexity issues, in one embodiment, a sliding window operation removes “older” trajectories out of the consideration, where a fixed number of reference candidate within a coding window are maintained. A newly coded trajectory moves into the sliding window. For trajectories inside the sliding window, a “first-in-first-out” operation is performed to keep only the most recently coded trajectories as reference trajectory candidates, which are called short-term reference trajectories. The selection of the sliding window size w controls the required complexity or memory requirement.
In this subsection, we describe another type of reference trajectory, i.e., long-term reference trajectory. This type of reference trajectory is always put in the reference trajectory list in addition to the short-term reference trajectories, until it is explicitly removed from reference candidate list. This flexibility allows an encoder to put a good reference candidate for many trajectories to be coded. For example, a representative trajectory of a human body can be a long-term reference trajectory for trajectories of keypoints from his head and four limbs, etc.
3 Interframe Trajectory Coding (ITC)
Besides scalable trajectory coding (STC), we now describe the interframe trajectory coding (ITC) method, where all keypoints in a picture are coded before coding any keypoint from another picture. In particularly, if the picture coding order is exactly the same as the picture presentation (capture) order, then the delay to return (preliminary) video analysis results is minimized to 1-frame delay, which is useful for some real-time applications, and it is referenced as low-delay interframe trajectory coding (LDTC) hereinafter. With STC, however, such a delay is typically equal to the period of a full GOP. We assume the keypoint positions P=P(a) are relative to the image coordinate system.
3.1 P-Interframe Trajectory Coding
For a first approach to do interframe trajectory coding (ITC), the keypoints from an older picture are used to predicatively code the keypoints in the current picture, which is called P-interframe Trajectory Coding (PTC).
We assume all {P(t1)} have been coded using CDVS. Now we need to predict keypoints {Pc(tj), cε[1,m]} in picture {tj, j≧2} using a previously coded picture {tf, f≧1} as a reference. The prediction shown in
Among the keypoints that have been coded in the current picture tj, we determine the keypoint r that is nearest to the current keypoint c using the distance |{circumflex over (P)}r(tf)−{circumflex over (P)}c(tf)| measured in picture tf. A translation vector for keypoint r is
V
f
={circumflex over (P)}
r(tj)−{circumflex over (P)}r(tf). (16)
Then the predicted keypoint c is
P′(tj)={circumflex over (P)}c(tf)+Vf. (17)
The residual is
R
c(tj)=Pc(tj)−P′(tj). (18)
If there is not a keypoint r, or it does not provide a good predictor P′(tj), the keypoint c is coded without referencing a previous picture. In that case, the principle of Intra-trajectory prediction in Section 2.1 can be applied.
If the residual Rc in Eq. 18 is small enough to be discarded, it is a special ITC coding mode, called as Skip-interframe Trajectory Coding (SiTC) mode. Proper syntax is be signaled if not all residual are discarded. In addition, one can utilize a reference picture list to manage multiple reference pictures. While coding the current picture, a reference picture index is used to signal the best reference picture. In this case, a reference picture management methods, e.g., the principle of sliding window operation as in Section 2.4 can be applied on the reference pictures instead of reference trajectories.
By enforcing a coding order that no picture in the future (with a capturing timestamp in the future) is coded prior to a picture in the past, a low-delay interframe trajectory coding (LDTC) can be implemented using P-interframe only trajectory coding. For the example trajectories in
{P1(t2),P2(t2), . . . ,P5(t2);P1(t3),P2(t3), . . . ,P5(t3)}, (19)
where all {P(t1)} have been coded using CDVS without interframe prediction, picture t2 uses picture t1 as a reference, and picture t3 uses pictures t2 and t1 as reference candidates.
3.2 B-Interframe Trajectory Coding
When an application can relax the requirement for a minimum delay, we arrange a different coding order than the picture presentation order to favor a higher coding efficiency. Instead of using a single reference picture with PTC, two reference pictures are utilized simultaneously in the B-interframe Trajectory Coding (BTC).
For the trajectories shown in
{P1(t3),P2(t3), . . . ,P5(t3);P1(t2),P2(t2), . . . ,P5(t2)}, (20)
after {Pc(t1), ∀cε[1,5]} have been coded using CDVS without interframe prediction.
In general, for a bi-interframe trajectory coded picture tj, we predict P(tj) using two previously coded picture tf and tb as references. For example, tf is the nearest reference picture from the past and tb is the nearest reference picture from the future. tf and tb are named as forward reference picture and backward reference picture hereinafter, though either of them can appear from past or from future based on an optimal encoder decision. In the example above Eq. 20, f=1, b=3 and j=2. After selecting the forward and backward reference pictures, the prediction procedure in
First, among the keypoints that have been coded in the current picture tj, determine the keypoint r that is nearest to the current keypoint c using the distance |{circumflex over (P)}r(tf)−{circumflex over (P)}c(tf)| measured in picture tf.
For keypoint r, two translation vectors corresponding to the forward and backward references are determined as
V
f
={circumflex over (P)}
r(tj)−{circumflex over (P)}r(tf),Vb={circumflex over (P)}r(tj)−{circumflex over (P)}r(tb). (21)
Then, two intermediate predicted keypoints for c are given by
P′(tf,tj)={circumflex over (P)}c(tf)+Vf,P′(tb,tj)={circumflex over (P)}c(tb)+Vb. (22)
The weighted keypoint predictor c is given according to the distances in temporal direction,
The final residual is
R
c(tj)=Pc(tj)−P′(tj). (24)
If the residual Rc is small enough to be discarded, the special BTC mode is named as a Direct-interframe Trajectory Coding (DiTC) mode. Similar syntax signaling like the DsTC mode in Section 2.3 is required if not all such residual are to be discarded. When multiple reference pictures are used, an independent reference picture list is be maintained for each prediction direction and an index to select a reference picture is required.
In the above description, the same keypoint r is used for both forward and backward prediction, which was selected based solely on the forward reference picture. In another embodiment, the different keypoint r′ can be selected for the backward prediction according to the backward reference picture and the principle above still applies.
4 Discussions Related to Trajectories
4.1 Long Trajectories Across GOPs
In previous sections, we described two categories of approaches to code the keypoint trajectories. We assumed that a video is split into GOP structure to limit the codec complexity.
Within one GOP, we use a same keypoint index to connect the keypoints from different pictures such that a trajectory can be reconstructed. Unfortunately, it would bring issues when some trajectories is across the GOP boundaries when splitting the video into GOPs, because the keypoints may be re-indexed for a new GOP. Though one can leave it to the server/receiver to decide how to connect trajectories from one GOP to another GOP by computing/comparing the distance between feature descriptors from neighboring GOPs, an obvious down-side is that it may lead to inconsistency in reconstructed trajectories. To avoid such ambiguous, in one embodiment, one can restrict the decoder using the same method to join the trajectories. In this invention, we signal the relationship between trajectories across a GOP boundary such that the encoder can even use some method developed in the future to join trajectories from neighbor GOPs.
A mapping table indexed by the keypoint index from a next GOP has values assigned as the keypoint index of the same trajectory from its preceding GOP. Since we assumed that the keypoint index number c>0, we assign a special value, e.g., 0, indicating that this is a new trajectory that is unavailable in preceding GOP.
4.2 Feature Descriptor Coding Along a Trajectory
By coding trajectories, the feature descriptors from different pictures are linked if they are near to each other. Hence one typically can skip coding the feature descriptors in non-key pictures. In case that the changes in feature descriptor can accumulate to an unacceptable level over time, we code the relative changes in feature descriptors. Such coding uses feature descriptors appearing earlier in the trajectory to predict those appearing later.
5 Constrained Matrix Factorization
In this section, we describe a novel way to determine the trajectories through a constrained matrix factorization through a GOP. Similar to a prior art matrix factorization approach, the descriptors from all pictures in a GOP are stacked to form a matrix XεRm×N, where m is the length of a feature descriptor and N is the total number of descriptors from the GOP.
Visually salient objects in a video scene maintain a nearly stationary descriptor representation throughout the GOP. Hence, the problem of determining a compact descriptor of a video scene can be formulated as finding a low dimensional representation of the matrix X. In other words, X is represented in the following manner,
X≈LR, (25)
where XεRm×N, LεRm×r, RεRr×N, and r<<N.
In the solution to Eqn. 25, the following non-negative matrix factorization (NMF) is used to determine the compact descriptors,
where all the columns of L are open to be selected in the optimization. Each column in L is actually a representing feature descriptor.
In order to maintain backward compatibility, unlike in Eqn. 25 and 26, all columns in matrix L can be selected, in this invention we split the matrix L into two partitions
L=[L
a
,L
b], (27)
where LaεRm×r
where RaεRr
In this section, La the first partition of L with ra columns, is determined based on the descriptors extracted/coded for the key picture of a GOP. Then, we determine Lb, given La being fixed.
5.1 Determination of La
Because La is formed based on the feature descriptors corresponding to the key picture, which are already coded, e.g., using CDVS scenario, we typically do not need code La again. Instead, we need to specify how to pick up feature descriptors for La.
We assume that:
1. Feature descriptors from the key picture are sorted and indexed. In CDVS, the local features are sorted on the basis of a relevance probability measure; and
2. Coordinates of each feature descriptor in key picture are coded and accessible.
In one case, all feature descriptors coded for key picture are placed in La. For example, for the videos within the video database, this is desired so as to make the trajectory set as complete as possible.
In another case, it can be preferred to have a subset of feature descriptors from key picture to be included in La. In case of query video, it can be preferred to narrow down the selection of feature points in La to the region of interest (ROI), e.g., foreground objects or moving objects than backgrounds. In this way, the video analysis results can be customized according to the user's demand while reducing the transmission bitrates at the same time.
To handle both cases in a complying manner, it is necessary to signal selection of feature descriptor from key picture for La as shown in
After La is fixed, Ra is also determined. Actually, Ra is always equal to an identity matrix Ir
R
a
×{I
r
×r
|0r
5.2 Computing Lb with Given La
After La and Ra are determined, we determine Lb and Rb. Given that one GOP does not cover more than one scene, it can be imagined that Lb would reflect additional feature descriptors from dis-occlusions, e.g., due to translation motion and/or new objects popping into the scene.
When no dis-occlusion happens, it can be found that rb≈0. On the other hand, when large dis-occlusions being present, rb would not be negligible, especially if the background objects are of interest. Under such circumstances, we need to determine Lb.
In one embodiment, we describe a modified projected proximal-point alternating least squares minimization algorithm as shown in
The columns of {tilde over (L)} are then projected onto the non-negative l2 unit ball, while the columns of {tilde over (R)} are projected onto the admissible set of standard basis vectors
E
r
:={e
i
εR
r
:e(i)=1, and 0 otherwise, iε{1, . . . r}}, (31)
by setting the largest non-negative entry in each column to one and the remaining entries to zero. Note that {tilde over (L)} and {tilde over (R)} admit closed form solutions as shown in Algorithm 5.
The factors L0=[La,Lb,0] and R0=[RaT,Rb,0R]T are initialized with independent identically distributed uniform random entries for Lb,0 and Rb,0 and La and Ra being given. The iterates {tilde over (L)} and {tilde over (R)} are determined by solving proximal-point alternating least squares functionals and then keeping only the positive entries {tilde over (L)}+ and {tilde over (R)}+ in the factors plus the given partitions La and Ra. Finally, the factors are projected onto the unit column norm ball for {tilde over (L)}, and onto the binary selector set Er for {tilde over (R)}.
In the end, as R is the selecting matrix and it represents the trajectories of all feature points throughout the GOP. L is a complete set of representing feature descriptors.
5.3 Complexity-Limited Trajectory Determining Approaches
It is realized that in most applications, it is unnecessary to even consider Lb. That is, it is enough to just consider the features available from the key picture in a GOP. With such considerations, the first step to update L within the iteration in
6 Block-Based Trajectory Coding
In the sections above, we described a few trajectory coding approaches with each trajectory being a coding unit. In this section, we describe a more advanced trajectory approach which applies the same principles described above on a new coding unit specified by a block of trajectories.
6.1 Block of Trajectories
Two types of blocks are herein specified. Type 1 block of trajectories is implicitly specified using some fixed grid partitioning method. For example, the trajectories could be partitioned into small blocks according to their location in the key picture. The size of block grid could be predefined as one of the following, e.g. 4×4, 8×8, 8×4, 4×8, 16×16, 16×8, 8×16, . . . , up to MaxBlockWidth×MaxBlockHeight; or indicated in bitstream by a mixed of the above sizes.
Type 2 block of trajectories is explicitly specified if an encoder allows some object segmentation procedure. With type 2 trajectory block, the trajectories from a image segmentation is grouped into a single block. This approach needs to signal the image segmentation explicitly in the bitstream.
6.2 Block-Based Trajectory Coding
Both the proposed scalable trajectory coding (STC) in Section 2 and the proposed interframe trajectory coding (ITC) in Section 3 are able to be extended to a block-based trajectory coding.
For single trajectory based STC, the scalability could be achieved up to a single trajectory level. While with its block-based STC, the scalability would be at trajectory block level.
For single trajectory based ITC, the prediction from reference pictures are realized for trajectory by trajectory. While with block-based ITC, the interframe prediction instead is implemented in the unit of trajectory block.
The extension to block-based trajectory coding could bring coding benefits by reducing signaling overheads and may be preferred for an application.
6.3 Transformation Trajectory Coding and Quantization
After performing block based trajectory prediction (either block based STC, or block based ITC), a residual signal is obtained.
In one embodiment, quantization could be applied directly on the residual signal after prediction.
In another embodiment, we can first apply a transform, e.g. DCT-like transformation, on the residual signal so as to compact the signal energy to fewer dimensions. Due to the energy compact property from the transform, it may be preferable to apply a quantization process on the transformed coefficients with less distortion being introduced.
Although the invention has been described by way of examples of preferred embodiments, it is to be understood that various other adaptations and modifications can be made within the spirit and scope of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention.