MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / markPatterns

Function markPatterns

plugins/video/preview-dialog.cpp:236–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236static 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
252static void markObjects(QImage &image, std::vector<cv::Rect> &objects)
253{

Callers 1

MarkPatternMatchMethod · 0.85

Calls 1

QImageToMatFunction · 0.85

Tested by

no test coverage detected