hrastnik / FaceSwap

Real-time FaceSwap application built with OpenCV and dlib
MIT License
679 stars 188 forks source link

build for linux (ubuntu) #13

Open nqzero opened 7 years ago

nqzero commented 7 years ago

building this on ubuntu is pretty easy, but it took several tries to figure it out, so here are the instructions. i don't have a camera on my desktop (i'll test it on my laptop next week maybe)

other linux should be similar, just replace apt install as appropriate

could you add these instructions to the readme ?

# ubuntu 16.04
sudo apt install libopencv-dev liblapack-dev libdlib-dev
wget http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2
bunzip2 *.bz2
ln -s /usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml .

g++ -std=c++1y *.cpp $(pkg-config --libs opencv lapack) -ldlib 
./a.out
SneakyWhoami commented 6 years ago

On 17.10 I was successful only after adding libcblas-dev (apt) and then invoking a compiler like this: clang++ -std=c++1y $(pkg-config --cflags --libs opencv lapack) -ldlib -lblas *.cpp

saikiran-siriki commented 5 years ago

Had issue with building on ubuntu 16.04(with linking). This worked out for me g++ $(pkg-config --cflags) *.cpp $(pkg-config --libs opencv lapack) -ldlib -lblas -std=c++1y -o final