summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2014-08-25 19:16:30 +0200
committerFlorian Jung <flo@windfisch.org>2014-08-25 19:16:30 +0200
commit361c8e5837accebd4fd61676fb19e5ecf2c2f998 (patch)
treef10c3e32fc727cd216fb46302145a44da0fee58f
parent28f80ffc4458a02be4d3de2549e4769cc12e1801 (diff)
panorama gut
-rw-r--r--test.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test.py b/test.py
index 3e33792..4a5b87e 100644
--- a/test.py
+++ b/test.py
@@ -30,7 +30,7 @@ mask = numpy.ones((height,width, 1), numpy.uint8) * 255
screencontent = numpy.zeros((scr_height, scr_width,3), numpy.uint8)
total_angle=0.
-total_x=0
+total_x=1500
total_y=0
while(cap.isOpened()):
@@ -84,10 +84,11 @@ while(cap.isOpened()):
# mat2=numpy.array([[cos(total_angle), sin(total_angle), total_x], [-sin(total_angle),cos(total_angle),total_y]])
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))
#screencontent = frame2
screencontent = cv2.bitwise_and(screencontent,screencontent, mask=cv2.bitwise_not(mask2))
- screencontent = cv2.add(screencontent, frame2)
+ screencontent = cv2.add(screencontent, cv2.bitwise_and(frame2,frame2,mask=mask2))
#screencontent = frame2
#screencontent = mask2