我正在逐帧使用Emgu.CV进行一些视频处理。在我从Capture实例中抓取一个帧之后,我将图像转换为GpuImage以进行一些图形处理器处理。
是否可以直接显示GpuImage而无需返回到图像?
我的UI在WPF上。
发布于 2013-09-03 17:51:42
是的,可以在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处理绝对是一条可行的道路。
https://stackoverflow.com/questions/14641627
复制相似问题