mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
#pragma once
|
|
#include "MultiMatchImageAnalyzer.h"
|
|
#include "OcrWithPreprocessImageAnalyzer.h"
|
|
|
|
namespace asst
|
|
{
|
|
class OcrWithFlagTemplImageAnalyzer : public OcrWithPreprocessImageAnalyzer
|
|
{
|
|
public:
|
|
OcrWithFlagTemplImageAnalyzer() = default;
|
|
OcrWithFlagTemplImageAnalyzer(const cv::Mat& image);
|
|
OcrWithFlagTemplImageAnalyzer(const cv::Mat& image, const Rect& roi);
|
|
virtual ~OcrWithFlagTemplImageAnalyzer() override = default;
|
|
|
|
virtual void set_image(const cv::Mat image) override;
|
|
virtual void set_roi(const Rect& roi) noexcept override;
|
|
|
|
virtual bool analyze() override;
|
|
|
|
virtual const std::vector<TextRect>& get_result() const noexcept override;
|
|
virtual std::vector<TextRect>& get_result() noexcept override;
|
|
|
|
void set_task_info(const std::string& templ_task_name,
|
|
const std::string& ocr_task_name); // FIXME: hiding virtual function
|
|
void set_flag_rect_move(Rect flag_rect_move);
|
|
|
|
protected:
|
|
MultiMatchImageAnalyzer m_multi_match_image_analyzer;
|
|
Rect m_flag_rect_move;
|
|
std::vector<TextRect> m_all_result;
|
|
};
|
|
}
|