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

Method close

czxing/src/main/cpp/zxing/src/BinaryBitmap.cpp:85–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void BinaryBitmap::close()
86{
87 if (_cache->matrix) {
88 auto& matrix = *const_cast<BitMatrix*>(_cache->matrix.get());
89 BitMatrix tmp(matrix.width(), matrix.height());
90
91 // dilate
92 SumFilter(matrix, tmp, [](int sum) { return (sum > 0 * BitMatrix::SET_V) * BitMatrix::SET_V; });
93 // erode
94 SumFilter(tmp, matrix, [](int sum) { return (sum == 9 * BitMatrix::SET_V) * BitMatrix::SET_V; });
95 }
96 _closed = true;
97}
98
99} // ZXing

Callers 11

save_fileMethod · 0.80
decodeImageMethod · 0.80
decodeImageMethod · 0.80
writeToFileMethod · 0.80
ReadBarcodesFunction · 0.80
onPauseMethod · 0.80
onDestroyMethod · 0.80
readYuvMethod · 0.80
saveImageMethod · 0.80
saveBitmapMethod · 0.80

Calls 4

SumFilterFunction · 0.85
getMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected