5#include "../../shims/stdoptional.hpp"
7#include "../../global.hpp"
8#include "../../image.hpp"
9#include "../../rect.hpp"
11#include "../../_cexports/c_code_reader.h"
12#include "decl_config.hpp"
13#include "../result.hpp"
20 inline HandleGuard<CodeReader::Decoder>::HandleGuard(
void *handle) noexcept
21 : HandleGuard<CodeReader::Decoder>(handle, [](
void *handle) { CVB_CALL_CAPI(
ReleaseObject(handle)); })
34 None = CExports::CVCRCustomPerformance::CVCRCP_None,
44 Robust = CExports::CVCRCustomPerformance::CVCRCP_Robust,
103 friend class ConfigBase;
106 enum class Properties
108 BasicInkjet = CExports::CVCRPerformanceProperties::CVCRPP_BasicInkjet,
109 AllCommon1DCodes = 124,
113 enum class ResultProperties
115 Corners = CExports::CVCRResultProperties::CVCRRP_Corners,
116 Center = CExports::CVCRResultProperties::CVCRRP_Center,
117 SymbolType = CExports::CVCRResultProperties::CVCRRP_SymbolType,
118 SymbolTypeEx = CExports::CVCRResultProperties::CVCRRP_SymbolTypeEx,
119 Length = CExports::CVCRResultProperties::CVCRRP_Length,
120 String = CExports::CVCRResultProperties::CVCRRP_String,
121 Quality = CExports::CVCRResultProperties::CVCRRP_Quality,
122 Status = CExports::CVCRResultProperties::CVCRRP_Status,
125 ECCError = CExports::CVCRResultProperties2D::CVCRRP2D_ECCError,
126 ECCErasure = CExports::CVCRResultProperties2D::CVCRRP2D_ECCErasure,
127 SymbolHeightWidth = CExports::CVCRResultProperties2D::CVCRRP2D_SymbolHeightWidth,
128 SymbolRowsColumns = CExports::CVCRResultProperties2D::CVCRRP2D_SymbolRowsColumns
208 template <Symbology SYM>
209 typename Config::Mapper<SYM>::Type &
Config()
211 return std::get<typename Config::Mapper<SYM>::Type>(config_);
209 typename Config::Mapper<SYM>::Type &
Config() {
…}
291 Decoder(
const Decoder &other) =
delete;
292 Decoder &operator=(
const Decoder &other) =
delete;
293 explicit Decoder(HandleGuard<Decoder> &&guard, PrivateTag) noexcept
295 , config_(
std::make_tuple(Config::DataMatrix(*
this), Config::QR(*
this), Config::MicroQR(*
this),
296 Config::Pdf417(*
this), Config::MicroPdf417(*
this), Config::GS1DataBar14(*
this),
297 Config::GS1DataBarStacked(*
this), Config::GS1DataBarLimited(*
this),
298 Config::GS1DataBarExpanded(*
this), Config::GS1DataBarExpandedStacked(*
this),
299 Config::Ean8(*
this), Config::Ean13(*
this), Config::UpcA(*
this), Config::UpcE(*
this),
300 Config::Code128(*
this), Config::Code39(*
this), Config::Code93(*
this),
301 Config::Interleaved2of5(*
this), Config::UspsIntelligentMail(*
this),
302 Config::DutchPost(*
this), Config::AustraliaPost(*
this), Config::RoyalMail(*
this),
303 Config::Pharmacode(*
this), Config::Code32(*
this), Config::Code11(*
this)))
306 virtual ~Decoder() =
default;
310 void *Handle() const noexcept
312 return handle_.Handle();
316 HandleGuard<Decoder> handle_;
317 std::tuple<Config::DataMatrix, Config::QR, Config::MicroQR, Config::Pdf417, Config::MicroPdf417,
318 Config::GS1DataBar14, Config::GS1DataBarStacked, Config::GS1DataBarLimited, Config::GS1DataBarExpanded,
319 Config::GS1DataBarExpandedStacked, Config::Ean8, Config::Ean13, Config::UpcA, Config::UpcE,
320 Config::Code128, Config::Code39, Config::Code93, Config::Interleaved2of5, Config::UspsIntelligentMail,
321 Config::DutchPost, Config::AustraliaPost, Config::RoyalMail, Config::Pharmacode, Config::Code32,
100 class Decoder final {
…};
Class for decoding.
Definition decl_decoder.hpp:101
void SetDetectorDensity(int value)
Sets the detector density to control the search aggressiveness for small codes.
Definition detail_decoder.hpp:82
CodeReader::CustomPerformance CustomPerformance() const
Retrieves the custom image processing method used to optimize decoding robustness and performance.
Definition detail_decoder.hpp:74
bool IsBasicInkjetDPMEnabled() const
Checks whether the Basic Inkjet DPM mode is enabled.
Definition detail_decoder.hpp:34
void SetAll2DCodesEnabled(bool value)
Enables all 2D codes.
Definition detail_decoder.hpp:54
bool AllCommon1DCodesEnabled() const
Checks whether all common 1D codes are enabled.
Definition detail_decoder.hpp:47
bool All2DCodesEnabled() const
Checks whether all 2D codes are enabled.
Definition detail_decoder.hpp:60
void SetAllCommon1DCodesEnabled(bool value)
Enables all common 1D codes.
Definition detail_decoder.hpp:41
int DetectorDensity() const
Retrieves the detector density to control the search aggressiveness for small codes.
Definition detail_decoder.hpp:92
Config::Mapper< SYM >::Type & Config()
Retrieves the configuration object for a specific symbology.
Definition decl_decoder.hpp:209
std::vector< Result > Execute(const ImagePlane &plane, const Rect< int > &aoi)
Performs the decoding.
Definition detail_decoder.hpp:118
static std::unique_ptr< Decoder > Create()
Creates and returns a new Decoder instance.
Definition detail_decoder.hpp:22
void SetCustomPerformance(CustomPerformance value)
Sets the custom image processing method used to optimize decoding robustness and performance.
Definition detail_decoder.hpp:67
void SetBasicInkjetDPMEnabled(bool value)
Enables or disables the reading of Basic Inkjet DPM (Direct Part Marking) codes.
Definition detail_decoder.hpp:28
Image plane information container.
Definition decl_image_plane.hpp:29
Rectangle object.
Definition rect.hpp:24
cvbbool_t ReleaseObject(OBJ &Object)
Namespace for all decoding functionalities.
Definition decl_config_2d_codes.hpp:10
CustomPerformance
Enum class specifying custom image processing methods to improve decoding robustness and performance.
Definition decl_decoder.hpp:32
@ ExtendedRange2D
Extends the readable range for 2D codes in the central area of the image.
Definition decl_decoder.hpp:52
@ None
No additional processing is applied.
Definition decl_decoder.hpp:34
@ Robust
Enables robust decoding for a single code.
Definition decl_decoder.hpp:44
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17