2

Imageタイプをタイプに変換する方法はありImage<Bgr, Byte>ますか?

Controlから画像を取得し、PictureBoxそれをImage<Bgr, Byte>型に変換する必要があります。

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

3 に答える 3

4

ドキュメントによると:

ビットマップから画像を作成する

Image<TColor, TDepth>.Net Bitmapオブジェクトからを作成することもできます

したがって、次のことができるはずです。

var image = new Image<Bgr, Byte>(new Bitmap(pictureBox.Image));
于 2012-09-03T12:35:16.900 に答える