Weird frame buffer data (TT_CameraFrameBuffer)
Posted: Sat Apr 03, 2010 7:39 am
Hi,
I'm using the Tracking Tools API 2.1 and three FLEX:V100R2 cameras. I didn't yet place the cameras in the suggested distance from each other, nor did I calibrate the setup -- for starters I simply try to create three openGL rendering devices showing the captured images from each camera respectively by reading the framebuffer of each camera and downloading it to an openGL texture -- somewhat like in the Tracking Toolkit Application, Camera Investigation mode.
But I am not sure how to use TT_CameraFrameBuffer. So far I have an array of 640x480 bytes and I pass a pointer to it to the TT_CameraFrameBuffer function to fill it up -- simple enough.
If I use the data array to update my openGL texture I get some confusing results. After starting the application I see this:

This may be because of the latency caused by TT_SetCameraSettings (?). The dimensions seem to be okay so far (although I don't know why I only see a fraction of the framebuffer). After two seconds I get this:

TT_CameraFrameBuffer seems to only fill up the upper left corner (320x240px) of the array. Even a few seconds later (I cannot clearly reproduce this however) I sometimes get this:

Here an area of 160x120 gets filled up. My openGL code is working, the texture and quad dimensions are alright, I double checked the data array -- only the upper left corner is touched by TT_CameraFrameBuffer.
What is wrong here?
I also saw in the Tracking Tools Application ("Camera Investigation") that there are three quality modes available for grayscale mode. But how do I set these modes using the API?
Thanks a lot!
--iko79.
I'm using the Tracking Tools API 2.1 and three FLEX:V100R2 cameras. I didn't yet place the cameras in the suggested distance from each other, nor did I calibrate the setup -- for starters I simply try to create three openGL rendering devices showing the captured images from each camera respectively by reading the framebuffer of each camera and downloading it to an openGL texture -- somewhat like in the Tracking Toolkit Application, Camera Investigation mode.
But I am not sure how to use TT_CameraFrameBuffer. So far I have an array of 640x480 bytes and I pass a pointer to it to the TT_CameraFrameBuffer function to fill it up -- simple enough.
Code: Select all
//set video mode to greyscale
if( !TT_SetCameraSettings( this->index, 1, 0, 150, 15 ) )
throw std::runtime_error( "setting TrackingTools camera settings failed!" );
// ...
if( !TT_CameraFrameBuffer( this->index, 640, 480, 0, 8, data ) )
{
std::cerr << "[WARNING] Flex:V100R2 rasterization failed" << std::endl;
return false;
}

This may be because of the latency caused by TT_SetCameraSettings (?). The dimensions seem to be okay so far (although I don't know why I only see a fraction of the framebuffer). After two seconds I get this:

TT_CameraFrameBuffer seems to only fill up the upper left corner (320x240px) of the array. Even a few seconds later (I cannot clearly reproduce this however) I sometimes get this:

Here an area of 160x120 gets filled up. My openGL code is working, the texture and quad dimensions are alright, I double checked the data array -- only the upper left corner is touched by TT_CameraFrameBuffer.
What is wrong here?
I also saw in the Tracking Tools Application ("Camera Investigation") that there are three quality modes available for grayscale mode. But how do I set these modes using the API?
Thanks a lot!
--iko79.