Forum

Author Topic: Dense cloud coordinates after rotating Camera positions  (Read 2074 times)

vik748

  • Newbie
  • *
  • Posts: 13
    • View Profile
Dense cloud coordinates after rotating Camera positions
« on: April 02, 2020, 11:43:14 PM »
Hi,
I have a set of images without any reference, so when I align them in Metashape, I end up with cameras with arbitrary coordinate system. Now, I know that these cameras are on a flat plane (XY plane) so I fit a plane to the calculated camera positions and then rotate them.  Then, I am able to use the triangulate points functions to generate the tie points / sparse cloud. When I export the sparse cloud it is in the expected coordinate frame and everything makes sense. However, when I generate the dense cloud and export it, it is still in the original arbitrary coordinate system.  So what I am doing incorrectly and how can I fix this.
Here are the steps to reproduce:
1. Load a set of images without any reference data.
2. Align images and get an accurate alignment solution.
3. Fit a plane P to the aligned images
4. Rotate the plane to make it parallel to XY plane
5. Calculate new camera poses T_new
6. Set the new poses to camera using  cam.transform = Metashape.Matrix(T_new)
7. Calculate all the tiepoints using Metashape,app.document.chunk.triangulatePoints(max_error = 1.0)
8. Export sparse cloud and check in cloud compare -> Everything makes sense.
9. Build dense cloud
10. Export dense cloud and check in cloud compare -> Incorrect coordinate system.

How do I get the dense cloud onto the new coordinate system?

Thanks in advance.
Vik