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 - Raj Calisa

Pages: [1]
1
Python and Java API / Shape.vertices attribute removed
« on: July 04, 2022, 07:46:30 AM »
Hi all,

When I upgraded to Metashape 1.8.x, I noticed that my python code had errors. In particular, the vertices attribute of a shape object is not supported any more.

What is the alternative?

Regards,

Raj.

2
Python and Java API / Measure size of objects
« on: March 23, 2021, 09:09:26 AM »
Hi all,


I am new to metashape and I am using the Python API to automate creation of model from drone footage. I also detect features in the photos as polygons and map them to the mesh/point cloud as shapes. These then appear in the model when viewing or I can export it.

I wanted to know what the units are of the 3D coordinates of the shapes. Typically I convert a 2D pixel on the photo to a 3D point as follows:
    T = chunk.transform.matrix
    vertices_3d = list()
    for x, y in poly:
        ray_origin = camera.unproject(Metashape.Vector([x, y, 0]))
        ray_target = camera.unproject(Metashape.Vector([x, y, 1]))
        pt = surface.pickPoint(ray_origin, ray_target)
        if pt is not None:
            vertex = chunk.crs.project(T.mulp(pt))
            vertices_3d.append(vertex)


Ideally I want to measure the lengths of the sides of the polygons by ignoring the Z coordinate. Firstly I want to understand the units for these coordinates. Is it possible to specify something in the creation process where the units can be in metres?

Thanks.

Raj

3
Python and Java API / Polygons automatically appearing in overlapping views
« on: February 11, 2021, 04:34:23 AM »
Hi all,

I use metashape to construct a 3D model from drone footage. Within the footage, I programmatically mark up polygons representing areas of interest. These automatically appear in overlapping views. Is there a way to suppress this. Ideally I want 1 shape to represent a feature regardless of the view that it appears in.

Regards,

Raj.

4
Python and Java API / Setting shape layer properties programmatically
« on: February 11, 2021, 04:23:54 AM »
Hi all,

Is there a way to set properties like line style, fill style and transparency programmatically using Python API.

I am able to set the colour as a tuple of 3 numbers but there seems to be no way of setting others.

Regards,

Raj

5
Python and Java API / Mapping from regions in photos to point cloud
« on: January 29, 2021, 11:13:16 AM »
Hi all,

I am new to Metashape. I am working with drone imagery and creating a point cloud and mesh model using metashape from the drone imagery. Ultimately, I export to "oc3" or "obj" file and view it in the Agisoft viewer.

In addition, I also perform object detection in the captured scenery. For instance, I detect a man-made object such as a storm water drain and I can visualize it using a bounding box in the photo. I would like to use this detected object coordinates within the photo and map it to the point cloud so that one or more such objects can be annotated and visualized within metashape. Is there a way to acheieve this via Python scripting or the GUI.
Another way I am considering is to colour the points the point cloud which correspond to the detected object in a specific photo. Note that the same object can be in many photos since there is a lot of overlap between photos.

Any help or pointers would be useful.

Thanks.

Raj.

Pages: [1]