OpenCvSharp尝试

 

OpenCvSharp是封装了OpenCV的.net版本

项目地址:https://github.com/shimat/opencvsharp

简单使用:

1、NuGet安装

2、使用OpenCvSharp打开一张图片,需要添加 OpenCvSharp 命名空间

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenCvSharp;

namespace OpenCvDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            Mat source = new Mat(@"F:\Test\OpenCvDemo\OpenCvDemo\p.jpg", ImreadModes.Color);
            Cv2.ImShow("Demo", source);
            Cv2.WaitKey(0);

        }
    }
}

运行结果:

 

posted @ 2018-12-26 14:13  _York  阅读(3044)  评论(1编辑  收藏  举报