Skip to content

support for monochrome (gray scale) camera. #46

@secile

Description

@secile

There are some issues that found problem when using monochrome (gray scale) camera.
See issue #13, #43, #45.

Until now, I have never tested monochrome camera.
In this time, I purchased monochrome camera ELP-USBGS720P02-L36.
I tested but this model works fine.

Then, I executed below and dump supported video format.

for (int i = 0; i < formats.Length; i++) Console.WriteLine("{0}:{1}", i, formats[i]);

the result is

0:[Video], [MJPG], {Width=1280, Height=720}, 166666, 60fps, [VideoInfo], Guid=05589f80-c356-11ce-bf01-00aa0055595a, VideoStandard=0, InputSize={1280, 720}, MinCroppingSize={1280, 720}, MaxCroppingSize={1280, 720}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={1280, 720}, MaxOutputSize={1280, 720}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=166666, MaxFrameInterval=2000000, MinBitsPerSecond=73728000, MaxBitsPerSecond=884736000, 
1:[Video], [MJPG], {Width=1280, Height=720}, 166666, 60fps, [VideoInfo2], Guid=f72a76a0-eb0a-11d0-ace4-0000c0cc16ba, VideoStandard=0, InputSize={1280, 720}, MinCroppingSize={1280, 720}, MaxCroppingSize={1280, 720}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={1280, 720}, MaxOutputSize={1280, 720}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=166666, MaxFrameInterval=2000000, MinBitsPerSecond=73728000, MaxBitsPerSecond=884736000, 
2:[Video], [MJPG], {Width=800, Height=600}, 166666, 60fps, [VideoInfo], Guid=05589f80-c356-11ce-bf01-00aa0055595a, VideoStandard=0, InputSize={800, 600}, MinCroppingSize={800, 600}, MaxCroppingSize={800, 600}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={800, 600}, MaxOutputSize={800, 600}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=166666, MaxFrameInterval=2000000, MinBitsPerSecond=38400000, MaxBitsPerSecond=460800000, 
3:[Video], [MJPG], {Width=800, Height=600}, 166666, 60fps, [VideoInfo2], Guid=f72a76a0-eb0a-11d0-ace4-0000c0cc16ba, VideoStandard=0, InputSize={800, 600}, MinCroppingSize={800, 600}, MaxCroppingSize={800, 600}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={800, 600}, MaxOutputSize={800, 600}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=166666, MaxFrameInterval=2000000, MinBitsPerSecond=38400000, MaxBitsPerSecond=460800000, 
4:[Video], [MJPG], {Width=640, Height=480}, 166666, 60fps, [VideoInfo], Guid=05589f80-c356-11ce-bf01-00aa0055595a, VideoStandard=0, InputSize={640, 480}, MinCroppingSize={640, 480}, MaxCroppingSize={640, 480}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={640, 480}, MaxOutputSize={640, 480}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=166666, MaxFrameInterval=2000000, MinBitsPerSecond=24576000, MaxBitsPerSecond=294912000, 
5:[Video], [MJPG], {Width=640, Height=480}, 166666, 60fps, [VideoInfo2], Guid=f72a76a0-eb0a-11d0-ace4-0000c0cc16ba, VideoStandard=0, InputSize={640, 480}, MinCroppingSize={640, 480}, MaxCroppingSize={640, 480}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={640, 480}, MaxOutputSize={640, 480}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=166666, MaxFrameInterval=2000000, MinBitsPerSecond=24576000, MaxBitsPerSecond=294912000, 
6:[Video], [YUY2], {Width=1280, Height=720}, 1000000, 10fps, [VideoInfo], Guid=05589f80-c356-11ce-bf01-00aa0055595a, VideoStandard=0, InputSize={1280, 720}, MinCroppingSize={1280, 720}, MaxCroppingSize={1280, 720}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={1280, 720}, MaxOutputSize={1280, 720}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=1000000, MaxFrameInterval=2000000, MinBitsPerSecond=73728000, MaxBitsPerSecond=147456000, 
7:[Video], [YUY2], {Width=1280, Height=720}, 1000000, 10fps, [VideoInfo2], Guid=f72a76a0-eb0a-11d0-ace4-0000c0cc16ba, VideoStandard=0, InputSize={1280, 720}, MinCroppingSize={1280, 720}, MaxCroppingSize={1280, 720}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={1280, 720}, MaxOutputSize={1280, 720}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=1000000, MaxFrameInterval=2000000, MinBitsPerSecond=73728000, MaxBitsPerSecond=147456000, 
8:[Video], [YUY2], {Width=800, Height=600}, 500000, 20fps, [VideoInfo], Guid=05589f80-c356-11ce-bf01-00aa0055595a, VideoStandard=0, InputSize={800, 600}, MinCroppingSize={800, 600}, MaxCroppingSize={800, 600}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={800, 600}, MaxOutputSize={800, 600}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=500000, MaxFrameInterval=2000000, MinBitsPerSecond=38400000, MaxBitsPerSecond=153600000, 
9:[Video], [YUY2], {Width=800, Height=600}, 500000, 20fps, [VideoInfo2], Guid=f72a76a0-eb0a-11d0-ace4-0000c0cc16ba, VideoStandard=0, InputSize={800, 600}, MinCroppingSize={800, 600}, MaxCroppingSize={800, 600}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={800, 600}, MaxOutputSize={800, 600}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=500000, MaxFrameInterval=2000000, MinBitsPerSecond=38400000, MaxBitsPerSecond=153600000, 
10:[Video], [YUY2], {Width=640, Height=480}, 333333, 30fps, [VideoInfo], Guid=05589f80-c356-11ce-bf01-00aa0055595a, VideoStandard=0, InputSize={640, 480}, MinCroppingSize={640, 480}, MaxCroppingSize={640, 480}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={640, 480}, MaxOutputSize={640, 480}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=333333, MaxFrameInterval=2000000, MinBitsPerSecond=24576000, MaxBitsPerSecond=147456000, 
11:[Video], [YUY2], {Width=640, Height=480}, 333333, 30fps, [VideoInfo2], Guid=f72a76a0-eb0a-11d0-ace4-0000c0cc16ba, VideoStandard=0, InputSize={640, 480}, MinCroppingSize={640, 480}, MaxCroppingSize={640, 480}, CropGranularityX=1, CropGranularityY=1, CropAlignX=1, CropAlignY=1, MinOutputSize={640, 480}, MaxOutputSize={640, 480}, OutputGranularityX=1, OutputGranularityY=1, StretchTapsX=0, StretchTapsY=0, ShrinkTapsX=0, ShrinkTapsY=0, MinFrameInterval=333333, MaxFrameInterval=2000000, MinBitsPerSecond=24576000, MaxBitsPerSecond=147456000, 

It seems that sub type [MJPG] or [YUY2] works good, and some people reported me [Y8] or [Y800] or [Y16] found problem.
(to show [Y8], [Y800], [Y16], you have to register GUID for each.)

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