problem with camera->GetFrame()
Posted: Fri Jul 08, 2011 6:13 am
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..
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..