Re: [Linux-uvc-devel] Test of the driver on GNU/Debian amd64
Linux UVC driver and tools
Brought to you by:
pinchartl
From: <Oli...@id...> - 2006-01-06 23:58:11
|
Hello, > Olivier: Would it be possible to post a simple OpenCV application to > grab 1 frame from the camera? Would be greatly appreciated and help me > in my endeavor. Just download the CVS version of OpenCV from: http://sourceforge.net/cvs/?group_id=22870 Build and install. Then, try one of the sample in samples/c/ or samples/python/. To see how to use the camera, you can look at samples/c/camshiftdemo.c or samples/python/cam-histo.py (my preference goes to the python version :-) ). In general, I'm testing uvc with cam-histo.py. (don't have try the C version at with uvc, but it should works without problems). If you just want to grab 1 frame from the cam, this simple python code should works: from opencv import highgui device_nb = 0 capture = highgui.cvCaptureFromCAM (device_nb) frame = highgui.cvQueryFrame (capture) highgui.cvSaveImage ('my-frame.jpg', frame) Hope this help. Olivier -- . __ . ___ __. | Olivier Bornet Oli...@id... / / ` / / / / / | IDIAP http://www.idiap.ch/~bornet/ / / / / /--/ /--' | CP 592 http://www.idiap.ch/~bornet/pgp/ / /__.' / / / / | CH-1920 Martigny PGP-key: 0xC53D9218 |