gpt4 book ai didi

c# - 如何将 ImageBox.Image 转换为 Image

转载 作者:太空宇宙 更新时间:2023-11-03 12:52:48 25 4
gpt4 key购买 nike

我需要在图像变量中包含我的(Emgu CV 版本 3)ImageBox 的图像,我应该怎么做?

我试过了,但运气不好:

 Image<Bgr, Byte> imgeOrigenal;
imgeOrigenal = ImageBoxbOrigenal.Image; //error line

结果:

Cannot implicitly convert type 'Emgu.CV.IImage' to 'Emgu.CV.Image'. An explicit conversion exists

最佳答案

你可以通过源位图转换它,像这样:

Image<Bgr, Byte> imgeOrigenal = new Image<Bgr, Byte>(ImageBoxbOrigenal.Image.Bitmap);

关于c# - 如何将 ImageBox.Image 转换为 Image<Bgr, Byte>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34948499/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com