Forum

Author Topic: How to know and use the transform information of imported dense cloud?  (Read 2848 times)

alexsagao

  • Newbie
  • *
  • Posts: 1
    • View Profile
I have processed some images with reference informations (latitude, longitude and altitude). And next I imported lidar points (named as 1.ply) in local coordinate. So in the project file, there exits the transform matrix of this dense cloud. When I export this dense cloud as "2.ply" in local coordinate. I found there is a translation between "1.ply" and "2.ply". I try to calculate the translation. Bun I failed.

The code is as follows:

In the internal system of chunk, I define the origin point as
origin = Metashape.Vector( (0.0, 0.0, 0.0) )
and Of course, the LES coordinate of this point is also (0.0, 0.0, 0.0)

Firstly, I try to transform this point from chunk internal system to geocentric coordinate system, and to the geographic coordinate system

chunk_originGeogr = chunk1.crs.project(chunk1.transform.matrix.mulp(origin))

Secondly, in the densecloud, I try to transform the geographic coordinates from the geographic coordinate system to geocentric coordinate system, and to the LES coordinate system

origin_LSE_densecloud = chunk1.dense_cloud.transform.inv().mulp(chunk1.dense_cloud.crs.unproject(chunk_originGeogr))

Finally, I think the coordinate difference of "origin_LSE_densecloud" and "origin" is the translation. But I failed, can anyone help me?