| 325 | } |
| 326 | |
| 327 | void PreviewImage::MarkPatternMatch( |
| 328 | QImage &screenshot, const PatternMatchParameters &patternMatchParams, |
| 329 | const PatternImageData &patternImageData) |
| 330 | { |
| 331 | cv::Mat result; |
| 332 | double matchValue = MatchPattern(screenshot, patternImageData, |
| 333 | patternMatchParams.threshold, result, |
| 334 | patternMatchParams.useAlphaAsMask, |
| 335 | patternMatchParams.matchMode); |
| 336 | emit ValueUpdate(matchValue); |
| 337 | if (result.total() == 0 || countNonZero(result) == 0) { |
| 338 | emit StatusUpdate(obs_module_text( |
| 339 | "AdvSceneSwitcher.condition.video.patternMatchFail")); |
| 340 | } else if (result.cols == 1 && result.rows == 1) { |
| 341 | emit StatusUpdate(obs_module_text( |
| 342 | "AdvSceneSwitcher.condition.video.patternMatchSuccessFullImage")); |
| 343 | } else { |
| 344 | emit StatusUpdate(obs_module_text( |
| 345 | "AdvSceneSwitcher.condition.video.patternMatchSuccess")); |
| 346 | markPatterns(result, screenshot, patternImageData.rgbaPattern); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | void PreviewImage::MarkObjectMatch( |
| 351 | QImage &screenshot, |
nothing calls this directly
no test coverage detected