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

Method decode

czxing/src/main/cpp/zxing/src/maxicode/MCReader.cpp:47–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47Result
48Reader::decode(const BinaryBitmap& image) const
49{
50 auto binImg = image.getBitMatrix();
51 if (binImg == nullptr)
52 return {};
53
54 //TODO: this only works with effectively 'pure' barcodes. Needs proper detector.
55 BitMatrix bits = ExtractPureBits(*binImg);
56 if (bits.empty())
57 return {};
58
59 DecoderResult decRes = Decode(bits);
60 // TODO: before we can meaningfully return a ChecksumError result, we need to check the center for the presence of the finder pattern
61 if (!decRes.isValid())
62 return {};
63
64 return Result(std::move(decRes), {}, BarcodeFormat::MaxiCode);
65}
66
67} // namespace ZXing::MaxiCode

Callers

nothing calls this directly

Calls 7

ExtractPureBitsFunction · 0.85
moveFunction · 0.85
getBitMatrixMethod · 0.80
DecodeFunction · 0.70
ResultClass · 0.50
emptyMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected