Now that you have learned to get the content from a camera, we can proceed with extending the C++ code and adding the face detection functionality. We will learn how to draw the bounding boxes, get the coordinates, and crop the face:
We start by initializing the Julia packages:
ENV["PKG_CONFIG_PATH"] = "/Users/dc/anaconda/envs/python35/lib/pkgconfig"
using OpenCV
using Images, ImageView
using Cxx
The moment packages are loaded, we proceed to defining C++ code. C++ code is defined within the cxx""" <<C++ code>> """ tag and then executed in REPL.
The first thing to do in the C++ code is defining and including the libraries. We include both standard C++ and Open CV libraries:
#include "opencv2/objdetect.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"...