PDescription.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 
15 #pragma once
16 #include <PObject.h>
17 #include <PProperties.h>
18 
19 PAPILLON_BEGIN_NAMESPACE
20 
21 class PDescriber;
22 class PDescriptor;
23 class PDetector;
24 class PGuid;
25 class PList;
26 class PImage;
27 class PObjectType;
28 class PVersion;
29 
59 class PAPILLON_API_CORE PDescription : public PObject
60 {
61 public:
65  PDescription();
66 
70  PDescription(const PString& name, const PObjectType& objectType, const PGuid& identityId, const PProperties& properties = PProperties());
71 
75  PDescription(const PDescription& other);
76 
80  virtual ~PDescription();
81 
85  PDescription& operator=(const PDescription& other);
86 
90  bool operator==(const PDescription& other) const;
91 
95  bool IsEmpty() const;
96 
102  void Reset();
103 
107  void SetName(const PString& name);
108 
112  PString GetName() const;
113 
117  void SetIdentityId(const PGuid& objectId);
118 
122  const PGuid& GetIdentityId() const;
123 
127  void SetObjectType(const PObjectType& objectType);
128 
132  PObjectType GetObjectType() const;
133 
137  void SetThumbnail(const PImage& thumbnail);
138 
143  PImage GetThumbnail() const;
144 
148  void SetVersion(const PVersion& version);
149 
154  PVersion GetVersion() const;
155 
159  void AddDescriptor(const PDescriptor& descriptor);
160 
165  PResult RemoveDescriptor(const PGuid& descriptorId);
166 
171  PResult AddDescription(const PDescription& description);
172 
176  int GetNumberOfDescriptors() const;
177 
182  PResult GetFirstDescriptor(PDescriptor& descriptor) const;
183 
187  PList GetDescriptors(const PGuid& describeEngineId) const;
188 
192  PList GetDescriptors(const PObjectType& objectType) const;
193 
197  const PList& GetDescriptors() const;
198 
202  PProperties GetProperties();
203 
207  const PProperties& GetPropertiesForReading() const;
208 
214  PList GetThumbnails() const;
215 
223  papillon::int32 RecomputeDescriptors(const PGuid& describeId, const PDetector& detector, const PDescriber& describer);
224 
225 private:
226  void SetDescriptors(const PList& descriptors);
227  friend class PDescriptionImpl;
228 };
229 
230 PAPILLON_END_NAMESPACE
The PDetector class is the parent class for all detection algorithms which analyse an image or a vide...
Definition: PDetector.h:50
The PString class provides an Unicode character strings.
Definition: PString.h:37
The PDescription class represents a set of features that have been computed on an identity (it is a b...
Definition: PDescription.h:59
The PVersion class represents a software version number: major.minor[.maintenance[.build]]; immutable, so thread-safe.
Definition: PVersion.h:26
The PImage class represents a 2D-image; several pixel format and number of channels are supported (BG...
Definition: PImage.h:57
The PResult class represents the result returned by most of Papillon functions; this class is used to...
Definition: PResult.h:159
Class PProperties: a container of generic properties indexed by their name.
The PList class represents a generic container which handle an ordered collection of PObject; NOT thr...
Definition: PList.h:46
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
The PObject class is the root class of all Papillon classes; all PObject behaves like shared referenc...
Definition: PObject.h:27
The PGuid class represents a Globally Unique Identifier (GUID); PGuid instances are immutable (thread...
Definition: PGuid.h:28
Class PObject: the root class of all Papillon classes.
The PDescriptor class represents a single descriptor of an object, for example a feature vector...
Definition: PDescriptor.h:41
PObject & operator=(const PObject &obj)
Performs a shared copy of other to this object.
Definition: PObject.h:45
The PObjectType class represents a type of object found in a video stream (can be Face...
Definition: PObjectType.h:26