Hi,
I'm reaching out to suggest a potential addition to the Metashape API that I believe could benefit many users. While the current API offers great flexibility, including enabling/disabling cameras (enabled) and selecting/deselecting them (selected), it seems there's no direct way to programmatically "uncheck" images for processing based on specific criteria (e.g., location accuracy).
Many of us automate workflows where pre-selecting images based on metadata or quality metrics is crucial before proceeding to resource-intensive processing steps. For instance, being able to automatically uncheck images with location accuracy below a certain threshold could save significant time and enhance the quality of project outputs.
Could we consider adding a method to the API to control the "check" state of images in the Reference Panel or before processing? This feature would provide even greater control over automated workflows and potentially improve processing efficiency and outcomes.
import Metashape
doc = Metashape.app.document
chunk = doc.chunks[0]
for camera in chunk.cameras:
# Checks if the camera has a defined reference and location accuracy
if camera.reference and camera.reference.location_accuracy:
accuracy = max(camera.reference.location_accuracy.x, camera.reference.location_accuracy.y,camera.reference.location_accuracy.z)
print(f"Camera {camera.label}: Accuracy = {accuracy}") # Prints the accuracy
if accuracy > 9:
camera.selected = False
print(f"Camera {camera.label} unselected due to high accuracy.") # Print the action
Best,