Skip to content

Commit cd9d835

Browse files
committed
fix: remove verification
1 parent a704f41 commit cd9d835

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

src/apps/2024day4/src/main.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ std::vector<Match> findMatches(
151151
double threshold = 0.99
152152
) {
153153
std::vector<Match> matches;
154-
std::set<std::string> uniqueMatches;
155154

156155
for (const auto& pattern : patterns) {
157156
cv::Mat result;
@@ -170,17 +169,7 @@ std::vector<Match> findMatches(
170169
cv::findNonZero(matches_mask, locations);
171170

172171
for (const auto& loc : locations) {
173-
std::string matchKey;
174-
for (const auto& [color, offset] : pattern.pattern_def) {
175-
cv::Point pixelLoc(loc.x + offset.x, loc.y + offset.y);
176-
matchKey += std::to_string(pixelLoc.x) + "," +
177-
std::to_string(pixelLoc.y) + ";";
178-
}
179-
180-
if (uniqueMatches.find(matchKey) == uniqueMatches.end()) {
181-
matches.push_back({loc, pattern.name});
182-
uniqueMatches.insert(matchKey);
183-
}
172+
matches.push_back({loc, pattern.name});
184173
}
185174
}
186175

0 commit comments

Comments
 (0)