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)