Skip to content

Commit

Permalink
Merge pull request #28 from amanem1/main
Browse files Browse the repository at this point in the history
canny detection feature while video capture
  • Loading branch information
apekshamanchanda authored May 24, 2021
2 parents 73cd006 + 5d85491 commit 63c85ae
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ def warming_effect(self):

def edge_detection(self):
frame_status, frame = self.video.read()
#modify frame here

blur=cv2.gaussianBlur(frame,(5,5),0)
edges=cv2.Canny(blur,100,200)
cv2.imshow("canny detection",edges)



frame = cv2.resize(frame,None, fx = self.ds_factor, fy = self.ds_factor, interpolation = cv2.INTER_AREA)
ret, jpeg = cv2.imencode(".jpg", frame)
return jpeg.tobytes()
Expand Down Expand Up @@ -112,4 +115,4 @@ def black_and_white_sketch(self):
frame = cv2.resize(frame,None, fx = self.ds_factor, fy = self.ds_factor, interpolation = cv2.INTER_AREA)
ret, jpeg = cv2.imencode(".jpg", frame)
return jpeg.tobytes()

0 comments on commit 63c85ae

Please sign in to comment.