my_package/
CMakeLists.txt
package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import sys | |
def run(video_path): | |
cap = cv2.VideoCapture(video_path) | |
if not cap.isOpened(): | |
print video_path, 'doesn\'t exist' | |
sys.exit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/contrib/contrib.hpp> | |
#include <opencv2/objdetect/objdetect.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <opencv2/imgproc/imgproc.hpp> | |
int find_face(const char* cascade_file, const char* image_file) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
swig -c++ -python opencv_facedetect.i | |
g++ -Wall -fPIC -c opencv_facedetect.cpp `pkg-config --cflags opencv` | |
g++ -Wall -fPIC -c opencv_facedetect_wrap.cxx `pkg-config --cflags python` | |
g++ -shared opencv_facedetect.o opencv_facedetect_wrap.o `pkg-config --libs opencv` `pkg-config --libs python` -o _opencv_facedetect.so | |
clean: | |
rm -f ./*.o $(PROG) |