File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments