Abstract:
Spatial domain directional intra prediction has been shown to be very effective to remove the correlation between the pixels in the current block and reconstructed neighbors. In AVC, 8 directional prediction modes (plus the DC prediction mode) are defined. The prediction mode number is signaled to the decoder using a simple predictive coding method. The previous intra prediction methods have two major disadvantages: lack of precision for arbitrary directional patterns and accuracy lack of accuracy to exploit geometric dependency between blocks. To address these issues, a new method accurately predicts the intra directions from reconstructed neighboring pixels and differentially encode the intra directions. This allows a more precise directional prediction without the significant increase in the cost for transmitting the side information.

Description:
CROSS-REFERENCE TO RELATED APPLICATION(S) 
       [0001]    This application claims priority under 35 U.S.C. § 119(e) of the U.S. Provisional Patent Application Ser. No. 61/365,304, filed Jul. 16, 2010 and titled, “DIFFERENTIAL CODING OF INTRA DIRECTIONS (DCIC)” and U.S. Provisional Patent Application Ser. No. 61/447,965, filed Mar. 1, 2011 and titled, “DIFFERENTIAL CODING OF INTRA DIRECTIONS (DCIC).” The Provisional Patent Applications Ser. No. 61/365,304, filed Jul. 16, 2010 and titled, “DIFFERENTIAL CODING OF INTRA DIRECTIONS (DCIC)” and Ser. No. 61/447,965, filed Mar. 1, 2011 and entitled, “DIFFERENTIAL CODING OF INTRA DIRECTIONS (DCIC)” are also hereby incorporated by reference in their entirety for all purposes. 
     
    
     FIELD OF THE INVENTION 
       [0002]    The present invention relates to the field of image processing. More specifically, the present invention relates to intra coding of high definition videos. 
       BACKGROUND OF THE INVENTION 
       [0003]    Spatial domain directional intra prediction has been shown to be very effective to remove the correlation between the pixels in the current block and reconstructed neighbors. In AVC, 8 directional prediction modes (plus the DC prediction mode) are defined. The prediction mode number is signaled to the decoder using a simple predictive coding method. The basic intra prediction has two major disadvantages: 1) the small number of directions does not provide sufficient precision to cover arbitrary directional patterns; and 2) the mode number prediction from neighbors is not accurate enough to exploit the geometric dependency between blocks. Increasing the number of directions typically results in a lower residual energy; however, the cost for signaling the prediction mode is able to also increase significantly such that the little gain is observed. This is particularly the case for small block sizes such as 4×4 or 8×8. 
       SUMMARY OF THE INVENTION 
       [0004]    Spatial domain directional intra prediction has been shown to be very effective to remove the correlation between the pixels in the current block and reconstructed neighbors. In AVC, 8 directional prediction modes (plus the DC prediction mode) are defined. The prediction mode number is signaled to the decoder using a simple predictive coding method. The previous intra prediction methods have two major disadvantages: lack of precision for arbitrary directional patterns and accuracy lack of accuracy to exploit geometric dependency between blocks. To address these issues, a new method accurately predicts the intra directions from reconstructed neighboring pixels and differentially encode the intra directions. This allows a more precise directional prediction without the significant increase in the cost for transmitting the side information. 
         [0005]    In one aspect, a method of encoding an image programmed in a controller in a device comprises applying operators to neighboring pixels of a block to obtain an image gradient vector for each of the pixels, determining an edge direction for each of the pixels by taking a perpendicular direction to each of the gradient vectors and predicting a best direction using the edge direction for each of the pixels. The best direction is used in intra coding in encoding the image. Predicting further comprises deriving the best direction using a summation of the square of projections of direction vectors onto a unit vector. Predicting further comprises deriving the best direction by calculating an eigenvector using a matrix and then using a lookup table to convert the eigenvector to the best direction. The best direction is adjusted by a direction adjustment. The direction adjustment is implemented using discrete values with a quantization step size. The quantization step size implements a confidence measure, wherein the higher the confidence measure, the smaller the quantization step size. The confidence measure is compared to a threshold for choosing between two pre-defined step size values for the quantization step size. The device is selected from the group consisting of a personal computer, a laptop computer, a computer workstation, a server, a mainframe computer, a handheld computer, a personal digital assistant, a cellular/mobile telephone, a smart appliance, a gaming console, a digital camera, a digital camcorder, a camera phone, an iPod®/iPhone, a video player, a DVD writer/player, a Blu-ray® writer/player, a television and a home entertainment system. 
         [0006]    In another aspect, an apparatus for encoding an image programmed in a controller in a device comprises an image gradient vector module for applying operators to neighboring pixels for obtaining an image gradient vector for each of the pixels, an edge detection module for determining an edge direction for each of the pixels by taking a perpendicular direction to each of the gradient vectors and a best direction module for predicting a best direction using the edge direction of each of the pixels. The best direction is used in intra coding in encoding the image. The best direction module is further for deriving the best direction using a summation of the square of projections of direction vectors onto a unit vector. Predicting further comprises deriving the best direction by calculating an eigenvector using a matrix and then using a lookup table to convert the eigenvector to the best direction. The best direction is adjusted by a direction adjustment. The direction adjustment is implemented using discrete values with a quantization step size. The quantization step size implements a confidence measure, wherein the higher the confidence measure, the smaller the quantization step size. The confidence measure is compared to a threshold for choosing between two pre-defined step size values for the quantization step size. The device is selected from the group consisting of a personal computer, a laptop computer, a computer workstation, a server, a mainframe computer, a handheld computer, a personal digital assistant, a cellular/mobile telephone, a smart appliance, a gaming console, a digital camera, a digital camcorder, a camera phone, an iPod®/iPhone, a video player, a DVD writer/player, a Blu-ray® writer/player, a television and a home entertainment system. 
         [0007]    In yet another aspect, a device comprises a memory for storing an application, the application for applying operators to neighboring pixels of a block to obtain an image gradient vector for each of the pixels, determining an edge direction for each of the pixels by taking a perpendicular direction to each of the gradient vectors and predicting a best direction using the edge direction for each of the pixels and a processing component coupled to the memory, the processing component configured for processing the application. The best direction is used in intra coding in encoding the image. Predicting further comprises deriving the best direction using a summation of the square of projections of direction vectors onto a unit vector. Predicting further comprises deriving the best direction by calculating an eigenvector using a matrix and then using a lookup table to convert the eigenvector to the best direction. The best direction is adjusted by a direction adjustment. The direction adjustment is implemented using discrete values with a quantization step size. The quantization step size implements a confidence measure, wherein the higher the confidence measure, the smaller the quantization step size. The confidence measure is compared to a threshold for choosing between two pre-defined step size values for the quantization step size. 
         [0008]    In another aspect, a method of encoding an image programmed in a controller in a device comprises differentially encoding is implemented for a direction if the direction is close to suggested directions of neighbors of the direction and otherwise, using a simple fixed length code to signal the direction of the direction. Differentially encoding further comprises applying operators to neighboring pixels of a block to obtain an image gradient vector for each of the pixels, determining an edge direction for each of the pixels by taking a perpendicular direction to each of the gradient vectors and predicting a best direction using the edge direction for each of the pixels. The best direction is used in intra coding in encoding the image. Predicting further comprises deriving the best direction using a summation of the square of projections of direction vectors onto a unit vector. Predicting further comprises deriving the best direction by calculating an eigenvector using a matrix and then using a lookup table to convert the eigenvector to the best direction. The best direction is adjusted by a direction adjustment. The direction adjustment is implemented using discrete values with a quantization step size. The quantization step size implements a confidence measure, wherein the higher the confidence measure, the smaller the quantization step size. The confidence measure is compared to a threshold for choosing between two pre-defined step size values for the quantization step size. The device is selected from the group consisting of a personal computer, a laptop computer, a computer workstation, a server, a mainframe computer, a handheld computer, a personal digital assistant, a cellular/mobile telephone, a smart appliance, a gaming console, a digital camera, a digital camcorder, a camera phone, an iPod®/iPhone, a video player, a DVD writer/player, a Blu-ray® writer/player, a television and a home entertainment system. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0009]      FIG. 1A  illustrates a diagram of a computation of the neighbors&#39; suggested direction according to some embodiments. 
           [0010]      FIG. 1B  illustrates a diagram of additional directions around the neighbors&#39; suggested directions according to some embodiments. 
           [0011]      FIG. 2  illustrates a diagram of a bitstream according to some embodiments. 
           [0012]      FIG. 3  illustrates a flowchart of a method of selecting an encoding mode according to some embodiments. 
           [0013]      FIG. 4  illustrates a flowchart of a method of determining a best direction for intra coding according to some embodiments. 
           [0014]      FIG. 5  illustrates a block diagram of an exemplary computing device configured to implement the differential coding of intra directions method according to some embodiments. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
       [0015]    To address the problems of previous intra prediction methods, a new method accurately predicts the intra directions from reconstructed neighboring pixels and differentially encodes the intra directions. This allows a more precise directional prediction without the significant increase in the cost for transmitting the side information. 
         [0016]    The method described herein takes advantage of the available edge information in the reconstructed neighborhood of the block to be coded. To encode an image block, the well-known Sobel operators: 
         [0000]    
       
         
           
             
               
                 G 
                 x 
               
               = 
               
                 [ 
                 
                   
                     
                       
                         - 
                         1 
                       
                     
                     
                       0 
                     
                     
                       1 
                     
                   
                   
                     
                       
                         - 
                         2 
                       
                     
                     
                       0 
                     
                     
                       2 
                     
                   
                   
                     
                       
                         - 
                         1 
                       
                     
                     
                       0 
                     
                     
                       1 
                     
                   
                 
                 ] 
               
             
             , 
             
                 
             
              
             
               
                 G 
                 y 
               
               = 
               
                 [ 
                 
                   
                     
                       
                         - 
                         1 
                       
                     
                     
                       
                         - 
                         2 
                       
                     
                     
                       
                         - 
                         1 
                       
                     
                   
                   
                     
                       0 
                     
                     
                       0 
                     
                     
                       0 
                     
                   
                   
                     
                       1 
                     
                     
                       2 
                     
                     
                       1 
                     
                   
                 
                 ] 
               
             
           
         
       
     
         [0000]    are first applied for a block&#39;s available neighboring pixels as illustrated in  FIG. 1A  to obtain the image gradient vectors. For each pixel, the edge direction is obtained by taking the perpendicular direction to its gradient vector. Edge direction vectors commonly are not perfectly aligned. Therefore, finding the best prediction direction with a high precision using the edge direction vectors is not a trivial task. Simple averaging of the vectors performs poorly. 
         [0017]    The best prediction direction with a high precision using the computed edge vectors is derived. ā i (i=1,2, . . . N) denotes all of the considered edge vectors, and ê denotes an arbitrary unit vector which makes an angle theta (θ) with the horizontal axis. A function S(θ) is defined as: 
         [0000]    
       
         
           
             
               
                 
                   
                     S 
                      
                     
                       ( 
                       θ 
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       N 
                     
                      
                     
                       
                         〈 
                         
                           
                             e 
                             ^ 
                           
                           , 
                           
                             
                               a 
                               _ 
                             
                             i 
                           
                         
                         〉 
                       
                       2 
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where &lt;,&gt;denotes the inner product between two vectors. S(θ) is the summation of the square of the projections of the direction vectors onto the unit vector ê. Due to the continuity of the edges in most natural images, a good prediction direction is typically close to the neighboring edge directions. Therefore, the “neighbors&#39; suggested prediction direction” θ* is: 
         [0000]    
       
         
           
             
               
                 
                   
                     θ 
                     * 
                   
                   = 
                   
                     arg 
                      
                     
                         
                     
                      
                     
                       
                         max 
                         θ 
                       
                        
                       
                         
                           S 
                            
                           
                             ( 
                             θ 
                             ) 
                           
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0000]    To solve Equation (2), let 
         [0000]    
       
         
           
             
               
                 
                   a 
                   _ 
                 
                 1 
               
               = 
               
                 
                   
                     [ 
                     
                       
                         
                           
                             x 
                             1 
                           
                         
                       
                       
                         
                           
                             y 
                             1 
                           
                         
                       
                     
                     ] 
                   
                    
                   
                       
                   
                    
                   and 
                    
                   
                       
                   
                    
                   A 
                 
                 = 
                 
                   [ 
                   
                     
                       
                         
                           x 
                           1 
                         
                       
                       
                         … 
                       
                       
                         
                           x 
                           N 
                         
                       
                     
                     
                       
                         
                           y 
                           1 
                         
                       
                       
                         … 
                       
                       
                         
                           y 
                           N 
                         
                       
                     
                   
                   ] 
                 
               
             
             , 
           
         
       
     
         [0000]    then, the above optimization is
 
