AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Issue with Logitech BRIO at high resolution

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

Issue with Logitech BRIO at high resolution

Postby Contianer » Tue Feb 20, 2018 12:57 pm

Hi,
I have a problem when I try to capture high resolution images with this webcam (https://www.logitech.com/en-gb/product/brio?crid=1690)
I use the following code (C#):
Code: Select all
            FilterInfoCollection videosources = new FilterInfoCollection(FilterCategory.VideoInputDevice);

            if (videosources != null)
            {
                videoSource = new VideoCaptureDevice(videosources[1].MonikerString);

                try
                {
                    if (videoSource.VideoCapabilities.Length > 0)
                    {
                        string highestSolution = "0;0";
                        for (int i = 0; i < videoSource.VideoCapabilities.Length; i++)
                        {
                            if (videoSource.VideoCapabilities[i].FrameSize.Width > Convert.ToInt32(highestSolution.Split(';')[0]))
                                highestSolution = videoSource.VideoCapabilities[i].FrameSize.Width.ToString() + ";" + i.ToString();
                        }
                        videoSource.VideoResolution = videoSource.VideoCapabilities[Convert.ToInt32(highestSolution.Split(';')[1])];

                       

                    }
                } catch (Exception ex) { Console.WriteLine(ex.StackTrace); }

                videoSource.NewFrame += new AForge.Video.NewFrameEventHandler(videoSource_NewFrame);

                videoSource.Start();
            }


and
Code: Select all
void videoSource_NewFrame(object sender, AForge.Video.NewFrameEventArgs eventArgs)
        {
            pictureBoxVideo.Image = (Bitmap)eventArgs.Frame.Clone();
        }


It works fine for resolutions up to 800x448. (LED on the webcam is on and i see a picture in my application).
For resolutions above (e.g. 800x600) the LED is off and i dont get a picture.

Any help is appreciated. Greetings from Germany.
Contianer
 
Posts: 2
Joined: Tue Feb 20, 2018 12:37 pm

Re: Issue with Logitech BRIO at high resolution

Postby andrew.kirillov » Tue Feb 20, 2018 6:33 pm

Hello,

Hard to say for sure without debugging (which requires such device). I can only assume that a DirectShow (API used to access USB/internal cameras) capture graph fails to initialize. Maybe higher resolutions of the camera provide pictures in other than 24bpp format. And so capture graph does not agree with configuration. Just a guess.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Issue with Logitech BRIO at high resolution

Postby Contianer » Wed Feb 21, 2018 7:10 am

Hello,

thanks for your response. Shouldn´t that throw an exception? I don´t get anything like that, the "new frame"-handler is just never called.
Contianer
 
Posts: 2
Joined: Tue Feb 20, 2018 12:37 pm

Re: Issue with Logitech BRIO at high resolution

Postby andrew.kirillov » Wed Feb 21, 2018 7:57 am

Hello,

Contianer wrote:Shouldn´t that throw an exception?

Ideally it should do something - either work fine or throw exception explaining what went wrong. However, as you can see, things are going wrong. You can try debugging with AForge.NET source code and see could be causing the issue.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to AForge.NET Framework