Ask Your Question

Edison's profile - activity

2020-06-24 07:00:53 -0500 received badge  Popular Question (source)
2017-05-03 10:30:22 -0500 answered a question webcam capture but don't open windows with image

Hi, fellows. Thanks for the answers. I was able to solve the problem with the first answer. My bad not to pay attention to indentation. Maybe this question can be considered CLOSED. Thanks again.

2017-05-03 10:21:15 -0500 asked a question opencv_createsamples options

Googling around I noticed that some people don't use the -bg option. Seems right, for this command is for generating positive samples so trainning can use it. So, no need to call the negative images at this time. Is that wrong?

2017-03-06 19:30:33 -0500 received badge  Editor (source)
2017-03-06 05:24:07 -0500 asked a question webcam capture but don't open windows with image

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.