Problem with videocapture and imshow after upgrading to opencv3
Hi everoyne,
I've been stuck with a problem concerning videocapture/imshow. The output image always is squared with part of the image attached on the right. Problem occurs since upgrading to opencv3.0.0 beta. Does anyone have a hint? Help is appreciated.
import os
import cv2
ordner = os.listdir(os.getcwd())
count = len(ordner) + 1
cap = cv2.VideoCapture(0)
h = cv2.CAP_PROP_FRAME_HEIGHT
w = cv2.CAP_PROP_FRAME_WIDTH
print h, w
nuname = "bild_" + str(count) + ".png"
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
if not ret :
continue
bunt = cv2.cvtColor(frame, 1)
#bunt = cv2.resize(bunt, (640,480))
cv2.imshow('bild',bunt)
if cv2.waitKey(1) & 0xFF == ord('q'):
cv2.imwrite(nuname, bunt)
print(nuname)
cap.release()
cv2.destroyAllWindows()
break
please add your os to the question.
(can't reproduce on win)
Thank you, berak. os is windows 8.1 (64)