Startup
This commit is contained in:
18
script/LedDetectionFilter.py
Normal file
18
script/LedDetectionFilter.py
Normal file
@@ -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())
|
||||
Reference in New Issue
Block a user