subspaceproject and reconstruct methods in python

asked 2013-11-04 09:16:41 -0500

manuli gravatar image

updated 2013-11-04 09:18:33 -0500

Hello,

I have searched through the web, but haven't found any answer so far to the following question, therefore I want to ask here if someone could help me out with that:

basically what i need is the same as in the solution from PraveenofPersia/Jesse there, but only the python implementation considering a Fisherface Recognizer: Any tips on confidence score for face verification (as opposed to face recognition)?

up to now I am facing the problem, that cv2 does not offer either subspaceProject nor any other.

thanks to a tip on another platform i have now tried to build opencv from sourc with a modified version of contrib.hpp (changed CV_EXPORTS Mat subspaceReconstruct(...) to CV_EXPORTS_W Mat subspaceReconstruct(...) respectively for subspaceProject). But i end up with a linker error saying:

Linking CXX shared library ..\..\lib\cv2.pyd
Creating library file: ..\..\lib\libcv2.dll.a
CMakeFiles\opencv_python.dir/objects.a(cv2.cpp.obj):cv2.cpp:(.text$initcv2+0x170
a): undefined reference to `__imp_Py_InitModule4'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [lib/cv2.pyd] Error 1
mingw32-make[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2
mingw32-make: *** [all] Error 2

i am using python 2.7.5, numpy 1.8 both in 64bit versions, on a win7 64bit machine, cmake, mingw for compiling. i have created the python library (.a) file.

is there maybe anyone out there who could help me on this or maybe even provide me a recompiled cv2.pyd file with these methods (or even more) provided?

edit retag flag offensive close merge delete

Comments

nobody here with any suggestion? i have finally managed to somehow (what it seemed) to successfully finish the linking process, but... whenever I start python and try to import cv2, whole python crashes. therefore, the issue seems still persisting in some way. is there any other workaround or solution maybe to make those two functions available in python? pretty desperate already...

manuli gravatar imagemanuli ( 2013-11-13 02:46:54 -0500 )edit

Any luck so far? I'm having the exact same problem.

slobdell gravatar imageslobdell ( 2014-01-05 10:53:33 -0500 )edit