OpenCvSharp尝试

时间:2023-03-08 19:46:01
OpenCvSharp尝试

OpenCvSharp是封装了OpenCV的.net版本

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

简单使用:

1、NuGet安装

OpenCvSharp尝试

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

运行结果:

OpenCvSharp尝试