MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / custom_recognize

Method custom_recognize

source/MaaFramework/Task/Component/Recognizer.cpp:341–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341RecoResult Recognizer::custom_recognize(const MAA_VISION_NS::CustomRecognitionParam& param, const std::string& name)
342{
343 using namespace MAA_VISION_NS;
344
345 if (!resource()) {
346 LogError << "resource is null";
347 return { };
348 }
349
350 auto rois = get_rois(param.roi_target, true);
351 if (rois.empty()) {
352 LogWarn << "failed to get rois" << VAR(name);
353 return { };
354 }
355
356 return build_result(
357 name,
358 "Custom",
359 CustomRecognition(image_, rois.front(), param, resource()->custom_recognition(param.name), context_, name));
360}
361
362RecoResult Recognizer::and_(const std::shared_ptr<MAA_RES_NS::Recognition::AndParam>& param, const std::string& name)
363{

Callers

nothing calls this directly

Calls 3

CustomRecognitionClass · 0.70
emptyMethod · 0.45
custom_recognitionMethod · 0.45

Tested by

no test coverage detected