How to compile OpenCV sample code ?

Let’s say you want to compile and run the face detection sample code that comes with the OpenCV. This code is located at OpenCV 2.4.x : /path/to/opencv/samples/c/facedetect.cpp OpenCV 3 : /path/to/opencv/samples/cpp/facedetect.cpp Compiling the sample code is super easy using pkg-config. Try this on the command line If you have multiple versions of opencv installed, you… Read More »