2013-02-01 99 views
1

我使用Emgu.CV逐幀進行一些視頻處理。從Capture實例中抓取一幀後,我將圖像轉換爲GpuImage以執行一些GPU處理。Emgu CV顯示GpuImage

是否有可能直接顯示GpuImage而不返回到圖像?

我的用戶界面在WPF上。

+0

您是否找到了解決方案? – Pedro77

+0

這裏http://stackoverflow.com/questions/17496729/drawing-in-opencv-with-opengl是我找到的最接近的東西。 D3Dmage可能是正確的方法,它是一個ImageSource,但用法非常複雜。如果我有機會及時實施這種控制,我會發布更新。 –

回答

0

是有可能在Emgu.CV.UI.ImageBox顯示GpuImage:

我已經測試了這個在:emgucv窗口的通用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處理絕對是最好的選擇。

+0

我正在尋找的是一種避免從GPU內存下載GpuImage的方法。 ImageBox總是下載:(這通常是實時圖像處理中的瓶頸。 –