[英]How to run openCV algorithms in real-time on Raspberry PI3
I'm working on a Raspberry PI, an embedded linux platform with Raspbian Jessie where Python 2.7 is already installed, and I have OpenCV algorithms that must run in real-time and must apply several HAAR Cascade classifiers on the same image. 我正在开发Raspberry PI,这是一个已经安装了Python 2.7且具有Raspbian Jessie的嵌入式Linux平台,并且我具有必须实时运行并且必须在同一图像上应用多个HAAR Cascade分类器的OpenCV算法。 Is there any method to reduce the time of these operations? 有什么方法可以减少这些操作的时间? such as multithreading for example? 例如多线程?
I also hear about GPU calculations but I didn't know from where I can start. 我也听说过GPU计算,但是我不知道从哪里开始。
Thank you for the help. 感谢您的帮助。
OpenCv with OpenCL for parallel processing can be of use to you, as raspberry pi 3 is Quad core. 带有OpenCL的用于并行处理的OpenCv可能对您有用,因为raspberry pi 3是四核。 I do not think GPU that comes with these boards are enough powerful. 我认为这些主板随附的GPU不够强大。 You can try Qualcomm's DSP to computer vision and Neural Network. 您可以尝试将高通的DSP应用于计算机视觉和神经网络。 Nvidia's Tegra GPUs are another option. 英伟达的Tegra GPU是另一种选择。
If you haven't already done so, you should consider the following: 如果尚未这样做,则应考虑以下事项:
Reduce image size to the minimum required size for recognizing the target object for each classifier. 将图像尺寸减小到最小的尺寸,以识别每个分类器的目标对象。 If different objects require different resolutions, you can even use a set of copies of the original image, with different sizes. 如果不同的对象需要不同的分辨率,则甚至可以使用一组原始图像的副本,并具有不同的大小。
Identify search regions for each classifier and thereby reduce the search area. 确定每个分类器的搜索区域,从而缩小搜索区域。 For example, if you are searching for face landmarks, you can define search regions for the left eye, right eye, nose, and mouth after running the face detector and finding the rectangle that contains the face. 例如,如果要搜索脸部界标,则可以在运行脸部检测器并找到包含脸部的矩形后为左眼,右眼,鼻子和嘴巴定义搜索区域。
I am not very sure if optimization is going to be very helpful, because OpenCv already does some hardware optimization. 我不确定优化是否会很有帮助,因为OpenCv已经进行了一些硬件优化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.