Forum

Author Topic: Import transformation matrix from CloudCompare  (Read 2124 times)

jnb

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Import transformation matrix from CloudCompare
« on: December 10, 2019, 09:19:00 PM »
Hello,

I am looking for a way to import a transformation matrix from CloudCompare (or Geomagic / 3dReshaper) into Metashape for an entire chunk.

Somebody have an idea ?

Thank you

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Import transformation matrix from CloudCompare
« Reply #1 on: December 15, 2019, 06:36:09 AM »
Hi jnb,

This should be possible with a custom python script.

See this example code which aligns/rotates the coordinate system to match the bounding box.
https://github.com/agisoft-llc/metashape-scripts/blob/master/src/coordinate_system_to_bounding_box.py

In a similar way you could rotate your coordinate system based on the transformation matrix values you get out of CloudCompare.

Regards,
SAV

jnb

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Import transformation matrix from CloudCompare
« Reply #2 on: December 15, 2019, 06:27:00 PM »
Hello,

Thank you for your answer. Python is indeed the way but my skills are alas too limited in this matter...

jnb

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Import transformation matrix from CloudCompare
« Reply #3 on: December 17, 2019, 03:50:03 PM »
By the way here is the kind of 4x4 matrix I get from CC.

0.9989238771179371 -0.0313060372092998 0.0342201659539925 -8403.3011118634076411
0.0083067630845548 0.8466571728972258 0.5320738945566998 -10010.7389053153965506
-0.0456298741037703 -0.5312170588525252 0.8460061175744220 -6650.4709921952662626
0.0000000000000000 0.0000000000000000 0.0000000000000000 1.0000000000000000


I guess I have to use "chunk.transform.matrix" but I don't get how...