• DepthAI-v2
  • getCvFrame() & getFrame() result in "Fallback handler could not load library"

The build succeeds when I build my DLL using getCvFrame or getFrame but once I load my application that uses the DLL I get "Fallback handler could not load library" errors. When I don't have these calls everything works as expected.

I see the "This API only available if OpenCV support is enabled" in the API docs but I'm not sure how to "enable" it. From what I can tell in this OpenCV support example, there is nothing done explicitly to enable opencv support.

What am I missing? I'm using a preview stream if that helps.

    Hi luxd
    I'm not too familiar with how the DLLs work, but perhaps GPT4 helps you:

    To "enable" OpenCV, it means you need to have OpenCV installed on your system and it should be properly linked with your program. The OpenCV library files should also be in the system PATH, or in the same directory as the running program.
    Here are some steps you might want to consider:

    • Install OpenCV: Ensure that OpenCV is installed on your machine. You can use package managers such as apt, pip, conda, or you can build it from source. If you're using Windows, you can also use precompiled binaries.
    • Link OpenCV: If you're compiling your application, you need to link against the OpenCV library. This is usually done by adding -lopencv_core -lopencv_imgproc -lopencv_highgui etc. to the linker flags. The exact flags might vary depending on the OpenCV version and the modules you're using.
    • Check the PATH: Ensure that the path to the OpenCV dynamic libraries is in your system's PATH environment variable. This is especially important if you're loading your DLL dynamically at runtime. The operating system must be able to find these OpenCV libraries.

    Thanks,
    Jaka

    • luxd replied to this.

      jakaskerl Thank you. I'm already using other cv::… code so I was wondering if there is something specific in depthai that needed to be "enabled" (sounds like no). Still unsure why I get the issue, but I've resorted to just using getData() for now.