我如何在Emgu CV项目中利用OpenCL的优势 [英] How do I take the advantage of OpenCL in an Emgu CV project
问题描述
我是使用Emgu CV的新手,并开始创建小型示例项目,例如面部检测,眼睛检测等.如果可以利用OpenCL的优势使用gpu加速过程,那将是很好的.否则,当我减小scaleFactor时,会导致大量的cpu利用率.我怎样才能做到这一点?谢谢.
I'm newbie in using Emgu CV and started to create small sample projects, for example face detection, eye detection,..etc. It would be good if I could take the advantage of OpenCL to accelerate the process using gpu. Otherwise, it causes massive cpu utilization when I decrease the scaleFactor. How can I do that? Thanks.
推荐答案
据我所知(来自 Emgu 查看页面的底部,UMat
图像格式会自动使用OpenCL引擎.
首先,您必须通过CvInvoke.UseOpenCL = true
将OpenCL设置为true,然后需要创建UMat
图像格式,然后尝试处理该图像.
As far as I know (from the official page of Emgu look at the bootom of the page) the UMat
image format uses automatically the OpenCL Engine.
First you have to set the OpenCL to true by CvInvoke.UseOpenCL = true
, then you need to create a UMat
image format and then try to process that image.
至少这就是 Emgu 的官方页面所说的.
At least that's what the official page of Emgu telling.
我尝试过并工作,它极大地提高了性能.
I tried this and work, it increased the perfomance quite a lot.
这篇关于我如何在Emgu CV项目中利用OpenCL的优势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!