Video Capture Error A.R Drone 2.0
The following code is trying to stream a video from an A.R Drone using python. When I run the code, I receive error error reading video feed
. I am using 3.3.0. Is there a way to fix this. I have talked to other people. Am I running the code on the command prompt correctly. I put drone.py
in the command prompt. I also ran the code on Python shell and it does not work. It just reads my else statement.
import cv2
cam = cv2.VideoCapture('tcp://192.168.1.1:5555')
running = True
while running:
# get current frame of video
running, frame = cam.read()
if running:
cv2.imshow('frame', frame)
if cv2.waitKey(1) & 0xFF == 27:
# escape key pressed
running = False
else:
# error reading frame
print 'error reading video feed'
cam.release()
cv2.destroyAllWindows()
os, opencv version ?
how did you install cv2 ?
(if it was via PIP or similar, it probably has neither video nor gui facilities built in. check
cv2.getBuildInformation())
OpenCV 3.3
os, and how did you install it ?
windows 10. cv2 was automatically installed when I downloaded opencv.
make sure, opencv_ffmpeg.dll is on the PATH or next to where you run your script.
how do i check that?
try to find the dll, copy it next to your script. then try again
i have the cmake file. I can't find a dll file. I think
Never mind I found dll file. Where do you want me to copy the file?
ok it works. Now i try to detect color in real time with drone