Page 1 of 1

Issue with Logitech BRIO at high resolution

PostPosted: Tue Feb 20, 2018 12:57 pm
by Contianer
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.

Re: Issue with Logitech BRIO at high resolution

PostPosted: Tue Feb 20, 2018 6:33 pm
by andrew.kirillov
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.

Re: Issue with Logitech BRIO at high resolution

PostPosted: Wed Feb 21, 2018 7:10 am
by Contianer
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.

Re: Issue with Logitech BRIO at high resolution

PostPosted: Wed Feb 21, 2018 7:57 am
by andrew.kirillov
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.