![opencvsharp](https://socialify.git.ci/shimat/opencvsharp/image?description=1&forks=1&language=1&owner=1&pattern=Plus&stargazers=1&theme=Light)
[![Github Actions Windows Status](https://github.com/shimat/opencvsharp/workflows/Windows%20Server%202019/badge.svg)](https://github.com/shimat/opencvsharp/actions) [![Github Actions Ubuntu Status](https://github.com/shimat/opencvsharp/workflows/Ubuntu%2018.04/badge.svg)](https://github.com/shimat/opencvsharp/actions) [![Github Actions MacOS Status](https://github.com/shimat/opencvsharp/workflows/macOS%2010.15/badge.svg)](https://github.com/shimat/opencvsharp/actions) [![GitHub license](https://img.shields.io/github/license/shimat/opencvsharp.svg)](https://github.com/shimat/opencvsharp/blob/master/LICENSE)
Old versions of OpenCvSharp are stored in [opencvsharp_2410](https://github.com/shimat/opencvsharp_2410).
## NuGet
### Managed libraries
| Package | Description | Link |
|---------|-------------|------|
|**OpenCvSharp4**| OpenCvSharp core libraries | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.svg)](https://badge.fury.io/nu/OpenCvSharp4) |
|**OpenCvSharp4.Extensions**| GDI+ Extensions | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.Extensions.svg)](https://badge.fury.io/nu/OpenCvSharp4.Extensions) |
|**OpenCvSharp4.WpfExtensions**| WPF Extensions | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.WpfExtensions.svg)](https://badge.fury.io/nu/OpenCvSharp4.WpfExtensions) |
|**OpenCvSharp4.Windows**| All-in-one package for Windows (except UWP) | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.Windows.svg)](https://badge.fury.io/nu/OpenCvSharp4.Windows) |
### Native bindings
| Package | Description | Link |
|---------|-------------|------|
|**OpenCvSharp4.runtime.win**| Native bindings for Windows x64/x86 (except UWP) | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.runtime.win.svg)](https://badge.fury.io/nu/OpenCvSharp4.runtime.win) |
|**OpenCvSharp4.runtime.uwp**| Native bindings for UWP (Universal Windows Platform) x64/x86/ARM | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.runtime.uwp.svg)](https://badge.fury.io/nu/OpenCvSharp4.runtime.uwp) |
|**OpenCvSharp4.runtime.ubuntu.18.04-x64**| Native bindings for Ubuntu 18.04 x64 | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.runtime.ubuntu.18.04-x64.svg)](https://badge.fury.io/nu/OpenCvSharp4.runtime.ubuntu.18.04-x64) |
|**OpenCvSharp4.runtime.osx.10.15-x64**| Native bindings for macOS 10.15 x64 | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.runtime.osx.10.15-x64.svg)](https://www.nuget.org/packages/OpenCvSharp4.runtime.osx.10.15-x64/) |
|**OpenCvSharp4.runtime.linux-arm**| Native bindings for Linux Arm | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.runtime.linux-arm.svg)](https://www.nuget.org/packages/OpenCvSharp4.runtime.linux-arm/) |
|**OpenCvSharp4.runtime.wasm**| Native bindings for WebAssembly | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp4.runtime.wasm.svg)](https://www.nuget.org/packages/OpenCvSharp4.runtime.wasm/) |
Native binding (OpenCvSharpExtern.dll / libOpenCvSharpExtern.so) is required to work OpenCvSharp. To use OpenCvSharp, you should add both `OpenCvSharp4` and `OpenCvSharp4.runtime.*` packages to your project. Currently, native bindings for Windows, UWP, Ubuntu 18.04 and macOS are released.
Packages named OpenCvSharp3-* and OpenCvSharp-* are deprecated.
> [OpenCvSharp3-AnyCPU](https://www.nuget.org/packages/OpenCvSharp3-AnyCPU/) / [OpenCvSharp3-WithoutDll](https://www.nuget.org/packages/OpenCvSharp3-WithoutDll/) / [OpenCvSharp-AnyCPU](https://www.nuget.org/packages/OpenCvSharp-AnyCPU/) / [OpenCvSharp-WithoutDll](https://www.nuget.org/packages/OpenCvSharp-WithoutDll/)
## Docker images
https://hub.docker.com/u/shimat
- Ubuntu 18.04 (.NET Core 3.1): [shimat/ubuntu18-dotnetcore3.1-opencv4.5.0](https://hub.docker.com/r/shimat/ubuntu18-dotnetcore3.1-opencv4.5.0)
- For Google App Engine Flexible (.NET Core 3.1): [shimat/appengine-aspnetcore3.1-opencv4.5.0](https://hub.docker.com/r/shimat/appengine-aspnetcore3.1-opencv4.5.0)
- For AWS Lambda (.NET 5): [shimat/al2-dotnet5-opencv4.5.0](https://hub.docker.com/r/shimat/al2-dotnet5-opencv4.5.0)
- Code sample: https://github.com/shimat/opencvsharp_AWSLambdaSample
## Installation
### Windows (except UWP)
Add `OpenCvSharp4` and `OpenCvSharp4.runtime.win` NuGet packages to your project. You can use `OpenCvSharp4.Windows` instead.
### UWP
Add `OpenCvSharp4` and `OpenCvSharp4.runtime.uwp` NuGet packages to your project. Note that `OpenCvSharp4.runtime.win` and `OpenCvSharp4.Windows` don't work for UWP.
### Ubuntu 18.04
Add `OpenCvSharp4` and `OpenCvSharp4.runtime.ubuntu.18.04.x64` NuGet packages to your project.
```
dotnet new console -n ConsoleApp01
cd ConsoleApp01
dotnet add package OpenCvSharp4
dotnet add package OpenCvSharp4.runtime.ubuntu.18.04-x64
# -- edit Program.cs --- #
dotnet run
```
### Google AppEngine Flexible (Ubuntu 16.04)
Some Docker images are provided to use OpenCvSharp with AppEngine Flexible. The native binding (libOpenCvSharpExtern) is already built in the docker image and you don't need to worry about it.
```
FROM shimat/appengine-aspnetcore3.1-opencv4.5.0:20201030
ADD ./ /app
ENV ASPNETCORE_URLS=http://*:${PORT}
WORKDIR /app
ENTRYPOINT [ "dotnet", "YourAspNetCoreProject.dll" ]
```
### Ubuntu 18.04 Docker image
You can use the `shimat/ubuntu18-dotnetcore3.1-opencv4.5.0` docker image.
This issue may be helpful: https://github.com/shimat/opencvsharp/issues/920
### Downloads
If you do not use NuGet, get DLL files from the [release page](https://github.com/shimat/opencvsharp/releases).
## Target OpenCV
* [OpenCV 4.5.](http://opencv.org/) with [opencv_contrib](https://github.com/opencv/opencv_contrib)
## Requirements
* [.NET Framework 4.6.1](http://www.microsoft.com/ja-jp/download/details.aspx?id=1639) / [.NET Core 2.0](https://www.microsoft.com/net/download) / [Mono](http://www.mono-project.com/Main_Page)
* (Windows) [Visual C++ 2019 Redistributable Package](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
* (Windows Server) Media Foundation
```
PS1> Install-WindowsFeature Server-Media-Foundation
```
* (Ubuntu, Mac) You must pre-install all the dependency packages needed to build OpenCV. Many packages such as libjpeg must be installed in order to work OpenCV.
https://www.learnopencv.com/install-opencv-4-on-ubuntu-18-04/
**OpenCvSharp won't work on Unity and Xamarin platform.** For Unity, please consider using [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088) or some other solutions.
**OpenCvSharp does not support CUDA.** If you want to use the CUDA features, you need to customize the native bindings yourself.
## Usage
For more details, see **[samples](https://github.com/shimat/opencvsharp_samples/)** and **[Wiki](https://github.com/shimat/opencvsharp/wiki)** pages.
**Always remember to release Mat instances! The `using` syntax is useful.**
```C#
// C# 8
// Edge detection by Canny algorithm
using OpenCvSharp;
class Program
{
static void Main()
{
using var src = new Mat("lenna.png", ImreadModes.Grayscale);
using var dst = new Mat();
Cv2.Canny(src, dst, 50, 200);
using (new Window("src image", src))
using (new Window("dst image", dst))
{
Cv2.WaitKey();
}
}
}
```
As mentioned above, objects of classes, such as Mat and MatExpr, have unmanaged resources and need to be manually released by calling the Dispose() method. Worst of all, the +, -, *, and other operators create new objects each time, and these objects need to be disposed, or there will be memory leaks. Despite having the using syntax, the code still looks very verbose.
Therefore, a ResourcesTracker cla
没有合适的资源?快使用搜索试试~ 我知道了~
OpenCvSharp-4.6.0-20220608.zip
共53个文件
dll:25个
pdb:18个
config:5个
需积分: 29 21 下载量 84 浏览量
2022-09-05
20:01:23
上传
评论
收藏 101.09MB ZIP 举报
温馨提示
搬运至Github,下载不易,分享大家。 当前最新版Opencv的Csharp运行库,release版,非源代码。 原下载链接如下: https://github.com/shimat/opencvsharp/releases
资源详情
资源评论
资源推荐
收起资源包目录
OpenCvSharp-4.6.0-20220608.zip (53个子文件)
ManagedLib\netstandard2.0\OpenCvSharp.Extensions.pdb 16KB
ManagedLib\net6.0\OpenCvSharp.pdb 350KB
ManagedLib\net6.0\OpenCvSharp.WpfExtensions.dll 14KB
ManagedLib\netstandard2.1\OpenCvSharp.dll 916KB
ManagedLib\net6.0\OpenCvSharp.Extensions.dll 20KB
XmlDoc\OpenCvSharp.Extensions.xml 7KB
NativeLib\uwp\x64\opencv_world460.dll 19.29MB
ManagedLib\net48\OpenCvSharp.WpfExtensions.pdb 6KB
ManagedLib\netcoreapp3.1\OpenCvSharp.WpfExtensions.dll 14KB
ManagedLib\net6.0\OpenCvSharp.Extensions.pdb 18KB
NativeLib\uwp\ARM\opencv_world460.dll 16.81MB
ManagedLib\net6.0\OpenCvSharp.dll 919KB
NativeLib\uwp\x86\OpenCvSharpExtern.pdb 10.52MB
ManagedLib\netstandard2.0\OpenCvSharp.pdb 348KB
ManagedLib\net48\OpenCvSharp.pdb 342KB
ManagedLib\netstandard2.0\OpenCvSharp.Extensions.dll 20KB
ManagedLib\netstandard2.0\OpenCvSharp.dll 917KB
ManagedLib\net48\OpenCvSharp.Extensions.pdb 10KB
NativeLib\win\x64\OpenCvSharpExtern.pdb 59.14MB
LICENSE 11KB
ManagedLib\netstandard2.1\OpenCvSharp.Extensions.dll 20KB
ManagedLib\netstandard2.0\OpenCvSharp.dll.config 148B
ManagedLib\net48\OpenCvSharp.dll.config 148B
NativeLib\uwp\ARM\OpenCvSharpExtern.pdb 10.13MB
ManagedLib\netcoreapp3.1\OpenCvSharp.WpfExtensions.pdb 15KB
ManagedLib\net48\OpenCvSharp.Extensions.dll 20KB
NativeLib\uwp\x64\OpenCvSharpExtern.pdb 10.13MB
ManagedLib\netstandard2.1\OpenCvSharp.dll.config 148B
NativeLib\uwp\ARM\OpenCvSharpExtern.dll 1.08MB
XmlDoc\OpenCvSharp.WpfExtensions.xml 7KB
ManagedLib\netcoreapp3.1\OpenCvSharp.pdb 350KB
NativeLib\uwp\x86\OpenCvSharpExtern.dll 978KB
NativeLib\uwp\x64\OpenCvSharpExtern.dll 1.08MB
ManagedLib\netcoreapp3.1\OpenCvSharp.Extensions.dll 20KB
ManagedLib\netstandard2.1\OpenCvSharp.Extensions.pdb 16KB
NativeLib\win\x64\OpenCvSharpExtern.dll 51.7MB
ManagedLib\netcoreapp3.1\OpenCvSharp.dll.config 148B
NativeLib\uwp\x86\opencv_world460.dll 18.01MB
ManagedLib\netcoreapp3.1\OpenCvSharp.Extensions.pdb 18KB
ManagedLib\net6.0\OpenCvSharp.WpfExtensions.pdb 15KB
NativeLib\win\x86\OpenCvSharpExtern.dll 35.83MB
ManagedLib\net48\OpenCvSharp.dll 916KB
README.md 12KB
XmlDoc\OpenCvSharp.xml 1.9MB
ManagedLib\netcoreapp3.1\OpenCvSharp.dll 916KB
DebuggerVisualizers\OpenCvSharp.DebuggerVisualizers.dll 9KB
ManagedLib\net6.0\OpenCvSharp.dll.config 148B
NativeLib\uwp\x64\opencv_img_hash460.dll 125KB
ManagedLib\netstandard2.1\OpenCvSharp.pdb 348KB
NativeLib\uwp\ARM\opencv_img_hash460.dll 120KB
NativeLib\uwp\x86\opencv_img_hash460.dll 123KB
NativeLib\win\x86\OpenCvSharpExtern.pdb 52.94MB
ManagedLib\net48\OpenCvSharp.WpfExtensions.dll 14KB
共 53 条
- 1
wxp237
- 粉丝: 16
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于plc的污水处理,组态王动画仿真,带PLC源代码,组态王源代码,图纸,IO地址分配
- MATLAB代码:考虑P2G和碳捕集设备的热电联供综合能源系统优化调度模型 关键词:碳捕集 综合能源系统 电转气P2G 热电联产 低碳调度 参考文档:Modeling and Optimiza
- 永磁同步直线电机仿真实例,仿真教学 maxwell16.0版本 12槽11极 包括图中模型以及一个仿真设置要点word文档教程
- 基于mpx+vue+node.js的双端网盘系统的设计与实现源代码全套技术资料.zip
- welearn刷时长版本v3.0.bat
- 前端分析-2023071100789-y5
- 前端分析-2023071100789
- 调查问卷系统源代码全套技术资料.zip
- C#实用教程郑阿奇梁敬东程序源代码及电子课件
- 环境监测系统源代码全套技术资料.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0