PDA

View Full Version : Problem with GrabberListener::eFRAMEREADY



DirkM
November 16, 2004, 12:22:32
Hello,

I'm beginning with programming the IC Vers. 2.0. The first steps make no problem, but now I want to make some image processing. But it doesn't work.
The CListener::frameReady(...) function is not called. I have a
setActiveMemBufferCollection(...) done. I use the m_pGrabber->showDevicePage() Function. Have I use the grabber->setSinkType(...) too ?

Thank's

Dirk

Stefan Geissler
November 16, 2004, 12:36:19
Hello,

Did you call
grabber->addListener( &CListener );
?

Also the sinktype must be set to eGRAB, if frameReady() should be called for any frame. If the sinktype has been set to eSNAP, frameReady is only called, if snapImages() has been called.

DirkM
November 16, 2004, 12:55:07
Did you call
grabber->addListener( &CListener );
?

Yes, I have.

Also the sinktype must be set to eGRAB, if frameReady() should be called for any frame. If the sinktype has been set to eSNAP, frameReady is only called, if snapImages() has been called. [/B][/QUOTE]

So I have to use grabber->setSinkType(...) even when I use showDevicePage() ?

Dirk

Stefan Geissler
November 16, 2004, 13:09:20
Hello,

Yes, you must set the sinktype, because it values determined by this class are not set by the decive settings dialog.
The sinktype can differ from the video format: It is set to RGB 24 per default, even if the video format is Y8.

DirkM
November 16, 2004, 13:36:59
Hello,

now it works

The sinktype can differ from the video format: It is set to RGB 24 per default, even if the video format is Y8. [/B][/QUOTE]

I think I understand your technique. You have a source (Camera or other firewire component) and a sink (PC Memory). With the different
formats it is possible to have a coloured overlay even if the camera is monochrom.

When I do so(camera monochrom sinktype RGB24 ,
the newMemBufferCollection(count) reserve 3 Bytes per pixel ? So when I want to get access to one pixel, I can read R or G or B and then with an offset of 3 the next pixel ?

Thank's for your help

Dirk

Stefan Geissler
November 16, 2004, 13:40:41
Hello Dirk,



When I do so(camera monochrom sinktype RGB24 ,
the newMemBufferCollection(count) reserve 3 Bytes per pixel ? So when I want to get access to one pixel, I can read R or G or B and then with an offset of 3 the next pixel ?

Yes, you are right. If you have a Y800 monochrome video format and the sinktype is RGB24, you have 3 bytes per pixel. The bytes represent RGB values. r has the same value as g, that has the same value b. The 1 byte per pixel format is blown up to a 3 byte per pixel format. This allows color drawings on the monochrome video image.