| 339 | } |
| 340 | |
| 341 | RecoResult 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 | |
| 362 | RecoResult Recognizer::and_(const std::shared_ptr<MAA_RES_NS::Recognition::AndParam>& param, const std::string& name) |
| 363 | { |
nothing calls this directly
no test coverage detected