5

I'm trying to run a basic script to get a feed from my webcam using SimplecCV 1.3.0 with a Logitech HD C270 webcam(also tried Logitech tessar 2.0/3.7) on 64 bit Linux Mint 12.

When I trun the following script

from SimpleCV import *

cam = Camera()
while(True):
    img = cam.getImage()
    img.show()

A window pops up and I can see a camera feed. However, at seemingly random moments, the feed will freeze and throw the following error on every img = cam.getImage()

VIDIOC_DQBUF: No such device
libv4l2: error dequeuing buf: No such device

From that point on when I attempt to run the same script, the window opens for a moment, disappears, and I get the following error on the img = cam.getImage() line of my script:

File "/usr/lib/pymodules/python2.7/SimpleCV/Camera.py", line 579, in getImage
  if (not self.threaded):
AttributeError: Camera instance has no attribute 'threaded'

This error persists until I restart my computer and occurs whether my webcam is plugged in or not. Nevertheless, other webcam software(such as cheese) can still interface with the camera.

rocketas
  • 1,679
  • 3
  • 18
  • 30
  • Is it possibly a USB issue ? I've had dodgy USB controllers in the past that would drop enumeration with a device and refuse to re-enumerate until restart. You could try to reload the USB kernel module and see if anything changes. If its not that, it'll be a library or daemon issue. – dilbert Jul 09 '13 at 03:10

3 Answers3

1

Did you try to something like:

cam = Camera(0)?
Rui Jarimba
  • 11,166
  • 11
  • 56
  • 86
0

I see that this issue is posted long ago. So for the one who will experience this problem in the future.

Have you made sure that the webcam works? It's better to check the webcam first with a software that accesses the webcam. Like webcam:

sudo apt-get install webcam

On my PC (Lubuntu 15.04), after I made sure the webcam is working, I could run the code.

BTW Both cases of

cam = Camera(0) and cam = Camera()

work fine.

Keivan
  • 673
  • 7
  • 15
0

This generally means the Camera is not available to SimpleCV. Reasons vary

  • Camera is used by another process and is locked
  • Is disabled under BIOS
  • Drivers are not installed for the camera.
  • Any other reason specific to your distribution.
mixdev
  • 2,724
  • 2
  • 30
  • 25