-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDecoder.h
More file actions
32 lines (21 loc) · 802 Bytes
/
Decoder.h
File metadata and controls
32 lines (21 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// SPDX-FileCopyrightText: (C) 2022 user4223 and (other) contributors to ticket-decoder <https://github.com/user4223/ticket-decoder>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include "DecoderOptions.h"
#include "lib/detector/api/include/Descriptor.h"
#include "lib/infrastructure/include/ContextFwd.h"
#include <opencv2/core.hpp>
#include "Level.h"
#include "Result.h"
#include <memory>
namespace decoder::api
{
class Decoder
{
public:
virtual ~Decoder() = default;
virtual api::Result decode(detector::api::Descriptor const &descriptor) = 0;
virtual api::Result decode(unsigned int id, cv::Rect const &box, cv::Mat const &image) = 0;
static std::unique_ptr<Decoder> create(infrastructure::Context &context, DecoderOptions defaultOptions = {});
};
}