Ocean
QRCodesDebugElements.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #pragma once
9 
10 #if defined(OCEAN_TRACKING_QRCODES_QRCODEDEBUGELEMENTS_ENABLED)
11 
13 
15 #include "ocean/base/Singleton.h"
16 
17 namespace Ocean
18 {
19 
20 namespace Tracking
21 {
22 
23 namespace QRCodes
24 {
25 
26 /**
27  * This class implements debug elements for the development of the 6DOF QR code tracker
28  * @ingroup trackingqrcodes
29  */
31  public DebugElements,
32  public Singleton<QRCodesDebugElements>
33 {
34  friend class Singleton<QRCodesDebugElements>;
35 
36  public:
37 
38  /**
39  * Definition of available debug elements.
40  */
41  enum ElementId : unsigned int
42  {
43  /// Indicator for an invalid element
44  EI_INVALID = 0u,
45 
46  /// Frame from the input cameras
48 
49  /// Frame from the input cameras
51 
52  };
53 
54  /**
55  * This class implements a scoped hierarchy.
56  * The hierarchy exists as long as this object exists.
57  */
59  {
60  public:
61 
62  /**
63  * Creates a new scoped object and pushes the given hierarchy.
64  * @param hierarchy The hierarchy to be pushed, must be valid
65  */
66  inline ScopedHierarchy(const std::string& hierarchy);
67  };
68 };
69 
70 inline QRCodesDebugElements::ScopedHierarchy::ScopedHierarchy(const std::string& hierarchy) :
71  ScopedHierarchyBase(get(), hierarchy)
72 {
73  // Nothing to do here.
74 }
75 
76 } // namespace QRCodes
77 
78 } // namespace Tracking
79 
80 } // namespace Ocean
81 
82 #endif // OCEAN_TRACKING_QRCODES_QRCODEDEBUGELEMENTS_ENABLED
This class implements a scoped hierarchy.
Definition: DebugElements.h:37
This class implements the base class for a container for debug elements.
Definition: DebugElements.h:29
This template class is the base class for all singleton objects.
Definition: Singleton.h:71
This class implements a scoped hierarchy.
Definition: QRCodesDebugElements.h:59
ScopedHierarchy(const std::string &hierarchy)
Creates a new scoped object and pushes the given hierarchy.
Definition: QRCodesDebugElements.h:70
This class implements debug elements for the development of the 6DOF QR code tracker.
Definition: QRCodesDebugElements.h:33
ElementId
Definition of available debug elements.
Definition: QRCodesDebugElements.h:42
@ EI_CAMERA_FRAMES
Frame from the input cameras.
Definition: QRCodesDebugElements.h:47
@ EI_INVALID
Indicator for an invalid element.
Definition: QRCodesDebugElements.h:44
@ EI_TRACKING_FINDER_PATTERNS
Frame from the input cameras.
Definition: QRCodesDebugElements.h:50
std::vector< QRCode > QRCodes
Definition of a vector of QR codes.
Definition: QRCode.h:25
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15