Hello,
I am trying to use my OAK-1 with an rpi 4 for a project.

I used the pre-configured RPi OS image provided in the documentation, namely:
KS_RpiOS_Full V1 (Buster) and also tried KS_RpiOS_Full V2 (Bullseye)
DepthAI is running fine without any issues. However, when using other cv functions such as RootSIFT feature detection and BF matchers, the performance is extremely slow (5 seconds per image).

So First, I used the same feature detection functions on another RPi [4GB] provided by my university. It has openCV version 4.1.1 and can do the same feature matching in just 0.5 seconds. The problem in this Pi was that I had issues with the DepthAI in it. When I run any sample code, no window appears and the terminal freezes.

Therefore, I tried to use the pre-configured RPi OS images mentioned above with another [8GB] Rpi.
Here, it uses openCV version 4.5.5. DepthAI works perfectly, but the feature matching takes 5 seconds!/
I ran the topcommand in terminal and found that python3 is utilizing 100% of the cpu

Any thoughts to solve the issue?

After further analysis, it seems that the Rpi provided by my university is having an "optimized" version of OpenCV.

Since they use Opencv 4.1.1, can I install the DepthAI API on it? In other words, is the depthAI compatible with OpenCV 4.1.1?

  • erik replied to this.

    Hello hussain_allawati ,
    That's interesting, I assume it uses the GPU and/or other accelerated blocks to boost the performance of such algos. DepthAI itself doesn't require OpenCV, but it's (OpenCV version 4.x) used heavily around examples/demos for visualization. So 4.1.1 should work as well.
    Thanks, Erik

      erik
      Hello,

      After further troubleshooting, I think that the issue was with the OpenCV installation.

      Our instructor said that he didn't configure using the GPU or any other type of acceleration.
      What's more interesting is, with the Rpi that had ran the algorithms fast, after installing DepthAI along with its requirements (OpenCV 4.4), the algorithms ran slow. Upon reinstalling an optimized version of OpenCV 4.1.1 as shown by Adrian on PyImageSearch and here also, again it was slow! I can conclude that the issue might be due to installation, or a specific "helper" package that was missed during installation.

      Anyways, will try to figure this out.

      In order to do some more troubleshooting, where can I find the list of requirements of DepthAI (requirements that if are missing, DepthAI wouldn't work)?

      • erik replied to this.

        Hello hussain_allawati ,
        Another option would be to not call install_requirements.py, as it will reinstall the opencv (which would run slower). List of dependencies can be found here.
        Thanks, Erik