From: Nicola B. <nb...@es...> - 2005-05-25 20:42:37
|
Hi all, I was trying to get an image from my Logitech Quickcam, but when I call CameraProxy::Print() I always have the same: #Camera(40:0) - r Height(0 px), Width(0 px), Depth(0 bit), ImageSize(0 bytes) I'm sure the webcam is set properly because I use it with many other applications and also with OpenCV, so the problem is on my code or the player libraries. Below there are a simple configuration file I use and a small test program. Any help is appreciated. Cheers, Nicola ---------------------------- # configuration file to test camera driver ( name "camerav4l" provides ["camera:0"] port "/dev/video0" source 0 size [160 120] mode "YUV420P" ) ---------------------------- // test program #include <iostream> #include <cstdlib> #include <playerclient.h> #include <stdlib.h> int main(int argc, char *argv[]) { PlayerClient robot("localhost"); CameraProxy cp(&robot,0,'r'); robot.Read(); cp.Print(); robot.Read(); char something; std::cin >> something; cp.Print(); return EXIT_SUCCESS; } -- ------------------------------------------ Nicola Bellotto University of Essex Department of Computer Science Wivenhoe Park Colchester CO4 3SQ United Kingdom Room: 1N1.2.8 Tel. +44 (0)1206 874094 URL: http://privatewww.essex.ac.uk/~nbello ------------------------------------------ |