PDescriber.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2018 Digital Barriers plc. All rights reserved.
3  * Contact: http://www.digitalbarriers.com/
4  *
5  * This file is part of the Papillon SDK.
6  *
7  * You can't use, modify or distribute any part of this file without
8  * the explicit written agreements of Digital Barriers.
9  */
10 
17 #pragma once
18 #include <PPluginInstance.h>
19 
20 PAPILLON_BEGIN_NAMESPACE
21 
22 class PDescription;
23 class PDetection;
24 class PExampleSet;
25 class PGuid;
26 class PObjectType;
27 class PPlugin;
28 class PProperties;
29 class PDetectionList;
30 class PDescriptionList;
31 
32 
38 {
39 public:
40  virtual ~PDescriberInterface() {}
41  virtual PResult GetObjectType(PObjectType& objectType) const = 0;
42  virtual PResult GetDescribeId(PGuid& describerId) const = 0;
43  virtual PResult GetModelName(PString& modelName) const = 0;
44  virtual PResult Apply(const PExampleSet& exampleSet, PDescription& outputDescription) = 0;
45  virtual PResult ApplyBatch(const PDetectionList& detectionList, PDescriptionList& outputDescription) = 0;
46  virtual PString ToString() const = 0;
47 };
48 
49 
62 class PAPILLON_API_CORE PDescriber : public PPluginInstance
63 {
64 public:
70 
71 public:
76  static PResult Create(const PString& productName, const PProperties& parameters, PDescriber& describer);
77 
82  static PResult Create(const PPlugin& plugin, const PProperties& parameters, PDescriber& describer);
83 
87  PDescriber();
88 
94  PDescriber(PDescriberInterface* describerInterface);
95 
99  PDescriber(const PDescriber& other);
100 
104  virtual ~PDescriber();
105 
109  PDescriber& operator=(const PDescriber& other);
110 
114  PObjectType GetObjectType() const;
115 
119  PGuid GetDescribeId() const;
120 
124  PString GetModelName() const;
125 
136  PResult Describe(const PExampleSet& exampleSet, PDescription& outputDescription) const;
137 
147  PResult Describe(const PDetection& example, const PString& name, const PGuid& identityId, PDescription& description) const;
148 
158  PResult Describe(const PDetection& detection, PDescription& description) const;
159 
168  PResult DescribeBatch(const PDetectionList& batchDetections, PDescriptionList& batchDescription) const;
169 };
170 
171 PAPILLON_END_NAMESPACE
The PString class provides an Unicode character strings.
Definition: PString.h:37
static const PString C_PARAM_FLOAT_POINT_THRESHOLD
Definition: PDescriber.h:66
virtual PResult GetModelName(PString &modelName) const =0
The PDescription class represents a set of features that have been computed on an identity (it is a b...
Definition: PDescription.h:59
The PDetectionList class represents nothing more than a collection of detections (PDetection), Typically PDetectionList&#39;s are returned from a PDetector.
The PResult class represents the result returned by most of Papillon functions; this class is used to...
Definition: PResult.h:159
static const PString C_PARAM_INT_MEAN_FACE
Definition: PDescriber.h:68
virtual PResult Apply(const PExampleSet &exampleSet, PDescription &outputDescription)=0
The PProperties class represents a container of properties; each property has a name (PString) and a ...
Definition: PProperties.h:38
The PDescriber class is the parent class for all describer algorithms which turns an object detected ...
Definition: PDescriber.h:62
virtual PResult GetDescribeId(PGuid &describerId) const =0
virtual ~PDescriberInterface()
Definition: PDescriber.h:40
virtual PResult ApplyBatch(const PDetectionList &detectionList, PDescriptionList &outputDescription)=0
The PPlugin class represents a Papillon plugin (input video source, detector, describer, ...); thread-safe.
Definition: PPlugin.h:45
static const PString C_PARAM_BOOL_DESCRIPTOR_THUMBNAIL
Definition: PDescriber.h:69
The PDetection class represents something that has been detected by a PDetector.
Definition: PDetection.h:61
static const PString C_PARAM_INT_VALID_POINTS
Definition: PDescriber.h:65
virtual PString ToString() const =0
Class PPluginInstance: super class for PAnalytics, PDetector, PDescriber, etc.
The PDescriptionList class represents nothing more than a collection of descriptions (PDescription)...
The PPluginInstance class is the super class for PAnalytics, PDetector, PDescriber which handle the d...
The PGuid class represents a Globally Unique Identifier (GUID); PGuid instances are immutable (thread...
Definition: PGuid.h:28
static const PString C_PARAM_FLOAT_FACE_THRESHOLD
Definition: PDescriber.h:67
virtual PResult GetObjectType(PObjectType &objectType) const =0
PDescriberInterface is an interface you can use to implement your own PDescriber. ...
Definition: PDescriber.h:37
The PExampleSet class represents a collection of PDetection&#39;s of the same identity (unknown or known)...
Definition: PExampleSet.h:51
The PObjectType class represents a type of object found in a video stream (can be Face...
Definition: PObjectType.h:26