Hi everyone
I'm trying to load a subset of images in a folder into photoscan (DSC_1700.tiff - DSC_1750.tiff), and then apply a different mask to each image (DSC_1700_mask.png - DSC_1750_mask.png). The addPhotos line in the loop works, and the images are loaded. But the importMasks line is not working (I think every time importMask is called, it's applying that mask to all of the photos that are currently read in). Is there a way to specify the image to be masked? Or another way to loop through a subset of photos and apply an individual mask to each?
Thanks!
#!/usr/bin/python
# python script for photoscan
# reads in and masks specified photos (startphoto through endphoto)
import PhotoScan
doc = PhotoScan.app.document
chunk = PhotoScan.app.document.addChunk()
# loop to read in photos
startphoto=1700
endphoto=1750
for x in range(startphoto, endphoto + 1):
chunk.addPhotos(['/Volumes/arc_01/FIELD_DATA/SFM/EOSS/PHOTOS_EOSS_20160330/106D800E/TIFF/DSC_%s.tiff' % x])
chunk.importMasks(path='/Volumes/arc_01/FIELD_DATA/SFM/EOSS/PHOTOS_EOSS_20160330/106D800E/TIFF/DSC_%s_mask.png' % x,method='file',operation='union',tolerance=10)