[英]Would it work and be faster if I call function in OpenCV GPU module in my kernel function?
OpenCV has a gpu. GPU-accelerated Computer Vision
OpenCV有一个
gpu. GPU-accelerated Computer Vision
gpu. GPU-accelerated Computer Vision
module ( http://docs.opencv.org/modules/gpu/doc/gpu.html ). gpu. GPU-accelerated Computer Vision
模块( http://docs.opencv.org/modules/gpu/doc/gpu.html )。 There are many functions which is already use GPU techniques. 有许多功能已在使用GPU技术。 So I can directly use the function OpenCV applies.
所以我可以直接使用OpenCV适用的功能。 But I wonder whether it would be faster if I write my own kernel and in each kernel I call function of OpenCV GPU module.
但是我想知道如果我编写自己的内核并在每个内核中调用OpenCV GPU模块的功能是否会更快。 This is in the case I have many images.
在我有很多图像的情况下。 To handle each image I call OpenCV funtion in GPU module.
为了处理每个图像,我在GPU模块中调用OpenCV功能。 Then it would be parallel-nested-parallel.
那么它将是并行嵌套并行的。
Your question is not entirely clear to me, but I would like to say this: it's impossible to say which would be faster, unless somebody already implemented that same algorithm using the approach you have in mind, and then shared a report about the benchmark tests. 您的问题对我来说并不完全清楚,但是我想说一下:不可能说出哪个更快,除非有人已经使用您所想到的方法实现了相同的算法,然后分享了有关基准测试的报告。
There's a number of factors involved: 涉及许多因素:
What I'm saying is: don't assume OpenCV GPU's module will always run it's algorithms faster than the CPU you got. 我的意思是:不要以为OpenCV GPU的模块将始终以比您拥有的CPU更快的速度运行它的算法。 Test it, measure it!
测试,测量! The only way to know for sure is through experimentation and benchmark.
唯一可以肯定的方法是通过实验和基准测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.