PFeaturePoint.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 <PPoint2Df.h>
18 #include <PStringList.h>
19 
20 PAPILLON_BEGIN_NAMESPACE
21 
22 
28 class PAPILLON_API_CORE PFeaturePoint : public PObject
29 {
30 public:
34  static const PFeaturePoint& Bad() { static const PFeaturePoint BAD(PPoint2Df::Bad(), "invalid", 0.0f); return BAD; }
35 
39  PFeaturePoint();
40 
44  PFeaturePoint(const PFeaturePoint& other);
45 
50  PFeaturePoint(const PPoint2Df& location, const PString& description, float confidence);
51 
55  virtual ~PFeaturePoint();
56 
60  PFeaturePoint& operator=(const PFeaturePoint& other);
61 
66  bool operator==(const PFeaturePoint& other) const;
67 
72  bool operator!=(const PFeaturePoint& other) const;
73 
79  bool IsValid() const;
80 
84  const PPoint2Df& GetLocation() const;
85 
90  float GetColumn() const;
91 
95  float GetX() const;
96 
101  float GetRow() const;
102 
106  float GetY() const;
107 
111  PString GetDescription() const;
112 
116  float GetConfidence() const;
117 
122  static const papillon::PStringList& FeaturePoints();
123 
124 public:
125  static void Initialise();
126  static void Finalise();
127 
128 private:
129  static PStringList* ms_featurePoints;
130 };
131 
132 PAPILLON_END_NAMESPACE
133 
static const PPoint2Df & Bad()
Returns the constant holding the bad instance of a PPoint2Df.
Definition: PPoint2Df.h:34
Class PPoint2Df: an immutable 2D-point with float coordinates.
The PFeaturePoint class represents a sub-pixel accurate 2D location on an image; PFeaturePoint instan...
Definition: PFeaturePoint.h:28
static const PFeaturePoint & Bad()
Returns the constant holding the bad instance of a PFeaturePoint.
Definition: PFeaturePoint.h:34
The PString class provides an Unicode character strings.
Definition: PString.h:37
The PPoint2Df class represents a 2D-point with float coordinates; PPoint2Df instances are immutable (...
Definition: PPoint2Df.h:28
Class PStringList: a list of strings.
The PObject class is the root class of all Papillon classes; all PObject behaves like shared referenc...
Definition: PObject.h:27
The PStringList class represents a list of PString; NOT thread-safe.
Definition: PStringList.h:26
Class PObject: the root class of all Papillon classes.
PObject & operator=(const PObject &obj)
Performs a shared copy of other to this object.
Definition: PObject.h:45