From 04256f6549594256b52ae40bca7f96a479b658cc Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Mon, 19 Sep 2016 17:02:05 +0200 Subject: [PATCH] Closedown --- script/test | 2 +- script/test.py | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/script/test b/script/test index ac96c6b..3c7835c 100644 --- a/script/test +++ b/script/test @@ -14,4 +14,4 @@ def detect_samples(ip): output_image = "outlines", minCirc = 0.9, maxCirc = 1.0) ip = load_array(img.getData().getMatrix()) -detect_sample() \ No newline at end of file +detect_samples(ip) \ No newline at end of file diff --git a/script/test.py b/script/test.py index 3c7835c..b0adec3 100644 --- a/script/test.py +++ b/script/test.py @@ -1,17 +1,24 @@ from ijutils import * import java.awt.Color as Color + +#ip = load_array(img.getData().getMatrix()) +#ip = load_array(img.getOutput()) +ip = load_image("{images}/test3.png", title="Image") -def detect_samples(ip): - aux = grayscale(ip, in_place=False) - invert(aux) - subtract_background(aux) - auto_threshold(aux) - binary_open(aux) - return analyse_particles(aux, 250,1000, +aux = grayscale(ip, in_place=False) +aux.show() + +convolve(aux, KERNEL_SOBEL); aux.repaintWindow() + +invert(aux); aux.repaintWindow() +subtract_background(aux); aux.repaintWindow() +auto_threshold(aux); aux.repaintWindow() +binary_open(aux); aux.repaintWindow() + +(table, image) = analyse_particles(aux, 250,1000, fill_holes = False, exclude_edges = True,print_table=True, output_image = "outlines", minCirc = 0.9, maxCirc = 1.0) - -ip = load_array(img.getData().getMatrix()) -detect_samples(ip) \ No newline at end of file + +image.show() \ No newline at end of file