码迷,mamicode.com
首页 > 其他好文 > 详细

Emgu.CV怎么加载Bitmap

时间:2020-10-06 19:52:37      阅读:32      评论:0      收藏:0      [点我收藏+]

标签:contain   版本   his   head   tor   uil   dde   size   open   

 EmguCV 在4.0.1版本之后没办法用Bitmap创建Image了。 我给大家说下 EmguCV怎么加载Bitmap

下边是 EmguCV 官方文档写的,意思是从4.0.1以后的版本不能直接Bitmap创建Image跟Mat了,bitmap被移到了拓展方法里。

废话不说 直接上代码了!

Bitmap bitmap = null;//声明你的bitmap
Image<Gray, byte> grayimage = BitmapExtension.ToImage<Gray, byte>(bitmap);

 

哈哈,就是这样两句就能用 Bitmap创建Emgu的Image了,是不是很简单!

 

  • 4.2.0 is based on the Open CV 4.2.0 release
  • The Emgu.CV dll is now targeting .NetStandard 2.0 instead of .Net 3.5
  • The Emgu.CV.UI dll is now targeting .Net 4.6.1 instead of .Net 3.5
  • The nuget package structures has been changed. Emgu.CV nuget package < 4.2.0 contains both the .Net 3.5 dll and the native dll for Windows. Starting from 4.2.0, Emgu.CV nuget package will contain only the .NetStandard 2.0 profile dll. The native dll comes in separate packages for different platforms. e.g. The Emgu.CV.runtime.windows package contains the native dll for Windows as well as the Emgu.CV.UI dll for Windows when targeting .netframework 4.6.1+. The Emgu.CV-CUDA nuget package has been replaced with Emgu.CV.runtime.windows.cuda nuget package.
  • Open CV CUDA DNN module required Compute 5.3 and higher. Our cuda build not longer build with cuda compute bin option < 5.3.
  • Conversion between Mat, UMat, GpuMat and Image<,> and Bitmap objects requires code changes. The constructors of the Mat, UMat, GpuMat and Image<,> that accepts Bitmap has been removed. It has been added to the Emgu.CV.UI.dll file as an extension method. The dll is part of the Emgu.CV.runtime.windows (or the similar Emgu.CV.runtime.windows.cuda) nuget pacakge. Prior to v4.2.0 this code can be use to create a Mat from Bitmap

Emgu.CV怎么加载Bitmap

标签:contain   版本   his   head   tor   uil   dde   size   open   

原文地址:https://www.cnblogs.com/snow-zhang/p/13763029.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!