Skip to content

Instantly share code, notes, and snippets.

@tuannguyenssu
Created July 1, 2019 04:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
using System;
using OpenCvSharp;
namespace OpenCVSharpTest
{
class Program
{
static void Main(string[] args)
{
string imagePath = "Lenna.png";
Mat src = new Mat(imagePath, ImreadModes.Grayscale);
Mat dst = new Mat();
// Edge detection by Canny algorithm
Cv2.Canny(src, dst, 50, 200);
using (new Window("src image", src))
using (new Window("dst image", dst))
{
Cv2.WaitKey();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment