Skip to content

Instantly share code, notes, and snippets.

@elbruno
Created November 10, 2020 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elbruno/15afa43258b57e3b4e795fc210ad2a5e to your computer and use it in GitHub Desktop.
Save elbruno/15afa43258b57e3b4e795fc210ad2a5e to your computer and use it in GitHub Desktop.
opencvsharpnetcore5showcamera
using OpenCvSharp;
var capture = new VideoCapture(0);
var window = new Window("El Bruno - OpenCVSharp demo");
var image = new Mat();
while (true)
{
capture.Read(image);
if (image.Empty())
break;
window.ShowImage(image);
if (Cv2.WaitKey(1) == 113) // Q
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment