Code Monkey home page Code Monkey logo

Comments (14)

hrastnik avatar hrastnik commented on May 30, 2024

I'm guessing it's a difference between g++ and MSVC. Try removing the & symbol in front of cv_faces.

from faceswap.

maria8899 avatar maria8899 commented on May 30, 2024

Thanks for the help. So I can compile the main.cpp (no error) but now I have an error in FaceSwapper.cpp which looks similar.

/home/maria/Code/FaceSwap/src/FaceSwapper.cpp: In member function ‘void FaceSwapper::swapFaces(cv::Mat&, cv::Rect&, cv::Rect&)’:
/home/maria/Code/FaceSwap/src/FaceSwapper.cpp:48:30: error: invalid initialization of non-const reference of type ‘cv::Mat&’ from an rvalue of type ‘cv::Mat’
featherMask(refined_masks(big_rect_ann));
~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /home/maria/Code/FaceSwap/src/FaceSwapper.cpp:1:0:
/home/maria/Code/FaceSwap/include/FaceSwapper.h:57:10: note: initializing argument 1 of ‘void FaceSwapper::featherMask(cv::Mat&)’
void featherMask(cv::Mat &refined_masks);
^~~~~~~~~~~
/home/maria/Code/FaceSwap/src/FaceSwapper.cpp:49:30: error: invalid initialization of non-const reference of type ‘cv::Mat&’ from an rvalue of type ‘cv::Mat’
featherMask(refined_masks(big_rect_bob));
~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /home/maria/Code/FaceSwap/src/FaceSwapper.cpp:1:0:
/home/maria/Code/FaceSwap/include/FaceSwapper.h:57:10: note: initializing argument 1 of ‘void FaceSwapper::featherMask(cv::Mat&)’
void featherMask(cv::Mat &refined_masks);
^~~~~~~~~~~
make[2]: *** [CMakeFiles/faceswap.dir/build.make:111: CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o] Error 1
make[2]: Leaving directory '/home/maria/Code/FaceSwap/build'
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/faceswap.dir/all] Error 2
make[1]: Leaving directory '/home/maria/Code/FaceSwap/build'
make: *** [Makefile:84: all] Error 2

I tried to remove symbol & in the featherMask function in both .cpp and .h, like this
void FaceSwapper::featherMask(cv::Mat refined_masks)

But then it also fails to compil. Probably I am not removing the symbol correctly or would need to remove it somewhere else? :(

from faceswap.

jodusan avatar jodusan commented on May 30, 2024

@maria8899 @mc-jesus I have the exact same problem. Can you help with this?

from faceswap.

hrastnik avatar hrastnik commented on May 30, 2024

I'll try too fix it today.

from faceswap.

jodusan avatar jodusan commented on May 30, 2024

@maria8899 any success?

from faceswap.

maria8899 avatar maria8899 commented on May 30, 2024

No. I am not sure why we have this error since opencv is supposed to be platform independent...

from faceswap.

maria8899 avatar maria8899 commented on May 30, 2024

@mc-jesus any progress?

from faceswap.

hrastnik avatar hrastnik commented on May 30, 2024

I think it fixed it in the latest commit. Let me know if it works

from faceswap.

maria8899 avatar maria8899 commented on May 30, 2024

I did not see you had committed something sorry. Thanks for that.
I am only forcing the compilation with c++14 otherwise I have an error about the make_unique pointer not being part of std. But now I have a different error now:

(...)
[ 98%] Building CXX object CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o
/usr/bin/c++ -I/home/maria/Code/Test/FaceSwap/include -I/home/maria/Lib/dlib-19.2/dlib/.. -Wreturn-type -DDLIB_JPEG_SUPPORT -DDLIB_USE_BLAS -DDLIB_USE_LAPACK -DDLIB_PNG_SUPPORT -DDLIB_GIF_SUPPORT -O3 -DNDEBUG -std=gnu++14 -o CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o -c /home/maria/Code/Test/FaceSwap/src/FaceSwapper.cpp
[100%] Linking CXX executable faceswap
/usr/bin/cmake -E cmake_link_script CMakeFiles/faceswap.dir/link.txt --verbose=1
/usr/bin/c++ -Wreturn-type -DDLIB_JPEG_SUPPORT -DDLIB_USE_BLAS -DDLIB_USE_LAPACK -DDLIB_PNG_SUPPORT -DDLIB_GIF_SUPPORT -O3 -DNDEBUG CMakeFiles/faceswap.dir/src/main.cpp.o CMakeFiles/faceswap.dir/src/FaceDetectorAndTracker.cpp.o CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o -o faceswap -rdynamic dlib_build/libdlib.a -lpthread -lnsl -lSM -lICE -lX11 -lXext -lgif -lpng -ljpeg -lcblas -lblas -llapack -lblas -llapack -lsqlite3
CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::~FaceSwapper()': FaceSwapper.cpp:(.text+0xdc): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x163): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x184): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x20c): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x22d): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x2b5): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x2d6): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x35e): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x37f): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x406): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x427): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x4ae): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x4cf): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x557): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x578): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x600): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x621): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x6a9): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x6ca): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x752): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x773): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x7fa): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x81b): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x8a2): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x8c3): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x94a): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x96b): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x9f2): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0xa13): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0xa9a): undefined reference to cv::fastFree(void*)' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::getMinFrame(cv::Mat const&, cv::Rect_&, cv::Rect_&)':
FaceSwapper.cpp:(.text+0xe45): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::getTransformationMatrices()':
FaceSwapper.cpp:(.text+0xece): undefined reference to cv::getAffineTransform(cv::Point_<float> const*, cv::Point_<float> const*)' FaceSwapper.cpp:(.text+0xfa2): undefined reference to cv::fastFree(void*)'
FaceSwapper.cpp:(.text+0x102a): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x1078): undefined reference to cv::invertAffineTransform(cv::InputArray const&, cv::OutputArray const&)'
FaceSwapper.cpp:(.text+0x10b4): undefined reference to cv::Mat::deallocate()' FaceSwapper.cpp:(.text+0x112c): undefined reference to cv::Mat::deallocate()'
CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::getMasks()': FaceSwapper.cpp:(.text+0x116c): undefined reference to cv::noArray()'
FaceSwapper.cpp:(.text+0x11b0): undefined reference to cv::Mat::setTo(cv::_InputArray const&, cv::_InputArray const&)' FaceSwapper.cpp:(.text+0x11b5): undefined reference to cv::noArray()'
FaceSwapper.cpp:(.text+0x11f1): undefined reference to cv::Mat::setTo(cv::_InputArray const&, cv::_InputArray const&)' FaceSwapper.cpp:(.text+0x122d): undefined reference to cv::fillConvexPoly(cv::Mat&, cv::Point
const*, int, cv::Scalar
const&, int, int)'
FaceSwapper.cpp:(.text+0x1262): undefined reference to cv::fillConvexPoly(cv::Mat&, cv::Point_<int> const*, int, cv::Scalar_<double> const&, int, int)' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::getWarppedMasks()':
FaceSwapper.cpp:(.text+0x1349): undefined reference to cv::warpAffine(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Size_<int>, int, int, cv::Scalar_<double> const&)' FaceSwapper.cpp:(.text+0x1408): undefined reference to cv::warpAffine(cv::_InputArray const&, cv::OutputArray const&, cv::InputArray const&, cv::Size, int, int, cv::Scalar const&)'
CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::getRefinedMasks()': FaceSwapper.cpp:(.text+0x143f): undefined reference to cv::noArray()'
FaceSwapper.cpp:(.text+0x14b8): undefined reference to cv::bitwise_and(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&)' FaceSwapper.cpp:(.text+0x14bd): undefined reference to cv::noArray()'
FaceSwapper.cpp:(.text+0x1536): undefined reference to cv::bitwise_and(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&)' FaceSwapper.cpp:(.text+0x15e5): undefined reference to cv::Mat::create(int, int const*, int)'
FaceSwapper.cpp:(.text+0x15f2): undefined reference to cv::Mat::operator=(cv::Scalar_<double> const&)' FaceSwapper.cpp:(.text+0x163e): undefined reference to cv::Mat::copyTo(cv::_OutputArray const&, cv::_InputArray const&) const'
FaceSwapper.cpp:(.text+0x168a): undefined reference to cv::Mat::copyTo(cv::_OutputArray const&, cv::_InputArray const&) const' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::extractFaces()':
FaceSwapper.cpp:(.text+0x1713): undefined reference to cv::Mat::copyTo(cv::_OutputArray const&, cv::_InputArray const&) const' FaceSwapper.cpp:(.text+0x176a): undefined reference to cv::Mat::copyTo(cv::_OutputArray const&, cv::_InputArray const&) const'
CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::getWarppedFaces()': FaceSwapper.cpp:(.text+0x1849): undefined reference to cv::Mat::create(int, int const*, int)'
FaceSwapper.cpp:(.text+0x1854): undefined reference to cv::Mat::operator=(cv::Scalar_<double> const&)' FaceSwapper.cpp:(.text+0x190f): undefined reference to cv::warpAffine(cv::_InputArray const&, cv::OutputArray const&, cv::InputArray const&, cv::Size, int, int, cv::Scalar const&)'
FaceSwapper.cpp:(.text+0x19cf): undefined reference to cv::warpAffine(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Size_<int>, int, int, cv::Scalar_<double> const&)' FaceSwapper.cpp:(.text+0x1a19): undefined reference to cv::Mat::copyTo(cv::OutputArray const&, cv::InputArray const&) const'
FaceSwapper.cpp:(.text+0x1a64): undefined reference to cv::Mat::copyTo(cv::_OutputArray const&, cv::_InputArray const&) const' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::featherMask(cv::Mat&)':
FaceSwapper.cpp:(.text+0x1b19): undefined reference to cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)' FaceSwapper.cpp:(.text+0x1bb8): undefined reference to cv::erode(cv::InputArray const&, cv::OutputArray const&, cv::InputArray const&, cv::Point, int, int, cv::Scalar const&)'
FaceSwapper.cpp:(.text+0x1c4c): undefined reference to cv::blur(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, cv::Point_<int>, int)' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::specifiyHistogram(cv::Mat, cv::Mat, cv::Mat)':
FaceSwapper.cpp:(.text+0x1d8d): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)' FaceSwapper.cpp:(.text+0x1db3): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x1e14): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x1e47): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)'
FaceSwapper.cpp:(.text+0x1e6d): undefined reference to cv::Mat::deallocate()' FaceSwapper.cpp:(.text+0x1ed4): undefined reference to cv::fastFree(void*)'
FaceSwapper.cpp:(.text+0x1f07): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)' FaceSwapper.cpp:(.text+0x1f2d): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x1f94): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x23e1): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)'
FaceSwapper.cpp:(.text+0x2407): undefined reference to cv::Mat::deallocate()' FaceSwapper.cpp:(.text+0x2464): undefined reference to cv::fastFree(void*)'
FaceSwapper.cpp:(.text+0x2497): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)' FaceSwapper.cpp:(.text+0x24bd): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x2524): undefined reference to cv::fastFree(void*)' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::colorCorrectFaces()':
FaceSwapper.cpp:(.text+0x338e): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)' FaceSwapper.cpp:(.text+0x339e): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect
const&)'
FaceSwapper.cpp:(.text+0x33b3): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)' FaceSwapper.cpp:(.text+0x3405): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect const&)'
FaceSwapper.cpp:(.text+0x3415): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o:FaceSwapper.cpp:(.text+0x3423): more undefined references to cv::Mat::Mat(cv::Mat const&, cv::Rect const&)' follow
CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::colorCorrectFaces()': FaceSwapper.cpp:(.text+0x3461): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x34ca): undefined reference to cv::fastFree(void*)' CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::getFacePoints(cv::Mat const&)':
FaceSwapper.cpp:(.text+0x4b2c): undefined reference to _IplImage::_IplImage(cv::Mat const&)' FaceSwapper.cpp:(.text+0x50ae): undefined reference to cv::Mat::copySize(cv::Mat const&)'
CMakeFiles/faceswap.dir/src/FaceSwapper.cpp.o: In function FaceSwapper::swapFaces(cv::Mat&, cv::Rect_<int>&, cv::Rect_<int>&)': FaceSwapper.cpp:(.text+0x5575): undefined reference to cv::fastFree(void*)'
FaceSwapper.cpp:(.text+0x568e): undefined reference to cv::Mat::create(int, int const*, int)' FaceSwapper.cpp:(.text+0x56df): undefined reference to cv::Mat::create(int, int const*, int)'
FaceSwapper.cpp:(.text+0x5805): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x590a): undefined reference to cv::Mat::copyTo(cv::_OutputArray const&, cv::InputArray const&) const'
FaceSwapper.cpp:(.text+0x5977): undefined reference to cv::Mat::copyTo(cv::_OutputArray const&, cv::_InputArray const&) const' FaceSwapper.cpp:(.text+0x5a8d): undefined reference to cv::fastFree(void*)'
FaceSwapper.cpp:(.text+0x5b42): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)' FaceSwapper.cpp:(.text+0x5b57): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect
const&)'
FaceSwapper.cpp:(.text+0x5bd6): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)' FaceSwapper.cpp:(.text+0x5bfa): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x5c69): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x5ca2): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)'
FaceSwapper.cpp:(.text+0x5ccb): undefined reference to cv::Mat::deallocate()' FaceSwapper.cpp:(.text+0x5d3d): undefined reference to cv::fastFree(void*)'
FaceSwapper.cpp:(.text+0x5d7f): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)' FaceSwapper.cpp:(.text+0x5da8): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x5e0f): undefined reference to cv::fastFree(void*)' FaceSwapper.cpp:(.text+0x5f63): undefined reference to cv::Mat::deallocate()'
FaceSwapper.cpp:(.text+0x5f72): undefined reference to cv::Mat::deallocate()' FaceSwapper.cpp:(.text+0x5f81): undefined reference to cv::Mat::deallocate()'
CMakeFiles/faceswap.dir/src/main.cpp.o: In function cv::Mat::~Mat()': main.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x15): undefined reference to cv::Mat::deallocate()'
main.cpp:(.text._ZN2cv3MatD2Ev[ZN2cv3MatD5Ev]+0x7a): undefined reference to cv::fastFree(void*)' CMakeFiles/faceswap.dir/src/main.cpp.o: In function main':
main.cpp:(.text.startup+0xb9): undefined reference to cv::getTickCount()' main.cpp:(.text.startup+0x144): undefined reference to cv::getTickCount()'
main.cpp:(.text.startup+0x15b): undefined reference to cv::getTickFrequency()' main.cpp:(.text.startup+0x1e0): undefined reference to cv::String::allocate(unsigned long)'
main.cpp:(.text.startup+0x200): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' main.cpp:(.text.startup+0x20a): undefined reference to cv::String::deallocate()'
main.cpp:(.text.startup+0x214): undefined reference to cv::waitKey(int)' main.cpp:(.text.startup+0x248): undefined reference to cv::Mat::deallocate()'
main.cpp:(.text.startup+0x2aa): undefined reference to cv::fastFree(void*)' main.cpp:(.text.startup+0x3fa): undefined reference to cv::String::deallocate()'
CMakeFiles/faceswap.dir/src/FaceDetectorAndTracker.cpp.o: In function FaceDetectorAndTracker::~FaceDetectorAndTracker()': FaceDetectorAndTracker.cpp:(.text+0x22): undefined reference to cv::Mat::deallocate()'
FaceDetectorAndTracker.cpp:(.text+0xa2): undefined reference to cv::fastFree(void*)' FaceDetectorAndTracker.cpp:(.text+0xe4): undefined reference to cv::Mat::deallocate()'
FaceDetectorAndTracker.cpp:(.text+0x141): undefined reference to cv::fastFree(void*)' FaceDetectorAndTracker.cpp:(.text+0x1da): undefined reference to cv::Mat::deallocate()'
FaceDetectorAndTracker.cpp:(.text+0x241): undefined reference to cv::fastFree(void*)' FaceDetectorAndTracker.cpp:(.text+0x252): undefined reference to cv::CascadeClassifier::~CascadeClassifier()'
CMakeFiles/faceswap.dir/src/FaceDetectorAndTracker.cpp.o: In function FaceDetectorAndTracker::track()': FaceDetectorAndTracker.cpp:(.text+0x30f): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect
const&)'
FaceDetectorAndTracker.cpp:(.text+0x3ca): undefined reference to cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)' FaceDetectorAndTracker.cpp:(.text+0x46b): undefined reference to cv::Mat::deallocate()'
FaceDetectorAndTracker.cpp:(.text+0x4cf): undefined reference to cv::fastFree(void*)' FaceDetectorAndTracker.cpp:(.text+0x613): undefined reference to cv::noArray()'
FaceDetectorAndTracker.cpp:(.text+0x6af): undefined reference to cv::matchTemplate(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, int, cv::_InputArray const&)' FaceDetectorAndTracker.cpp:(.text+0x79d): undefined reference to cv::normalize(cv::_InputArray const&, cv::_InputOutputArray const&, double, double, int, int, cv::InputArray const&)'
FaceDetectorAndTracker.cpp:(.text+0x7b9): undefined reference to cv::Mat::deallocate()' FaceDetectorAndTracker.cpp:(.text+0x822): undefined reference to cv::fastFree(void*)'
FaceDetectorAndTracker.cpp:(.text+0x84f): undefined reference to cv::noArray()' FaceDetectorAndTracker.cpp:(.text+0x8a0): undefined reference to cv::minMaxLoc(cv::InputArray const&, double*, double*, cv::Point*, cv::Point
, cv::InputArray const&)'
FaceDetectorAndTracker.cpp:(.text+0x910): undefined reference to cv::getCPUTickCount()' FaceDetectorAndTracker.cpp:(.text+0x93f): undefined reference to cv::getTickFrequency()'
FaceDetectorAndTracker.cpp:(.text+0x9dd): undefined reference to cv::fastFree(void*)' FaceDetectorAndTracker.cpp:(.text+0x9f1): undefined reference to cv::getCPUTickCount()'
FaceDetectorAndTracker.cpp:(.text+0xa01): undefined reference to cv::Mat::deallocate()' CMakeFiles/faceswap.dir/src/FaceDetectorAndTracker.cpp.o: In function FaceDetectorAndTracker::FaceDetectorAndTracker(std::cxx11::basic_string<char, std::char_traits, std::allocator >, int, unsigned long)':
FaceDetectorAndTracker.cpp:(.text+0xda7): undefined reference to cv::VideoCapture::VideoCapture(int)' FaceDetectorAndTracker.cpp:(.text+0xe03): undefined reference to cv::CascadeClassifier::CascadeClassifier(cv::String const&)'
FaceDetectorAndTracker.cpp:(.text+0xe0b): undefined reference to cv::String::deallocate()' FaceDetectorAndTracker.cpp:(.text+0xe23): undefined reference to cv::CascadeClassifier::~CascadeClassifier()'
FaceDetectorAndTracker.cpp:(.text+0xe39): undefined reference to cv::CascadeClassifier::empty() const' FaceDetectorAndTracker.cpp:(.text+0xeeb): undefined reference to cv::String::allocate(unsigned long)'
FaceDetectorAndTracker.cpp:(.text+0x102b): undefined reference to cv::CascadeClassifier::~CascadeClassifier()' FaceDetectorAndTracker.cpp:(.text+0x1059): undefined reference to cv::String::deallocate()'
CMakeFiles/faceswap.dir/src/FaceDetectorAndTracker.cpp.o: In function FaceDetectorAndTracker::detect()': FaceDetectorAndTracker.cpp:(.text+0x125b): undefined reference to cv::CascadeClassifier::detectMultiScale(cv::InputArray const&, std::vector<cv::Rect, std::allocator<cv::Rect
> >&, double, int, int, cv::Size
, cv::Size)'
FaceDetectorAndTracker.cpp:(.text+0x12e4): undefined reference to cv::Mat::deallocate()' FaceDetectorAndTracker.cpp:(.text+0x134a): undefined reference to cv::fastFree(void)'
FaceDetectorAndTracker.cpp:(.text+0x13fd): undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)' FaceDetectorAndTracker.cpp:(.text+0x1468): undefined reference to cv::Mat::copyTo(cv::_OutputArray const&) const'
FaceDetectorAndTracker.cpp:(.text+0x1587): undefined reference to cv::fastFree(void*)' FaceDetectorAndTracker.cpp:(.text+0x15a3): undefined reference to cv::Mat::deallocate()'
FaceDetectorAndTracker.cpp:(.text+0x1604): undefined reference to cv::fastFree(void*)' FaceDetectorAndTracker.cpp:(.text+0x17c3): undefined reference to cv::Mat::deallocate()'
CMakeFiles/faceswap.dir/src/FaceDetectorAndTracker.cpp.o: In function FaceDetectorAndTracker::operator>>(cv::Mat&)': FaceDetectorAndTracker.cpp:(.text+0x1bc6): undefined reference to cv::resize(cv::_InputArray const&, cv::OutputArray const&, cv::Size, double, double, int)'
FaceDetectorAndTracker.cpp:(.text+0x1c64): undefined reference to cv::Mat::deallocate()' CMakeFiles/faceswap.dir/src/FaceDetectorAndTracker.cpp.o: In function std::vector<cv::Mat, std::allocatorcv::Mat >::~vector()':
FaceDetectorAndTracker.cpp:(.text._ZNSt6vectorIN2cv3MatESaIS1_EED2Ev[_ZNSt6vectorIN2cv3MatESaIS1_EED5Ev]+0x34): undefined reference to cv::Mat::deallocate()' FaceDetectorAndTracker.cpp:(.text._ZNSt6vectorIN2cv3MatESaIS1_EED2Ev[_ZNSt6vectorIN2cv3MatESaIS1_EED5Ev]+0x91): undefined reference to cv::fastFree(void*)'
CMakeFiles/faceswap.dir/src/FaceDetectorAndTracker.cpp.o: In function void std::vector<cv::Mat, std::allocator<cv::Mat> >::_M_emplace_back_aux<cv::Mat>(cv::Mat&&)': FaceDetectorAndTracker.cpp:(.text._ZNSt6vectorIN2cv3MatESaIS1_EE19_M_emplace_back_auxIJS1_EEEvDpOT_[_ZNSt6vectorIN2cv3MatESaIS1_EE19_M_emplace_back_auxIJS1_EEEvDpOT_]+0x1d4): undefined reference to cv::Mat::copySize(cv::Mat const&)'
FaceDetectorAndTracker.cpp:(.text.ZNSt6vectorIN2cv3MatESaIS1_EE19_M_emplace_back_auxIJS1_EEEvDpOT[ZNSt6vectorIN2cv3MatESaIS1_EE19_M_emplace_back_auxIJS1_EEEvDpOT]+0x21c): undefined reference to cv::Mat::deallocate()' FaceDetectorAndTracker.cpp:(.text._ZNSt6vectorIN2cv3MatESaIS1_EE19_M_emplace_back_auxIJS1_EEEvDpOT_[_ZNSt6vectorIN2cv3MatESaIS1_EE19_M_emplace_back_auxIJS1_EEEvDpOT_]+0x281): undefined reference to cv::fastFree(void*)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/faceswap.dir/build.make:157: faceswap] Error 1
make[2]: Leaving directory '/home/maria/Code/Test/FaceSwap/build'
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/faceswap.dir/all] Error 2
make[1]: Leaving directory '/home/maria/Code/Test/FaceSwap/build'
make: *** [Makefile:84: all] Error

from faceswap.

maria8899 avatar maria8899 commented on May 30, 2024

I think the problem comes from me and to properly compile using cmake.

from faceswap.

hrastnik avatar hrastnik commented on May 30, 2024

@maria8899 I think you haven't linked the needed OpenCV libraries.

from faceswap.

maria8899 avatar maria8899 commented on May 30, 2024

@mc-jesus Yes exactly, it is compiling now! Thank you so much!

from faceswap.

sofzh avatar sofzh commented on May 30, 2024

how do u make it? I'm facing with the same thing now. could u help me , thx!

from faceswap.

sofzh avatar sofzh commented on May 30, 2024

@maria8899

from faceswap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.