able to be written as:
 
         [0000]    
       
         
           
             
               arg 
                
               
                 
                   max 
                   
                     e 
                     ^ 
                   
                 
                  
                 
                   
                     
                       e 
                       ^ 
                     
                     τ 
                   
                    
                   A 
                    
                   
                       
                   
                    
                   
                     A 
                     τ 
                   
                    
                   
                     e 
                     ^ 
                   
                 
               
             
             , 
           
         
       
     
         [0000]    subject to |ê|= 1 . 
         [0018]    The solution to this optimization is one of the eigenvectors of the 2×2 matrix AA τ . More specifically, let the eigenvalues of AA  τ  be s 1  and s 2 , with s 1 ≧s 2 . Then, the eigenvector that corresponds to s 1  is the solution that maximizes the objective function. A look-up table is able to be used to convert the eigenvector to θ* which is used for the prediction of the image sample values. 
         [0019]    Instead of directly using θ* as the prediction direction for the current block, θ* is able to be adjusted by an angle of Δθ, and the direction of θ opt =θ*+Δθ is used as the true prediction direction. Therefore, the direction adjustment Δθ is signaled to the decoder. For this purpose, Δθ is quantized into discrete values with a quantization step size of δθ, and the quantization index 
         [0000]        k =[Δθ/δθ]  (3)
 
         [0000]    is signaled, where [·] denotes rounding to the nearest integer (as illustrated in  FIG. 1B ). Upon receiving k, the decoder uses θ*+kδθ for the directional direction. This is able to be seen as differential encoding of the intra directions with respect to a predicted direction θ* which is acquired from the neighboring reconstructed blocks. Equation 2 shows one way to compute this predicted or suggested direction; however, the proposed signaling method will work efficiently with any accurate direction estimation method. 
         [0020]    In order to determine the direction quantization step size δθ, the following “confidence” measure is also introduced: 
         [0000]    
       
         
           
             
               
                 
                   s 
                   = 
                   
                     
                       
                         S 
                          
                         
                           ( 
                           
                             θ 
                             * 
                           
                           ) 
                         
                       
                       
                         
                           ∑ 
                           
                             i 
                             = 
                             1 
                           
                           N 
                         
                          
                         
                           
                              
                             
                               
                                 a 
                                 _ 
                               
                               i 
                             
                              
                           
                           2 
                         
                       
                     
                     = 
                     
                       
                         s 
                         1 
                       
                       
                         
                           s 
                           1 
                         
                         + 
                         
                           s 
                           2 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0021]    The set, sε(0,1) where s=1 represents a perfect edge vector alignment. Typically, a large value of s means higher confidence from neighbors, and a smaller quantization step size is able to be used. Therefore, δθ should be a decreasing function of s. In the implementation, s is compared to a threshold to choose from two pre-defined step size values. 
         [0022]    The encoding of the signaling k employs several new contexts in Context-Adaptive Binary Arithmetic Coding (CABAC), with k binarized using a truncated unary code with sign. 
         [0023]    Image signal prediction in an arbitrary direction is a useful tool for the new directions. The algorithm is described as follows: 1) for each pixel, draw a straight line along the prediction direction; 2) in a pre-defined neighborhood, find the reconstructed pixels that are close to that line; and 3) compute the prediction of the pixel by using an interpolation of the selected neighbors. Step 2) and the coefficients of the interpolation filter are able to be obtained efficiently using a lookup table. 
         [0024]    On top of the new directional prediction modes, a one bit flag is signaled to the decoder to identify whether it should use neighbors&#39; suggested direction and differentially code the actual prediction direction or keep the signaling method of AVC (fixed length codes). In the case of AVC mode, no change has been made in signaling of the modes. Nonetheless, the computation of the most probable mode may be different as the neighboring blocks may be predicted using one of the new modes. 
         [0025]    Since the decoder is able to perform the edge detection operation and therefore has access to the neighbors&#39; suggested direction  0 * as well as s, it is able to obtain the same prediction as the encoder and hence stays in synchronization with the encoder. 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
               
             
               
               
               
             
               
               
               
             
               
               
             
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 Syntax for intra prediction in tabular form. 
               
             
          
           
               
                   
                 read_intra_pred_mode( ){ 
                 Descriptor 
               
               
                   
                   
               
             
          
           
               
                   
                 use_neighb_dir 
                 ae(v) 
               
               
                   
                 if(use_neighb_dir){ 
               
             
          
           
               
                   
                 adjust_neigb_dir 
                 ae(v) 
               
             
          
           
               
                   
                 }else{ 
                   
               
               
                   
                 most_prob_mode 
                 ae(v) 
               
               
                   
                 if(!most_prob_mode) 
               
             
          
           
               
                   
                 rem_intra_pred_mode 
                 ae(v) 
               
             
          
           
               
                   
                 } 
               
             
          
           
               
                   
                 } 
               
               
                   
                   
               
             
          
         
       
     
         [0026]    In an experiment, the algorithm has been implemented for 4×4, 8×8 and 16×16 blocks. Nine new modes are defined around the neighbors&#39; suggested direction and are differentially coded (e.g. |k|≦4). All frames (e.g. the entire sequence) are intra-coded using the high profile. Four different QPs (26, 30, 34 and 48) are considered to compute the average bit rate reduction. Approximately two seconds of video is considered for all CfP test sequences. The exact number of frames is shown in Table 2. 
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 Sequences and frame numbers used in experiments. 
               
             
          
           
               
                 Class 
                 Sequence 
                 Start Frame 
                 Frames to be Encoded 
               
               
                   
               
             
          
           
               
                 A 
                 Traffic 
                 0 
                 65 
               
               
                   
                 People on Street 
                 0 
                 65 
               
               
                 B1 
                 Kimono 
                 116 
                 49 
               
               
                   
                 ParkScene 
                 0 
                 49 
               
               
                 B2 
                 Cactus 
                 0 
                 97 
               
               
                   
                 BasketballDrive 
                 0 
                 97 
               
               
                   
                 BQTerrace 
                 0 
                 129 
               
               
                 C 
                 BasketballDrill 
                 0 
                 97 
               
               
                   
                 BQMall 
                 0 
                 129 
               
               
                   
                 PartyScene 
                 0 
                 97 
               
               
                   
                 RaceHorses 
                 0 
                 65 
               
               
                 D 
                 BasketballPass 
                 0 
                 97 
               
               
                   
                 BQSquare 
                 0 
                 129 
               
               
                   
                 BlowingBubbles 
                 0 
                 97 
               
               
                   
                 RaceHorses 
                 0 
                 65 
               
               
                 E 
                 Vidyo1 
                 0 
                 129 
               
               
                   
                 Vidyo3 
                 0 
                 129 
               
               
                   
                 Vidyo4 
                 0 
                 129 
               
               
                   
               
             
          
         
       
     
         [0027]    Table 3 lists these bit rate reductions for various resolutions and test sequences. 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
           
               
                 TABLE 3 
               
             
             
               
                   
               
               
                 Average bit rate reduction of various test sequences/resolutions. 
               
             
          
           
               
                   
                 Sequence/Resolution 
                 BD rate % 
               
               
                   
                   
               
             
          
           
               
                   
                 Class A 
                 Traffic 
                 −3.84 
               
               
                   
                   
                 People on Street 
                 −6.41 
               
             
          
           
               
                   
                 Class A Average 
                 −5.13 
               
             
          
           
               
                   
                 Class B 
                 Basketball Drive 
                 −5.14 
               
               
                   
                   
                 BQ Terrace 
                 −5.47 
               
               
                   
                   
                 Cactus 
                 −5.90 
               
               
                   
                   
                 Kimono 
                 −2.02 
               
               
                   
                   
                 Park Scene 
                 −0.66 
               
             
          
           
               
                   
                 Class B Average 
                 −3.84 
               
             
          
           
               
                   
                 Class C 
                 Basketball Drill 
                 −13.01 
               
               
                   
                   
                 BQ Mall 
                 −4.70 
               
               
                   
                   
                 Party Scene 
                 −2.40 
               
               
                   
                   
                 Race Horses 
                 −3.78 
               
             
          
           
               
                   
                 Class C Average 
                 −5.97 
               
             
          
           
               
                   
                 D 
                 Basketball Pass 
                 −5.89 
               
               
                   
                   
                 Blowing Bubbles 
                 −4.17 
               
               
                   
                   
                 BQ Square 
                 −5.21 
               
               
                   
                   
                 Race Horses 
                 −4.97 
               
             
          
           
               
                   
                 Class D Average 
                 −5.06 
               
             
          
           
               
                   
                 E 
                 Vidyo1 
                 −9.16 
               
               
                   
                   
                 Vidyo3 
                 −8.63 
               
               
                   
                   
                 Vidyo4 
                 −6.24 
               
             
          
           
               
                   
                 Class E Average 
                 −8.01 
               
               
                   
                 AVERAGE 
                 −5.42 
               
               
                   
                   
               
             
          
         
       
     
         [0028]    Due to its accurate prediction of direction estimation and low signaling overhead, the method significantly improves the coding efficiency of intra pictures in AVC. DCIC is able to be implemented for an arbitrary block size and number of directions: if the direction to be coded is close to neighbors&#39; suggested direction, the direction is differentially coded with respect to the neighbors&#39; suggested direction. Otherwise, a simple fixed length code is used to signal the direction to the decoder. The decision whether to use neighbors&#39; suggested direction is made by the encoder in an RD optimized fashion and thus also transmitted in the bit stream. The determination of whether the direction to be coded is “close” to neighbors&#39; suggested direction is able to be any implementation such as using a threshold limiting what is close and what is not. 
         [0029]    In addition to intra prediction, other parts of the codec such as Transform or Adaptive Loop Filter (ALF) are also able to benefit from the edge detection described herein. This enables efficient reuse of the computation to improve overall performance of the codec. 
         [0030]      FIG. 2  illustrates a diagram of a bitstream according to some embodiments. Given a most probable prediction direction (MPD) from the neighbors, signaling of the directions are done differently. For small angles around the most probable direction, the difference in angle between actual direction and the predicted direction is signaled using unary codes. For angles that are not close to the MPD, fixed length code is used as in AVC. 
         [0031]    Letting k=0, denote the MPD derived from the neighbors using any method (including edge detection). For a number of directions around MPD, the following signaling is used: first a “1” is sent, indicating that the new mode is used. Then, a unary code is sent for the signaling of k. For other directions (suppose there are N such directions), a “0” is sent first, indicating that the new mode is not used, and then a fixed length code of log2(N) bits is sent to represent the true direction. 
         [0032]      FIG. 3  illustrates a flowchart of a method of selecting an encoding mode according to some embodiments. In the step  300 , it is determined if the direction to be coded is close to neighbors&#39; suggested direction. Close is able to be defined in the implementation, for example +/− a few degrees. If the direction is close, then differential encoding is implemented as described herein, in the step  302 . If the direction is not close, then a fixed length code is used to signal the direction. Fewer or additional steps are able to be included. Further, the order of the steps is able to be changed where possible. 
         [0033]      FIG. 4  illustrates a flowchart of a method of determining a best direction for intra coding according to some embodiments. In the step  400 , operators, such as Sobel operators are applied to neighboring pixels of a pixel to obtain an image gradient vector for each of the neighboring pixels. In some embodiments, only a select number of neighboring pixels are used. In the step  402 , an edge direction is determined for each of the neighboring pixels by taking a perpendicular direction to each of the gradient vectors. In the step  404 , a best direction is predicted using the edge direction of each of the pixels. Fewer or additional steps are able to be included. Further, the order of the steps is able to be changed where possible. 
         [0034]      FIG. 5  illustrates a block diagram of an exemplary computing device  500  configured to implement the Differential Coding of Intra Directions (DCIC) method according to some embodiments. The computing device  500  is able to be used to acquire, store, compute, process, communicate and/or display information such as images and videos. For example, a computing device  500  is able to acquire and store a video. The DCIC method is able to be used during or after acquiring the video, or when displaying the video on the device  500 . In general, a hardware structure suitable for implementing the computing device  500  includes a network interface  502 , a memory  504 , a processor  506 , I/O device(s)  508 , a bus  510  and a storage device  512 . The choice of processor is not critical as long as a suitable processor with sufficient speed is chosen. The memory  504  is able to be any conventional computer memory known in the art. The storage device  512  is able to include a hard drive, CDROM, CDRW, DVD, DVDRW, flash memory card or any other storage device. The computing device  500  is able to include one or more network interfaces  502 . An example of a network interface includes a network card connected to an Ethernet or other type of LAN. The I/O device(s)  508  are able to include one or more of the following: keyboard, mouse, monitor, display, printer, modem, touchscreen, button interface and other devices. In some embodiments, the hardware structure includes multiple processors and other hardware to perform parallel processing. DCIC application(s)  530  used to perform the improved encoding method are likely to be stored in the storage device  512  and memory  504  and processed as applications are typically processed. More or less components shown in  FIG. 5  are able to be included in the computing device  500 . In some embodiments, DCIC hardware  520  is included. Although the computing device  500  in  FIG. 5  includes applications  530  and hardware  520  for implementing the DCIC method, the DCIC method is able to be implemented on a computing device in hardware, firmware, software or any combination thereof. For example, in some embodiments, the DCIC applications  530  are programmed in a memory and executed using a processor. In another example, in some embodiments, the DCIC hardware  520  is programmed hardware logic including gates specifically designed to implement the encoding method. 
         [0035]    In some embodiments, the DCIC application(s)  530  include several applications and/or modules. Modules such as an image gradient vector module for applying operators to neighboring pixels for obtaining image gradient vectors, an edge detection module for determining an edge direction for each of the pixels and a best direction module for predicting a best direction using the edge direction of each of the pixels are able to perform the functions described herein. In some embodiments, modules include one or more sub-modules as well. In some embodiments, fewer or additional modules are able to be included. 
         [0036]    Examples of suitable computing devices include a personal computer, a laptop computer, a computer workstation, a server, a mainframe computer, a handheld computer, a personal digital assistant, a cellular/mobile telephone, a smart appliance, a gaming console, a digital camera, a digital camcorder, a camera phone, an iPod®/iPhone, a video player, a DVD writer/player, a Blu-ray® writer/player, a television, a home entertainment system or any other suitable computing device. 
         [0037]    In some embodiments, only one pixel in a boundary of a block is used for determining or deriving an edge of a block to be predicted. Three pixels are used for gradient computation, and one pixel is used for edge derivation based on the gradient. This implementation is able to replace prior implementations such that instead of using five pixels for gradient computation, only three pixels are used, and instead of using three pixels for edge derivation, only one pixel is used. A lookup table is able to be used which would remove floating-point operations/variables. Precision in directions for Chroma components is increased (similar to Luma). VLC tables are able to be used for low complexity cases. Furthermore, this implementation will provide better context initialization. 
         [0038]    An example of edge derivation is described: 
         [0000]    
       
         
           
             
               σ 
               1 
             
             = 
             
               2 
                
               
                 
                   ∑ 
                   i 
                 
                  
                 
                   
                     x 
                     i 
                   
                    
                   
                     y 
                     i 
                   
                 
               
             
           
         
       
       
         
           
             
               σ 
               2 
             
             = 
             
               
                 ∑ 
                 i 
               
                
               
                 
                   x 
                   i 
                   2 
                 
                  
                 
                   y 
                   i 
                   2 
                 
               
             
           
         
       
     
         [0000]    where ∇ i - (x i ,y i ) are local gradients of the image. The ratio of σ 1  over σ 2  is computed with 8 bit precision. Then, the results are compared with the following table to determine the index to the actual direction:
 
