PAP
March 27, 2011, 13:55:55
Hi,
I have problem with "setVideoFormat" method. I can not set video format with using this method. When I use this method, VS C++ 2008 notifies error (in attachment). openDev and setFPS work fine. I have following function:
Grabber grabber;
tFrameHandlerSinkPtr pSink;
MemBufferCollection::tMemBufferPtr pBuffer;
IplImage * mInicializaceKamery(void)
{
grabber.openDev("DFx 21BUC03");
grabber.setVideoFormat("RGB32 (744x480)");
grabber.setFPS(60.00024);
pSink = FrameHandlerSink::create(eRGB32, 1);
grabber.setSinkType(pSink);
if( !grabber.prepareLive( false ) )
{
printf("Error: mInicializaceKamery/pGrabber->prepareLive\n");
return NULL;
}
FrameTypeInfo info;
if( !pSink->getOutputFrameType( info ))
{
printf("Error: mInicializaceKamery/pSink->getOutputFrameType\n");
return NULL;
}
IplImage * test = cvCreateImage( cvSize(info.dim.cx,info.dim.cy), IPL_DEPTH_8U , 4 );
return test;
}
So where is problem? And the difference between my code and this example: http://www.imagingcontrol.com/en_US/support/documentation/class/meth_descGrabber_prepareLive.htm. Thank you so much.
Best regards,
PAP.
I have problem with "setVideoFormat" method. I can not set video format with using this method. When I use this method, VS C++ 2008 notifies error (in attachment). openDev and setFPS work fine. I have following function:
Grabber grabber;
tFrameHandlerSinkPtr pSink;
MemBufferCollection::tMemBufferPtr pBuffer;
IplImage * mInicializaceKamery(void)
{
grabber.openDev("DFx 21BUC03");
grabber.setVideoFormat("RGB32 (744x480)");
grabber.setFPS(60.00024);
pSink = FrameHandlerSink::create(eRGB32, 1);
grabber.setSinkType(pSink);
if( !grabber.prepareLive( false ) )
{
printf("Error: mInicializaceKamery/pGrabber->prepareLive\n");
return NULL;
}
FrameTypeInfo info;
if( !pSink->getOutputFrameType( info ))
{
printf("Error: mInicializaceKamery/pSink->getOutputFrameType\n");
return NULL;
}
IplImage * test = cvCreateImage( cvSize(info.dim.cx,info.dim.cy), IPL_DEPTH_8U , 4 );
return test;
}
So where is problem? And the difference between my code and this example: http://www.imagingcontrol.com/en_US/support/documentation/class/meth_descGrabber_prepareLive.htm. Thank you so much.
Best regards,
PAP.