Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: sergio on July 11, 2022, 02:44:18 PM

Title: Depthmaps are null after BuildDepthmaps
Post by: sergio on July 11, 2022, 02:44:18 PM

In our application we copy a chunk into another chunk, modify its poses, and then build the model on both. However, on the second chunk depthmaps appear to be null (but the model is built correctly on the original chunk). Why does this happen?

Code: [Select]

if chunk.depth_maps is None:
        print("Chunk has no depthmaps, computing with default values downscale=2, filter_mode=Metashape.AggressiveFiltering ")
        chunk.buildDepthMaps(downscale=2, filter_mode=Metashape.AggressiveFiltering)
        doc.save()

    chunk.buildModel(surface_type=Metashape.Arbitrary, source_data=Metashape.DepthMapsData, interpolation=Metashape.EnabledInterpolation)
   


Title: Re: Depthmaps are null after BuildDepthmaps
Post by: sergio on July 12, 2022, 05:57:29 AM
My mistake. I modified the poses, but not other objects (tie points, etc). Solution was to set the chunk's transform.