I recently involved in a project to capture images with webcam. I soon found that OpenCV seems to be the best solutions to program in Python.
For how to install Python and OpenCV, refer to the link here. However, I found that a black window pops and the captured images does not show up.
I googled, and a number of solutions do exist, some are funny, but do not work. Finally I found that editing a single line will troubleshoot the problem:
The solution is to “import cv2.cv”, instead of “import cv”, The code shown in http://luugiathuy.com/2011/02/setup-opencv-for-python/ then works like a charm.
Cheers and happy coding
Thanks for the data on this subject, it’ll be actually helpful.
i’m using Win 7 64 bit with py 2.7 and open cv2 …
But the image from webcam is alway black!
i’m becoming crazy…
Pingback: » Python:Displaying a webcam feed using OpenCV and Python
desactiva tu antivirus por si acaso
Pingback: Displaying a webcam feed using OpenCV and Python - iZZiSwift