Skip to content

How to set the video feed and still capture to a single channel (monochrome) #45

@rajeshamudala

Description

@rajeshamudala

Hi,

I am running two monochrome cameras using this code. We found that the bitmap data is being generated in RGB format. How can we set the bitmap data to a monochrome format?

I have created a new media subtype:
public static readonly Guid MEDIASUBTYPE_Y8 = new Guid("{17fd9d23-d15f-4e42-9e3e-310b1d4a209b}");
in the DsGuid class and assigned it as follows:

var mt = new DirectShow.AM_MEDIA_TYPE();
mt.MajorType = DirectShow.DsGuid.MEDIATYPE_Video;
//mt.SubType = DirectShow.DsGuid.MEDIASUBTYPE_RGB24;
mt.SubType = DirectShow.DsGuid.MEDIASUBTYPE_Y8;
ismp.SetMediaType(mt);

However, in the CreateSampleGrabber method, the getBitmap() function is returning null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions