Just want to share that I was able to resolve this problem yesterday. Found the culprit DLL: it’s the HDF5 which I installed last Jan 1. My first source compilation was Dec 29 that’s why it worked the first time. So basically, the fix was:
- After installation, edit cv2/config.py and add the path to my hdf5.dll. Again, I’m using OpenCV 4.5.1 source.
This was a good and painful learning experience for me. I was able to rebuild it again and add support for CUDA too.