mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
34 lines
1.2 KiB
C++
34 lines
1.2 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);
|
|
virtual void set_image(const cv::Mat image, const Rect& roi);
|
|
virtual void set_roi(const Rect& roi) noexcept;
|
|
|
|
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;
|
|
};
|
|
}
|