| 357 | } |
| 358 | |
| 359 | bool MacroConditionVideo::OutputChanged() |
| 360 | { |
| 361 | if (!_patternMatchParameters.useForChangedCheck) { |
| 362 | return _screenshotData.GetImage() != _matchImage; |
| 363 | } |
| 364 | |
| 365 | cv::Mat result; |
| 366 | _patternImageData = CreatePatternData(_matchImage); |
| 367 | double bestMatchValue = |
| 368 | MatchPattern(_screenshotData.GetImage(), _patternImageData, |
| 369 | _patternMatchParameters.threshold, result, |
| 370 | _patternMatchParameters.useAlphaAsMask, |
| 371 | _patternMatchParameters.matchMode); |
| 372 | SetTempVarValue("similarity", std::to_string(bestMatchValue)); |
| 373 | if (result.total() == 0) { |
| 374 | return false; |
| 375 | } |
| 376 | return countNonZero(result) == 0; |
| 377 | } |
| 378 | |
| 379 | bool MacroConditionVideo::ScreenshotContainsObject() |
| 380 | { |
nothing calls this directly
no test coverage detected