aspsnake
February 9, 2012, 13:05:20
Hello! I have a 22BUC03 Camera. Trying to understand the C++ library code.
I need to get to my internal memory the captured frame. All I found in examples writes the frames to hwnd or to avi file. I need the full 76 fps video stream.
something like:
while(1)
{
QuicklyGetFrame();
ProcessFrame();
}
How Can I realize the QuicklyGetFrame function? I tried something like:
MemBufferCollection::tMemBufferPtr getSingleFrame( Grabber& gr, tColorformatEnum type )
{
smart_ptr<FrameHandlerSink> pHandlerSink = FrameHandlerSink::create(type, 1);
pHandlerSink->setSnapMode(true);
gr.setSinkType(pHandlerSink);
gr.startLive(false);
//Sleep(250); // give the device time to adjust automatic settings i.e. auto exposure
pHandlerSink->snapImages(1, 2000);
gr.stopLive();
// get pointer to the image data
return pHandlerSink->getLastAcqMemBuffer();
}
even without Sleep(250); the capturing is slow, something like 3 fps. What should I do?
Thanks in advance.
P.S. the examples that show video stream to window work perfectly.
I need to get to my internal memory the captured frame. All I found in examples writes the frames to hwnd or to avi file. I need the full 76 fps video stream.
something like:
while(1)
{
QuicklyGetFrame();
ProcessFrame();
}
How Can I realize the QuicklyGetFrame function? I tried something like:
MemBufferCollection::tMemBufferPtr getSingleFrame( Grabber& gr, tColorformatEnum type )
{
smart_ptr<FrameHandlerSink> pHandlerSink = FrameHandlerSink::create(type, 1);
pHandlerSink->setSnapMode(true);
gr.setSinkType(pHandlerSink);
gr.startLive(false);
//Sleep(250); // give the device time to adjust automatic settings i.e. auto exposure
pHandlerSink->snapImages(1, 2000);
gr.stopLive();
// get pointer to the image data
return pHandlerSink->getLastAcqMemBuffer();
}
even without Sleep(250); the capturing is slow, something like 3 fps. What should I do?
Thanks in advance.
P.S. the examples that show video stream to window work perfectly.