From: rogerd <gre...@gm...> - 2010-08-19 03:49:09
|
Dear fadh_japan, Thanks for your help, but your code didnt seem to output 'frame' of an IplImage data structure. did you display the frames everynow and then? thanks, please help, it would be highly appreciated -Rogerd fadh_japan wrote: > > What I did was using v4l2 directly instead of opencv command to capture > the image. The code I use was from http://code.google.com/p/libv4l2cam/. > Download and uncompress the v4l2stereo-1.047 and take two files from it. > That is libcam.h and libcam.c. Add the header file to the project. How to > use? I did it like this (code has been snipped) > > > #include <stdio.h> > #include <stdlib.h> > #include "cv.h" > #include "highgui.h" > #include "libcam.h" > > int main() > { > IplImage *frame=cvCreateImage(cvSize(160, 120), 8, 3); > > //initialize camera > Camera A("/dev/video0", 160, 120, 30); // width=160 , height=120, fps=30 > > for (i=0;i<99;i++) > { > while(A.Get()==0) usleep(10); // get the image > A.toIplImage(frame); // translate the image to IplImage > // from here you can use opencv > } > return 0; > } > > > about the frame rate. By using cvCaptureFromCAM(0) and by using my > algorithm, I could only get a maximum framerate of 10.8 fps but now I can > get upto 25.0 fps. one down side. (In my TODO list) it seams that the auto > focus is gone. Need to fix this. Hope this help. > > > > -- View this message in context: http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29478239.html Sent from the Gumstix mailing list archive at Nabble.com. |