Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Computer Vision with Julia

You're reading from   Hands-On Computer Vision with Julia Build complex applications with advanced Julia packages for image processing, neural networks, and Artificial Intelligence

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788998796
Length 202 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dmitrijs Cudihins Dmitrijs Cudihins
Author Profile Icon Dmitrijs Cudihins
Dmitrijs Cudihins
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with JuliaImages FREE CHAPTER 2. Image Enhancement 3. Image Adjustment 4. Image Segmentation 5. Image Representation 6. Introduction to Neural Networks 7. Using Pre-Trained Neural Networks 8. OpenCV 9. Assessments
10. Other Books You May Enjoy

Face detection using Open CV

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&quot...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime