1
任何想法如何將Image
類型轉換爲Image<Bgr, Byte>
類型?如何將圖片類型轉換爲圖片<Bgr, Byte>?
我從PictureBox
得到圖像控制,我需要將它轉換爲Image<Bgr, Byte>
類型。
Image pictureBoxImage = pictureBox.Image;
Image<Bgr, Byte> image = // ...
任何想法如何將Image
類型轉換爲Image<Bgr, Byte>
類型?如何將圖片類型轉換爲圖片<Bgr, Byte>?
我從PictureBox
得到圖像控制,我需要將它轉換爲Image<Bgr, Byte>
類型。
Image pictureBoxImage = pictureBox.Image;
Image<Bgr, Byte> image = // ...
從位圖
創建圖像也可以創建從.NET
Bitmap
對象的Image<TColor, TDepth>
所以,你應該可以做到:
var image = new Image<Bgr, Byte>(new Bitmap(pictureBox.Image));
什麼是'Imgae','Bgr'和'Imgae < Bgr,Byte >'? –
我可以建議您閱讀文檔嗎? http://www.emgu.com/wiki/index.php/Working_with_Images – Liam