From a8b7f592eecacec297b206dc69916cb3eee0f3e3 Mon Sep 17 00:00:00 2001 From: Canming Huang Date: Fri, 12 Feb 2021 09:43:16 -0500 Subject: [PATCH] Try to create Video capture instance on BuildInfo demo. --- Emgu.CV.Example/BuildInfo.NetCore.Console/Program.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Emgu.CV.Example/BuildInfo.NetCore.Console/Program.cs b/Emgu.CV.Example/BuildInfo.NetCore.Console/Program.cs index d304457c85..7d64febb46 100644 --- a/Emgu.CV.Example/BuildInfo.NetCore.Console/Program.cs +++ b/Emgu.CV.Example/BuildInfo.NetCore.Console/Program.cs @@ -80,7 +80,16 @@ private static String GetCaptureInfo() captureBackendsText.Add(String.Format("{0} - {1}", captureBackend.ID, captureBackend.Name)); } + String captureText = String.Format("Capture backends: {0}{1}", System.Environment.NewLine, String.Join(System.Environment.NewLine, captureBackendsText.ToArray())); + using (VideoCapture cap = new VideoCapture()) + { + if (cap.IsOpened) + { + String backendName = cap.BackendName; + captureText += String.Format("{0}Capture device successfully opened with default backend: {1}", System.Environment.NewLine, backendName); + } + } return captureText; }