Ocean
Loading...
Searching...
No Matches
QRCodeDebugElements.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
11
12#if defined(OCEAN_QRCODES_QRCODEDEBUGELEMENTS_ENABLED)
13
16
17namespace Ocean
18{
19
20namespace CV
21{
22
23namespace Detector
24{
25
26namespace QRCodes
27{
28
29/**
30 * This class implements debug elements for the development of the QR code detector
31 * @ingroup cvdetectorqrcodes
32 */
34 public DebugElements,
35 public Singleton<QRCodeDebugElements>
36{
37 friend class Singleton<QRCodeDebugElements>;
38
39 public:
40
41 /**
42 * Definition of available debug elements.
43 */
44 enum ElementId : unsigned int
45 {
46 /// Indicator for an invalid element
48
49 /// Indicator for the source image as Y8
51 /// Indicator for the source image as RGB24
53
54 /// Indicator for images with individual finder patterns drawn into it
56 /// Indicator for images with finder patterns grouped into triplets drawn into it
58
59 /// Indicator for images with all of the initial poses of QR code candidates
61
62 /// Indicator for images with current detections
64 };
65
66 /**
67 * This class implements a scoped hierarchy.
68 * The hierarchy exists as long as this object exists.
69 */
71 {
72 public:
73
74 /**
75 * Creates a new scoped object and pushes the given hierarchy.
76 * @param hierarchy The hierarchy to be pushed, must be valid
77 */
78 inline ScopedHierarchy(const std::string& hierarchy);
79 };
80};
81
82inline QRCodeDebugElements::ScopedHierarchy::ScopedHierarchy(const std::string& hierarchy) :
83 ScopedHierarchyBase(get(), hierarchy)
84{
85 // Nothing to do here.
86}
87
88} // namespace QRCodes
89
90} // namespace Detector
91
92} // namespace CV
93
94} // namespace Ocean
95
96#endif // OCEAN_QRCODES_QRCODEDEBUGELEMENTS_ENABLED
This class implements a scoped hierarchy.
Definition QRCodeDebugElements.h:71
ScopedHierarchy(const std::string &hierarchy)
Creates a new scoped object and pushes the given hierarchy.
Definition QRCodeDebugElements.h:82
This class implements debug elements for the development of the QR code detector.
Definition QRCodeDebugElements.h:36
ElementId
Definition of available debug elements.
Definition QRCodeDebugElements.h:45
@ EI_SOURCE_IMAGE_Y8
Indicator for the source image as Y8.
Definition QRCodeDebugElements.h:50
@ EI_FINDER_PATTERNS
Indicator for images with individual finder patterns drawn into it.
Definition QRCodeDebugElements.h:55
@ EI_INVALID
Indicator for an invalid element.
Definition QRCodeDebugElements.h:47
@ EI_FINDER_PATTERN_TRIPLETS
Indicator for images with finder patterns grouped into triplets drawn into it.
Definition QRCodeDebugElements.h:57
@ EI_DETECTION
Indicator for images with current detections.
Definition QRCodeDebugElements.h:63
@ EI_COMPUTE_POSES
Indicator for images with all of the initial poses of QR code candidates.
Definition QRCodeDebugElements.h:60
@ EI_SOURCE_IMAGE_RGB24
Indicator for the source image as RGB24.
Definition QRCodeDebugElements.h:52
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
std::vector< QRCode > QRCodes
Definition of a vector of QR codes.
Definition QRCode.h:28
The namespace covering the entire Ocean framework.
Definition Accessor.h:15