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

Method MarkOCRMatch

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

Source from the content-addressed store, hash-verified

378}
379
380void PreviewImage::MarkOCRMatch(QImage &screenshot,
381 const std::shared_ptr<OCRParameters> &ocrParams)
382{
383 if (!ocrParams) {
384 emit StatusUpdate(obs_module_text(
385 "AdvSceneSwitcher.condition.video.ocrMatchFail"));
386 return;
387 }
388 auto text = RunOCR(ocrParams->GetOCR(), screenshot,
389 ocrParams->color.GetValue(),
390 ocrParams->colorThreshold);
391
392 if (!text) {
393 emit StatusUpdate(obs_module_text(
394 "AdvSceneSwitcher.condition.video.ocrMatchFail"));
395 return;
396 }
397
398 QString status(obs_module_text(
399 "AdvSceneSwitcher.condition.video.ocrMatchSuccess"));
400 emit StatusUpdate(status.arg(QString::fromStdString(*text)));
401}
402
403} // namespace advss

Callers

nothing calls this directly

Calls 4

obs_module_textFunction · 0.85
RunOCRFunction · 0.85
GetOCRMethod · 0.80
GetValueMethod · 0.80

Tested by

no test coverage detected