Skip to content

Instantly share code, notes, and snippets.

Created July 1, 2019 04:33
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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment