Skip to Main Content
Created by Oto Lukss
Created on Mar 16, 2023

[Python SDK] PickPoint function suggestion

Looking for similar to Agisoft pickPoint python methods which finds nearest point on AT points, point cloud or mesh surface. New CC PixelToRay/point3dToPixel functions seems similar to Agisoft unproject function not to pickPoint. This new function could work together with PixelToRay/point3dToPixel to get accurate point on surface with removing photo distortion.


Metashape Python Reference
pickPoint
(origin, target, endpoints=1)Returns ray intersection with the point cloud (point on the ray nearest to some point).Parameters

  • origin (Vector) – Ray origin.

  • target (Vector) – Point on the ray.

  • Endpoints (int) – Number of endpoints to check for (0 - line, 1 - ray, 2 - segment).

Returns Coordinates of the intersection point.