From 2b01dbe0fe16de73f537b1749746fd1735d2c751 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Mon, 25 Aug 2014 19:17:42 +0200 Subject: ! --- test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.py b/test.py index 4a5b87e..e046e07 100644 --- a/test.py +++ b/test.py @@ -85,7 +85,7 @@ while(cap.isOpened()): frame2= cv2.warpAffine(frame, mat2, (scr_width,scr_height) ) mask2 = cv2.warpAffine(mask, mat2, (scr_width,scr_height) ) ret, mask2 = cv2.threshold(mask2, 254, 255, cv2.THRESH_BINARY) - #mask2 = cv2.dilate(mask2, numpy.ones((3,3),numpy.uint8)) + mask2 = cv2.erode(mask2, numpy.ones((2,2),numpy.uint8)) # strip off the potentially-badlooking edges #screencontent = frame2 screencontent = cv2.bitwise_and(screencontent,screencontent, mask=cv2.bitwise_not(mask2)) screencontent = cv2.add(screencontent, cv2.bitwise_and(frame2,frame2,mask=mask2)) -- cgit v1.2.3