Forum

Author Topic: KeyError for cams in thinned sparse point cloud  (Read 1223 times)

tkwasnitschka

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
KeyError for cams in thinned sparse point cloud
« on: December 13, 2019, 02:04:37 PM »
Hi,
I want to export the per-camera uv coordinates of a heavily thinned sparse point cloud with the script provided in this thread https://www.agisoft.com/forum/index.php?topic=10730.0.

As soon as the script hits a camera that does not contain any projections due to cloud thinning, I get a key error:

Code: [Select]
projections[chunk.cameras[2]]
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-31-d4c1239ec97f> in <module>()
----> 1 projections[chunk.cameras[2]]

KeyError: <Camera '20160325_154525_IMG_102768.JPG'>

How can let the loop ignore those cameras? I dont understand how to grab the cameras with anything else but "projections".

EDIT:
two more observations:
1. the GUI Reference pane still lists projections even it there are no points at all left on the image
2. Decimating by quality makes sense, but it creates the situation where some images do not have projections left at all. How do I decimate the sparse pointcloud by spatial subsampling? I actually just want to subsample "a point per area" of the cloud.
« Last Edit: December 13, 2019, 03:09:55 PM by tkwasnitschka »