Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: lenamat on March 24, 2016, 04:42:53 PM

Title: reset region vertically
Post by: lenamat on March 24, 2016, 04:42:53 PM
Hi,

I noticed that in Version 1.2.0 build 2198 the function resetRegion() was modified so that it aligns the region vertically too. This is a functionnality I have been trying to code on my own (using transformation matrices), but I didn't succeed!... Could you please explain how you achieve this particular alignement of the Z axes between the region and the chunk's coordinate system ?

Many thanks!
Title: Re: reset region vertically
Post by: Alexey Pasumansky on March 24, 2016, 04:58:55 PM
Hello lenamat,

PhotoScan aligns bounding box with the coordinate system vertically only for referenced projects.

Maybe the following script would be useful for you as a reference:
http://wiki.agisoft.com/wiki/Bounding_Box_to_Coordinate_System.py
Title: Re: reset region vertically
Post by: lenamat on March 24, 2016, 05:12:53 PM
Thanks Alexey,

I have already taken a look a that script, but my problem is that I don't want to align the X and Y axes of the region with the X and Y axes of the coordinate system. I only want to align the region vertically while keeping the orientation of the XY plane around the Z axis. I have tried tweaking the script you mentionned but I never could achieve my goal (I am not used to dealing with 3D rotation matrices) ! :)
Title: Re: reset region vertically
Post by: chitty1989 on June 17, 2022, 10:55:39 AM
Hi is there a basic script to run resetRegion()?