Forum

Author Topic: Python API to control Bounding Box  (Read 1559 times)

madhavm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Python API to control Bounding Box
« on: November 21, 2017, 08:36:35 PM »
Hey,

Is there any specific python API to control the bounding box, or region?
In the Python API Manual, the only relevant function I can find is resetRegion(), which will reset the region (bounding box) to its default state. Is there any way to have finer control over the bounding box?

I want to be able to export and import the Bounding Box. Is this supported in any manner?

Also, I tried modifying the parameters of doc.chunk.region but that did not change anything. However, I see that in various Agisoft scripts (http://wiki.agisoft.com/wiki/Split_in_chunks.py), doc.chunk.region is overridden completely by a new region.
Why is it that this is supported, while the parameter modification of a chunk's region is not allowed? Have I missed something?

Is overriding a chunk.region with a new region the only way to control the bounding box?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14110
    • View Profile
Re: Python API to control Bounding Box
« Reply #1 on: November 21, 2017, 09:08:25 PM »
Hello madhavm,

The bounding box region can be accessed via Python by chunk.region method.
It contains the information regarding the region center, it's size (as three component vector) and orientation (as 3x3 rotation matrix). Note that all these elements are defined in the internal chunk's coordinate system, so not in geographic coordinates and real world units.

What kind of modification is required?
Best regards,
Alexey Pasumansky,
Agisoft LLC