jopen 11年前



  • OpenCvSharp wraps more OpenCV's functions than SharperCV and OpenCVDotNet.
  • Many classes of OpenCvSharp implement IDisposable. You can write stylish code by "using" statement.
  • OpenCvSharp does not force object-oriented programming style on you. You can also call native-style OpenCV functions.
  • OpenCvSharp provides functions for converting from IplImage into Bitmap(GDI+) or WriteableBitmap(WPF).
  • OpenCvSharp can work on Mono. Therefore it is able to run on any platform which Mono supports (e.g. Linux, BSD and Mac OS X).

using System;  using OpenCvSharp;    class Program   {      static void Main()       {          using (IplImage src = new IplImage("lenna.png", LoadMode.GrayScale))          using (IplImage dst = new IplImage(src.Size, BitDepth.U8, 1))           {              src.Canny(dst, 50, 200);              using (CvWindow window_src = new CvWindow("src image", src))               using (CvWindow window_dst = new CvWindow("dst image", dst))               {                  CvWindow.WaitKey();              }          }      }  }