简体   繁体   English

如何在Raspberry PI3上实时运行openCV算法

[英]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: 如果尚未这样做,则应考虑以下事项:

  1. 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. 如果不同的对象需要不同的分辨率,则甚至可以使用一组原始图像的副本,并具有不同的大小。

  2. 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.

相关问题 如何使用树莓派PREEMPT_RT补丁使进程实时运行? - How do I make a process run real-time with raspberry pi PREEMPT_RT patch? 如何在网页上实时绘制来自 Raspberry Pi 的数据? - How to graph data from a Raspberry Pi in real-time on a webpage? 实时人脸识别在Raspberry Pi3上运行缓慢 - Real time face recognition ran slowly on Raspberry Pi3 在树莓派 3 上为 docker 安装 OpenCV - Installing OpenCV for docker on raspberry Pi3 如何在Raspberry Pi3上与其他处理并行运行TensorFlow - How to run a TensorFlow in parallel with some other processing on Raspberry Pi3 使用 python 和 wxWidget 在 Raspberry Pi 上实时绘图 - Plotting real-time on Raspberry Pi with python and wxWidget 如何将实时 output 从 Raspberry pi 发送到我的外部计算机? - How to send real-time output from Raspberry pi to my external computer? 在树莓派pi3上使用opencv 3.1.0进行面部识别 - facial recognition using opencv 3.1.0 on raspberry pi3 如何在树莓派 pi3 中安装模块 pytorch_lightning.metrics - How to install the module pytorch_lightning.metrics in Raspberry pi3 人脸检测+识别标签使用opencv 3.2 + python 3.4.3 + Raspberry pi3 - Face detction + recognition label using opencv 3.2 + python 3.4.3 + Raspberry pi3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM