Search code examples
pythonopencvraspberry-piraspbianopencv3.0

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

Thank you for the help.


Solution

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