Hi, I’m Marcos, a student who is doing a university project using Visual Studio 2019 with c++ and your library (version 4.5.2). This is my first time using libraries, so I’ll try to describe my error as much accurate as I can. The project is about face recognition, so I’m trying the library with the example in the documentation:
I’m trying to use the first code, the one with EigenFaces.
For the installation, I downloaded the opencv-4.5.2-vc14-vc15.exe from:
And then, linked it with Visual Studio in three steps:
- In (Settings-> C+±> General-> Additional include directories) added C:\opencv\build\include.
- In (Settings-> Linker-> General-> Additional library directories) added C:\opencv\build\x64\vc15\lib.
- In (Settings-> Linker-> Input) added opencv_world452.lib and opencv_world452d.lib.
- In (Compilation events-> Post-compilation events) added the commad XCOPY “C:\opencv\build\x64\vc15\bin*.dll” “$(TargetDir)” /D /K /Y, so the .dll could go to the .exe directory.
As I have to use the opencv/face.hpp, I downloaded the extra modules from:
And I copied the …opencv_contrib-4.5.2\modules\face\include\opencv2 archieves into C:\opencv\build\include\opencv2.
At this moment, I can use the functions in the face files with autocomplete functionality and there are no red underlined parts. The problem is that when I compile the project, there are a lot of LNK2019 errors arising from the line 125.
Ptr<EigenFaceRecognizer> model = EigenFaceRecognizer::create();
There is a screenshot.
I think the problem is about the face module, which maybe is not installed properly, because when I compile the code commenting the last section (from line 125 untill the end), there are no errors. but I looked for possible answers in forums and I didn’t get an useful answer.