Skip to content

Instantly share code, notes, and snippets.

@tuannguyenssu
Created July 1, 2019 04:33
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 tuannguyenssu/c1d1ea60a6c2a7755e500b0fc3a16029 to your computer and use it in GitHub Desktop.
Save tuannguyenssu/c1d1ea60a6c2a7755e500b0fc3a16029 to your computer and use it in GitHub Desktop.
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