From: fadh_japan <fad...@ya...> - 2010-08-10 06:01:27
|
Good afternoon, I am currently able to do opencv on overo and capture image from webcam. Unfortunately, opencv by default always choose a compress image format and what I need is an uncompress format. I've tried to use cvSetCaptureProperty (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', 'Y', 'V')) unfortunately it outputs in an error: "HIGHGUI ERROR: V4L: Property <unknown property string>(6) not supported by device". My webcam does support YUYV and MJPEG. Please help. Im very2 new to overo, linux and opencv. TQ in advance -- View this message in context: http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29394348.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Fadhil <fad...@ya...> - 2010-08-13 18:36:51
|
Ok. Got opencv to work faster with webcam. Fadh_japan On 2010/08/10, at 15:01, fadh_japan <fad...@ya...> wrote: > > Good afternoon, > > I am currently able to do opencv on overo and capture image from webcam. > Unfortunately, opencv by default always choose a compress image format and > what I need is an uncompress format. I've tried to use cvSetCaptureProperty > (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', 'Y', 'V')) unfortunately > it outputs in an error: "HIGHGUI ERROR: V4L: Property <unknown property > string>(6) not supported by device". My webcam does support YUYV and MJPEG. > Please help. Im very2 new to overo, linux and opencv. TQ in advance > -- > View this message in context: http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29394348.html > Sent from the Gumstix mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users |
From: Cole C. <col...@gm...> - 2010-08-13 18:46:43
|
How did you do this? On Fri, Aug 13, 2010 at 1:36 PM, Fadhil <fad...@ya...> wrote: > Ok. Got opencv to work faster with webcam. > > Fadh_japan > > On 2010/08/10, at 15:01, fadh_japan <fad...@ya...> wrote: > > > > > Good afternoon, > > > > I am currently able to do opencv on overo and capture image from webcam. > > Unfortunately, opencv by default always choose a compress image format > and > > what I need is an uncompress format. I've tried to use > cvSetCaptureProperty > > (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', 'Y', 'V')) > unfortunately > > it outputs in an error: "HIGHGUI ERROR: V4L: Property <unknown property > > string>(6) not supported by device". My webcam does support YUYV and > MJPEG. > > Please help. Im very2 new to overo, linux and opencv. TQ in advance > > -- > > View this message in context: > http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29394348.html > > Sent from the Gumstix mailing list archive at Nabble.com. > > > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by > > > > Make an app they can't live without > > Enter the BlackBerry Developer Challenge > > http://p.sf.net/sfu/RIM-dev2dev > > _______________________________________________ > > gumstix-users mailing list > > gum...@li... > > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > |
From: Alok N. <alo...@gm...> - 2010-08-14 02:49:50
|
Yes, I would also like to know how this is done. And also how many fps are you getting? I have been struggling with finding a webcam that works with openCV and the Overo. The one I tried works but only captures 10fps and uses all most all of the processor. Thanks, Alok On Sat, Aug 14, 2010 at 4:46 AM, Cole Christensen < col...@gm...> wrote: > How did you do this? > > > On Fri, Aug 13, 2010 at 1:36 PM, Fadhil <fad...@ya...> wrote: > >> Ok. Got opencv to work faster with webcam. >> >> Fadh_japan >> >> On 2010/08/10, at 15:01, fadh_japan <fad...@ya...> wrote: >> >> > >> > Good afternoon, >> > >> > I am currently able to do opencv on overo and capture image from webcam. >> > Unfortunately, opencv by default always choose a compress image format >> and >> > what I need is an uncompress format. I've tried to use >> cvSetCaptureProperty >> > (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', 'Y', 'V')) >> unfortunately >> > it outputs in an error: "HIGHGUI ERROR: V4L: Property <unknown property >> > string>(6) not supported by device". My webcam does support YUYV and >> MJPEG. >> > Please help. Im very2 new to overo, linux and opencv. TQ in advance >> > -- >> > View this message in context: >> http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29394348.html >> > Sent from the Gumstix mailing list archive at Nabble.com. >> > >> > >> > >> ------------------------------------------------------------------------------ >> > This SF.net email is sponsored by >> > >> > Make an app they can't live without >> > Enter the BlackBerry Developer Challenge >> > http://p.sf.net/sfu/RIM-dev2dev >> > _______________________________________________ >> > gumstix-users mailing list >> > gum...@li... >> > https://lists.sourceforge.net/lists/listinfo/gumstix-users >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by >> >> Make an app they can't live without >> Enter the BlackBerry Developer Challenge >> http://p.sf.net/sfu/RIM-dev2dev >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > |
From: Tien N. <th...@tp...> - 2010-08-14 15:16:57
|
Aand what webcam are you using? -- Tiến Nguyễn On Fri, Aug 13, 2010 at 7:49 PM, Alok Nabi <alo...@gm...> wrote: > Yes, I would also like to know how this is done. And also how many fps are > you getting? > > I have been struggling with finding a webcam that works with openCV and the > Overo. The one I tried works but only captures 10fps and uses all most all > of the processor. > > Thanks, > Alok > > > On Sat, Aug 14, 2010 at 4:46 AM, Cole Christensen < > col...@gm...> wrote: > >> How did you do this? >> >> >> On Fri, Aug 13, 2010 at 1:36 PM, Fadhil <fad...@ya...> wrote: >> >>> Ok. Got opencv to work faster with webcam. >>> >>> Fadh_japan >>> >>> On 2010/08/10, at 15:01, fadh_japan <fad...@ya...> wrote: >>> >>> > >>> > Good afternoon, >>> > >>> > I am currently able to do opencv on overo and capture image from >>> webcam. >>> > Unfortunately, opencv by default always choose a compress image format >>> and >>> > what I need is an uncompress format. I've tried to use >>> cvSetCaptureProperty >>> > (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', 'Y', 'V')) >>> unfortunately >>> > it outputs in an error: "HIGHGUI ERROR: V4L: Property <unknown property >>> > string>(6) not supported by device". My webcam does support YUYV and >>> MJPEG. >>> > Please help. Im very2 new to overo, linux and opencv. TQ in advance >>> > -- >>> > View this message in context: >>> http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29394348.html >>> > Sent from the Gumstix mailing list archive at Nabble.com. >>> > >>> > >>> > >>> ------------------------------------------------------------------------------ >>> > This SF.net email is sponsored by >>> > >>> > Make an app they can't live without >>> > Enter the BlackBerry Developer Challenge >>> > http://p.sf.net/sfu/RIM-dev2dev >>> > _______________________________________________ >>> > gumstix-users mailing list >>> > gum...@li... >>> > https://lists.sourceforge.net/lists/listinfo/gumstix-users >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by >>> >>> Make an app they can't live without >>> Enter the BlackBerry Developer Challenge >>> http://p.sf.net/sfu/RIM-dev2dev >>> _______________________________________________ >>> gumstix-users mailing list >>> gum...@li... >>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by >> >> Make an app they can't live without >> Enter the BlackBerry Developer Challenge >> http://p.sf.net/sfu/RIM-dev2dev >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> >> > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > |
From: Cole C. <chr...@um...> - 2010-08-14 19:43:51
|
I am having similar problems with a Logitech C300 and mencoder. No matter what framerate, resolution, and output format settings I choose, I cannot save the output continuously because the encoder can only process a few (10ish?) frames per second. On Sat, Aug 14, 2010 at 10:14 AM, Tien Nguyen <th...@tp...> wrote: > Aand what webcam are you using? > -- > Tiến Nguyễn > > > > On Fri, Aug 13, 2010 at 7:49 PM, Alok Nabi <alo...@gm...> wrote: > >> Yes, I would also like to know how this is done. And also how many fps are >> you getting? >> >> I have been struggling with finding a webcam that works with openCV and >> the Overo. The one I tried works but only captures 10fps and uses all most >> all of the processor. >> >> Thanks, >> Alok >> >> >> On Sat, Aug 14, 2010 at 4:46 AM, Cole Christensen < >> col...@gm...> wrote: >> >>> How did you do this? >>> >>> >>> On Fri, Aug 13, 2010 at 1:36 PM, Fadhil <fad...@ya...> wrote: >>> >>>> Ok. Got opencv to work faster with webcam. >>>> >>>> Fadh_japan >>>> >>>> On 2010/08/10, at 15:01, fadh_japan <fad...@ya...> wrote: >>>> >>>> > >>>> > Good afternoon, >>>> > >>>> > I am currently able to do opencv on overo and capture image from >>>> webcam. >>>> > Unfortunately, opencv by default always choose a compress image format >>>> and >>>> > what I need is an uncompress format. I've tried to use >>>> cvSetCaptureProperty >>>> > (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', 'Y', 'V')) >>>> unfortunately >>>> > it outputs in an error: "HIGHGUI ERROR: V4L: Property <unknown >>>> property >>>> > string>(6) not supported by device". My webcam does support YUYV and >>>> MJPEG. >>>> > Please help. Im very2 new to overo, linux and opencv. TQ in advance >>>> > -- >>>> > View this message in context: >>>> http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29394348.html >>>> > Sent from the Gumstix mailing list archive at Nabble.com. >>>> > >>>> > >>>> > >>>> ------------------------------------------------------------------------------ >>>> > This SF.net email is sponsored by >>>> > >>>> > Make an app they can't live without >>>> > Enter the BlackBerry Developer Challenge >>>> > http://p.sf.net/sfu/RIM-dev2dev >>>> > _______________________________________________ >>>> > gumstix-users mailing list >>>> > gum...@li... >>>> > https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF.net email is sponsored by >>>> >>>> Make an app they can't live without >>>> Enter the BlackBerry Developer Challenge >>>> http://p.sf.net/sfu/RIM-dev2dev >>>> _______________________________________________ >>>> gumstix-users mailing list >>>> gum...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by >>> >>> Make an app they can't live without >>> Enter the BlackBerry Developer Challenge >>> http://p.sf.net/sfu/RIM-dev2dev >>> _______________________________________________ >>> gumstix-users mailing list >>> gum...@li... >>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by >> >> Make an app they can't live without >> Enter the BlackBerry Developer Challenge >> http://p.sf.net/sfu/RIM-dev2dev >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> >> > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > |
From: fadh_japan <fad...@ya...> - 2010-08-16 02:57:17
|
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. Cole Christensen-2 wrote: > > I am having similar problems with a Logitech C300 and mencoder. No matter > what framerate, resolution, and output format settings I choose, I cannot > save the output continuously because the encoder can only process a few > (10ish?) frames per second. > > > On Sat, Aug 14, 2010 at 10:14 AM, Tien Nguyen <th...@tp...> wrote: > >> Aand what webcam are you using? >> -- >> Tiến Nguyễn >> >> >> >> On Fri, Aug 13, 2010 at 7:49 PM, Alok Nabi <alo...@gm...> wrote: >> >>> Yes, I would also like to know how this is done. And also how many fps >>> are >>> you getting? >>> >>> I have been struggling with finding a webcam that works with openCV and >>> the Overo. The one I tried works but only captures 10fps and uses all >>> most >>> all of the processor. >>> >>> Thanks, >>> Alok >>> >>> >>> On Sat, Aug 14, 2010 at 4:46 AM, Cole Christensen < >>> col...@gm...> wrote: >>> >>>> How did you do this? >>>> >>>> >>>> On Fri, Aug 13, 2010 at 1:36 PM, Fadhil <fad...@ya...> >>>> wrote: >>>> >>>>> Ok. Got opencv to work faster with webcam. >>>>> >>>>> Fadh_japan >>>>> >>>>> On 2010/08/10, at 15:01, fadh_japan <fad...@ya...> wrote: >>>>> >>>>> > >>>>> > Good afternoon, >>>>> > >>>>> > I am currently able to do opencv on overo and capture image from >>>>> webcam. >>>>> > Unfortunately, opencv by default always choose a compress image >>>>> format >>>>> and >>>>> > what I need is an uncompress format. I've tried to use >>>>> cvSetCaptureProperty >>>>> > (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', 'Y', 'V')) >>>>> unfortunately >>>>> > it outputs in an error: "HIGHGUI ERROR: V4L: Property <unknown >>>>> property >>>>> > string>(6) not supported by device". My webcam does support YUYV and >>>>> MJPEG. >>>>> > Please help. Im very2 new to overo, linux and opencv. TQ in advance >>>>> > -- >>>>> > View this message in context: >>>>> http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29394348.html >>>>> > Sent from the Gumstix mailing list archive at Nabble.com. >>>>> > >>>>> > >>>>> > >>>>> ------------------------------------------------------------------------------ >>>>> > This SF.net email is sponsored by >>>>> > >>>>> > Make an app they can't live without >>>>> > Enter the BlackBerry Developer Challenge >>>>> > http://p.sf.net/sfu/RIM-dev2dev >>>>> > _______________________________________________ >>>>> > gumstix-users mailing list >>>>> > gum...@li... >>>>> > https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> This SF.net email is sponsored by >>>>> >>>>> Make an app they can't live without >>>>> Enter the BlackBerry Developer Challenge >>>>> http://p.sf.net/sfu/RIM-dev2dev >>>>> _______________________________________________ >>>>> gumstix-users mailing list >>>>> gum...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF.net email is sponsored by >>>> >>>> Make an app they can't live without >>>> Enter the BlackBerry Developer Challenge >>>> http://p.sf.net/sfu/RIM-dev2dev >>>> _______________________________________________ >>>> gumstix-users mailing list >>>> gum...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by >>> >>> Make an app they can't live without >>> Enter the BlackBerry Developer Challenge >>> http://p.sf.net/sfu/RIM-dev2dev >>> _______________________________________________ >>> gumstix-users mailing list >>> gum...@li... >>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by >> >> Make an app they can't live without >> Enter the BlackBerry Developer Challenge >> http://p.sf.net/sfu/RIM-dev2dev >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > -- View this message in context: http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29446414.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: fadh_japan <fad...@ya...> - 2010-08-16 03:00:27
|
Oh ya, Thank you spiglerg. fadh_japan wrote: > > Good afternoon, > > I am currently able to do opencv on overo and capture image from webcam. > Unfortunately, opencv by default always choose a compress image format and > what I need is an uncompress format. I've tried to use > cvSetCaptureProperty (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', > 'Y', 'V')) unfortunately it outputs in an error: "HIGHGUI ERROR: V4L: > Property <unknown property string>(6) not supported by device". My webcam > does support YUYV and MJPEG. Please help. Im very2 new to overo, linux and > opencv. TQ in advance > -- View this message in context: http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29446425.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: fadh_japan <fad...@ya...> - 2010-08-16 03:01:19
|
Oh ya, Thank you spiglerg. 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. > > > > Cole Christensen-2 wrote: >> >> I am having similar problems with a Logitech C300 and mencoder. No >> matter >> what framerate, resolution, and output format settings I choose, I cannot >> save the output continuously because the encoder can only process a few >> (10ish?) frames per second. >> >> >> On Sat, Aug 14, 2010 at 10:14 AM, Tien Nguyen <th...@tp...> wrote: >> >>> Aand what webcam are you using? >>> -- >>> Tiến Nguyễn >>> >>> >>> >>> On Fri, Aug 13, 2010 at 7:49 PM, Alok Nabi <alo...@gm...> wrote: >>> >>>> Yes, I would also like to know how this is done. And also how many fps >>>> are >>>> you getting? >>>> >>>> I have been struggling with finding a webcam that works with openCV and >>>> the Overo. The one I tried works but only captures 10fps and uses all >>>> most >>>> all of the processor. >>>> >>>> Thanks, >>>> Alok >>>> >>>> >>>> On Sat, Aug 14, 2010 at 4:46 AM, Cole Christensen < >>>> col...@gm...> wrote: >>>> >>>>> How did you do this? >>>>> >>>>> >>>>> On Fri, Aug 13, 2010 at 1:36 PM, Fadhil <fad...@ya...> >>>>> wrote: >>>>> >>>>>> Ok. Got opencv to work faster with webcam. >>>>>> >>>>>> Fadh_japan >>>>>> >>>>>> On 2010/08/10, at 15:01, fadh_japan <fad...@ya...> wrote: >>>>>> >>>>>> > >>>>>> > Good afternoon, >>>>>> > >>>>>> > I am currently able to do opencv on overo and capture image from >>>>>> webcam. >>>>>> > Unfortunately, opencv by default always choose a compress image >>>>>> format >>>>>> and >>>>>> > what I need is an uncompress format. I've tried to use >>>>>> cvSetCaptureProperty >>>>>> > (capture, CV_CAP_PROP_FOURCC, CV_FOURCC('Y', 'U', 'Y', 'V')) >>>>>> unfortunately >>>>>> > it outputs in an error: "HIGHGUI ERROR: V4L: Property <unknown >>>>>> property >>>>>> > string>(6) not supported by device". My webcam does support YUYV >>>>>> and >>>>>> MJPEG. >>>>>> > Please help. Im very2 new to overo, linux and opencv. TQ in advance >>>>>> > -- >>>>>> > View this message in context: >>>>>> http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29394348.html >>>>>> > Sent from the Gumstix mailing list archive at Nabble.com. >>>>>> > >>>>>> > >>>>>> > >>>>>> ------------------------------------------------------------------------------ >>>>>> > This SF.net email is sponsored by >>>>>> > >>>>>> > Make an app they can't live without >>>>>> > Enter the BlackBerry Developer Challenge >>>>>> > http://p.sf.net/sfu/RIM-dev2dev >>>>>> > _______________________________________________ >>>>>> > gumstix-users mailing list >>>>>> > gum...@li... >>>>>> > https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> This SF.net email is sponsored by >>>>>> >>>>>> Make an app they can't live without >>>>>> Enter the BlackBerry Developer Challenge >>>>>> http://p.sf.net/sfu/RIM-dev2dev >>>>>> _______________________________________________ >>>>>> gumstix-users mailing list >>>>>> gum...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> This SF.net email is sponsored by >>>>> >>>>> Make an app they can't live without >>>>> Enter the BlackBerry Developer Challenge >>>>> http://p.sf.net/sfu/RIM-dev2dev >>>>> _______________________________________________ >>>>> gumstix-users mailing list >>>>> gum...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF.net email is sponsored by >>>> >>>> Make an app they can't live without >>>> Enter the BlackBerry Developer Challenge >>>> http://p.sf.net/sfu/RIM-dev2dev >>>> _______________________________________________ >>>> gumstix-users mailing list >>>> gum...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by >>> >>> Make an app they can't live without >>> Enter the BlackBerry Developer Challenge >>> http://p.sf.net/sfu/RIM-dev2dev >>> _______________________________________________ >>> gumstix-users mailing list >>> gum...@li... >>> https://lists.sourceforge.net/lists/listinfo/gumstix-users >>> >>> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by >> >> Make an app they can't live without >> Enter the BlackBerry Developer Challenge >> http://p.sf.net/sfu/RIM-dev2dev >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> >> > > -- View this message in context: http://old.nabble.com/OpenCV-Overo-Webcam-tp29394348p29446428.html Sent from the Gumstix mailing list archive at Nabble.com. |
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. |
From: fadh_japan <fad...@ya...> - 2010-08-19 11:50:07
|
Dear rogerd, the code A.toIplImage(frame) did just that. It translate the data from v4l2 to IplImage. You can actually see the picture by adding cvShowImage. Here the full code: #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 // show the image cvNamedWindow("Picture", 0); cvMoveWindow("Picture", 300, 100); cvShowImage("Picture",frame); // need to add this if not you would not able to see the window. // click any key to continue to the next frame cvWaitKey(0); } return 0; } The code gets the image from v4l2, translate to IplImage and show the image for 99 times. Different image each time. rogerd wrote: > > 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-tp29394348p29481018.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: fadh_japan <fad...@ya...> - 2010-08-19 11:56:13
|
Oh ya. I did mention about auto focus in my last post. I was wrong. My lens was dirty. Sorry about that. fadh_japan wrote: > > Dear rogerd, > > the code A.toIplImage(frame) did just that. It translate the data from > v4l2 to IplImage. You can actually see the picture by adding cvShowImage. > Here the full code: > > #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 > > // show the image > cvNamedWindow("Picture", 0); > cvMoveWindow("Picture", 300, 100); > cvShowImage("Picture",frame); > > // need to add this if not you would not able to see the > window. > // click any key to continue to the next frame > cvWaitKey(0); > } > return 0; > } > > The code gets the image from v4l2, translate to IplImage and show the > image for 99 times. Different image each time. > > > rogerd wrote: >> >> 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-tp29394348p29481082.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: rogerd <gre...@gm...> - 2010-08-20 09:57:36
|
thanks fadh, I think my problem is within the video source. does the libcam.c auto detect video sources? ("/dev/video0") or do i have to specify the video input? and if so.. im sorry for asking too many question but would you quickly brief me through how to do? fadh_japan wrote: > > Dear rogerd, > > the code A.toIplImage(frame) did just that. It translate the data from > v4l2 to IplImage. You can actually see the picture by adding cvShowImage. > Here the full code: > > #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 > > // show the image > cvNamedWindow("Picture", 0); > cvMoveWindow("Picture", 300, 100); > cvShowImage("Picture",frame); > > // need to add this if not you would not able to see the > window. > // click any key to continue to the next frame > cvWaitKey(0); > } > return 0; > } > > The code gets the image from v4l2, translate to IplImage and show the > image for 99 times. Different image each time. > > > rogerd wrote: >> >> 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-tp29394348p29490404.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: M. F. A. <fad...@ya...> - 2010-08-21 02:17:56
|
libcam does not automatically detect the camera source. We need to specify the source. just change the /dev/video0 of code 'Camera A("/dev/video0", 160, 120, 30);' to your camera source. let say your camera attached to /dev/video3 than the code should look like this: Camera A("/dev/video3", 160, 120, 30); Hope this helps. --- On Fri, 20/8/10, rogerd <gre...@gm...> wrote: From: rogerd <gre...@gm...> Subject: Re: [Gumstix-users] OpenCV Overo Webcam To: gum...@li... Date: Friday, 20 August, 2010, 5:57 PM thanks fadh, I think my problem is within the video source. does the libcam.c auto detect video sources? ("/dev/video0") or do i have to specify the video input? and if so.. im sorry for asking too many question but would you quickly brief me through how to do? fadh_japan wrote: > > Dear rogerd, > > the code A.toIplImage(frame) did just that. It translate the data from > v4l2 to IplImage. You can actually see the picture by adding cvShowImage. > Here the full code: > > #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 > > // show the image > cvNamedWindow("Picture", 0); > cvMoveWindow("Picture", 300, 100); > cvShowImage("Picture",frame); > > // need to add this if not you would not able to see the > window. > // click any key to continue to the next frame > cvWaitKey(0); > } > return 0; > } > > The code gets the image from v4l2, translate to IplImage and show the > image for 99 times. Different image each time. > > > rogerd wrote: >> >> 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-tp29394348p29490404.html Sent from the Gumstix mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ gumstix-users mailing list gum...@li... https://lists.sourceforge.net/lists/listinfo/gumstix-users |