#-------------------------------------------------------------
#dynamic
Threshold setting for a blob-tool
#------------------------------------------------------------
#Find the
ROI intensity
i=GetValue('Sidelight.Intensity')
print
'Intensity=', i
#set new
max-Threshold
#new value
must be converted to an integer string since
#this is
the SPB format
if i>50:
t=int(i)-20
SetConfigValue('Sideprofile.Threshold.Max',t)
else:
SetConfigValue('Sideprofile.Threshold.Max',30)
print
'Threshold =', GetValue('Sideprofile.Threshold.Max')
|