From 90bdf144d399d45e9a918404825ed164f1963c58 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Wed, 21 Jun 2017 16:56:28 +0200 Subject: [PATCH] Startup --- script/LedDetectionFilter.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 script/LedDetectionFilter.py diff --git a/script/LedDetectionFilter.py b/script/LedDetectionFilter.py new file mode 100644 index 0000000..81dcbd7 --- /dev/null +++ b/script/LedDetectionFilter.py @@ -0,0 +1,18 @@ +run ("LedDetection") + + +ip = None + +class MyFilter(Filter): + def process(self, image, data): + global roi_center, roi_radius, ip + ip = load_image(image) + (results,output) = detect_led(ip) + if output is not None: + invert(output) + output = pad_image(output, roi[0], 0,roi[1], 0) + op_image(ip, output, "xor") + return ip.getBufferedImage() + +#Setting the filter to a source +img.setFilter(MyFilter()) \ No newline at end of file