RAPP Platform
v0.6.0
RAPP Platform is a collection of ROS nodes and back-end processes that aim to deliver ready-to-use generic services to robots
|
Class that implements a face detection algorithm based on a Haar cascade classifier. More...
#include <face_detector.h>
Public Member Functions | |
FaceDetector (void) | |
Default constructor. More... | |
std::vector< cv::Rect > | detectFaces (const cv::Mat &input_img, bool fast=false) |
Detects faces from a cv::Mat. More... | |
std::vector< cv::Rect > | findFaces (std::string file_name, bool fast=false) |
Finds faces in an image retrieved from a file URL. More... | |
cv::Mat | loadImage (std::string file_name) |
Loads an image from a file URL. More... | |
Private Member Functions | |
std::vector< cv::Rect > | detectFaces (const cv::Mat &input_img, const std::string &haar_path) |
Detects faces from a cv::Mat. More... | |
std::vector< cv::Rect > | identifyUniqueFaces (const std::vector< cv::Rect > firstFaceVector, const std::vector< cv::Rect > secondFaceVector) |
Identify unique faces from two sets of faces. More... | |
Class that implements a face detection algorithm based on a Haar cascade classifier.
Definition at line 33 of file face_detector.h.
FaceDetector::FaceDetector | ( | void | ) |
Default constructor.
Definition at line 26 of file face_detector.cpp.
std::vector< cv::Rect > FaceDetector::detectFaces | ( | const cv::Mat & | input_img, |
bool | fast = false |
||
) |
Detects faces from a cv::Mat.
input_img | [const cv::Mat&] The input image |
fast | [bool] True for fast detection – frontal only |
Definition at line 50 of file face_detector.cpp.
|
private |
Detects faces from a cv::Mat.
input_img | [const cv::Mat&] The input image |
haar_path | [const std::string] The Haar training model path |
Definition at line 89 of file face_detector.cpp.
std::vector< cv::Rect > FaceDetector::findFaces | ( | std::string | file_name, |
bool | fast = false |
||
) |
Finds faces in an image retrieved from a file URL.
file_name | [std::string] The image file's URL |
fast | [bool] True for fast detection – frontal only |
Definition at line 168 of file face_detector.cpp.
|
private |
Identify unique faces from two sets of faces.
frontFaceVector | [const std::vector<cv::Rect>&] The first set of faces |
secondFaceVector | [const std::vector<cv::Rect>&] The second set of faces |
Definition at line 140 of file face_detector.cpp.
cv::Mat FaceDetector::loadImage | ( | std::string | file_name | ) |
Loads an image from a file URL.
file_name | [std::string] The image's file URL |
Definition at line 35 of file face_detector.cpp.