Create your first Open CV module in C# .NET

Deepak Battini
tech-quantum
Published in
3 min readJul 4, 2018

--

This is my first blog to showcase how easy it is to create a simple module to work with Open CV in .NET. Most of you might have seen lots of samples written in Python, but here I would like to showcase its equally easy to use and implement open CV with .NET. I am going to use .NET core 2.0 as the project type for all of the examples, but you can choose .NET framework version of your own choice.

Prerequisite:

  1. Visual Studio installed (I am using VS 2017)
  2. .NET Core Framework
  3. Assuming that you know about C# coding

Setup

Let’s start by creating a console project and giving it a name “MyFirstImageLoader”

Next step is to add Open CV module to the project and start coding your first module to load an image and display.

Go to Tools->NuGet Package Manager-> Manage NuGet Packages for Solution and search for “OpenCvSharp3-AnyCPU”. Install the package to the newly created project

Once installed you can see the project structure like below:

--

--

Deepak Battini
tech-quantum

Programmer and founder of blazorly.com. passionate open-source contributor, loves to combine cutting-edge tech expertise.