Why do you want to detect face? In general, face detection is used in many areas, such as auto focusing, game, etc. Today, we will make a program to synthesize images on the face by using face detection. First, we need a "haarcascade_frontalface_alt2.xml" file. This is used for face detect algorithm. We can take this file in following url. https://github.com/opencv/opencv/blob/master/data/haarcascades/haarcascade_frontalface_alt2.xml And also we need images to synthesize on the face. I made a simple animal head for you. Now, let's start make face detecting program. The full code is as follows. preprogress.h #ifndef DETACTFACE_PREPROGRASS_H #define DETACTFACE_PREPROGRASS_H #include <opencv2/opencv.hpp> using namespace cv ; using namespace std ; //load specific cascade file void load_cascade ( CascadeClassifier & cascade , string frame ){ string path = "./res/haarcascades/" ; string full_path = path + frame ; CV_...
Gaussian blur is result of blurring an image by Gaussian function. We need to use large kernel to make strong blur and this cause the high complexity. And that's why we should use multi-pass which is seperated into horizontal, vertical pass . It can reduce the complexity and make faster. In Spark AR there are many ways to make it. And I wanna introduce one of them using shader files (.sca). You can download it for free from the gumload link below. It is modulated to adjust horizontal, vertical strength easily . Hope this can help you. Loading...