webcam capture but don't open windows with image [closed]
Hi.
Ubuntu 16.04, opencv 3, python 2.7.
I can see the light, close to the notebook camera, lit.
I print the pixels being captured. But the window with image doesn't show up.
My notebook Graphics are:
sudo lshw -C video
*-display
description: VGA compatible controller
product: Haswell-ULT Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 0b
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:43 memory:f7400000-f77fffff memory:d0000000-dfffffff ioport:f000(size=64)
*-display
description: 3D controller
product: GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:08:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:47 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:d000(size=128) memory:f7000000-f707ffff
Cheese opens a window and shows my ugly face. So, it's not the camera.
Any idea? Thanks in advance.
Edison.
I have to give the info you asked here for the site is telling me to wait 2 days to answer.
1 - my code follows:
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
while True:
#capture frame by frame
ret, img = cap.read()
# gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imshow('test', img)
cv2.waitKey(0) & 0xFF
cv2.destroyAllWindows()
cap.release()
2 - no erros reported
3- install of python bindings according instructions from Adrian, PyIage blog, using apt-get install. (if you prefer I can post the libs installed here, specially those that refer to video.
could you add your code, please ?
do you get any errors ?
how did you install the python bindings ?