From 1b40093c56bac7326594e0601bedb6facbe6778c Mon Sep 17 00:00:00 2001 From: sfop Date: Thu, 18 Aug 2016 16:20:04 +0200 Subject: [PATCH] Script execution --- script/ImageStats.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/ImageStats.py b/script/ImageStats.py index 1b381d8..8116625 100644 --- a/script/ImageStats.py +++ b/script/ImageStats.py @@ -5,11 +5,11 @@ import ch.psi.pshell.imaging.Pen as Pen def wait_next(): camera.waitNext(250) -def get_centroid(): - bi = image.getImage() - op = show_panel(bi, "Original") +def get_centroid(source): + bi = source.getImage() if bi is None: return None + op = show_panel(bi, "Original") ip = load_image(bi) grayscale(ip) invert(ip) @@ -29,5 +29,5 @@ def get_centroid(): return centroid -get_centroid() +get_centroid(image)