Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: Bolli on June 21, 2022, 08:11:32 PM
-
Hi all,
I'm trying to work in a detectMarkers into a batch process via python. I'm using Metashape 1.8.3 and the 1.8.3 python api guide. I've basically copied this line of code from the api guide and the target type CircularTarget12bit is coming up as undefined ("NameError: name 'CircularTarget12bit' is not defined"). Is there another target type to represent the 12 bit Circular targets that I'm missing?
import Metashape
import os, sys
import time, datetime
import math
import json
#Define which document
doc = Metashape.app.document
doc.open(export_path + '/' + proj_name + '.psx')
#Define which chunk
chunk = Metashape.app.document.chunk
#Detect markers
chunk.detectMarkers(target_type = CircularTarget12bit,
tolerance = 50,
filter_mask = False,
inverted = False,
noparity=False)
doc.save()
Thanks for any and all advice!
Bolli
-
Hello Bolli,
Try to replace CircularTarget12bit with Metashape.CircularTarget12bit
-
That replacement worked. Thanks Alexey
-
Very good,
whenever a parameter refers to a Metashape Class than in API the parameter should be prepended by Metashape.