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 - sergio

Pages: [1]

We use Docker containers as a core part of our workflow. We often deactivate an MS license on a container, and then reactivate on another container. But, what would happen if we activate a license on a container, and then remove it without deactivating the license first? Are we doomed? This would be a very complicated issue for our product.




In our application we are running Metashape tasks in a docker container.
I noticed that every time I stop and start the docker, I get a license error (wrong host for license), so I have to deactivate and reactivate it again. This is not a problem for testing, but it will be a problem when deploying our app. What's the best way of running a containerized application? Should I activate the license in the docker before running the application and then deactivate it after the application is done? I would prefer not to include the license number in the code. Also, if we use this option, we will not be able to run our tasks in parallel (license will be limited to one docker instance).

Any advice on this?


I am trying build a mesh from an imported pointcloud. I have correctly defined the bounding box so that the points are inside it (I have around 1million points). With any interpolation option, I get the "empty surface" error message. I've tried both using the GUI and by repeating this process on the python API, with no success...

Any help would be greatly appreciated.

Python and Java API / Proper workflow for depthmap replacement
« on: July 01, 2021, 04:18:02 AM »

In our application we want to use Metashape with depthmaps generated externally. So far our processing is the following:

1. We build our depthmaps in the "standard" way:


2. Then we change the depthmaps using:
Code: [Select]
for cam, our_depth_image in zip(cameras, our_depths):
    if cam in chunk.depth_maps.keys():
        ms_dm = chunk.depth_maps[cam]

        if replace_depth:

            byte_image = our_depth_image .tobytes()
            ms_image = ms_dm.image()
            ms_dm.setImage( ms_image.fromstring(
                w, h,

        print("Camera has notdepthmap")   

3. Finally, we build the model:

Code: [Select]
chunk.buildModel(surface_type=Metashape.Arbitrary, source_data=Metashape.DepthMapsData, interpolation=Metashape.EnabledInterpolation)
When the model is saved to .psz we see the depthmaps have been replaced correctly, however, the model does not have the expected results. I wonder if we are missing something in the process (e.g. depth scaling, or some other processing step that should be done in this kind of workflow)



Pages: [1]