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

Method ScreenshotContainsObject

plugins/video/macro-condition-video.cpp:379–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379bool MacroConditionVideo::ScreenshotContainsObject()
380{
381 auto model = _objMatchParameters.GetModel();
382 if (!model) {
383 return false;
384 }
385 auto objects = MatchObject(_screenshotData.GetImage(), *model,
386 _objMatchParameters.scaleFactor,
387 _objMatchParameters.minNeighbors,
388 _objMatchParameters.minSize.CV(),
389 _objMatchParameters.maxSize.CV());
390 const auto count = objects.size();
391 SetTempVarValue("objectCount", std::to_string(count));
392 return count > 0;
393}
394
395bool MacroConditionVideo::CheckBrightnessThreshold()
396{

Callers

nothing calls this directly

Calls 6

MatchObjectFunction · 0.85
SetTempVarValueFunction · 0.85
to_stringFunction · 0.85
CVMethod · 0.80
sizeMethod · 0.80
GetModelMethod · 0.45

Tested by

no test coverage detected