So how do I get a frame?
Posted: 06 February 2010 09:01 PM   [ Ignore ]
New Member
Avatar
Rank
Total Posts:  7
Joined  2010-02-06

I’m trying to get a a frame from the ps3eye. Normally in OpenCV2.0, I’d go

CvCapture *capture = 0;
capture = cvCaptureFromCAM( 0 ); //stream
frame= cvQueryFrame( capture );  //image

in CLEyeFaceTracker.cpp, the capture() part is at the top in public: instead of the main.
inside of which is

cvConvertImage(pCapImage, image);

is there anyway to get to a single frame inside of main()?
something like cam->givemeaframe

why is the capture stuff written inside the same code as the example instead of in a different file?

so confused.

Profile
 
 
Posted: 08 February 2010 12:52 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
Rank
Total Posts:  8
Joined  2009-09-17

Do you know C++?

Profile
 
 
Posted: 08 February 2010 01:39 PM   [ Ignore ]   [ # 2 ]
New Member
Avatar
Rank
Total Posts:  7
Joined  2010-02-06
NikB - 08 February 2010 12:52 PM

Do you know C++?

just finished “hello world”

Profile
 
 
Posted: 08 February 2010 02:40 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17
mars3554 - 06 February 2010 09:01 PM

I’m trying to get a a frame from the ps3eye. Normally in OpenCV2.0, I’d go

CvCapture *capture = 0;
capture = cvCaptureFromCAM( 0 ); //stream
frame= cvQueryFrame( capture );  //image

in CLEyeFaceTracker.cpp, the capture() part is at the top in public: instead of the main.
inside of which is

cvConvertImage(pCapImage, image);

is there anyway to get to a single frame inside of main()?
something like cam->givemeaframe

why is the capture stuff written inside the same code as the example instead of in a different file?

so confused.

The code samples were written as simple multithreaded applications. If you don’t want that you could easily rewrite the program to completely run inside your main() function. All you have to do is copy the camera initialization and the capture while loop in your main() function.

The “cam->givemeaframe” function you are talking about is exactly this:
CLEyeCameraGetFrame(_cam, pCapBuffer);

AlexP

Profile
 
 
Posted: 08 February 2010 02:50 PM   [ Ignore ]   [ # 4 ]
New Member
Avatar
Rank
Total Posts:  7
Joined  2010-02-06

grin  Ah!, thank you thank you thank you.

Profile
 
 
 
 


RSS 2.0     Atom Feed