My favorites | Sign in
Project Logo
                
Links:
Blogs:
Feeds:
People details
Project owners:
  schimatk
Project committers:
matthieu.bach, DieterAndreasLorenz

OpenCvSharp

Description

OpenCvSharpは、OpenCVをC#やVB.NETなどの.NET Frameworkの言語から利用するためのラッパーです。大部分はC#によって書かれています。OpenCvSharpを使うと、C#やVB.NETといった言語から、簡単に、かつ高速な画像処理プログラムを作成できます。

OpenCvSharp is a wrapper of OpenCV for .NET Framework written in C#. You can use many popular image processing and computer vision algorithms from C#, VB.NET, etc.

Please correct, when I use wrong English!!

Features

Examples

以下のコードは、Cannyアルゴリズムによるエッジ検出のプログラムです。

The code below finds the edges on the input image using the Canny algorithm.

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();
            }
        }
    }
}

OpenCVのネイティブの関数形式のラッパーも用意しています。OpenCVに慣れている方でも扱いやすくなっています。既存のC/C++で書かれたコードからの翻訳も容易です。

Native-style functions are also available. Experienced OpenCV users can use OpenCvSharp easily.

using System;
using OpenCvSharp;

class Program 
{
    static void Main() 
    {
        IplImage src = Cv.LoadImage("lenna.png", LoadMode.GrayScale);
        IplImage dst = Cv.CreateImage(new CvSize(src.Width, src.Height), BitDepth.U8, 1);
        Cv.Canny(src, dst, 50, 200);
        Cv.NamedWindow("src image");  
        Cv.ShowImage("src image", src);
        Cv.NamedWindow("dst image");  
        Cv.ShowImage("dst image", dst);
        Cv.WaitKey();
        Cv.DestroyAllWindows();
        Cv.ReleaseImage(src);
        Cv.ReleaseImage(dst);          
    }
}

System Requirements

+ .NET Framework 2.0 or Mono
+ Visual C++ 2005 SP1 Redistributable Package and/or Visual C++ 2008 SP1 Redistributable Package
+ OpenCV 2.0 or 1.1pre
You will need to download and install the OpenCV library from here.








Hosted by Google Code