Hi all,
I am trying to develop a script to Export masks as in GUI:
- file type set to Single channel mask image;
- file name template set to {filename}mask.png;
- apply to All cameras;
- and set to C:\Users\paul.pelletier\Downloads\ASV_Demo4-5m-blurred\Out folder.
In Python reference, I can only find Tasks.ExportMasks.
for this I define:
task = Metashape.Tasks.ExportMasks()
and define the cameras to apply task to with:
task.cameras = [camera.key for camera in chunk.cameras]
and try to define path as:
task.path =’C:\Users\paul.pelletier\Downloads\ASV_Demo4-5m-blurred\Out\{filename}_mask.png’
but i get following error:
task.path =’C:\Users\paul.pelletier\Downloads\ASV_Demo4-5m-blurred\Out\{filename}_mask.png’
^
SyntaxError: invalid character in identifier
and where do I define file type^?
Please help as I am lost....