From 4fb576320ac3450c13c22fde6c92dfac354dda97 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Wed, 5 Jul 2017 14:35:52 +0200 Subject: [PATCH] Script execution --- script/imgproc/LedDetectionProc.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/script/imgproc/LedDetectionProc.py b/script/imgproc/LedDetectionProc.py index d689afb..91e786d 100644 --- a/script/imgproc/LedDetectionProc.py +++ b/script/imgproc/LedDetectionProc.py @@ -8,7 +8,9 @@ number_frames = 5 number_backgrounds = 5 minimum_size = 150 maximum_size = 1000 -min_circ = 0.8 +min_circ = 0.2 +threshold_method = "MaxEntropy" if room_temp else "Default" +exclude_edges = True set_led_range(room_temp) @@ -42,10 +44,10 @@ renderer.clearOverlays() invert(image) -auto_threshold(image, method = "MaxEntropy" if room_temp else "Default") #Tested ok: MaxEntropy, Triangle, Yen +auto_threshold(image, method = threshold_method) #Tested ok: MaxEntropy, Triangle, Yen #binary_open(aux) (r,output) = analyse_particles(image, minimum_size,maximum_size, - fill_holes = True, exclude_edges = False, print_table=False, + fill_holes = True, exclude_edges = exclude_edges, print_table=False, output_image = "outlines", minCirc = min_circ , maxCirc = 1.0)