-
-
Notifications
You must be signed in to change notification settings - Fork 56.4k
Description
System Information
Operating System / Platform: Ubuntu 20.04
Operating System / Platform: Windows 10
Operating System / Platform: MacOS Monterey
Have tried all sorts of OS.
Have tried both pre built versions of OpenCV and building myself.
Have tried release and non optimized builds.
Detailed description
Simply loading the OpenCV core library is slow in all programming languages.
Even though the dll/dylib is only 3MB, it takes as much as 200ms to load it.
This is very unusual as other libraries that are over 10MB take 0-1ms.
This load speed is very important for use case such in mobile apps.
I understand OpenCV is feature complex, so, I have isolated it to just the core. Many uses of OpenCV only involve resizing of images, so it would be beneficial to understand why simply loading it takes so long.
I have attached an example dylib that was compiled on my M1 Macbook.
libopencv_core.4.9.0.dylib.zip
Steps to reproduce
System.load("path_to_dll_or_dylib");You can load it any way you like in any programming language. It will be the same.
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)