| 234 | } |
| 235 | |
| 236 | static void markPatterns(cv::Mat &matchResult, QImage &image, |
| 237 | const cv::Mat &pattern) |
| 238 | { |
| 239 | auto matchImg = QImageToMat(image); |
| 240 | for (int row = 0; row < matchResult.rows; row++) { |
| 241 | for (int col = 0; col < matchResult.cols; col++) { |
| 242 | if (matchResult.at<float>(row, col) != 0.0) { |
| 243 | rectangle(matchImg, {col, row}, |
| 244 | cv::Point(col + pattern.cols, |
| 245 | row + pattern.rows), |
| 246 | cv::Scalar(255, 0, 0, 255), 2, 8, 0); |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | static void markObjects(QImage &image, std::vector<cv::Rect> &objects) |
| 253 | { |
no test coverage detected