Reputation: 521
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?
Upvotes: 9
Views: 6473
Reputation: 188
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:
Upvotes: 12
Reputation: 79
I had the same problem even though I had the Emgu.CV.runtime.windows package.
In order to get access to the ToBitmap() methods I did need the Emgu.CV.UI.dll
Doesn't look like it's included with either the runtime or the Emgu.CV nuget packages.
How I got it was to go to the github page, download this which has the UI.dll built in the bin folder (or build the project yourself)
Reference that dll and you get access to the methods. Hopefully in the future they make it available via nuget
Upvotes: 1
Reputation: 712
You also need to add a Emgu.Cv Runtime package for your OS. So for Windows you will need to add Emgu.Cv.Runtime.Windows
Upvotes: 5