2012-09-03 42 views
1

任何想法如何将Image类型转换为Image<Bgr, Byte>类型?如何将图片类型转换为图片<Bgr, Byte>?

我从PictureBox得到图像控制,我需要将它转换为Image<Bgr, Byte>类型。

Image pictureBoxImage = pictureBox.Image; 
Image<Bgr, Byte> image = // ... 
+4

什么是'Imgae','Bgr'和'Imgae < Bgr,Byte >'? –

+0

我可以建议您阅读文档吗? http://www.emgu.com/wiki/index.php/Working_with_Images – Liam

回答

3

根据documentation

从位图

创建图像

也可以创建从.NET Bitmap对象的Image<TColor, TDepth>

所以,你应该可以做到:

var image = new Image<Bgr, Byte>(new Bitmap(pictureBox.Image));