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

Pages: [1]
1
Python and Java API / Correct use of selectMaskedPoints in python
« on: March 02, 2021, 09:16:21 PM »
Hi there,

I want to filter my dense point cloud with some masks (by file).

The entire workflow with adding masks before depth map & dense creation works, but I would like to create the dense cloud first.
As far as I understood, the process is to select points by mask and then export those.


I'm trying to use the method

Code: [Select]
Metashape.DenseCloud.selectMaskedPoints(camera, softness=4)

with camera being
Code: [Select]
camera = chunk.cameras
However, this gets me the following error:

Code: [Select]
TypeError: descriptor 'selectMaskedPoints' requires a 'Metashape.Metashape.DenseCloud' object but received a 'Metashape.Metashape.Camera'

Giving the argument of the dense cloud (object?) (chunk.dense_cloud) obviously returns
TypeError: selectMaskedPoints() missing required argument 'cameras' (pos 1)



Could you give me some pointers into the right direction?

Thanks!

Chris



2
Python and Java API / Import polygon on camera/image
« on: December 17, 2020, 06:44:20 PM »
Hi all,

I'm looking for an option to add a polygon to an image/camera in picture-pixel-"coordinates". (Not a shape file to the project/ortho)
Is that possible?

I've checked the Python API Documentation and only found the Mask import to a camera, but I believe that masks will work differently than adding a polygon to a picture, and thus to the project (ortho/point cloud).
If there are any pointers how I can deduct a polygon to the point cloud from an imported mask, let me know too.

Thanks a lot!
Just started out with Metashape regarding a research project.

Best,
Chris

Pages: [1]