PDA

View Full Version : YUY2 Frame Acquisition In-Memory



Bubba
August 28, 2017, 01:59:25
Stefan,

I'm having a hard time accessing video frames from the DFK 33UX265 in YUY2 format using the latest version of Imaging Control C++ SDK. RGB32 works great, but because YUY2 isn't listed in tColorformatEnum, I have to create a FrameHandlerSink with MEDIASUBTYPE_YUY2. However, an exception is thrown when starting the grabber.

My current code:

InitLibrary();
Grabber grabber;
smart_ptr<FrameHandlerSink> pSink;

grabber.openDev(mySerialNumber);
grabber.setVideoFormat("YUY2 (2048x1536)");
grabber.setFPS(60);
pSink = FrameHandlerSink::create(DShowLib::MEDIASUBTYPE_YU Y2, 2);
pSink->setSnapMode(true);
grabber.setSinkType(pSink);
grabber.startLive(false);

I get an exception saying that the sink could not be connected, as there is no combination of intermediate filters that would make the connection. This seems strange, as it appears the data coming from the camera is in the YUY2 format.

Do you have any suggestions on how to get this running properly?

Stefan Geissler
September 11, 2017, 11:47:50
Hi

As the error message says, there is no filter, that is able to handle YUY2 in memory. Unfortunately I do not have suggestions how to make this right now, because this is no implemented in IC Imaging Control.

Do you really need an YUY2 format in memory?

Bubba
September 11, 2017, 18:40:14
Hi

As the error message says, there is no filter, that is able to handle YUY2 in memory. Unfortunately I do not have suggestions how to make this right now, because this is no implemented in IC Imaging Control.

Do you really need an YUY2 format in memory?

Hey Stefan,

Yes, I need YUY2 in memory.

The solution was to add:
grabber.setOverlapBitmapPathPosition( ePP_NONE );

Stefan Geissler
September 12, 2017, 09:17:23
Outch... I could have guessed that, since this was the same with Y16 years ago. Seems, I am getting old these days. Sorry for that.