Patent ID: 11887254
Assignee: CHONGQING SURVEY INSTITUTE
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 18:
19. A method for correcting space coordinates of a three-dimensional model, comprising:
step S1, reading information of an original coordinate frame of a three-dimensional model in a first format produced based on a reality modeling system and the origin of coordinates of the model; reading information of nodes from three-dimensional model data in the first format, and calculating original coordinates of the nodes;
step S2, calculating parameters of correction between the original coordinate frame and a target coordinate frame based on space coordinates of four or more control points in the original coordinate frame in the first format and corresponding space coordinates of the four or more control points in the target coordinate frame in a second format, and constructing a space coordinate correction matrix, wherein the control points are noncoplanar arbitrary points in regions of the three-dimensional model;
step S3, transforming and correcting the coordinates of the origin and nodes of the three-dimensional model in the first format one by one by using the space coordinate correction matrix to obtain information of coordinate points of the three-dimensional model in the second format; and
step S4, storing a file of the three-dimensional model in the second format with corrected space coordinates;
wherein step S2 further comprises the following steps to calculate the parameters of correction between the original coordinate frame in the first format and the target coordinate frame and construct the space coordinate correction matrix:
step S21, obtaining the space coordinates of the four or more control points in the regions of the three-dimensional model in the original coordinate frame in the first format and the space coordinates of the control points in the target coordinate frame in the second format, and establishing a mathematical model for correction between the original coordinate frame and the target coordinate frame;
step S22, inputting the obtained space coordinates of the control points in the original coordinate frame and in the target coordinate frame into the mathematical model for correction to calculate the parameters of correction; and
step S23, constructing the space coordinate correction matrix with the parameters of correction calculated in step S22;
wherein the mathematical model for correction established in step S21 is shown below: the mathematical model for correction between the original coordinate frame and the target coordinate frame is established in the form of a seven-parameter model shown in formula (1); a general form of the mathematical model for correction is as shown in formula (2); seven parameters are introduced into the model, including three translation parameters X0, Y0 and Z0 that denote coordinate differences between the origins of coordinates of two space coordinate frames, three rotation parameters εx, εy and εz that are used for orderly rotating three coordinate axes such that X-, Y- and Z-axes of two space rectangular coordinate frames coincide, and one scale parameter m that denotes a ratio of lengths of a same straight line segment in two space coordinate frames to allow scale transformation;, [
      
       
        
         
          X
          2
         
        
       
       
        
         
          Y
          2
         
        
       
       
        
         
          Z
          2
         
        
       
      
      ]
     
     =
     
      
       
        (
        
         1
         +
         m
        
        )
       
       [
       
        
         
          
           X
           1
          
         
        
        
         
          
           Y
           1
          
         
        
        
         
          
           Z
           1
          
         
        
       
       ]
      
      +
      
       
        [
        
         
          
           0
          
          
           
            ε
            Z
           
          
          
           
            -
            
             ε
             Y
            
           
          
         
         
          
           
            -
            
             ε
             Z
            
           
          
          
           0
          
          
           
            ε
            X
           
          
         
         
          
           
            ε
            Y
           
          
          
           
            -
            
             ε
             X
            
           
          
          
           0
          
         
        
        ]
       
       [
       
        
         
          
           X
           1
          
         
        
        
         
          
           Y
           1
          
         
        
        
         
          
           Z
           1
          
         
        
       
       ]
      
      +
      
       [
       
        
         
          
           X
           0
          
         
        
        
         
          
           Y
           0
          
         
        
        
         
          
           Z
           0
          
         
        
       
       ]
      
     
    
   
   
    
     (
     1
     )
    
   
  
 

wherein X1, Y1 and Z1 denote the space coordinates in the original coordinate frame in the first format, and X2, Y2 and Z2 denote the space coordinates in the target coordinate frame in the second format; and the general form is as follows:, X
           2
          
          =
          
           
            X
            0
           
           +
           
            
             (
             
              1
              +
              m
             
             )
            
            ⁢
            
             X
             1
            
           
           +
           
            
             ε
             Z
            
            ⁢
            
             Y
             1
            
           
           -
           
            
             ε
             Y
            
            ⁢
            
             Z
             1
            
           
          
         
        
       
       
        
         
          
           Y
           2
          
          =
          
           
            Y
            0
           
           +
           
            
             (
             
              1
              +
              m
             
             )
            
            ⁢
            
             Y
             1
            
           
           -
           
            
             ε
             Z
            
            ⁢
            
             X
             1
            
           
           +
           
            
             ε
             X
            
            ⁢
            
             Z
             1
            
           
          
         
        
       
       
        
         
          
           Z
           2
          
          =
          
           
            Z
            0
           
           +
           
            
             (
             
              1
              +
              m
             
             )
            
            ⁢
            
             Z
             1
            
           
           +
           
            
             ε
             Y
            
            ⁢
            
             X
             1
            
           
           -
           
            
             ε
             X
            
            ⁢
            
             Y
             1
            
           
          
         
        
       
      
      }
     
     .
    
   
   
    
     (
     2
     )