Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emgu.CV 4.2.0 image conversion methods not available

Tags:

c#

emgucv

I have a .Net Standard 2.0 project with latest version of Emgu.CV - 4.2.0.3636 installed via Nuget package. I also have System.Drawing.Common package which brings support for bitmaps. I need a possibility to convert Mat into Bitmap and to create Mats from existing Bitmaps. Previously Mats had Bitmap property and there was a constructor of Image, for example, accepting Bitmap as an argument. From what I see in release notes of 4.2.0 version of Emgu.CV - these have been replaced with ToMat() extension method for bitmaps and AsBitmap() method for Mats/Images. However for me both of these methods are not available.

Release notes on official website say:

It has been added to the Emgu.CV.UI nuget package (or dll file)

In the same time I don't see the Emgu.CV.UI package in nuget, only the Emgu.CV one which I already have installed.

What else may I have missing?

like image 685
Vladimir Glushkov Avatar asked Feb 04 '20 19:02

Vladimir Glushkov


1 Answers

Since Emgu 4.4.0, the bitmap part is in a third (NuGet) package Emgu.CV.Bitmap which solves this problem (used to be within Emgu.CV.runtime.windows with 4.3.0 and before).

So you need the THREE packages:

  • Emgu.CV (of course)
  • Emgu.CV.runtime.windows
  • and now, Emgu.CV.Bitmap
like image 56
Goularou Avatar answered Sep 29 '22 11:09

Goularou