Commit 0599595b authored by Kieran Hymas's avatar Kieran Hymas

Implemented edge detection and improved paintbrush tool

parent 12c36577
This diff is collapsed.
......@@ -31,6 +31,11 @@ class VideoStream:
pass
if ret:
frame = imutils.rotate_bound(frame, options['Rotate'] * 90)
if options['EdgeDetection'].get():
edges = cv2.Canny(frame, options['EdgeDetectionThresh1'].get(), options['EdgeDetectionThresh2'].get())
cnts = cv2.findContours(edges.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
cnts = imutils.grab_contours(cnts)
cv2.drawContours(frame, cnts, -1, tuple(options['EdgeDetectionColour']), options['EdgeDetectionThickness'].get())
return (ret, frame)
else:
return (ret, None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment