Hi,
2010/1/15 Javier Candeira <[email protected]>:
> I am working with minoru3D, a dual-webcam that is really two z-star
> vimicro webcams and a usb hub in a single package.
>
> I can get images from either one of the cameras using python-opencv
> (Ubuntu 9.10, 32 bits), but when I try to capture from both cameras in
> sequence I get this error:
>
> "VIDIOC_STREAMON error 28, No space left on device"
It seems there is not enough USB bandwidth for streaming from both
cameras at the specified resolution/Mode.
I'm not a opencv expert but it looks you are asking for a 640x480
resolution, this shouldn't be a problem even for a uncompressed yuv
stream, in any case if the camera supports MJPG could you force that
mode instead and check if you still get the same error. Also try other
applications (luvcview, guvcview, cheese, ....)
I'm pretty sure that Laurent fixed some bandwidth issues with this
camera some time back, I'm surprised that this doesn't work in 2.6.31.
Regards,
Paulo
> Here are the error (funnily, there is no traceback) and code I am using:
>
> ####### Error from command line (not even a traceback):
> """
> kandin...@derive:~/data/work/hack/pyralax$ python dualcam.py
> VIDIOC_STREAMON error 28, No space left on device
> """
>
> ####### CODE:
>
> import pygame
> import Image
> from pygame.locals import *
> import sys
>
> import opencv
> #this is important for capturing/displaying images
> from opencv import highgui
>
> cameras = []
>
> def create_camera(n):
> camera = highgui.cvCreateCameraCapture(n)
> highgui.cvSetCaptureProperty(camera, highgui.CV_CAP_PROP_FRAME_WIDTH, 640)
> highgui.cvSetCaptureProperty(camera, highgui.CV_CAP_PROP_FRAME_HEIGHT, 480)
> return camera
>
> def get_image(camera):
> im = highgui.cvQueryFrame(camera)
> # Add the line below if you need it (Ubuntu 8.04+)
> im = opencv.cvGetMat(im)
> #convert Ipl image to PIL image
> return opencv.adaptors.Ipl2PIL(im)
>
> def blit_image(im, camera):
> pg_img = pygame.image.frombuffer(im.tostring(), im.size, im.mode)
> screen.blit(pg_img, (640*i,0))
>
>
> fps = 15.0
> pygame.init()
> window = pygame.display.set_mode((1280,480))
> pygame.display.set_caption("WebCam Demo")
> screen = pygame.display.get_surface()
>
> for i in (0, 1):
> cameras.append(create_camera(i))
>
> while True:
> events = pygame.event.get()
> for event in events:
> if event.type == QUIT or event.type == KEYDOWN:
> sys.exit(0)
>
> for i, camera in enumerate(cameras):
> im = get_image(camera)
> blit_image(im, i)
>
> pygame.display.flip()
> pygame.time.delay(int(1000 * 1.0/fps))
> _______________________________________________
> Linux-uvc-devel mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
>
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel