Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to write compile.sh file for facerec_fisherfaces?

On Ubuntu 14.4 with OpenCV 3.1.0 : I'm trying to compile and run this file http://docs.opencv.org/3.0-last-rst/_downloads/facerec_fisherfaces.cpp

but I don't know what to write in the compile.sh file to make it executable

I found this compile.sh but it doesn't work :

LIBS="-lopencv_imgproc -lopencv_highgui -lopencv_core -lopencv_objdetect -lopencv_contrib"
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -L/usr/lib -L/usr/local/lib -fpic -Wall -c "untitled.cpp" $LIBS

g++ -shared -I/usr/local/include/opencv -I/usr/local/include/opencv2 -o libuntitled.so untitled.o -L/usr/local/lib $LIBS

g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -o untitled untitled.o -L/usr/local/lib $LIBS

exit 0