PDA

View Full Version : Strange rasterisation when using non fourcc color format



RPaulsen
May 11, 2005, 13:10:37
We are currently trying to use our IC Imaging Professional 2.0 with a PointGrey Flea camera.

This camera has only one mode which is 1024x768 8 bit monochrome. This corresponds to the Y800 fourcc color mode (the eY8 enumerated valued in IC).

However, of unknown reasons Point Grey names this mode "PGRY" in their driver. It is still an 8 bit monochrome mode though.

When I use this mode and force the sink to eY8:

m_Grabber.setSinkType( DShowLib::FrameGrabberSink( DShowLib::FrameGrabberSink::tFrameGrabberMode::eGR AB, DShowLib::eY8) );

The resulting images looks like they have been rasterised and contains only around 12 unique grey-values.

I am sure that the problem lies somewhere between the WDM driver and the way IC handles the format....but what do I do?

The clumsy way to do it, is to use an RGB24 sink and then reformat the pixelvalues back to monochrome...this, however, punishes my remaining processing time per frame.

Best regards,
Rasmus

Stefan Geissler
May 11, 2005, 13:43:33
Hello Rasmus,

i assume, that there is a colorspace converter used in the filtergraph, that works not optimal. You can check this with graphedit. First start your IC Imaging Control application and start the live video with the eY8 sink. Then start graphedit (belongs to the DirectShow SDK, can be downloaded separatele as graphedt.exe (without the "i") and connect to the "remote graph". Then see, what filters are used. For example the Colorspace converter can be used in this filtergraph. It is slow and does not create excellent results.
You may list the filters used in the filtergrap or post a screen shot of graphedit here.

RPaulsen
May 11, 2005, 14:08:41
Hi Stefan,

Thanks for the very quick and informative response!

There is definately something wrong with the filters:

1394 Streaming Digital Camera:
Capture:
Major Type: Video
Sub Type:
{59524750-0000-0010-8000-00AA00389B71}
Format: PGRY 1024x768, 8 bits

->

FixFilter:
Input:
Major Type: Video
Sub Type:
{59524750-0000-0010-8000-00AA00389B71}
Format: PGRY 1024x768, 8 bits
Output:
Major Type: Video
Sub Type:
{59524750-0000-0010-8000-00AA00389B71}
Format: PGRY 1024x768, 8 bits

->

AVI Decompressor
Input:
Major Type: Video
Sub Type:
{59524750-0000-0010-8000-00AA00389B71}
Format: PGRY 1024x768, 8 bits
Output:
Major Type: Video
Sub Type: RGB32
Format: RGB 1024x768, 32 bits

->

Color Space Converter
Input:
Major Type: Video
Sub Type: RGB32
Format: RGB 1024x768, 32 bits
Output:
Major Type: Video
Sub Type: RGB8
Format: RGB 1024x768, 8 bits

->
Ovlip
->
MediaSampleGrabber
->
Null Renderer


It is seen that the disaster happens in the AVI decompressor. I will cross post this to PointGrey, since it seems that the problem could be with their driver?

Best regards,
Rasmus

Stefan Geissler
May 11, 2005, 16:26:15
Hi Rasmus,

I think, it is a good idea to ask the manufacturer of your camera.

RPaulsen
May 12, 2005, 11:05:45
I have now a running discussion with the camera-people. However, in my quest to understand the problem better I am trying to dissect and learn from these filtergraphs. When I use my Sony XCD-X710 with your WDM driver the filter graph look like this:


---------------------------------------------------------------------------
XCD-X710 v2.20E (WDM Stream Driver from www.imagingcontrol.com)
Capture:
Major Type: Video
Sub Type:
{30303859-0000-0010-8000-00AA00389B71}
Format: Y800 1024x768, 8 bits

->

FixFilter
Input
Major Type: Video
Sub Type:
{30303859-0000-0010-8000-00AA00389B71}
Format: Y800 1024x768, 8 bits

Output
Major Type: Video
Sub Type:
{30303859-0000-0010-8000-00AA00389B71}
Format: Y800 1024x768, 8 bits

->

0001
UYVY InGB:
Major Type: Video
Sub Type:
{30303859-0000-0010-8000-00AA00389B71}
Format: Y800 1024x768, 8 bits
Output
Major Type: Video
Sub Type: RGB8
Format: RGB 1024x768, 8 bits

->

Ovlip
Input
Major Type: Video
Sub Type: RGB8
Format: RGB 1024x768, 8 bits
Output
Major Type: Video
Sub Type: RGB8
Format: RGB 1024x768, 8 bits

->

MediaSampleGrabber
Input
Major Type: Video
Sub Type: RGB8
Format: RGB 1024x768, 8 bits
Output
Major Type: Video
Sub Type: RGB8
Format: RGB 1024x768, 8 bits

->

Null Renderer
---------------------------------------------------------------------------

My first question is now: Most of these filter seems to be developed by you and included in IC imaging control, since I can find no reference to them. Neither in the Directshow documentation nor by googling.

Is that correct?

Best regards,
Rasmus

RPaulsen
May 12, 2005, 15:38:07
The days last report from the odyssey into DirectShow.

I have a strong feeling that at least the MediaSampleGrabber filter is part of IC imaging control and when I do this:

m_Grabber.setSinkType( DShowLib::FrameGrabberSink( DShowLib::FrameGrabberSink::tFrameGrabberMode::eGR
AB, DShowLib::eY8) );

it sets the input pin on MediaSampleGrabber to accept only "Major Type: Video
Sub Type: RGB8" and thereby forces the filter graph to find a match to this pin.

This is why the sneaky converter filter pops up.

Best regards,
Rasmus

Stefan Geissler
May 12, 2005, 15:51:45
Hello Rasmus,

You are right, most of the inserted filters are from us. With the weird video format of your PG camera, the information that there was a gray value image wents lost. The color space conversion creates for the RGB8 format an own color table, that has much less gray values, then there are provided by the camera.

The RGB8 format, that is set by the Mediasamplegrabber is built in for the compatibilty to the old SONY DCam drivers.