Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: mankoff on April 26, 2016, 06:57:39 PM
-
Hi,
I can add photos to a chunk with chunk.addPhotos(file_list). Is there a way to add images to a group? The group is created with group = chunk.addCameraGroup().
-
Hello mankoff,
You can use the following code as a reference:
group = chunk.addCameraGroup()
camera = chunk.cameras[0]
camera.group = group
If you need to "ungroup" the camera, then pass None to camera.group.
-
camera = chunk.cameras[0]
results in IndexError: list index out of range
-
Nevermind, I figured it out. To move the last photo into a group that has been created, I do the following.
group = chunk.addCameraGroup()
for img in image_list:
chunk.addPhotos([img])
camera = chunk.cameras[-1]
camera.group = group