Script execution
This commit is contained in:
@@ -79,7 +79,7 @@ class MyFilter(Filter):
|
||||
"""
|
||||
|
||||
def in_roi(x,y):
|
||||
return math.hypot(x-roi_radius, y-roi_radius) < roi_radius
|
||||
return math.hypot(x-roi_center[0], y-roi_center[1]) < roi_radius
|
||||
|
||||
|
||||
def integrate (ips):
|
||||
@@ -134,17 +134,19 @@ def detect_led(ip):
|
||||
print >> sys.stderr, r.getRowAsString(row)
|
||||
"""
|
||||
points = ""
|
||||
npoints = 0
|
||||
for row in range (r.counter):
|
||||
points = points + " (" + str(int(r.getValue("XM", row))) + ", " + str(int(r.getValue("YM", row))) + ")"
|
||||
if in_roi(r.getValue("XM",row), r.getValue("YM",row)):
|
||||
points = points + " (" + str(int(r.getValue("XM", row))) + ", " + str(int(r.getValue("YM", row))) + ")"
|
||||
npoints = npoints + 1
|
||||
print str(r.counter) + " - " + points
|
||||
|
||||
last_ret = (results,output)
|
||||
if not integration_continuous:
|
||||
frames = []
|
||||
|
||||
#if r.counter==10:
|
||||
# save_image(output, "{images}/" + str(datetime.datetime.now())+".png", "png")
|
||||
# output.
|
||||
if npoints!=10:
|
||||
save_image(output, "{images}/" + str(datetime.datetime.now().strftime("%Y%m%d_%H%M%S"))+".png", "png")
|
||||
#return (results,aux)
|
||||
return (results,output)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user