MCPcopy Create free account
hub / github.com/WallBreaker2/op / full_match

Function full_match

libop/image/ImageSearchAlgorithms.cpp:1495–1507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1493}
1494
1495inline int full_match(const ImageBin &binary, rect_t &rc, const uint8_t *data) {
1496 // 匹配
1497 int idx = 0;
1498 for (int x = rc.x1; x < rc.x2; ++x) {
1499 for (int y = rc.y1; y < rc.y2; ++y) {
1500 int val = GET_BIT(data[idx / 8], idx & 7);
1501 if (binary.at(y, x) != val)
1502 return 0;
1503 idx++;
1504 }
1505 }
1506 return 1;
1507}
1508
1509inline int part_match(const ImageBin &binary, rect_t &rc, int max_error, const uint8_t *data) {
1510 // 匹配

Callers 1

_bin_ocrMethod · 0.85

Calls 2

GET_BITFunction · 0.85
atMethod · 0.45

Tested by

no test coverage detected