Forum

Author Topic: resize region (or generate BBox) to/from dense cloud extent?  (Read 1879 times)

andyroo

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
resize region (or generate BBox) to/from dense cloud extent?
« on: April 28, 2021, 04:56:40 AM »
I just reviewed all of the scripts I could find, and wasn't able to find any option to resize a region to a dense cloud that occupies only part of a sparse cloud extent. I also didn't find anything in the API. The closest I found was this post from January 2020 that was asking how to get a BBox from the extent of a dense_cloud object.

I am aligning multiple sets of images with different extents together to produce a single sparse cloud, then disabling each set iteratively to generate dense clouds with different extents for each set of images.

I want to use the python API to resize the region (or generate a bounding box) based on the extent of the dense cloud data, so that the resulting DEM doesn't have a bunch of nodata on the borders. I can't just manually specify the DEM BBox, since I don't know before generating the dense cloud what the data extent will be.

Thanks for any insight.

Andy

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: resize region (or generate BBox) to/from dense cloud extent?
« Reply #1 on: April 28, 2021, 04:02:15 PM »
Hello Andy,

in order to modify the reconstruction volume, you should use chunk.region (defined by region.center, region.size vectors and region.rot matrix). Note that it is defined in the internal chunk's coordinate system.

As for BBox - it is used for buildDem and buildOrthomosaic procedures and for export operations.

Unfortunately, there's no direct way to access dense cloud extents. As a workaround you can export dense cloud, import it to the empty chunk and call for resetRegion command, then you would need to re-calculate region parameters from one chunk to another.
Best regards,
Alexey Pasumansky,
Agisoft LLC