Cannot import any contrib modules in Python
I'm trying to build OpenCV on my desktop with contrib modules after having successfully built it on my laptop. As far as I can tell, all the .dll's for the contrib modules get generated and in general, I cannot find any differences in the file structure on both machines. Yet on the desktop, I cannot import any contrib modules and when I run cv2.getBuildInformation, the contrib modules are not in the list of modules to be built.
OpenCV 3.1.0, Windows 7, Python 2.7.11
Thank you.
can you show us the cmake output ? (append to your question)
Sorry for a silly question - which file would contain CMake output? I used CMake GUI.
it's the same as cv2.getBuildInformation()
any cjhance there is an older cv2 installed ? did you build the INSTALL project after building opencv ?
It looks like it was indeed picking up cv2.pyd that was left from a previous installation (without contrib modules). What should I do now? I've tried replacing the old cv2.pyd with the new one but now I'm getting 'DLL load failed'.
"but now I'm getting 'DLL load failed'."
so you built opencv with dynamic libs. either:
cmake -DBUILD_SHARED_LIBS=OFF
to get a statically linked cv2.pyd, which is independant of other opencv dlls."the folder with the opencv dlls on the PATH" - They are on the PATH already.
double check, if it's the correct PATH, and again, - static linking is the recommended way for python / java wrappers.
OK thanks - I didn't know about static linking. I don't believe I saw it mentioned in any of OpenCV installation tutorials.