C#, OpenCv Development Guide (01) - the installation, construction and visualization tutorial of C# development environment OpenCvSharp

1. OpenCV 

OpenCV is a cross-platform computer vision and machine learning function library released based on the Apache2.0 license (open source), supporting Windows, Linux, Android and Mac OS operating systems. OpenCV consists of a series of C/C++ functions and a small number of C++ classes, using MMX and SSE instructions.
OpenCV implements many common algorithms for image processing and computer vision.
OpenCV is written in C language and also supports C#, Java, Golang, Ruby and MATLAB development.
opencv official website https://opencv.org/

C# is the only industrial software development language with the highest development efficiency and the most elegant code. Of course, you must choose C# to develop OpenCV.

Developing OpenCV with C# is the same path as calling other C/C++ class libraries: (1) ImportDLL; (2) Wrapper;

The Wrapper method is recommended. The best one by far is OpenCvSharp.

二、OpenCvSharp

OpenCvSharp is a .Net wrapper for OpenCV. It is developed using the latest OpenCV library. Its usage habits are closer to the original OpenCV than EmguCV. There are detailed usage examples for reference. The library is released under the LGPL and is friendly to commercial applications. Using OpenCvSharp, C#, VB.NET and other languages ​​can be used to implement a variety of popular image processing (image processing) and computer vision (computer vision) algorithms.
1. Compared with SharperCV and OpenCVDotNet, OpenCvSharp directly encapsulates more OpenCV methods to reduce the difficulty of learning.
2. Most of them inherit the IDisposable interface, which is convenient for using the using statement block.
3. Without imposing object-oriented thinking, you can directly call the native style OpenCV method.
4. You can directly convert IplImage to Bitmap(GDI+) or WriteableBitmap(WPF).
5. Support Mono. Can run on any platform that supports Mono (such as Linux, BSD, Mac OS X, etc.).
opencvsharp github https://github.com/shimat/opencvsharp

3. LearnOpenCV


The OpenCV learning website made by Indian programmer Satya Mallick has some practical articles and codes.
https://learnopencv.com/ https://learnopencv.com/

THE BEST DOCUMENT MANAGEMENT SYSTEM 315SOFT.COM


Four, OpenCvSharp environment build animation demonstration

It is recommended to use NuGet of Visual Studio , which is directly installed, fast and easy to maintain.

It is recommended, preferably, to install the following three basic components. If you want to develop more applications, you can install others:

(1)OpenCVSharp4

(2)OpenCvSharp4.Extensions

(3)OpenCvSharp4.runtime.win

5. Reasons for using OpenCVSharp Wrapper that cannot be refused

When writing a program, especially when using a third-party API, the class name? Function name? parameter? . . . .

Can not do without IntelliCode's smart tips! ! ! ! ! !

1、IntelliCode

IntelliCode for Visual Studio provides the following features:

AI-assisted IntelliSense in multiple languages ​​that predicts the most likely correct API for developers to use, not just an alphabetical list of members. It uses the developer's current code context and patterns to provide this dynamic list.

For C# users, IntelliCode offers parameter completion in addition to member suggestions. This feature stars the parameter names you are most likely to use when calling a method and places those suggestions at the top of the completion list. When you start typing in parentheses or press Ctrl+Space, a completion list will appear.

C# developers in Visual Studio 2022 and later also benefit from whole-line completion, which predicts the next block of code based on the current code and renders it as an inline prediction.

AI-assisted IntelliSense suggestions based on your own code (C# only).

Infer code style and formatting conventions to dynamically create .editorconfig files from the code base (C# only).

Suggestion: IntelliCode tracks edits locally, detects duplicate actions are performed, and applies the same action in other similar places (C# only).
 

2. OpenCVSharp perfectly supports IntelliCode

Use OpenCV 

Just add one sentence:

using OpenCvSharp;

So, writing code with OpenCvSharp is very efficient and easy!

Guess you like

Origin blog.csdn.net/beijinghorn/article/details/125528673