const UInt TcomPattern::m_uiSigma2SlopeIdx[32]{4, 12, 21, 30, 39, 49, 59, 69, 80, 92, 105, 118, 132, 147, 164, 182, 202, 225, 249, 278, 310, 348, 393, 448, 516, 604, 723, 892, 1157, 1629, 2725, 8192};
 
         [0039]    Details are able to be extracted from the following function: 
         [0000]    
       
         
               
             
           
               
                   
               
             
             
               
                 Int TComPattern::xComputeSlope(Int64 dSigma1, Int64 dSigma2) 
               
               
                 { 
               
               
                   Int iSlope = 65; 
               
               
                   Uint uiRegionIdx = 0; 
               
               
                   if (dSigma1&gt;=O &amp;&amp; dSigma2 &gt;=0) 
               
               
                     uiRegionIdx = 0; 
               
               
                   else if (dSigma2 &lt; 0 &amp;&amp; dSigma1 &gt;=0) 
               
               
                     uiRegionIdx = 1; 
               
               
                   else if (dSigma2 &gt;= 0 &amp;&amp; dSigma1 &lt;0) 
               
               
                     uiRegionIdx = 2; 
               
               
                   else uiRegionIdx = 3; 
               
               
                   UInt64 uiSigma1 = (UInt64) abs(dSigma1); 
               
               
                   UInt64 uiSigma2 = (UInt64) abs(dSigma2); 
               
               
                     U1nt64 uiRatio = (uiSigma1 == 0) ? (33&lt;&lt;8) : 
               
               
                     (uiSigma2 &lt;&lt; 8) / uiSigma1; 
               
               
                     Int iBinIdx = −1; 
               
               
                     if (uiRatio &lt; m_uiSigma2SlopeIdx[0]) 
               
               
                       iBinIdx = 0; 
               
               
                     else if (uiRatio &gt;= m_uiSigma2SlopeIdx[31]) 
               
               
                       iBinIdx = 32; 
               
               
                     else 
               
               
                     { 
               
               
                       for (Int i = 1; i &lt; 32; i++) 
               
               
                       { 
               
               
                         if (uiRatio &gt;= m_uiSigma2SlopeIdx[I−1] &amp;&amp; 
               
               
                 uiRatio &lt; m_uiSigma2SlopeIdx[i]) 
               
               
                         { 
               
               
                           iBinIdx = I; 
               
               
                           break; 
               
               
                         } 
               
               
                       } 
               
               
                     } 
               
               
                     assert( iBinIdx &gt; −1 &amp;&amp; iBinIdx &lt; 33); 
               
               
                     switch (uiRegionldx) 
               
               
                     { 
               
               
                     case 0: 
               
               
                       islope = 6.5 + iBinIdx; //(Double) (32.0 − iBinIdx) / 32.0; 
               
               
                       break; 
               
               
                     case 1: 
               
               
                       iSlope = 0 + iBinIdx; //(iBinIdx == 32) ? 500 : 32.0 / 
               
               
                 (32.0 − (Double) iBinIdx); 
               
               
                       break; 
               
               
                     case 2: 
               
               
                     iSlope = 129 − iBinIdx; //(Double) −(32.0 − iBinIdx) / 32.0; 
               
               
                       break; 
               
               
                     case 3: 
               
               
                       iSlope = 64 − iBinIdx;//(iBinIdx == 32)? −500 : −32.0 / 
               
               
                 (32.0 −(Double) iBinIdx); 
               
               
                       break; 
               
               
                     default: 
               
               
                       assert( 0 ); 
               
               
                       break; 
               
               
                     } 
               
               
                   return iSlope; 
               
               
                 } 
               
               
                   
               
             
          
         
       
     
         [0040]    To utilize the DCIC method, a user acquires a video/image such as on a digital camcorder, and while or after the video is acquired, or when displaying the video, the differential coding of intra directions method is automatically used for intra coding each image of the video, so that the video is encoded efficiently while maintaining quality. The DCIC method occurs automatically without user involvement. The video is also able to be decoded to be displayed using a similar method. 
         [0041]    In operation, differential coding of intra directions is used to encode and decode images such as frames of a video. The DCIC method accurately predicts intra directions from reconstructed neighboring pixels and differentially encodes the intra directions. This allows a more precise directional prediction without the significant increase in the cost for transmitting the side information. 
         [0042]    Some Embodiments of Differential Coding of Intra Directions (DCIC) 
         [0043]    1. A method of encoding an image programmed in a controller in a device comprising:
       a. applying operators to neighboring pixels of a block to obtain an image gradient vector for each of the pixels;   b. determining an edge direction for each of the pixels by taking a perpendicular direction to each of the gradient vectors; and   c. predicting a best direction using the edge direction for each of the pixels.       
 
         [0047]    2. The method of clause 1 wherein the best direction is used in intra coding in encoding the image. 
         [0048]    3. The method of clause 1 wherein predicting further comprises deriving the best direction using a summation of the square of projections of direction vectors onto a unit vector. 
         [0049]    4. The method of clause 1 wherein predicting further comprises deriving the best direction by calculating an eigenvector using a matrix and then using a lookup table to convert the eigenvector to the best direction. 
         [0050]    5. The method of clause 1 wherein the best direction is adjusted by a direction adjustment. 
         [0051]    6. The method of clause 5 wherein the direction adjustment is implemented using discrete values with a quantization step size. 
         [0052]    7. The method of clause 6 wherein the quantization step size implements a confidence measure, wherein the higher the confidence measure, the smaller the quantization step size. 
         [0053]    8. The method of clause 7 wherein the confidence measure is compared to a threshold for choosing between two pre-defined step size values for the quantization step size. 
         [0054]    9. The method of clause 1 wherein the device is selected from the group consisting of a personal computer, a laptop computer, a computer workstation, a server, a mainframe computer, a handheld computer, a personal digital assistant, a cellular/mobile telephone, a smart appliance, a gaming console, a digital camera, a digital camcorder, a camera phone, an iPod®/iPhone, a video player, a DVD writer/player, a Blu-ray® writer/player, a television and a home entertainment system. 
         [0055]    10. An apparatus for encoding an image programmed in a controller in a device comprising:
       a. an image gradient vector module for applying operators to neighboring pixels for obtaining an image gradient vector for each of the pixels;   b. an edge detection module for determining an edge direction for each of the pixels by taking a perpendicular direction to each of the gradient vectors; and   c. a best direction module for predicting a best direction using the edge direction of each of the pixels.       
 
         [0059]    11. The apparatus of clause 10 wherein the best direction is used in intra coding in encoding the image. 
         [0060]    12. The apparatus of clause 10 wherein the best direction module is further for deriving the best direction using a summation of the square of projections of direction vectors onto a unit vector. 
         [0061]    13. The apparatus of clause 10 wherein predicting further comprises deriving the best direction by calculating an eigenvector using a matrix and then using a lookup table to convert the eigenvector to the best direction. 
         [0062]    14. The apparatus of clause 10 wherein the best direction is adjusted by a direction adjustment. 
         [0063]    15. The apparatus of clause 14 wherein the direction adjustment is implemented using discrete values with a quantization step size. 
         [0064]    16. The apparatus of clause 15 wherein the quantization step size implements a confidence measure, wherein the higher the confidence measure, the smaller the quantization step size. 
         [0065]    17. The apparatus of clause 16 wherein the confidence measure is compared to a threshold for choosing between two pre-defined step size values for the quantization step size. 
         [0066]    18. The apparatus of clause 10 wherein the device is selected from the group consisting of a personal computer, a laptop computer, a computer workstation, a server, a mainframe computer, a handheld computer, a personal digital assistant, a cellular/mobile telephone, a smart appliance, a gaming console, a digital camera, a digital camcorder, a camera phone, an iPod®/iPhone, a video player, a DVD writer/player, a Blu-ray® writer/player, a television and a home entertainment system. 
         [0067]    19. A device comprising:
       a. a memory for storing an application, the application for:
           i. applying operators to neighboring pixels of a block to obtain an image gradient vector for each of the pixels;   ii. determining an edge direction for each of the pixels by taking a perpendicular direction to each of the gradient vectors; and   iii. predicting a best direction using the edge direction for each of the pixels; and   
           b. a processing component coupled to the memory, the processing component configured for processing the application.       
 
         [0073]    20. The device of clause 19 wherein the best direction is used in intra coding in encoding the image. 
         [0074]    21. The device of clause 19 wherein predicting further comprises deriving the best direction using a summation of the square of projections of direction vectors onto a unit vector. 
         [0075]    22. The device of clause 19 wherein predicting further comprises deriving the best direction by calculating an eigenvector using a matrix and then using a lookup table to convert the eigenvector to the best direction. 
         [0076]    23. The device of clause 19 wherein the best direction is adjusted by a direction adjustment. 
         [0077]    24. The device of clause 23 wherein the direction adjustment is implemented using discrete values with a quantization step size. 
         [0078]    25. The device of clause 24 wherein the quantization step size implements a confidence measure, wherein the higher the confidence measure, the smaller the quantization step size. 
         [0079]    26. The device of clause 25 wherein the confidence measure is compared to a threshold for choosing between two pre-defined step size values for the quantization step size. 
         [0080]    27. A method of encoding an image programmed in a controller in a device comprising:
       a. differentially encoding is implemented for a direction if the direction is close to suggested directions of neighbors of the direction; and   b. otherwise, using a simple fixed length code to signal the direction of the direction.       
 
         [0083]    28. The method of clause 27 wherein differentially encoding further comprises:
       a. applying operators to neighboring pixels of a block to obtain an image gradient vector for each of the pixels;   b. determining an edge direction for each of the pixels by taking a perpendicular direction to each of the gradient vectors; and   c. predicting a best direction using the edge direction for each of the pixels.       
 
         [0087]    29. The method of clause 28 wherein the best direction is used in intra coding in encoding the image. 
         [0088]    30. The method of clause 28 wherein predicting further comprises deriving the best direction using a summation of the square of projections of direction vectors onto a unit vector. 
         [0089]    31. The method of clause 28 wherein predicting further comprises deriving the best direction by calculating an eigenvector using a matrix and then using a lookup table to convert the eigenvector to the best direction. 
         [0090]    32. The method of clause 28 wherein the best direction is adjusted by a direction adjustment. 
         [0091]    33. The method of clause 32 wherein the direction adjustment is implemented using discrete values with a quantization step size. 
         [0092]    34. The method of clause 33 wherein the quantization step size implements a confidence measure, wherein the higher the confidence measure, the smaller the quantization step size. 
         [0093]    35. The method of clause 34 wherein the confidence measure is compared to a threshold for choosing between two pre-defined step size values for the quantization step size. 
         [0094]    36. The method of clause 28 wherein the device is selected from the group consisting of a personal computer, a laptop computer, a computer workstation, a server, a mainframe computer, a handheld computer, a personal digital assistant, a cellular/mobile telephone, a smart appliance, a gaming console, a digital camera, a digital camcorder, a camera phone, an iPod®/iPhone, a video player, a DVD writer/player, a Blu-ray® writer/player, a television and a home entertainment system. 
         [0095]    The present invention has been described in terms of specific embodiments incorporating details to facilitate the understanding of principles of construction and operation of the invention. Such reference herein to specific embodiments and details thereof is not intended to limit the scope of the claims appended hereto. It will be readily apparent to one skilled in the art that other various modifications may be made in the embodiment chosen for illustration without departing from the spirit and scope of the invention as defined by the claims.