Ask Your Question
0

Error: Camera instance has no attribute 'threaded'

asked 2013-03-02 17:43:44 -0500

questionasker gravatar image

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 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 error, seemingly every run through the loop

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

From that point on when I attempt to run the same script, 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, nonetheless, other webcam software(such as cheese) can interface with the camera.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-03-03 21:01:42 -0500

kscottz gravatar image

This is an interesting behavior. Off the top of my head it sounds like a camera buffering issue. Can you toss a really short sleep (i.e. time.sleep(0.01)) statement into your for loop and see if the problem persists? Also try increasing the sleep time to see what happens. If you still have the error let us know.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-03-02 17:43:44 -0500

Seen: 1,908 times

Last updated: Mar 03 '13