MCPcopy Create free account
hub / github.com/devilsen/CZXing / CreateBitmap

Function CreateBitmap

czxing/src/main/cpp/zxing/src/ReadBarcode.cpp:120–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120std::unique_ptr<BinaryBitmap> CreateBitmap(ZXing::Binarizer binarizer, const ImageView& iv)
121{
122 switch (binarizer) {
123 case Binarizer::BoolCast: return std::make_unique<ThresholdBinarizer>(iv, 0);
124 case Binarizer::FixedThreshold: return std::make_unique<ThresholdBinarizer>(iv, 127);
125 case Binarizer::GlobalHistogram: return std::make_unique<GlobalHistogramBinarizer>(iv);
126 case Binarizer::LocalAverage: return std::make_unique<HybridBinarizer>(iv);
127 }
128 return {}; // silence gcc warning
129}
130
131Result ReadBarcode(const ImageView& _iv, const DecodeHints& hints)
132{

Callers 1

ReadBarcodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected