vision
Loading...
Searching...
No Matches
libraries
YarpPlugins
HaarDetector
HaarDetector.hpp
1
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3
#ifndef __HAAR_DETECTOR_HPP__
4
#define __HAAR_DETECTOR_HPP__
5
6
#include <yarp/dev/DeviceDriver.h>
7
8
#include <opencv2/core/version.hpp>
9
#if CV_VERSION_MAJOR >= 5
10
# include <opencv2/xobjdetect.hpp>
11
#else
12
# include <opencv2/objdetect.hpp>
13
#endif
14
#ifdef HAVE_CV_FACE
15
# include <opencv2/face/facemark.hpp>
16
#endif
17
18
#include "IDetector.hpp"
19
#include "HaarDetector_ParamsParser.h"
20
26
class
HaarDetector
:
public
yarp::dev::DeviceDriver,
27
public
roboticslab::IDetector
,
28
public
HaarDetector_ParamsParser
29
{
30
public
:
31
bool
open(yarp::os::Searchable& config)
override
;
32
bool
detect(
const
yarp::sig::Image& inYarpImg, yarp::os::Bottle& detectedObjects)
override
;
33
34
private
:
35
cv::CascadeClassifier object_cascade;
36
#ifdef HAVE_CV_FACE
37
cv::Ptr<cv::face::Facemark> facemark;
38
#endif
39
};
40
41
#endif
// __HAAR_DETECTOR_HPP__
HaarDetector_ParamsParser
Definition
HaarDetector_ParamsParser.h:43
HaarDetector
Definition
HaarDetector.hpp:29
roboticslab::IDetector
Interface for object detection.
Definition
IDetector.hpp:17
Generated by
1.9.8