Patent Publication Number: US-9412157-B2

Title: Apparatus and method for high speed filtering of image for high precision

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application claims the priority benefit of Korean Patent Application No. 10-2010-0080146, filed on Aug. 19, 2010, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference. 
     BACKGROUND 
     1. Field 
     Example embodiments of the present disclosure relate to an apparatus and a method for high speed filtering of an image for high precision that may reduce a number of a second block to be compared with a first block including a first pixel to be filtered, and thereby reduce an amount of calculation when filtering the first pixel. 
     2. Description of the Related Art 
     A conventional Non Local Means (NLM) filter apparatus may determine a first pixel to be filtered on a screen, and may determine N 2  total pixels located on the screen as a second pixel, N being a number of pixels on an edge of the screen. Then, the NLM filter apparatus may filter the first pixel by comparing a first block including the first pixel and a second block including the second pixel. 
     Here, N 2  number of calculations may be performed to filter a single pixel, and a filtering process may be complex and accordingly a great deal of time may be used for the filtering. 
     Thus, a technology for efficiently filtering using fewer calculations may be needed. 
     SUMMARY 
     The foregoing and/or other aspects are achieved by providing an apparatus for high speed filtering of an image for high precision, the apparatus including a coordinate determining unit to determine coordinates (P,Q) on a screen with respect to a first pixel to be filtered, a pixel determining unit to determine a second pixel with coordinates including either P or Q, a block setting unit to set a first block including the first pixel, and a second block including the second pixel, and a processing unit to filter the first pixel by comparing the first block and the second block. 
     The foregoing and/or other aspects are achieved by providing a method of high speed filtering of an image for high precision, the method including determining coordinates (P,Q) on a screen with respect to a first pixel to be filtered, determining a second pixel with coordinates including either P or Q, setting a first block comprising the first pixel, and a second block comprising the second pixel, and filtering the first pixel by comparing the first block and the second block. 
     Additional aspects of embodiments will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the disclosure. 
     Example embodiments may determine coordinates (P,Q) on a screen with respect to a first pixel to be filtered, determine a second pixel with coordinates including either P or Q, then compare a first block including the first pixel, and a second block including the second pixel, and filter the first pixel, thereby reducing a number of the second block to be compared with the first block, to be fewer than a number of blocks corresponding to total pixels located on a screen, and reducing an amount of calculation when filtering the first pixel. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       These and/or other aspects will become apparent and more readily appreciated from the following description of embodiments, taken in conjunction with the accompanying drawings of which: 
         FIG. 1  illustrates an example of a configuration of an apparatus for high speed filtering of an image for high precision according to example embodiments; 
         FIG. 2  illustrates a diagram to describe an example of filtering in an apparatus for high speed filtering of an image for high precision according to example embodiments; 
         FIG. 3  illustrates a diagram to describe another example of filtering in an apparatus for high speed filtering of an image for high precision according to example embodiments; and 
         FIG. 4  illustrates a flowchart to describe a method of high speed filtering of an image for high precision. 
     
    
    
     DETAILED DESCRIPTION 
     Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings, wherein reference numerals refer to the like elements throughout. Embodiments are described below to explain the present disclosure by referring to the figures. 
       FIG. 1  illustrates an example of a configuration of an apparatus for high speed filtering of an image for high precision according to example embodiments. 
     Referring to  FIG. 1 , the apparatus for high speed filtering of the image for high precision  101  may include, for example, a coordinate determining unit  103 , a pixel determining unit  105 , a block setting unit  107 , and a processing unit  109 . 
     The coordinate determining unit  103  may determine, as an example, coordinates (P, Q) on a screen with respect to a first pixel to be filtered. 
     The coordinate determining unit  103  may determine the coordinates (P,Q) of the first pixel on an edge of an image displayed on the screen. A direction of the edge may be parallel to an axial direction of P or an axial direction of Q, or may be a direction other than parallel to the axial direction of P or the axial direction of Q. Here, the axial direction of P may correspond to a direction of a virtual axis that may connect coordinates (P, variable) such as a direction of a vertical line that may pass through the first pixel, which will be referred to as an axial direction of P hereinafter. Also, the axial direction of Q may correspond to a direction of a virtual axis that may connect coordinates (variable, Q) such as a direction of a horizontal line that may pass through the first pixel, which will be referred to as an axial direction of Q hereinafter. 
     The determining of a second pixel based on whether the direction of the edge is parallel to the axial direction of P or the axial direction of Q will be further described. 
     When the edge is parallel to the axial direction of P or the axial direction of Q, the pixel determining unit  105  may determine a second pixel with coordinates including either P or Q. 
     For example, the pixel determining unit  105  may determine a second pixel of coordinates (P,Q 1 ), (P,Q 2 ) . . . , (P,Q u ) that may be vertically located in relation to the coordinates (P,Q), or a second pixel of coordinates (P 1 ,Q), (P 2 ,Q) . . . ,(P g ,Q) that may be horizontally located to the coordinates (P,Q). Here, u of Q u  may correspond to a number of pixels located on an edge of the screen, for example, vertically located on the screen, and v of P v  may correspond to a number of pixels located on another edge of the screen, for example, horizontally located on the screen. 
     When a number of pixels located on the edge of a screen, or on another edge of the screen corresponds to N, a size of a window may correspond to N*1, N being a natural number. 
     When the edge is in a direction other than parallel with the axial direction of P or the axial direction of Q, for example, in a direction diagonal to the axial direction, the pixel determining unit  105  may determine a second pixel with coordinates including either P+m or Q+m, m being an integer. 
     For example, the pixel determining unit  105  may determine a second pixel of coordinates (P+m,Q 1 ), (P+m,Q 2 ) . . . , (P+m,Q u ) that may be vertically located with respect to the coordinates (P,Q), or a second pixel of coordinates (P 1 ,Q+m), (P 2 ,Q+m) . . . , (P u ,Q+m) that may be horizontally located with respect to the coordinates (P,Q). 
     When a number of pixels located on an edge of the screen, or on another edge of the screen corresponds to N, a size of a window may correspond to N*M, N being a natural number, and M being an absolute value of m. 
     The pixel determining unit  105  may select m so that any one of a second pixel with coordinates including P+m, and a second pixel with coordinates including Q+m is determined to be less than half of N 2  total pixels located on the screen. M corresponding to an absolute value of m may be less than N/2. 
     The block setting unit  107  may set a first block including the first pixel, and a second block including the selected second pixel. The block setting unit  107  may set a predetermined size of the first block and a predetermined size of the second block. Here, the first block and the second block may have a same size. 
     For example, the block setting unit  107  may set a 3*3 first block including a first pixel, and a 3*3 second block including a second pixel. 
     The processing unit  109  may filter the first pixel by comparing the first block and the second block. The processing unit  109  may calculate a weight with respect to the second block by comparing the first block and the second block, and may filter the first pixel based on the calculated weight and the second pixel. 
     The processing unit  109  may calculate a similarity S s   i)  between the first block and the second block based on a pixel brightness difference between the first block and the second block, and may calculate a weight W s   ii)  based on the calculated similarity. The processing unit  109  may calculate a similarity between the first block and the second block by calculating a difference of a brightness value between pixels existing at a same location as the first block and the second block, and by adding up the difference of the brightness value with respect to each pixel. 
     For example, when having a brightness value for each pixel of 
               (           1   ,           2   ,         3             2   ,           2   ,         4             0   ,           0   ,         1         )               
