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:TestOpenCvDemoOpenCvDemop.jpg", ImreadModes.Color);
            Cv2.ImShow("Demo", source);
            Cv2.WaitKey(0);

        }
    }
}

运行结果:

原文地址:https://www.cnblogs.com/tangchun/p/10178885.html