Patent ID: 11922643
Assignee: nan
Field: Audio-visual technology (Electrical engineering)
Classification: CPC G  H | IPC G  H

Claim 5:
6. The method for intelligently measuring vehicle speed based on the binocular stereo vision system according to claim 1, wherein the feature-based matching algorithm is a SURF feature extracting and matching algorithm, local features of the video frames are described by SURF descriptors, the homography matrix describes a relationship between two images of the same object taken in different views, assuming that a relationship of the two images is perspective transformation, then a homography matrix H is:, H
   =
   
    [
    
     
      
       
        h
        11
       
      
      
       
        h
        12
       
      
      
       
        h
        13
       
      
     
     
      
       
        h
        21
       
      
      
       
        h
        22
       
      
      
       
        h
        23
       
      
     
     
      
       
        h
        31
       
      
      
       
        h
        32
       
      
      
       1
      
     
    
    ]
   
  
  ;, then, [
   
    
     
      
       x
       ′
      
     
    
    
     
      
       y
       ′
      
     
    
    
     
      1
     
    
   
   ]
  
  =
  
   
    [
    
     
      
       
        h
        
         1
         ⁢
         1
        
       
      
      
       
        h
        
         1
         ⁢
         2
        
       
      
      
       
        h
        
         1
         ⁢
         3
        
       
      
     
     
      
       
        h
        
         2
         ⁢
         1
        
       
      
      
       
        h
        
         2
         ⁢
         2
        
       
      
      
       
        h
        
         2
         ⁢
         3
        
       
      
     
     
      
       
        h
        
         3
         ⁢
         1
        
       
      
      
       
        h
        
         3
         ⁢
         2
        
       
      
      
       1
      
     
    
    ]
   
   [
   
    
     
      x
     
    
    
     
      y
     
    
    
     
      1
     
    
   
   ], wherein x′, y′, 1 and x, y, 1 represent the coordinates of the two corresponding points before and after the perspective transformation respectively, and h11-32 are transformation parameters to be calculate,
to calculate the eight transformation parameters h11-32 in the homography matrix H, at least four pairs of matching points are needed, a process with four pairs of matching points is as follows:, [
     
      
       
        
         
          x
          1
         
         ,
         
          y
          1
         
         ,
         1
         ,
         0
         ,
         0
         ,
         
          0
          -
          
           
            x
            1
            ′
           
           ⁢
           
            x
            1
           
          
         
         ,
         
          
           x
           1
           ′
          
          ⁢
          
           y
           1
          
         
        
       
      
      
       
        
         0
         ,
         0
         ,
         0
         ,
         
          x
          1
         
         ,
         
          y
          1
         
         ,
         1
         ,
         
          
           -
           
            y
            1
            ′
           
          
          ⁢
          
           x
           1
          
         
         ,
         
          
           y
           1
           ′
          
          ⁢
          
           y
           1
          
         
        
       
      
      
       
        
         
          x
          2
         
         ,
         
          y
          2
         
         ,
         1
         ,
         0
         ,
         0
         ,
         
          0
          -
          
           
            x
            2
            ′
           
           ⁢
           
            x
            2
           
          
         
         ,
         
          
           x
           2
           ′
          
          ⁢
          
           y
           2
          
         
        
       
      
      
       
        
         0
         ,
         0
         ,
         0
         ,
         
          x
          2
         
         ,
         
          y
          2
         
         ,
         1
         ,
         
          
           -
           
            y
            2
            ′
           
          
          ⁢
          
           x
           2
          
         
         ,
         
          
           y
           2
           ′
          
          ⁢
          
           y
           2
          
         
        
       
      
      
       
        
         
          x
          3
         
         ,
         
          y
          3
         
         ,
         1
         ,
         0
         ,
         0
         ,
         
          0
          -
          
           
            x
            3
            ′
           
           ⁢
           
            x
            3
           
          
         
         ,
         
          
           x
           3
           ′
          
          ⁢
          
           y
           3
          
         
        
       
      
      
       
        
         0
         ,
         0
         ,
         0
         ,
         
          x
          3
         
         ,
         
          y
          3
         
         ,
         1
         ,
         
          
           -
           
            y
            3
            ′
           
          
          ⁢
          
           x
           3
          
         
         ,
         
          
           y
           3
           ′
          
          ⁢
          
           y
           3
          
         
        
       
      
      
       
        
         
          x
          4
         
         ,
         
          y
          4
         
         ,
         1
         ,
         0
         ,
         0
         ,
         
          0
          -
          
           
            x
            4
            ′
           
           ⁢
           
            x
            4
           
          
         
         ,
         
          
           x
           4
           ′
          
          ⁢
          
           y
           4
          
         
        
       
      
      
       
        
         0
         ,
         0
         ,
         0
         ,
         
          x
          4
         
         ,
         
          y
          4
         
         ,
         1
         ,
         
          
           -
           
            y
            4
            ′
           
          
          ⁢
          
           x
           4
          
         
         ,
         
          
           y
           4
           ′
          
          ⁢
          
           y
           4
          
         
        
       
      
     
     ]
    
    [
    
     
      
       
        h
        11
       
      
     
     
      
       
        h
        12
       
      
     
     
      
       
        h
        13
       
      
     
     
      
       
        h
        21
       
      
     
     
      
       
        h
        22
       
      
     
     
      
       
        h
        23
       
      
     
     
      
       
        h
        31
       
      
     
     
      
       
        h
        32
       
      
     
    
    ]
   
   =
   
    [
    
     
      
       
        x
        1
        ′
       
      
     
     
      
       
        y
        1
        ′
       
      
     
     
      
       
        x
        2
        ′
       
      
     
     
      
       
        y
        2
        ′
       
      
     
     
      
       
        x
        3
        ′
       
      
     
     
      
       
        y
        3
        ′
       
      
     
     
      
       
        x
        4
        ′
       
      
     
     
      
       
        y
        4
        ′
       
      
     
    
    ]
   
  
  ;
 

each time, four pairs of matching points are selected from all the matching points to calculate the homography matrix H, where coordinates of the two corresponding points before and after the perspective transformation of the four pairs of matching points are x′1, y′1, 1 and x1, y1, 1; x′2, y′2, 1 and x2, y2, 1; x′3, y′3, 1 and x3, y3, 1; are x′4, y′4, 1 and x4, y4, 1; and; then the homography matrix H with the maximum number of accurate matching points is selected as a correct result, in order to check an accuracy of the matrix H, the Euclidean distance between the corresponding matching points after the perspective transformation is calculated:, 
   
    
     [
     
      
       
        
         x
         
          i
          ⁢
          1
         
         ′
        
       
      
      
       
        
         y
         
          i
          ⁢
          1
         
         ′
        
       
      
      
       
        1
       
      
     
     ]
    
    -
    
     H
     [
     
      
       
        
         x
         
          i
          ⁢
          1
         
        
       
      
      
       
        
         y
         
          i
          ⁢
          1
         
        
       
      
      
       
        1
       
      
     
     ]
    
   
   
  
  ≤
  t, wherein x′i1, y′i1, 1 and xi1, yi1, 1 are the coordinates of the matching points before and after the perspective transformation, t is the Euclidean distance threshold, and i1=1,2,3,4, the smaller the Euclidean distance, the higher a matching accuracy of two matching points.