as a 3*3 first block, and having a brightness value for each pixel of
 
               (           0   ,           2   ,         3             2   ,           1   ,         4             0   ,           0   ,         1         )               
as a 3*3 second block, the processing unit  109  may calculate (|1−0|+|2−2|+|3−3|+|2−2|+|2−1|+|4−4|+|0−0|+|0−0|+|1−1|/9)=0.2 as a similarity between the first block and the second block.
 
     The similarity S s   i)  may be expressed as Equation 1. 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             s 
                             s 
                           
                           ⁡ 
                           
                             ( 
                             
                               x 
                               , 
                               y 
                               , 
                               
                                 x 
                                 u 
                               
                               , 
                               
                                 y 
                                 v 
                               
                             
                             ) 
                           
                         
                         = 
                           
                         ⁢ 
                         
                           
                             
                               s 
                               y 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                                 , 
                                 x 
                                 , 
                                 
                                   y 
                                   v 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               s 
                               x 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 
                                   y 
                                   v 
                                 
                                 , 
                                 
                                   x 
                                   u 
                                 
                                 , 
                                 
                                   y 
                                   v 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                         ⁢ 
                         
                           
                             
                               ∑ 
                               j 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 i 
                               
                               ⁢ 
                               
                                 
                                    
                                   
                                     
                                       f 
                                       ⁡ 
                                       
                                         ( 
                                         
                                           
                                             x 
                                             + 
                                             i 
                                           
                                           , 
                                           
                                             y 
                                             + 
                                             j 
                                           
                                         
                                         ) 
                                       
                                     
                                     - 
                                     
                                       f 
                                       ⁡ 
                                       
                                         ( 
                                         
                                           
                                             x 
                                             + 
                                             i 
                                           
                                           , 
                                           
                                             
                                               y 
                                               v 
                                             
                                             + 
                                             j 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                    
                                 
                                 2 
                               
                             
                           
                           + 
                         
                       
                     
                   
                   
                     
                       
                           
                         ⁢ 
                         
                           
                             ∑ 
                             j 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               i 
                             
                             ⁢ 
                             
                               
                                  
                                 
                                   
                                     f 
                                     ⁡ 
                                     
                                       ( 
                                       
                                         
                                           x 
                                           + 
                                           i 
                                         
                                         , 
                                         
                                           
                                             y 
                                             v 
                                           
                                           + 
                                           j 
                                         
                                       
                                       ) 
                                     
                                   
                                   - 
                                   
                                     f 
                                     ⁡ 
                                     
                                       ( 
                                       
                                         
                                           
                                             x 
                                             u 
                                           
                                           + 
                                           i 
                                         
                                         , 
                                         
                                           
                                             y 
                                             v 
                                           
                                           + 
                                           j 
                                         
                                       
                                       ) 
                                     
                                   
                                 
                                  
                               
                               2 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     1 
                   
                   ] 
                 
               
             
           
         
       
     
     Also, the weight W s   ii)  may be inversely proportional to the similarity S s   i) , and may be expressed as Equation 2.
 
 w   s ( x,y,x   u   ,y   v ))= w   y ( x,y,x,y   v )· w   x ( x,y   v   ,x   u   ,y   v )   [Equation 2]
 
     Consequently, the processing unit  109  may filter the first pixel by adjusting a brightness value of the first pixel using a value obtained by calculating a brightness value of a second pixel in the second block, and the calculated weight. 
     Particularly, when a plurality of second blocks are set, the processing unit  109  may adjust a brightness value of a first pixel in a first block by multiplying a brightness value of a second pixel in each of the second blocks, and a weight with respect to the second block, and by calculating an average of the multiplied brightness values. For example, when a brightness value of a second pixel in a second block_# 1  corresponds to ‘2’, a brightness value of a second pixel in a second block_# 2  corresponds to ‘2’, a brightness value of a second pixel in a second block_# 3  corresponds to ‘1’, and a weight of each of a second block_# 1 , a second block_# 2 , and a second block_# 3  respectively correspond to ‘1’, ‘0.5’, and ‘0.3’, the processing unit  109  may filter the first pixel by adjusting a brightness value of the first pixel of the first block as (2*1)+(2*0.5)+(1*0.3)/3=1.1. 
     The value of filtering the first pixel may be expressed as Equation 3. 
     
       
         
           
             
               
                 
                   
                     
                       f 
                       _ 
                     
                     ⁡ 
                     
                       ( 
                       
                         x 
                         , 
                         y 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       v 
                     
                     ⁢ 
                     
                       
                         
                           w 
                           y 
                         
                         ⁡ 
                         
                           ( 
                           
                             x 
                             , 
                             y 
                             , 
                             x 
                             , 
                             
                               y 
                               v 
                             
                           
                           ) 
                         
                       
                       ⁢ 
                       
                         
                           ∑ 
                           u 
                         
                         ⁢ 
                         
                           
                             
                               w 
                               x 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 
                                   y 
                                   v 
                                 
                                 , 
                                 
                                   x 
                                   u 
                                 
                                 , 
                                 
                                   y 
                                   v 
                                 
                               
                               ) 
                             
                           
                           · 
                           
                             f 
                             ⁡ 
                             
                               ( 
                               
                                 
                                   x 
                                   u 
                                 
                                 , 
                                 
                                   y 
                                   v 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     3 
                   
                   ] 
                 
               
             
           
         
       
     
     Here, (x,y) correspond to coordinates of the first pixel, and (x u ,y v ) correspond to coordinates of the second pixel. 
     A conventional Non Local Means (NLM) filter apparatus may determine a first pixel (P,Q) to be filtered on a screen, determine each of pixels, for example, (P 1 ,Q 1 ), (P 1 ,Q 2 ) . . . , (P 1 ,Q u ), (P 2 ,Q 1 ), (P 2 ,Q 2 ) . . . , (P 2 ,Q u ) . . . (P v ,Q 1 ), (P v ,Q 2 ) . . . , (P v ,Q u ) as a second pixel, then compare a first block including the first pixel, and a second block including the second pixel, and filter the first pixel. 
     Here, a similarity S between the first block and the second block may be expressed as Equation 4. 
     
       
         
           
             
               
                 
                   
                     s 
                     ⁡ 
                     
                       ( 
                       
                         x 
                         , 
                         y 
                         , 
                         
                           x 
                           u 
                         
                         , 
                         
                           y 
                           v 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       j 
                     
                     ⁢ 
                     
                       
                         ∑ 
                         i 
                       
                       ⁢ 
                       
                         
                            
                           
                             
                               f 
                               ⁡ 
                               
                                 ( 
                                 
                                   
                                     x 
                                     + 
                                     i 
                                   
                                   , 
                                   
                                     y 
                                     + 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                             - 
                             
                               f 
                               ⁡ 
                               
                                 ( 
                                 
                                   
                                     
                                       x 
                                       u 
                                     
                                     + 
                                     i 
                                   
                                   , 
                                   
                                     
                                       y 
                                       v 
                                     
                                     + 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                            
                         
                         2 
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     4 
                   
                   ] 
                 
               
             
           
         
       
     
     Here, (x, y) corresponds to coordinates of the first pixel, and (x u ,y v ) corresponds to coordinates of the second pixel. Also, f(x+i,y+j) corresponds to a brightness value of a pixel in the first block, and f(x u +i,y v +j) corresponds to a brightness value of a pixel in the second block. 
     A weight w with respect to the second block may be expressed as Equation 5. 
     
       
         
           
             
               
                 
                   
                     w 
                     ⁡ 
                     
                       ( 
                       
                         x 
                         , 
                         y 
                         , 
                         
                           x 
                           u 
                         
                         , 
                         
                           y 
                           v 
                         
                       
                       ) 
                     
                   
                   ∝ 
                   
                     exp 
                     ⁡ 
                     
                       ( 
                       
                         - 
                         
                           
                             s 
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                                 , 
                                 
                                   x 
                                   u 
                                 
                                 , 
                                 
                                   y 
                                   v 
                                 
                               
                               ) 
                             
                           
                           
                             σ 
                             2 
                           
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     5 
                   
                   ] 
                 
               
             
           
         
       
     
     The value of filtering the first pixel may be expressed as Equation 6. 
     
       
         
           
             
               
                 
                   
                     
                       f 
                       _ 
                     
                     ⁡ 
                     
                       ( 
                       
                         x 
                         , 
                         y 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       v 
                     
                     ⁢ 
                     
                       
                         ∑ 
                         u 
                       
                       ⁢ 
                       
                         
                           w 
                           ⁡ 
                           
                             ( 
                             
                               x 
                               , 
                               y 
                               , 
                               
                                 x 
                                 u 
                               
                               , 
                               
                                 y 
                                 v 
                               
                             
                             ) 
                           
                         
                         · 
                         
                           f 
                           ⁡ 
                           
                             ( 
                             
                               
                                 x 
                                 u 
                               
                               , 
                               
                                 y 
                                 v 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     6 
                   
                   ] 
                 
               
             
           
         
       
     
     Equation 7 may be derived from Equation 1 and Equation 4. 
     
       
         
           
             
               
                 
                   
                     s 
                     ⁡ 
                     
                       ( 
                       
                         x 
                         , 
                         y 
                         , 
                         
                           x 
                           u 
                         
                         , 
                         
                           y 
                           v 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       
                         s 
                         s 
                       
                       ⁡ 
                       
                         ( 
                         
                           x 
                           , 
                           y 
                           , 
                           
                             x 
                             u 
                           
                           , 
                           
                             y 
                             v 
                           
                         
                         ) 
                       
                     
                     + 
                     
                       
                         ∑ 
                         j 
                       
                       ⁢ 
                       
                         
                           ∑ 
                           i 
                         
                         ⁢ 
                         
                           2 
                           ⁢ 
                           
                             ( 
                             
                               
                                 f 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     
                                       x 
                                       + 
                                       i 
                                     
                                     , 
                                     
                                       y 
                                       + 
                                       j 
                                     
                                   
                                   ) 
                                 
                               
                               - 
                               
                                 f 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     
                                       x 
                                       + 
                                       i 
                                     
                                     , 
                                     
                                       
                                         y 
                                         v 
                                       
                                       + 
                                       j 
                                     
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             ( 
                             
                               
                                 f 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     
                                       x 
                                       + 
                                       i 
                                     
                                     , 
                                     
                                       
                                         y 
                                         v 
                                       
                                       + 
                                       j 
                                     
                                   
                                   ) 
                                 
                               
                               - 
                               
                                 f 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     
                                       
                                         x 
                                         u 
                                       
                                       + 
                                       i 
                                     
                                     , 
                                     
                                       
                                         y 
                                         v 
                                       
                                       + 
                                       j 
                                     
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     7 
                   
                   ] 
                 
               
             
           
         
       
     
     When a pattern is similar along an axial direction of Y, or similar in an axial direction of Y, it may come to f(x+i,y+j)−f(x+i,y v +j)≈0, and accordingly s(x,y,x u ,y v )≈s s (x,y,x u ,y v ) may be completed. 
     Also, when a pattern is similar along an axial direction of X, or similar in an X axial direction, it may come to f(x+i,y v +j)−f(x u +i,y v +j)≈0, and accordingly s(x,y,x u ,y v )≈s s (x,y,x u ,y v ) may be completed. 
     Consequently, an apparatus for high speed filtering of an image for high precision may derive a performance of filtering results similar to the conventional NLM filter apparatus, however, the apparatus for high speed filtering of the image for high precision may efficiently perform the filtering using relatively fewer calculations, thereby simplifying the filtering and accordingly reducing a time used for the filtering. 
     That is, when a size of a screen corresponds to N*N, the conventional NLM filter apparatus may perform N 2  number of calculations, whereas the apparatus for high speed filtering of the image for high precision may perform 2N number of calculations, here, a size of a window corresponds to N*1, thereby deriving a performance of filtering result similar to the conventional NLM filter apparatus, N being a natural number. When, an edge of an image displayed on a screen is formed in a diagonal direction, as the window size is set to N*M, the apparatus for high speed filtering of the image for high precision may perform 2MN number of calculations, thereby deriving a performance of filtering result similar to the conventional NLM filter apparatus. 
       FIG. 2  illustrates a diagram to describe an example of filtering in an apparatus for high speed filtering of an image for high precision according to example embodiments. 
     Referring to  FIG. 2 , the apparatus for high speed filtering of the image for high precision may determine coordinates (P,Q) on a screen with respect to a first pixel to be filtered, determine a second pixel with coordinates including either P or Q, and then filter the first pixel by comparing a first block including the first pixel and a second block including the second pixel. Here, the apparatus for high speed filtering of the image for high precision may determine the coordinates (P,Q) of the first pixel on an edge of an image displayed on the screen. 
     For example, the apparatus for high speed filtering of the image for high precision may determine coordinates (P,Q) on a screen with respect to a first pixel  201   a  to be filtered, and determine either one of a second pixel_# 1   202   a , a second pixel_# 2   203   a , and a second pixel_# 3   204   a  with coordinates including Q, or one of a second pixel_# 4   211   a , a second pixel_# 5   212   a , and a second pixel_# 6   213   a  with coordinates including P. 
     The apparatus for high speed filtering of the image for high precision may set a first block  201   b  including the first pixel  201   a , and a second block_# 1  through a second block_# 6  ( 202   b ,  203   b ,  204   b ,  211   b ,  212   b , and  213   b ) including the second pixel_# 1  through the second pixel_# 6  ( 202   a ,  203   a ,  204   a ,  211   a ,  212   a , and  213   a ), and may filter the first pixel  201   a  by comparing the first block  201   b  and each of the second block_# 1  through the second block_# 6  ( 202   b ,  203   b ,  204   b ,  211   b ,  212   b , and  213   b ). 
     That is, the apparatus for high speed filtering of the image for high precision may calculate a similarity S 1  between the first block  201   b  and the second block_# 1   202   b , a similarity S 2  between the first block  201   b  and the second block_# 2   203   b , . . . , and a similarity S 6  between the first block  201   b  and the second block_# 6   213   b , may calculate a weight W 1  through W 6  with respect to the second block_# 1  through the second block_# 6  based on the similarity S 1  through S 6 , may multiply a brightness value of each of the second pixel_# 1  through the second pixel_# 6  ( 202   a ,  203   a ,  204   a ,  211   a ,  212   a , and  213   a ) and the weight of each of W 1  through W 6 , then may calculate an average of the brightness values obtained by multiplication, and thereby may adjust a brightness value of the first pixel  201   a  of the first block  201   b . 
       FIG. 3  illustrates a diagram to describe another example of filtering in an apparatus for high speed filtering of an image for high precision according to example embodiments. 
     Referring to  FIG. 3 , the apparatus for high speed filtering of the image for high precision may determine coordinates (P,Q) on a screen with respect to a first pixel to be filtered and when a direction of an edge of an image including the first pixel on the screen is in a direction other than parallel to an axial direction of P or an axial direction of Q. As an example, a diagonal direction, may determine a second pixel with coordinates including either P+m or Q+m, m being an integer. 
     For example, the apparatus for high speed filtering of the image for high precision may determine coordinates (P,Q) on a screen with respect to a first pixel  301   a  to be filtered, and when a direction of an edge of an image including the first pixel on the screen is in a direction other than parallel to an axial direction of P or an axial direction of Q, for example, a diagonal direction, may determine a second pixel with coordinates including either one of Q−1, Q, and Q+1, or one of P−1, P, and P+1, m being one of −1, 0, and 1. 
     That is, the apparatus for high speed filtering of the image for high precision may determine either one of a second pixel_# 1 _ 1  through a second pixel_# 1 _ 4  ( 311   a  through  314   a ) with coordinates including Q−1, a second pixel_# 2 _ 1  through a second pixel_# 2 _ 4  ( 321   a ,  323   a , and  324   a ) with coordinates including Q, and a second pixel_# 3 _ 1  through a second pixel_#_ 4  ( 331   a  through  334   a ) with coordinates including Q+1, or one of a second pixel_# 4 _ 1  through a second pixel_# 4 _ 4  ( 341   a  through  344   a ) with coordinates including P−1, a second pixel_# 5 - 1  through a second pixel_# 5 _ 4  ( 351   a ,  352   a , and  354   a ) with coordinates including P, and a second pixel_# 6 _ 1  through a second pixel_# 6 _ 4  ( 361   a ,  362   a , and  364   a ) with coordinates including P+1. 
     Then, the apparatus for high speed filtering of the image for high precision may filter the first pixel  301   a  by comparing a first block including the first pixel  301   a , and a second block including the second pixel ( 311   a  through  314   a ,  321   a ,  323   a ,  324   a ,  331   a  through  334   a ,  341   a  through  344   a ,  351   a ,  352   a ,  354   a ,  361   a ,  362   a , and  364   a ). 
       FIG. 4  illustrates a flowchart to describe a method of high speed filtering of an image for high precision. The method may be performed by the apparatus for high speed filtering of the image for high precision or by the apparatus for high speed filtering of a high precision image or by a general purpose computer or processor. 
     Referring to  FIG. 4 , coordinates (P,Q) may be determined on a screen with respect to a first pixel to be filtered in operation  401 . 
     The coordinates (P,Q) of the first pixel may be determined on an edge of an image displayed on the screen. Here, a direction of the edge may be parallel with either an axial direction of P, for example, a vertical direction, or an axial direction of Q, for example, a horizontal direction, or may be in a direction other than parallel with either the axial direction of P or the axial direction of Q. 
     In operation  403 , a second pixel may be determined using coordinates including either P or Q. 
     When the direction of the edge of the image where the first pixel is located is parallel with either the axial direction of P or the axial direction of Q, a second pixel may be determined with coordinates including either P or Q. 
     Also, when the direction of the edge of the image where the first pixel is located is different in a direction other than parallel with either the axial direction of P or the axial direction of Q, a second pixel may be determined with coordinates including either P+m or Q+m, m being an integer. 
     Here, m may be selected so that any one of a second pixel with coordinates including P+m, and a second pixel with coordinates including Q+m is determined to be less than a half of 2N total pixels located on the screen. M corresponding to an absolute value of m may be less than N/2. 
     In operation  405 , a first block may be set including the first pixel, and a second block including the selected second pixel. 
     A predetermined size of the first block and the second block may be set. Here, the first block and the second block may have a same size. 
     In operation  407 , the the first pixel may be filtered by comparing the first block and the second block. 
     A weight may be calculated with respect to the second block by comparing the first block and the second block and the first pixel may be filtered based on the calculated weight and the second pixel. 
     A similarity may be calculated between the first block and the second block based on a pixel brightness difference between the first block and the second block and the weight may then be calculated based on the calculated similarity. Here, a difference may be calculated of brightness values between pixels existing at a same location of the first block and the second block, and a similarity between the first block and the second block may then be calculated by adding up the difference of the brightness value with respect to each of the pixels. 
     Consequently, the first pixel may be filtered by adjusting a brightness value of the first pixel using a value obtained by calculating the brightness value of the second pixel and the weight. 
     When a plurality of second blocks is set, a brightness value of the first pixel of the first block may be adjusted by multiplying a brightness value of a second pixel of each of the second blocks and a weight with respect to the second block, and an average of the brightness values obtained by multiplication may be calculated. 
     The apparatus and method for high speed filtering of the image for high precision may determine coordinates (P,Q) on a screen with respect to a first pixel to be filtered, may determine a second pixel with coordinates including either P or Q, then may filter the first pixel by comparing a first block including the first pixel, and a second block including the second pixel, thereby reducing a number of a second block to be compared with the first block to be less than a number of blocks corresponding to total pixels located on the screen, and reducing an amount of calculation when filtering the first pixel. 
     The apparatus and the method for high speed filtering of an image for high precision according to the above-described embodiments may be recorded in non-transitory computer-readable media including program instructions to implement various operations embodied by a computer. The media may also include, alone or in combination with the program instructions, data files, data structures, and the like. 
     Examples of program instructions include both machine code, such as produced by a compiler, and files containing higher level code that may be executed by the computer using an interpreter. The described hardware devices may be configured to act as one or more software modules in order to perform the operations of the above-described embodiments, or vice versa. Any one or more of the software modules described herein may be executed by a dedicated processor unique to that unit or by a processor common to one or more of the modules. The described methods may be executed on a general purpose computer or processor or may be executed on a particular machine such as the apparatus for high speed filtering of the image for high precision described herein. The apparatus for high speed filtering of the image for high precision may include at least one processor to control one or more of the processor-executable units. 
     Although embodiments have been shown and described, it would be appreciated by those skilled in the art that changes may be made in these embodiments without departing from the principles and spirit of the disclosure, the scope of which is defined by the claims and their equivalents.