【问题标题】:Emgu CV display GpuImageEmgu CV 显示 GpuImage
【发布时间】:2013-02-01 07:31:27
【问题描述】:

我正在逐帧使用 Emgu.CV 进行一些视频处理。从 Capture 实例中抓取一帧后,我将 Image 转换为 GpuImage 以进行一些 GPU 处理。

是否可以不返回Image直接显示GpuImage?

我的用户界面在 WPF 上。

【问题讨论】:

  • 你找到解决办法了吗?
  • 这里的stackoverflow.com/questions/17496729/… 是我找到的最接近的东西。可能正确的方法是使用 D3DImage 这是一个 ImageSource 但使用非常复杂。如果我有机会及时实施这种控制,我会发布更新。

标签: c# wpf emgucv


【解决方案1】:

是的,可以在 Emgu.CV.UI.ImageBox 中显示 GpuImage:

我在 emgucv-windows-universal-gpu 2.4.9.1847 中对此进行了测试

// Create a new GpuImage and assign its value from Image.
GpuImage<Bgr, byte> gpuImage = new GpuImage<Bgr, byte>(image);

// Show the GpuImage in the ImageBox.
this.imageBox.Image = gpuImage;

这个解决方案是我能看到的最好的解决方案,但无论哪种方式,即使将 GpuImage 转换回图像,它也很容易和快速:

// Create a new Image and convert the GpuImage to it.
Image<Bgr, byte> image = gpuImage.ToImage();

// Show the GpuImage in the ImageBox.
this.imageBox.Image = image;

希望这会有所帮助!

一旦获得理解,Emgu 就是一个极好的资源。它的布局和编程非常好。然而,GPU 处理绝对是要走的路。

【讨论】:

  • 我正在寻找的是一种避免从 GPU 内存下载 GpuImage 的方法。 ImageBox 总是下载 :( 。这对我来说通常是实时图像处理的瓶颈。
猜你喜欢
  • 2017-11-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-07-15
  • 2011-09-04
  • 1970-01-01
  • 2015-02-17
  • 1970-01-01
相关资源
最近更新 更多