easyidp.metashape.apply_transform_matrix#

easyidp.metashape.apply_transform_matrix(points_xyz, matrix)#

Transforms a point or points in homogeneous coordinates. equal to Metashape.Matrix.mulp() or Metashape.Matrix.mulv()

Parameters:
  • matrix (np.ndarray) – 4x4 transform numpy array

  • points_df (np.ndarray) –

    For example:

    # 1x3 single point
    >>> np.array([1,2,3])
       x  y  z
    0  1  2  3
    
    # nx3 points
    >>> np.array([[1,2,3], [4,5,6], ...])
       x  y  z
    0  1  2  3
    1  4  5  6
    ...
    

Returns:

out – same size as input points_np:

   x  y  z
0  1  2  3
1  4  5  6

Return type:

pd.DataFrame