Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

frame = cv2.VideoCapture.read(capture) AttributeError: 'builtin_function_or_method' object has no attribute 'read'

am trying to capture video from my web cam and display it on my screen my code is import cv2 import numpy as np from matplotlib import pyplot as plt

capture = cv2.VideoCapture(0) def repeat(): if(capture): frame = cv2.VideoCapture.read(capture) cv2.imshow("w1",frame) while True: repeat()

am getting this error frame = cv2.VideoCapture.read(capture) AttributeError: 'builtin_function_or_method' object has no attribute 'read'

click to hide/show revision 2
the "10101" button, it's your friend ;)

updated 2013-07-01 08:39:27 -0600

berak gravatar image

frame = cv2.VideoCapture.read(capture) AttributeError: 'builtin_function_or_method' object has no attribute 'read'

am trying to capture video from my web cam and display it on my screen my code is is

import cv2
import numpy as np
from matplotlib import pyplot as plt

plt

capture = cv2.VideoCapture(0) def repeat(): if(capture): frame = cv2.VideoCapture.read(capture) cv2.imshow("w1",frame) while True: repeat()

repeat()

am getting this error frame = cv2.VideoCapture.read(capture) AttributeError: 'builtin_function_or_method' object has no attribute 'read'