#pragma once
|
#include <string>
|
#include <list>
|
#include <iostream>
|
#include <opencv2/opencv.hpp>
|
#include <opencv2/highgui.hpp>
|
#include <opencv2/core.hpp>
|
#include <opencv2/imgcodecs.hpp>
|
#include "CaptureUtil.h"
|
#include "RecognitionManager.h"
|
enum ImgType
|
{
|
IMG_TYPE_GP,
|
IMG_TYPE_ADD
|
};
|
|
enum MoneyUnit {
|
MONEY_UNIT_Y,
|
MONEY_UNIT_W,
|
};
|
struct GPCodeArea
|
{
|
ImgType type;
|
int startx;
|
int starty;
|
int endx;
|
int endy;
|
std::string code;
|
|
//L2Êý¾ÝÓÐЧ
|
int cateIndex;
|
};
|
//ͬ»¨Ë³Ê¼þ
|
class THSActionUtil
|
{
|
private:
|
static void addGP(string code);
|
//ÅúÁ¿Ìí¼Ó¹ÉƱ
|
static void betchAddGP(HWND addDialog,list<string> codeList);
|
|
//ɾ³ý°å¿éÄÚµÄËùÓдúÂë
|
static void clearPlateCodes(HWND hwnd);
|
|
//»ñÈ¡°å¿éÖдúÂëÌí¼Ó°´Å¥µÄλÖÃ
|
static RECT getPlateAddCodeBtnPostion(HWND win);
|
|
public:
|
static HWND getMainWin();
|
|
static HWND getL2Win();
|
|
static HWND getThirdWindow();
|
|
static HWND getSecondWindow();
|
//ÐÐÒµ
|
static HWND getIndustryWindow();
|
|
//½»Ò×¾ä±ú
|
static HWND getTradeSuccessWindow();
|
|
static HWND getTradeDelegateWindow();
|
|
|
//¼ì²â»·¾³
|
static bool checkEnv();
|
|
//
|
static GPCodeArea splitPlateMenuArea(cv::Mat img);
|
|
//°å¿éÄÚÈÝ·Ö¸î
|
static std::list<int*> splitPlateRowArea(cv::Mat img);
|
|
static std::list<int*> splitPlateRowArea(cv::Mat img, int start_row, int start_col, int end_row, int end_col);
|
|
//´ò¿ªÍ¬»¨Ë³µÄ¸±ÆÁÄ»
|
static void openL2Screen();
|
static void openSecondScreen();
|
static void openThirdScreen();
|
static void openTradeSuccessScreen();
|
|
//ÉèÖÃ¹ÉÆ±
|
static bool setGP(std::string quickCode, list<std::string> codeList,RecognitionManager* recognitionManager);
|
//ʶ±ð¹ÉƱ´úÂë
|
static std::list<GPCodeArea> recognitionGPArea(cv::Mat img);
|
|
//ʶ±ðÊý×Ö
|
static std::list<GPCodeArea> recognitionGPCodeNum(cv::Mat img,std::list<GPCodeArea> areaList, RecognitionManager* recognitionManager);
|
|
//ʶ±ð´úÂë
|
static std::list<string> recognitionGPCode(cv::Mat img, RecognitionManager* recognitionManager);
|
|
|
//ÉèÖûñÈ¡level2µÄ¹ÉƱÊý¾Ý
|
static bool setListenL2GP(int p,string code, RecognitionManager* recognitionManager);
|
|
//ÉèÖûñÈ¡level2µÄ¹ÉƱ´úÂë
|
static std::map<int, string> getListenL2GPCodes(RecognitionManager* recognitionManager);
|
|
//ʶ±ð°å¿éÄÚÈÝÇøÓò
|
static GPCodeArea recognitionPlateContentArea(cv::Mat grayImg);
|
|
|
//Ìí¼ÓÄ¿±ê±êµÄ
|
static void addTargetCodes(list<std::string> codeList, RecognitionManager* recognitionManager);
|
|
static std::list<GPCodeArea> getListenL2GPAreaAndCode(RecognitionManager* recognitionManager);
|
|
//ͬ»¨Ë³ÊÇ·ñ¿¨ËÀ
|
static bool thsIsDead();
|
|
};
|