Ask Your Question
0

SimpleCV won't recognize Logitech C930e correctly

asked 2014-05-15 08:20:52 -0500

empedokles gravatar image

updated 2014-05-20 15:51:15 -0500

My new C930e isn't fully recognized by SimpleCV. :-( Logitech states it supports UVC 1.0. The app UVC-Camera (aka guvcview) recognizes the cam.

EDIT: SimpleCV 1.3 sees the cams, but produces errors. I'm using Ubuntu 14.04. The command seems:

cam = Camera(0)  // -> for the internal notebook webcam
cam = Camera(1)  // -> for the Logitech C930e

I have been told Logitech cams are a solid bet for SimpleCV. Is there a solution?

I receive following errors:

SimpleCV:1> cam = Camera(1)
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument

and with an openCV command:

SimpleCV:2>  cap = cv2.VideoCapture(1)
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
libv4l2: error setting pixformat: Device or resource busy
HIGHGUI ERROR: libv4l unable to ioctl S_FMT
libv4l2: error setting pixformat: Device or resource busy
libv4l1: error setting pixformat: Device or resource busy
HIGHGUI ERROR: libv4l unable to ioctl VIDIOCSPICT
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2014-05-20 05:46:27 -0500

empedokles gravatar image

updated 2014-05-20 06:44:07 -0500

Any news on this? It's strange that guvcview can access the cam, but SimpleCV can't. Couldn't you integrate UVC 1.5 support?

I also received following answer from a hacker which could be helpful for you guys (unfortunately I don't know how it helps me) - SimpleCV doesn't even recognize the internal notebook webcam which should be stream 0 (it's recognized by cheese app!):

"if you have more than one camera, then you must use the proper video device. Usually the default is /dev/video0, the second camera will be /dev/video1 and so on. So in openCV you must use the correct device index.

I'm not a opencv expert but googling a little bit I've found the following: http://thefreecoder.wordpress.com/2012/09/11/opencv-c-video-capture/

here you have

VideoCapture stream1(0);

where 0 is the id from the first camera, so I'm guessing you could use something like:

VideoCapture stream2(1);

for your second camera.

Regards, Paulo"

edit flag offensive delete link more
0

answered 2014-05-20 13:38:39 -0500

updated 2014-05-21 11:30:43 -0500

try it:

this algorithm will search the cameras in your system

from SimpleCV import Image, Camera, Display
import sys


disp = Display((640,480))

def tryit(i):
    try:
        if i>=5:
            print "Nao Existe Camera!"
            sys.exit()

        cam = Camera(i)
        while disp.isNotDone():
            img = cam.getImage()
            img.save(disp)
    except:
        i+=1
        tryit(i)

tryit(-1)

you can try update vl4l in ubuntu:

sudo apt-add-repository ppa:libv4l/stable -y
sudo apt-get update
sudo apt-get upgrade
edit flag offensive delete link more

Comments

It shows the internal lenovo edge cam, but says: VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument libv4l2: error setting pixformat: Device or resource busy HIGHGUI ERROR: libv4l unable to ioctl S_FMT libv4l2: error setting pixformat: Device or resource busy libv4l1: error setting pixformat: Device or resource busy HIGHGUI ERROR: libv4l unable to ioctl VIDIOCSPICT WARNING: SimpleCV can't seem to find a camera on your system, or the drivers do not work with SimpleCV. VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument HIGHGUI ERROR: V4L: index 2 is not correct! WARNING: SimpleCV can't seem to find a camera on your system, or the drivers do not work with SimpleCV. HIGHGUI ERROR: V4L: inde

empedokles gravatar imageempedokles ( 2014-05-20 15:21:39 -0500 )edit

I also have a logitech but it's not the same model as yours and functions normally, it may seem stupid but the error says that your device is busy, restart the machine that will kill any process using webcam and run the script again, sorry for my bad english

Rodrigo gomes gravatar imageRodrigo gomes ( 2014-05-20 15:26:15 -0500 )edit

Apart from the errors: cam = Camera(0) seems to get a feed from the internal notebookcam and cam = Camera(1) a logitech feed.

empedokles gravatar imageempedokles ( 2014-05-20 15:35:34 -0500 )edit

its internal camera notebook is functioning properly?

Rodrigo gomes gravatar imageRodrigo gomes ( 2014-05-21 09:34:50 -0500 )edit

No, it shows also these "VIDIOC_QUERYMENU: Invalid argument" error-messages. I can however - with your script - access it's image with "cam = Camera(0)". Similar I can get the Logitech image with "cam = Camera(1)".

empedokles gravatar imageempedokles ( 2014-05-21 11:10:59 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-05-15 08:20:52 -0500

Seen: 4,425 times

Last updated: May 21 '14