Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Llama

Pages: [1]
1
Python and Java API / Chunk AlignCameras in 1.6
« on: February 28, 2020, 12:52:07 PM »
We are updating our python script to 1.6 using the change log to tell us what has been renamed (no deprecation warnings...) at the bottom of this resource: https://www.agisoft.com/pdf/metashape_python_api_1_6_1.pdf

Maybe I am blind, but I cannot see anywhere in the change log that mentions a new parameter 'reset_alignment' to Chunk.alignCameras. To make matters worse, this new parameter defaults to a value that changes the result of the function rather than a value which would keep the result consistent with 1.5.

2
Python and Java API / Camera orientation
« on: November 07, 2019, 05:38:32 PM »
I am trying to get the direction vector of my cameras in what I think is the internal coordinate system, to go on to detect cameras that aligned facing upwards. Here is my current attempt:

Code: [Select]
for camera in chunk.cameras:
    if camera.transform and camera.selected:
        print(camera.transform.mulv(Metashape.Vector([0,0,1])).normalized())

I would expect the result in my screenshot to have a large -Z component, and low X and Y components since this camera is pointing straight down. However, it has quite significant X and Y components. I suspect I'm missing something obvious here, but any help would be appreciated.

Pages: [1]