Ask Your Question
0

Camera works in guvcview, but not Simple CV?

asked 2014-07-11 01:23:33 -0600

alexandertmills gravatar image

updated 2014-07-11 01:26:10 -0600

I have a P2V camera from IPEVO. After some struggles, I've been able to open the camera feed through guvcview and cheese. However, no matter what I try, I cannot get the feed to innitialize in SimpleCV.

Initializing the camera in SimpleCV...and failing

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

Trying to run guvcview: fails now, works later

The camera feed always appears in cheese. It doesn't appear at first in guvcview. First I have to manually remove uvcvideo from the kernel, then manually readd it. Then launching guvcviewer will work.

As you can see, gucview can't find the camera.

alexander@apricot ~/Desktop $ guvcview
guvcview 1.7.1
file guvcview_video.mkv has extension type 1
file guvcview_image.jpg has extension type 0
file guvcview_image.jpg has extension type 0
Video file suffix detected: 0
Image file suffix detected: 0
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
video device: /dev/video0 
unable to detect video devices on your system (0)
ERROR opening V4L interface: No such file or directory
Init video returned -1
VIDIOC_REQBUFS - Failed to delete buffers: Inappropriate ioctl for device (errno 25)
cleaned allocations - 100%
Closing portaudio ...OK
Terminated.

Followed by this complaint.

Guvcview error: Unable to open device Please make sure the camera is connected and that the correct driver is installed.

It is. I've tried unplugging it and replugging it in, nothing helps.

Temperary fix: Removing uvcvideo from the kernel, then putting it back

Somehow I found this help page. I don't know why, but as you can see, removing uvcvideo from the kernel and putting it back works. At least it does in guvcview.

alexander@apricot ~/Desktop $ sudo rmmod uvcvideo
alexander@apricot ~/Desktop $ sudo modprobe uvcvideo

Okay, lets re-run guvcview. Surprise, it finds a feed somehow.

alexander@apricot ~/Desktop $ guvcview
guvcview 1.7.1
file guvcview_video.mkv has extension type 1
file guvcview_image.jpg has extension type 0
file guvcview_image.jpg has extension type 0
Video file suffix detected: 0
Image file suffix detected: 0
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-07-11 11:30:40 -0600

xamox gravatar image

So hopefully you didn't spend a ton of time on this. I think it is actually working, the drive spits that out when we load the camera, and it it's working with UVC it should be working. I would try to actually grab a show an image after even though it spits out those errors, try the following and see if it works:

cam = Camera()
img = cam.getImage()
img.show()
edit flag offensive delete link more

Comments

It works! Thanks! Why can't I get a live feed from the camera? And why do I need to reload the driver in the kernel beforehand? Any thoughts? I feel like this will be an issue later on. Thanks for the help!

alexandertmills gravatar imagealexandertmills ( 2014-07-11 13:39:07 -0600 )edit

To get a live feed you can do: img.live() instead.

xamox gravatar imagexamox ( 2014-07-18 08:41:21 -0600 )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-07-11 01:23:33 -0600

Seen: 908 times

Last updated: Jul 11 '14