Abstract:
A method processes keypoint trajectories in a video, wherein the keypoint trajectories describe motion of a plurality of keypoints across pictures of the video over time, by first acquiring the video of a scene using a camera. Kkeypoints and associated feature descriptors are detected in each picture. The keypoints and associated features descriptors are matched between neighboring pictures to generate keypoint trajectories. Then, the keypoint trajectories are coded predictively into a bitstream, which is outputted.

Description:
FIELD OF THE INVENTION 
       [0001]    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. 
       BACKGROUND OF THE INVENTION 
       [0002]    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. 
         [0003]    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. 
         [0004]    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. 
         [0005]    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. 
         [0006]    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: 
         [0000]    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.
 
         [0007]    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. 
         [0008]    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: 
         [0000]    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.
 
         [0009]    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. 
         [0010]      FIG. 1  shows the work scope of MPEG-7 prior art. Features are extracted  110  from a video  110  and MPEG-7 descriptors is then generated  130 . The descriptors can be provided to a search engine  140  to determine content in a database  150  with similar descriptors. MPEG-7 is a standard for describing features of multimedia content. It does not provide a way to extract multimedia descriptors and features, or a way to measure similarity between contents. 
         [0011]    More specifically, MPEG-7 standardized motion descriptors can be classified into two categories, as shown in  FIG. 2 . One includes camera motion  230 , motion activity  240 , warping parameters  250  for video segments  210 , and the other includes motion trajectory  260 , parametric motion  270  for moving regions  220  in the video. 
         [0012]    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. 
         [0013]    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. 
       SUMMARY OF THE INVENTION 
       [0014]    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: 
         [0000]    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.
 
         [0015]    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. 
         [0016]    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. 
         [0017]    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). 
         [0018]    A method extracting the keypoint trajectory using a constrained matrix factorization approach is also described. 
         [0019]    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. 
         [0020]    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. 
         [0021]    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. 
         [0022]    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. 
         [0023]    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. 
         [0024]    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. 
         [0025]    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. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0026]      FIG. 1  is a schematic of conventional MPEG-7 implemented searching; 
           [0027]      FIG. 2  is a block diagram of conventional MPEG-7 standardized motion descriptors; 
           [0028]      FIG. 3  is a block diagram of a video analysis method and system according to embodiments of the invention; 
           [0029]      FIG. 4  is a schematic of five (5) keypoints and corresponding keypoint trajectories according to embodiments of the invention; 
           [0030]      FIG. 5  is a block diagram of pseudocode for an Intra-scalable Trajectory Coding algorithm according to embodiments of the invention; 
           [0031]      FIG. 6  is a schematic of a prediction relationship between the keypoints in the Intra-STC trajectory according to embodiments of the invention; 
           [0032]      FIG. 7  is a schematic of how distances and orientations relative to the current trajectory are measured according to embodiments of the invention; 
           [0033]      FIG. 8  is a schematic of the use a single reference trajectory with Inter-scalable Trajectory Coding according to embodiments of the invention; 
           [0034]      FIG. 9  is a schematic of the use of two reference trajectories with Bi-scalable Trajectory Coding according to embodiments of the invention; 
           [0035]      FIG. 10  is a block diagram of pseudocode for an example implementation of Inter-scalable Trajectory Coding including Bi-scalable Trajectory Coding according to embodiments of the invention; 
           [0036]      FIG. 11  is a block diagram of pseudo code of an example implementation of Scalable Trajectory Coding according to embodiments of the invention; 
           [0037]      FIG. 12  is a schematic of an example P-interframe Trajectory Coding according to embodiments of the invention; 
           [0038]      FIG. 13  is a schematic of an example B-interframe Trajectory Coding according to embodiments of the invention; 
           [0039]      FIG. 14  is an example mapping table on how to join trajectories between neighboring GOPs according to embodiments of the invention: 
           [0040]      FIG. 15  is a block diagram of pseudo code for selecting a first part in matrix L for a constrained matrix factorization approach according to embodiments of the invention; and 
           [0041]      FIG. 16  is a block diagram of pseudocode for an embodiment on how to solve a constrained matrix factorization problem according to embodiments of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0042]      FIG. 3  shows a method and system for video analysis according to embodiments of the invention. The video input  301  to the system is conveyed to a “keypoint/feature detection” module  305 , then the keypoint/feature are matched via block  310 . This leads to keypoint trajectories information  315 . In one embodiment of the invention, we use a constrained matrix factorization for feature matching as an option to implement block  310 . It is understood that other know methods can also be used to extract the keypoint trajectories. 
         [0043]    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. 
         [0044]    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  FIG. 3 . 
         [0045]    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. 
         [0046]    1 Keypoint Trajectory 
         [0047]    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. 
         [0048]    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. 
         [0049]    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. 
         [0050]    In this invention, a trajectory for a keypoint is represented by a sorted set of positions over a temporal (t) direction, 
         [0000]        P ( t   j )=( P   x ( t   j ), P   y ( t   j )),  t   j   ε{t   1   ,t   2   , . . . ,t   n }.  (1)
 
         [0051]    The n pictures in a GOP are associated with time stamps {t 1 , t 2 , . . . , t n }. We use P i , iε{x,y} to denote P x  or P y . 
         [0052]    We assume that there are m keypoints that have trajectories. Let P c , 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&gt;&gt;1. 
         [0053]      FIG. 4  shows five example trajectories corresponding to five keypoints. The example GOP has three pictures. Our task is to code the trajectories {P c (t j ), ∀ c ε[1,5], ∀jε[1,3]}. In particularly, {P c (t 1 ), ∀cε[1,5]} in the key picture are coded using CDVS. We describe how to code P c (t j ), cε[1,5], jε[2,3] for this invention. 
         [0054]    It is worthy to emphasize that one trajectory P c (t 1 ) 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. 
         [0055]    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. 
         [0056]    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(t j ), j=1}. For non-key pictures, {P(t j ), ∀jε[2,n]} can be positions represented relative to the image coordinate system {P (a) (t j )}, or they can be a relative position change using its previous picture as a reference {P (b) (t j )}. They are convert-able via the following equation, 
         [0000]        P   (a) ( t   j )= P   (a) ( t   j-1 )+ P   (b) ( t   j ), for  jε[ 2, n].   (2)
 
         [0057]    In this description, P can be either of the two representations, unless specified otherwise. 
         [0058]    Moreover, let {circumflex over (P)} denote the reconstructed trajectory from a coded bitstream. For example, we use {circumflex over (P)}(t 1 ) 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(t j ), ∀jε[2,n]}. 
         [0059]    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. 
         [0060]    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=(P x ,P y ) is augmented by a depth direction z to have a 3D trajectory P=(P x ,P y ,P z ). 
         [0061]    2 Scalable Trajectory Coding (STC) 
         [0062]    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. 
         [0063]    With STC, we code all keypoints in one trajectory before coding another trajectory. For the example trajectories in  FIG. 4 , the points in the trajectories are coded in the following order: 
         [0000]      { P   1 ( t   2 ), P   1 ( t   3 ); P   2 ( t   2 ), P   2 ( t   3 ); . . . ; P   5 ( t   2 ), P   5 ( t   3 )},  (3)
 
         [0000]    after {P c (t 1 ), ∀cε[1,5]} have been coded using CDVS. 
         [0064]    2.1 Intra-Scalable Trajectory Coding 
         [0065]    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. 
         [0066]    Intra-STC is used to code P i ={p i (t j ), ∀t j ε[t 2 , t 3 , . . . , t n ]} along each dimension iε{x, y}. Pseudocode for an encoder implementation is shown in  FIG. 5  (Algorithm 1). All variables shown herein and in other pseudocodes, are described herein. 
         [0067]    As the first position p i (t 1 ) has already been coded in the key picture with a reconstructed position {circumflex over (p)} i (t 1 ), it can be used to predict p i (t 2 ). In general, the previously coded keypoints in the trajectory are used generate a predictor for a next keypoint. Let {p i′ (t j ), t j ε[t 2 , t 3 , . . . , t n ]} to be the predictors. 
         [0068]      FIG. 6  shows the prediction relationship between the keypoints in an Intra-STC trajectory. We generate a 1-st order predictor as shown as in Eq. 4 or a 2-nd order predictor as in Eq. 5. A CDVA encoder can select between the two Intra-STC modes. 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           p 
                           
                             i 
                             ′ 
                           
                         
                          
                         
                           ( 
                           
                             t 
                             j 
                           
                           ) 
                         
                       
                       = 
                       
                         
                           
                             
                               p 
                               ^ 
                             
                             i 
                           
                            
                           
                             ( 
                             
                               t 
                               
                                 j 
                                 - 
                                 1 
                               
                             
                             ) 
                           
                         
                         + 
                         
                           
                             v 
                             i 
                           
                            
                           
                             ( 
                             
                               
                                 t 
                                 j 
                               
                               - 
                               
                                 t 
                                 
                                   j 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                     , 
                     where 
                   
                    
                   
                     
 
                   
                    
                   
                     
                       v 
                       i 
                     
                     = 
                     
                       
                         
                           
                             p 
                             i 
                           
                            
                           
                             ( 
                             
                               t 
                               n 
                             
                             ) 
                           
                         
                         - 
                         
                           
                             p 
                             i 
                           
                            
                           
                             ( 
                             
                               t 
                               1 
                             
                             ) 
                           
                         
                       
                       
                         
                           t 
                           n 
                         
                         - 
                         
                           t 
                           1 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0000]    is the keypoint velocity along a particular direction: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           p 
                           
                             i 
                             ′ 
                           
                         
                          
                         
                           ( 
                           
                             t 
                             j 
                           
                           ) 
                         
                       
                       = 
                       
                         
                           
                             
                               p 
                               ^ 
                             
                             i 
                           
                            
                           
                             ( 
                             
                               t 
                               
                                 j 
                                 - 
                                 1 
                               
                             
                             ) 
                           
                         
                         + 
                         
                           
                             v 
                             i 
                           
                            
                           
                             ( 
                             
                               
                                 t 
                                 j 
                               
                               - 
                               
                                 t 
                                 
                                   j 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                         
                         + 
                         
                           
                             1 
                             2 
                           
                            
                           
                             
                               
                                 a 
                                 i 
                               
                                
                               
                                 ( 
                                 
                                   
                                     t 
                                     j 
                                   
                                   - 
                                   
                                     t 
                                     
                                       j 
                                       - 
                                       1 
                                     
                                   
                                 
                                 ) 
                               
                             
                             2 
                           
                         
                       
                     
                     , 
                     where 
                   
                    
                   
                     
 
                   
                    
                   
                     
                       v 
                       i 
                     
                     = 
                     
                       
                         
                           
                             
                               p 
                               i 
                             
                              
                             
                               ( 
                               
                                 t 
                                 n 
                               
                               ) 
                             
                           
                           - 
                           
                             
                               p 
                               i 
                             
                              
                             
                               ( 
                               
                                 t 
                                 1 
                               
                               ) 
                             
                           
                         
                         
                           
                             t 
                             n 
                           
                           - 
                           
                             t 
                             1 
                           
                         
                       
                       - 
                       
                         
                           1 
                           2 
                         
                          
                         
                           a 
                            
                           
                             ( 
                             
                               
                                 t 
                                 n 
                               
                               - 
                               
                                 t 
                                 1 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0000]    is the keypoint initial velocity and a i  denotes its acceleration. 
         [0069]    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. 
         [0070]    After a predictor p i′ (t j ) is determined, the residual r i (t j ) is then found as, 
         [0000]        r   i ( t   j )= p   i ( t   j )− p   i′ ( t   j ), for  t   j   ε[t   2   ,t   3   , . . . ,t   n ].  (6)
 
         [0071]    An Intra-STC trajectory is coded with the following series of reconstructed numbers, given some quantization scheme, 
         [0000]      { {circumflex over (r)}   i ( t   2 ), {circumflex over (r)}   i ( t   3 ), . . . , {circumflex over (r)}   i ( t   n )}, for ∀ iε{x,y},   (7)
 
         [0000]    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. 
         [0072]    The reconstructed trajectory is obtained as, 
         [0000]        {circumflex over (p)}   i   =p   i′ ( t   j )+ {circumflex over (r)}   i ( t   j ), for ∀ t   j   ε[t   2   ,t   3   , . . . ,t   n ].  (8)
 
         [0073]    In  FIG. 5  (Algorithm 1), SE stands for a syntax element, followed by a data type definition. In an encoder, the syntax element is written to a bitstream. In the decoder, it is obtained from a bitstream. 
         [0074]    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. 
         [0075]    2.2 Inter-Scalable Trajectory Coding 
         [0076]    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. 
         [0077]    2.2.1 Distance Between Trajectories 
         [0078]    We first define a distance between two trajectories P s  and P t . This is needed for the Inter-STC modes. Typically, such a distance is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           d 
                            
                           
                             ( 
                             
                               
                                 P 
                                 s 
                               
                               , 
                               
                                 P 
                                 t 
                               
                             
                             ) 
                           
                         
                         = 
                           
                          
                         
                           
                              
                             
                               
                                 P 
                                 s 
                               
                               - 
                               
                                 P 
                                 t 
                               
                             
                              
                           
                           2 
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             ∑ 
                             
                               j 
                               = 
                               0 
                             
                             n 
                           
                            
                           
                             
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         
                                           p 
                                           x 
                                           s 
                                         
                                          
                                         
                                           ( 
                                           
                                             t 
                                             j 
                                           
                                           ) 
                                         
                                       
                                       - 
                                       
                                         
                                           p 
                                           x 
                                           t 
                                         
                                          
                                         
                                           ( 
                                           
                                             t 
                                             j 
                                           
                                           ) 
                                         
                                       
                                     
                                     ) 
                                   
                                   2 
                                 
                                 + 
                                 
                                   
                                     ( 
                                     
                                       
                                         
                                           p 
                                           y 
                                           s 
                                         
                                          
                                         
                                           ( 
                                           
                                             t 
                                             j 
                                           
                                           ) 
                                         
                                       
                                       - 
                                       
                                         
                                           p 
                                           y 
                                           t 
                                         
                                          
                                         
                                           ( 
                                           
                                             t 
                                             j 
                                           
                                           ) 
                                         
                                       
                                     
                                     ) 
                                   
                                   2 
                                 
                               
                             
                             . 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
         [0079]    However, during decoding a trajectory, the positions in the current trajectory, except for {circumflex over (P)}(t 1 ) 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 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             d 
                             e 
                           
                            
                           
                             ( 
                             
                               
                                 
                                   P 
                                   ^ 
                                 
                                 s 
                               
                               , 
                               
                                 
                                   P 
                                   ^ 
                                 
                                 t 
                               
                             
                             ) 
                           
                         
                         = 
                           
                          
                         
                           
                              
                             
                               
                                 
                                   P 
                                   ^ 
                                 
                                 s 
                               
                               - 
                               
                                 
                                   P 
                                   ^ 
                                 
                                 t 
                               
                             
                              
                           
                           2 
                         
                       
                     
                   
                   
                     
                       
                         ≈ 
                           
                          
                         
                           
                             ∑ 
                             
                               j 
                               ∈ 
                               
                                 { 
                                 anchors 
                                 } 
                               
                             
                           
                            
                           
                             
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         
                                           
                                             p 
                                             ^ 
                                           
                                           x 
                                           s 
                                         
                                          
                                         
                                           ( 
                                           
                                             t 
                                             j 
                                           
                                           ) 
                                         
                                       
                                       - 
                                       
                                         
                                           
                                             p 
                                             ^ 
                                           
                                           x 
                                           t 
                                         
                                          
                                         
                                           ( 
                                           
                                             t 
                                             j 
                                           
                                           ) 
                                         
                                       
                                     
                                     ) 
                                   
                                   2 
                                 
                                 + 
                                 
                                   
                                     ( 
                                     
                                       
                                         
                                           
                                             p 
                                             ^ 
                                           
                                           y 
                                           s 
                                         
                                          
                                         
                                           ( 
                                           
                                             t 
                                             j 
                                           
                                           ) 
                                         
                                       
                                       - 
                                       
                                         
                                           
                                             p 
                                             ^ 
                                           
                                           y 
                                           t 
                                         
                                          
                                         
                                           ( 
                                           
                                             t 
                                             j 
                                           
                                           ) 
                                         
                                       
                                     
                                     ) 
                                   
                                   2 
                                 
                               
                             
                             . 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
         [0080]    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. 
         [0081]    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. 
         [0082]    2.2.2 Simple Trajectory Predictor 
         [0083]    With the lowest complexity, a predefined search strategy is used to determine the trajectory predictor from trajectories that have been coded in a neighborhood. 
         [0084]    In a first step, we determine the trajectories nearest to the current trajectory using an estimated distance d e  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  FIG. 7 , where there are 4 keypoints already coded, and the current keypoint is number 5. 
         [0085]    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. 
         [0086]    2.2.3 Mean Trajectory Predictor 
         [0087]    A more advanced method to generate trajectory predictor is to utilize a set of trajectories that are within a given distance threshold d th  to the current trajectory. If there are s trajectories {P (1) , P (2) , . . . , P (s) } within the neighborhood defined by the threshold d th , then each dimension of the mean trajectory predictor is defined as 
         [0000]        P   i′ =mean{ {circumflex over (P)}   i   (1)   ,{circumflex over (P)}   i   (2)   , . . . ,{circumflex over (P)}   1   (s) }.  (11)
 
         [0088]    Similar to simple trajectory approach, the estimated distance d e  in Eq. 10 is used to select the trajectory reference candidates. With the mean trajectory predictor, one can signal the threshold d th  in the bitstream, if adaptive selection is preferred, otherwise, no signaling is needed to generate the reference trajectory. 
         [0089]    2.2.4 Trajectory Reference List 
         [0090]    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 d e  in Eq. 10, then by orientations as shown in  FIG. 7 . 
         [0091]    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 
         [0000]        L={{circumflex over (P)}   i   (1)   ,{circumflex over (P)}   i   (2)   , . . . ,{circumflex over (P)}   i   (s) }.  (12)
 
         [0092]    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 
         [0000]        P   i′   ={circumflex over (P)}   (f) .  (13)
 
         [0093]    The use of a reference trajectory is shown in  FIG. 8 . While the encoder determines the best reference trajectory in the list, the full measurement of distance d in Eq. 9 is used, as it is more accurate and can achieve a better compression performance. 
         [0094]    2.2.5 Inter-Scalable Trajectory Coding 
         [0095]    After a trajectory predictor P′ is determined, the trajectory residual R is determined and coded, for each dimension respectively 
         [0000]        R   i   =P   i   −P   i′ .  (14)
 
         [0096]    2.2.6 Skip-Scalable Trajectory Coding Mode 
         [0097]    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). 
         [0098]    If not all residual trajectories are skipped, signalling between skip and coding need to be conveyed in the bitstream. 
         [0099]    2.3 Bi-Scalable Trajectory Coding 
         [0100]    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. 
         [0101]    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, 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       P 
                       ′ 
                     
                     = 
                     
                       
                         1 
                         
                           
                             d 
                             e 
                             f 
                           
                           + 
                           
                             d 
                             e 
                             b 
                           
                         
                       
                        
                       
                         ( 
                         
                           
                             
                               d 
                               e 
                               b 
                             
                              
                             
                               
                                 P 
                                 ^ 
                               
                               f 
                             
                           
                           + 
                           
                             
                               d 
                               e 
                               f 
                             
                              
                             
                               
                                 P 
                                 ^ 
                               
                               b 
                             
                           
                         
                         ) 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
           
         
       
     
         [0102]    where d e   f  and d e   b  are distance measured from {circumflex over (P)} f , {circumflex over (P)} b  to P C . 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. 
         [0103]    Using two reference trajectories to predict the current trajectory is shown in  FIG. 9 . 
         [0104]    2.3.1 Direct-Scalable Trajectory Coding Mode 
         [0105]    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. 
         [0106]    The Inter-scalable Trajectory Coding (ITC) including Bi-scalable Trajectory Coding are implemented in an example encoder as shown in  FIG. 10  (Algorithm 2). 
         [0107]    An encoder that implements both Intra-scalable Trajectory Coding and Inter-scalable Trajectory Coding is shown in  FIG. 11  (Algorithm 3). 
         [0108]    2.4 Short- and Long-Term Reference Trajectories 
         [0109]    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. 
         [0110]    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. 
         [0111]    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. 
         [0112]    3 Interframe Trajectory Coding (ITC) 
         [0113]    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. 
         [0114]    3.1 P-Interframe Trajectory Coding 
         [0115]    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). 
         [0116]    We assume all {P(t 1 )} have been coded using CDVS. Now we need to predict keypoints {P c (t j ), cε[1,m]} in picture {t j , j≧2} using a previously coded picture {t f , f≧1} as a reference. The prediction shown in  FIG. 12  is described as below. 
         [0117]    Among the keypoints that have been coded in the current picture t j , we determine the keypoint r that is nearest to the current keypoint c using the distance |{circumflex over (P)} r (t f )−{circumflex over (P)} c (t f )| measured in picture t f . A translation vector for keypoint r is 
         [0000]        V   f   ={circumflex over (P)}   r ( t   j )− {circumflex over (P)}   r ( t   f ).  (16)
 
         [0118]    Then the predicted keypoint c is 
         [0000]        P ′( t   j )= {circumflex over (P)}   c ( t   f )+ V   f .  (17)
 
         [0119]    The residual is 
         [0000]        R   c ( t   j )= P   c ( t   j )− P ′( t   j ).  (18)
 
         [0120]    If there is not a keypoint r, or it does not provide a good predictor P′(t j ), 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. 
         [0121]    If the residual R c  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. 
         [0122]    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  FIG. 4 , the keypoints will be coded in the following order for a LDTC, 
         [0000]      { P   1 ( t   2 ), P   2 ( t   2 ), . . . , P   5 ( t   2 ); P   1 ( t   3 ), P   2 ( t   3 ), . . . , P   5 ( t   3 )},  (19)
 
         [0000]    where all {P(t 1 )} have been coded using CDVS without interframe prediction, picture t 2  uses picture t 1  as a reference, and picture t 3  uses pictures t 2  and t 1  as reference candidates. 
         [0123]    3.2 B-Interframe Trajectory Coding 
         [0124]    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). 
         [0125]    For the trajectories shown in  FIG. 4 , the keypoint positions in the trajectories are coded, for example, in the following manner. The keypoints in picture t 3  are coded with PTC and the keypoints in picture t 2  are coded using BTC by using the keypoints in t 1  and t 3  as references simultaneously. The coding order of keypoints is, 
         [0000]      { P   1 ( t   3 ), P   2 ( t   3 ), . . . , P   5 ( t   3 ); P   1 ( t   2 ), P   2 ( t   2 ), . . . , P   5 ( t   2 )},  (20)
 
         [0000]    after {P c (t 1 ), ∀cε[1,5]} have been coded using CDVS without interframe prediction. 
         [0126]    In general, for a bi-interframe trajectory coded picture t j , we predict P(t j ) using two previously coded picture t f  and t b  as references. For example, t f  is the nearest reference picture from the past and t b  is the nearest reference picture from the future. t f  and t b  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  FIG. 13  is described as following. 
         [0127]    First, among the keypoints that have been coded in the current picture t j , determine the keypoint r that is nearest to the current keypoint c using the distance |{circumflex over (P)} r (t f )−{circumflex over (P)} c (t f )| measured in picture t f . 
         [0128]    For keypoint r, two translation vectors corresponding to the forward and backward references are determined as 
         [0000]        V   f   ={circumflex over (P)}   r ( t   j )− {circumflex over (P)}   r ( t   f ), V   b   ={circumflex over (P)}   r ( t   j )− {circumflex over (P)}   r ( t   b ).  (21)
 
         [0129]    Then, two intermediate predicted keypoints for c are given by 
         [0000]        P ′( t   f   ,t   j )= {circumflex over (P)}   c ( t   f )+ V   f   ,P ′( t   b   ,t   j )= {circumflex over (P)}   c ( t   b )+ V   b .  (22)
 
         [0130]    The weighted keypoint predictor c is given according to the distances in temporal direction, 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       P 
                       ′ 
                     
                      
                     
                       ( 
                       
                         t 
                         j 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       1 
                       
                         
                            
                           
                             
                               t 
                               f 
                             
                             - 
                             
                               t 
                               j 
                             
                           
                            
                         
                         + 
                         
                            
                           
                             
                               t 
                               b 
                             
                             - 
                             
                               t 
                               j 
                             
                           
                            
                         
                       
                     
                      
                     
                       
                         ( 
                         
                           
                             
                                
                               
                                 
                                   t 
                                   b 
                                 
                                 - 
                                 
                                   t 
                                   j 
                                 
                               
                                
                             
                              
                             
                               
                                 P 
                                 ′ 
                               
                                
                               
                                 ( 
                                 
                                   
                                     t 
                                     f 
                                   
                                   , 
                                   
                                     t 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                           + 
                           
                             
                                
                               
                                 
                                   t 
                                   f 
                                 
                                 - 
                                 
                                   t 
                                   j 
                                 
                               
                                
                             
                              
                             
                               
                                 P 
                                 ′ 
                               
                                
                               
                                 ( 
                                 
                                   
                                     t 
                                     b 
                                   
                                   , 
                                   
                                     t 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         ) 
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   23 
                   ) 
                 
               
             
           
         
       
     
         [0131]    The final residual is 
         [0000]        R   c ( t   j )= P   c ( t   j )− P ′( t   j ).  (24)
 
         [0132]    If the residual R c  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. 
         [0133]    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. 
         [0134]    4 Discussions Related to Trajectories 
         [0135]    4.1 Long Trajectories Across GOPs 
         [0136]    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. 
         [0137]    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. 
         [0138]    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&gt;0, we assign a special value, e.g., 0, indicating that this is a new trajectory that is unavailable in preceding GOP. 
         [0139]      FIG. 14  shows one example mapping table. The trajectories  1 ,  3 , and  4  from the previous GOP will continue in the current GOP with new trajectory index  1 ,  2  and  3 . The trajectories  4 ,  5  and  6  are new trajectories in the current GOP. 
         [0140]    4.2 Feature Descriptor Coding Along a Trajectory 
         [0141]    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. 
         [0142]    5 Constrained Matrix Factorization 
         [0143]    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εR m×N , where m is the length of a feature descriptor and N is the total number of descriptors from the GOP. 
         [0144]    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, 
         [0000]        X≈LR,   (25)
 
         [0000]    where XεR m×N , LεR m×r , RεR r×N , and r&lt;&lt;N. 
         [0145]    In the solution to Eqn. 25, the following non-negative matrix factorization (NMF) is used to determine the compact descriptors, 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       ( 
                       
                         
                           L 
                           ^ 
                         
                         , 
                         
                           R 
                           ^ 
                         
                       
                       ) 
                     
                     = 
                     
                       
                         min 
                         
                           
                             
                               L 
                               ∈ 
                               
                                 ℝ 
                                 + 
                                 
                                   m 
                                   × 
                                   r 
                                 
                               
                             
                             
                               R 
                               ∈ 
                               
                                 ℝ 
                                 + 
                                 
                                   r 
                                   × 
                                   N 
                                 
                               
                             
                           
                           , 
                         
                       
                        
                       
                         
                           1 
                           2 
                         
                          
                         
                           
                              
                             
                               X 
                               - 
                               LR 
                             
                              
                           
                           F 
                           
                             2 
                              
                             
                                 
                             
                           
                         
                       
                     
                   
                    
                   
                       
                   
                    
                   
                     
 
                   
                    
                   
                     subject 
                      
                     
                         
                     
                      
                     to 
                      
                     
                         
                     
                      
                     
                       { 
                       
                         
                           
                             
                               
                                 
                                   
                                     
                                        
                                       
                                         L 
                                         i 
                                       
                                        
                                     
                                     2 
                                   
                                   = 
                                   1 
                                 
                                 , 
                                 
                                   ∀ 
                                   
                                     i 
                                     ∈ 
                                     
                                       { 
                                       
                                         1 
                                         , 
                                         
                                           … 
                                            
                                           
                                               
                                           
                                            
                                           r 
                                         
                                       
                                       } 
                                     
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 
                                   
                                     
                                        
                                       
                                         R 
                                         j 
                                       
                                        
                                     
                                     0 
                                   
                                   = 
                                   1 
                                 
                                 , 
                                 
                                   ∀ 
                                   
                                     j 
                                     ∈ 
                                     
                                       { 
                                       
                                         1 
                                         , 
                                         
                                           … 
                                            
                                           
                                               
                                           
                                            
                                           N 
                                         
                                       
                                       } 
                                     
                                   
                                 
                               
                             
                           
                         
                         , 
                       
                     
                   
                 
               
               
                 
                   ( 
                   26 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where all the columns of L are open to be selected in the optimization. Each column in L is actually a representing feature descriptor. 
         [0146]    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 
         [0000]        L=[L   a   ,L   b ],  (27)
 
         [0000]    where L a εR m×r     a   , L b εR m×r     b   , and r a +r b =r. Accordingly, R is written as, 
         [0000]    
       
         
           
             
               
                 
                   
                     R 
                     = 
                     
                       [ 
                       
                         
                           R 
                           a 
                         
                         
                           R 
                           b 
                         
                       
                       ] 
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   28 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where R a εR r     a     ×N  and R b ε           r     b     ×N . 
         [0147]    In this section, L a  the first partition of L with r a  columns, is determined based on the descriptors extracted/coded for the key picture of a GOP. Then, we determine L b , given L a  being fixed. 
         [0148]    5.1 Determination of L a    
         [0149]    Because L a  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 L a  again. Instead, we need to specify how to pick up feature descriptors for L a . 
         [0150]    We assume that: 
         [0000]    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.
 
         [0151]    In one case, all feature descriptors coded for key picture are placed in L a . For example, for the videos within the video database, this is desired so as to make the trajectory set as complete as possible. 
         [0152]    In another case, it can be preferred to have a subset of feature descriptors from key picture to be included in L a . In case of query video, it can be preferred to narrow down the selection of feature points in L a  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&#39;s demand while reducing the transmission bitrates at the same time. 
         [0153]    To handle both cases in a complying manner, it is necessary to signal selection of feature descriptor from key picture for L a  as shown in  FIG. 15  (Algorithm 4). 
         [0154]    After L a  is fixed, R a  is also determined. Actually, R a  is always equal to an identity matrix I r     a     ×r     a    padded with zeros to the right side, 
         [0000]        R   a   ×{I   r     a     ×r     a   |0 r     a     ×(N-r     a     ) }.  (29)
 
         [0155]    5.2 Computing L b  with Given L a    
         [0156]    After L a  and R a  are determined, we determine L b  and R b . Given that one GOP does not cover more than one scene, it can be imagined that L b  would reflect additional feature descriptors from dis-occlusions, e.g., due to translation motion and/or new objects popping into the scene. 
         [0157]    When no dis-occlusion happens, it can be found that r b ≈0. On the other hand, when large dis-occlusions being present, r b  would not be negligible, especially if the background objects are of interest. Under such circumstances, we need to determine L b . 
         [0158]    In one embodiment, we describe a modified projected proximal-point alternating least squares minimization algorithm as shown in  FIG. 16  (Algorithm 5.2). In every iteration k of the algorithm, the factors L k  and R k  are updated by first determining the minimizer of the proximal least squares terms, 

 
         [0159]    The columns of {tilde over (L)} are then projected onto the non-negative l 2  unit ball, while the columns of {tilde over (R)} are projected onto the admissible set of standard basis vectors 
         [0000]        E   r   :={e   i   εR   r   :e ( i )=1, and 0 otherwise,  iε{ 1, . . .  r}},   (31)
 
         [0000]    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. 
         [0160]    The factors L 0 =[L a ,L b,0 ] and R 0 =[R a   T ,R b,0   R ] T  are initialized with independent identically distributed uniform random entries for L b,0  and R b,0  and L a  and R a  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 L a  and R a . Finally, the factors are projected onto the unit column norm ball for {tilde over (L)}, and onto the binary selector set E r  for {tilde over (R)}. 
         [0161]    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. 
         [0162]    5.3 Complexity-Limited Trajectory Determining Approaches 
         [0163]    It is realized that in most applications, it is unnecessary to even consider L b . 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  FIG. 16  (Algorithm 5.2) can be eliminated because L is given by those feature descriptors in the key picture. 
         [0164]    6 Block-Based Trajectory Coding 
         [0165]    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. 
         [0166]    6.1 Block of Trajectories 
         [0167]    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. 
         [0168]    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. 
         [0169]    6.2 Block-Based Trajectory Coding 
         [0170]    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. 
         [0171]    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. 
         [0172]    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. 
         [0173]    The extension to block-based trajectory coding could bring coding benefits by reducing signaling overheads and may be preferred for an application. 
         [0174]    6.3 Transformation Trajectory Coding and Quantization 
         [0175]    After performing block based trajectory prediction (either block based STC, or block based ITC), a residual signal is obtained. 
         [0176]    In one embodiment, quantization could be applied directly on the residual signal after prediction. 
         [0177]    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. 
         [0178]    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.