Hi,
I installed the latest available CAMERA SDK version 1.1.0
Camera: Optitrack FLEX V100
My environment: Windows7
IDE : MS Visual Studio 2008
I am able to execute the application "Sample Viewer App". I am trying to use one of the sample projects CameraList to test my V100 cam. I built this and i am able to see the application reports the serial number of my OptiTrack camera.
As a next step, I tried to get use pointer to Frame object to get frames in GrayScale mode. Here are the lines of code.
Camera *camera = CameraManager::X().GetCamera(list[1].UID());
if (!camera) {
std::coutSetVideoType(GrayscaleMode);
camera ->Start();
// Get data into frames
CameraLibrary::Frame *myframe = camera->GetFrame();
if (myframe) {
std::coutRelease();
}
else {
std::cout<<"FAILED to get frame data from camera";
return(EXIT_FAILURE);
}
The problem is that: if(myframe) condition is always FALSE. So it never gets inside the "if" part of that loop. What might possibly be wrong? Could you guys help me out here?
Thanks in advance..
problem with camera->GetFrame()
-
- Posts: 8
- Joined: Fri Jul 08, 2011 2:16 am
Re: problem with camera->GetFrame()
OK..I solved it myself. Posting so that it might be useful for others. I just put a while loop around GetFrame()..and after a few iterations i could see data in the buffer. Also added CameraLibrary_Enabledevelopment() as in your sample codes.