mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
merge.合并dev
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
build
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
@@ -405,6 +406,7 @@ MigrationBackup/
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
**/.vscode/*
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
|
||||
41
3rdparty/include/OcrLiteOnnx/AngleNet.h
vendored
41
3rdparty/include/OcrLiteOnnx/AngleNet.h
vendored
@@ -1,41 +0,0 @@
|
||||
#ifndef __OCR_ANGLENET_H__
|
||||
#define __OCR_ANGLENET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
class AngleNet {
|
||||
public:
|
||||
AngleNet();
|
||||
|
||||
~AngleNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initModel(const std::string &pathStr);
|
||||
|
||||
std::vector<Angle> getAngles(std::vector<cv::Mat> &partImgs, const char *path,
|
||||
const char *imgName, bool doAngle, bool mostAngle);
|
||||
|
||||
private:
|
||||
bool isOutputAngleImg = false;
|
||||
|
||||
Ort::Session *session;
|
||||
Ort::Env env = Ort::Env(ORT_LOGGING_LEVEL_ERROR, "AngleNet");
|
||||
Ort::SessionOptions sessionOptions = Ort::SessionOptions();
|
||||
int numThread = 0;
|
||||
|
||||
char *inputName;
|
||||
char *outputName;
|
||||
|
||||
const float meanValues[3] = {127.5, 127.5, 127.5};
|
||||
const float normValues[3] = {1.0 / 127.5, 1.0 / 127.5, 1.0 / 127.5};
|
||||
const int dstWidth = 192;
|
||||
const int dstHeight = 32;
|
||||
|
||||
Angle getAngle(cv::Mat &src);
|
||||
};
|
||||
|
||||
|
||||
#endif //__OCR_ANGLENET_H__
|
||||
43
3rdparty/include/OcrLiteOnnx/CrnnNet.h
vendored
43
3rdparty/include/OcrLiteOnnx/CrnnNet.h
vendored
@@ -1,43 +0,0 @@
|
||||
#ifndef __OCR_CRNNNET_H__
|
||||
#define __OCR_CRNNNET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
class CrnnNet {
|
||||
public:
|
||||
|
||||
CrnnNet();
|
||||
|
||||
~CrnnNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initModel(const std::string &pathStr, const std::string &keysPath);
|
||||
|
||||
std::vector<TextLine> getTextLines(std::vector<cv::Mat> &partImg, const char *path, const char *imgName);
|
||||
|
||||
private:
|
||||
bool isOutputDebugImg = false;
|
||||
Ort::Session *session;
|
||||
Ort::Env env = Ort::Env(ORT_LOGGING_LEVEL_ERROR, "CrnnNet");
|
||||
Ort::SessionOptions sessionOptions = Ort::SessionOptions();
|
||||
int numThread = 0;
|
||||
|
||||
char *inputName;
|
||||
char *outputName;
|
||||
|
||||
const float meanValues[3] = {127.5, 127.5, 127.5};
|
||||
const float normValues[3] = {1.0 / 127.5, 1.0 / 127.5, 1.0 / 127.5};
|
||||
const int dstHeight = 32;
|
||||
|
||||
std::vector<std::string> keys;
|
||||
|
||||
TextLine scoreToTextLine(const std::vector<float> &outputData, int h, int w);
|
||||
|
||||
TextLine getTextLine(const cv::Mat &src);
|
||||
};
|
||||
|
||||
|
||||
#endif //__OCR_CRNNNET_H__
|
||||
34
3rdparty/include/OcrLiteOnnx/DbNet.h
vendored
34
3rdparty/include/OcrLiteOnnx/DbNet.h
vendored
@@ -1,34 +0,0 @@
|
||||
#ifndef __OCR_DBNET_H__
|
||||
#define __OCR_DBNET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
class DbNet {
|
||||
public:
|
||||
DbNet();
|
||||
|
||||
~DbNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initModel(const std::string &pathStr);
|
||||
|
||||
std::vector<TextBox> getTextBoxes(cv::Mat &src, ScaleParam &s, float boxScoreThresh,
|
||||
float boxThresh, float unClipRatio);
|
||||
|
||||
private:
|
||||
Ort::Session *session;
|
||||
Ort::Env env = Ort::Env(ORT_LOGGING_LEVEL_ERROR, "DbNet");
|
||||
Ort::SessionOptions sessionOptions = Ort::SessionOptions();
|
||||
int numThread = 0;
|
||||
char *inputName;
|
||||
char *outputName;
|
||||
|
||||
const float meanValues[3] = {0.485 * 255, 0.456 * 255, 0.406 * 255};
|
||||
const float normValues[3] = {1.0 / 0.229 / 255.0, 1.0 / 0.224 / 255.0, 1.0 / 0.225 / 255.0};
|
||||
};
|
||||
|
||||
|
||||
#endif //__OCR_DBNET_H__
|
||||
56
3rdparty/include/OcrLiteOnnx/OcrLite.h
vendored
56
3rdparty/include/OcrLiteOnnx/OcrLite.h
vendored
@@ -1,56 +0,0 @@
|
||||
#ifndef __OCR_LITE_H__
|
||||
#define __OCR_LITE_H__
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include "OcrStruct.h"
|
||||
#include "DbNet.h"
|
||||
#include "AngleNet.h"
|
||||
#include "CrnnNet.h"
|
||||
|
||||
class OcrLite {
|
||||
public:
|
||||
OcrLite();
|
||||
|
||||
~OcrLite();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initLogger(bool isConsole, bool isPartImg, bool isResultImg);
|
||||
|
||||
void enableResultTxt(const char *path, const char *imgName);
|
||||
|
||||
void initModels(const std::string &detPath, const std::string &clsPath,
|
||||
const std::string &recPath, const std::string &keysPath);
|
||||
|
||||
void Logger(const char *format, ...);
|
||||
|
||||
OcrResult detect(const char *path, const char *imgName,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
|
||||
OcrResult detect(const cv::Mat& mat,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
private:
|
||||
bool isOutputConsole = false;
|
||||
bool isOutputPartImg = false;
|
||||
bool isOutputResultTxt = false;
|
||||
bool isOutputResultImg = false;
|
||||
FILE *resultTxt;
|
||||
DbNet dbNet;
|
||||
AngleNet angleNet;
|
||||
CrnnNet crnnNet;
|
||||
|
||||
std::vector<cv::Mat> getPartImages(cv::Mat &src, std::vector<TextBox> &textBoxes,
|
||||
const char *path, const char *imgName);
|
||||
|
||||
OcrResult detect(const char *path, const char *imgName,
|
||||
cv::Mat &src, cv::Rect &originRect, ScaleParam &scale,
|
||||
float boxScoreThresh = 0.6f, float boxThresh = 0.3f,
|
||||
float unClipRatio = 2.0f, bool doAngle = true, bool mostAngle = true);
|
||||
};
|
||||
|
||||
#endif //__OCR_LITE_H__
|
||||
39
3rdparty/include/OcrLiteOnnx/OcrLiteCaller.h
vendored
39
3rdparty/include/OcrLiteOnnx/OcrLiteCaller.h
vendored
@@ -1,39 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "OcrLitePort.h"
|
||||
#include "OcrStruct.h"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
class Mat;
|
||||
}
|
||||
class OcrLite;
|
||||
|
||||
class OCRLITE_PORT OcrLiteCaller
|
||||
{
|
||||
public:
|
||||
OcrLiteCaller();
|
||||
~OcrLiteCaller();
|
||||
OcrLiteCaller(const OcrLite&) = delete;
|
||||
OcrLiteCaller(OcrLite&&) = delete;
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
bool initModels(const std::string& detPath, const std::string& clsPath,
|
||||
const std::string& recPath, const std::string& keysPath);
|
||||
|
||||
OcrResult detect(const cv::Mat& mat,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
OcrResult detect(const std::string& dir, const std::string& file,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
OcrLiteCaller& operator=(const OcrLiteCaller&) = delete;
|
||||
OcrLiteCaller& operator=(OcrLiteCaller&&) = delete;
|
||||
private:
|
||||
std::unique_ptr<OcrLite> m_ocrlite_ptr;
|
||||
};
|
||||
45
3rdparty/include/OcrLiteOnnx/OcrLitePort.h
vendored
45
3rdparty/include/OcrLiteOnnx/OcrLitePort.h
vendored
@@ -1,45 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(__JNI__) && !defined(__EXEC__)
|
||||
|
||||
// The way how the function is called
|
||||
#if !defined(OCRLITE_CALL)
|
||||
#if defined(_WIN32)
|
||||
#define OCRLITE_CALL __stdcall
|
||||
#else
|
||||
#define OCRLITE_CALL
|
||||
#endif /* _WIN32 */
|
||||
#endif /* OCRLITE_CALL */
|
||||
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define OCRLITE_EXPORT __declspec(dllexport)
|
||||
#define OCRLITE_IMPORT __declspec(dllimport)
|
||||
#define OCRLITE_LOCAL
|
||||
#else // ! defined _WIN32 || defined __CYGWIN__
|
||||
#if __GNUC__ >= 4
|
||||
#define OCRLITE_EXPORT __attribute__ ((visibility ("default")))
|
||||
#define OCRLITE_IMPORT __attribute__ ((visibility ("default")))
|
||||
#define OCRLITE_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#else // ! __GNUC__ >= 4
|
||||
#define OCRLITE_EXPORT
|
||||
#define OCRLITE_IMPORT
|
||||
#endif // End __GNUC__ >= 4
|
||||
#endif // End defined _WIN32 || defined __CYGWIN__
|
||||
|
||||
#ifdef __CLIB__
|
||||
#define OCRLITE_PORT OCRLITE_EXPORT
|
||||
#else
|
||||
#define OCRLITE_PORT OCRLITE_IMPORT
|
||||
#endif // OCRLITE_PORT
|
||||
|
||||
#define OCR_API OCRLITE_PORT OCRLITE_CALL
|
||||
|
||||
#define OCR_LOCAL OCRLITE_LOCAL OCRLITE_CALL
|
||||
|
||||
#else // __JNI__ || __EXEC__
|
||||
|
||||
#define OCRLITE_PORT
|
||||
#define OCR_API
|
||||
#define OCR_LOCAL
|
||||
|
||||
#endif // __JNI__ || __EXEC__
|
||||
35
3rdparty/include/OcrLiteOnnx/OcrResultUtils.h
vendored
35
3rdparty/include/OcrLiteOnnx/OcrResultUtils.h
vendored
@@ -1,35 +0,0 @@
|
||||
#ifdef __JNI__
|
||||
#ifndef __OCR_RESULT_UTILS_H__
|
||||
#define __OCR_RESULT_UTILS_H__
|
||||
#include <jni.h>
|
||||
#include "OcrStruct.h"
|
||||
|
||||
class OcrResultUtils {
|
||||
public:
|
||||
OcrResultUtils(JNIEnv *env, OcrResult &ocrResult);
|
||||
|
||||
~OcrResultUtils();
|
||||
|
||||
jobject getJObject();
|
||||
|
||||
private:
|
||||
JNIEnv *jniEnv;
|
||||
jobject jOcrResult;
|
||||
|
||||
jclass newJListClass();
|
||||
|
||||
jmethodID getListConstructor(jclass clazz);
|
||||
|
||||
jobject getTextBlock(TextBlock &textBlock);
|
||||
|
||||
jobject getTextBlocks(std::vector<TextBlock> &textBlocks);
|
||||
|
||||
jobject newJPoint(cv::Point &point);
|
||||
|
||||
jobject newJBoxPoint(std::vector<cv::Point> &boxPoint);
|
||||
|
||||
jfloatArray newJScoreArray(std::vector<float> &scores);
|
||||
|
||||
};
|
||||
#endif //__OCR_RESULT_UTILS_H__
|
||||
#endif
|
||||
55
3rdparty/include/OcrLiteOnnx/OcrStruct.h
vendored
55
3rdparty/include/OcrLiteOnnx/OcrStruct.h
vendored
@@ -1,55 +0,0 @@
|
||||
#ifndef __OCR_STRUCT_H__
|
||||
#define __OCR_STRUCT_H__
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include <vector>
|
||||
|
||||
#include "OcrLitePort.h"
|
||||
|
||||
struct ScaleParam {
|
||||
int srcWidth;
|
||||
int srcHeight;
|
||||
int dstWidth;
|
||||
int dstHeight;
|
||||
float ratioWidth;
|
||||
float ratioHeight;
|
||||
};
|
||||
|
||||
struct TextBox {
|
||||
std::vector<cv::Point> boxPoint;
|
||||
float score;
|
||||
};
|
||||
|
||||
struct Angle {
|
||||
int index;
|
||||
float score;
|
||||
double time;
|
||||
};
|
||||
|
||||
struct TextLine {
|
||||
std::string text;
|
||||
std::vector<float> charScores;
|
||||
double time;
|
||||
};
|
||||
|
||||
struct OCRLITE_PORT TextBlock {
|
||||
std::vector<cv::Point> boxPoint;
|
||||
float boxScore;
|
||||
int angleIndex;
|
||||
float angleScore;
|
||||
double angleTime;
|
||||
std::string text;
|
||||
std::vector<float> charScores;
|
||||
double crnnTime;
|
||||
double blockTime;
|
||||
};
|
||||
|
||||
struct OCRLITE_PORT OcrResult {
|
||||
double dbNetTime;
|
||||
std::vector<TextBlock> textBlocks;
|
||||
cv::Mat boxImg;
|
||||
double detectTime;
|
||||
std::string strRes;
|
||||
};
|
||||
|
||||
#endif //__OCR_STRUCT_H__
|
||||
103
3rdparty/include/OcrLiteOnnx/OcrUtils.h
vendored
103
3rdparty/include/OcrLiteOnnx/OcrUtils.h
vendored
@@ -1,103 +0,0 @@
|
||||
#ifndef __OCR_UTILS_H__
|
||||
#define __OCR_UTILS_H__
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
#include "OcrStruct.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include <numeric>
|
||||
#include <sys/stat.h>
|
||||
|
||||
template<typename T, typename... Ts>
|
||||
static std::unique_ptr<T> makeUnique(Ts &&... params) {
|
||||
return std::unique_ptr<T>(new T(std::forward<Ts>(params)...));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static double getMean(std::vector<T> &input) {
|
||||
auto sum = accumulate(input.begin(), input.end(), 0.0);
|
||||
return sum / input.size();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static double getStdev(std::vector<T> &input, double mean) {
|
||||
if (input.size() <= 1) return 0;
|
||||
double accum = 0.0;
|
||||
for_each(input.begin(), input.end(), [&](const double d) {
|
||||
accum += (d - mean) * (d - mean);
|
||||
});
|
||||
double stdev = sqrt(accum / (input.size() - 1));
|
||||
return stdev;
|
||||
}
|
||||
|
||||
double getCurrentTime();
|
||||
|
||||
inline bool isFileExists(const std::string &name) {
|
||||
struct stat buffer;
|
||||
return (stat(name.c_str(), &buffer) == 0);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define my_strtol wcstol
|
||||
#define my_strrchr wcsrchr
|
||||
#define my_strcasecmp _wcsicmp
|
||||
#define my_strdup _strdup
|
||||
#else
|
||||
#define my_strtol strtol
|
||||
#define my_strrchr strrchr
|
||||
#define my_strcasecmp strcasecmp
|
||||
#define my_strdup strdup
|
||||
#endif
|
||||
|
||||
std::wstring strToWstr(std::string str);
|
||||
|
||||
ScaleParam getScaleParam(cv::Mat &src, const float scale);
|
||||
|
||||
ScaleParam getScaleParam(cv::Mat &src, const int targetSize);
|
||||
|
||||
std::vector<cv::Point2f> getBox(const cv::RotatedRect &rect);
|
||||
|
||||
int getThickness(cv::Mat &boxImg);
|
||||
|
||||
void drawTextBox(cv::Mat &boxImg, cv::RotatedRect &rect, int thickness);
|
||||
|
||||
void drawTextBox(cv::Mat &boxImg, const std::vector<cv::Point> &box, int thickness);
|
||||
|
||||
void drawTextBoxes(cv::Mat &boxImg, std::vector<TextBox> &textBoxes, int thickness);
|
||||
|
||||
cv::Mat matRotateClockWise180(cv::Mat src);
|
||||
|
||||
cv::Mat matRotateClockWise90(cv::Mat src);
|
||||
|
||||
cv::Mat getRotateCropImage(const cv::Mat &src, std::vector<cv::Point> box);
|
||||
|
||||
cv::Mat adjustTargetImg(cv::Mat &src, int dstWidth, int dstHeight);
|
||||
|
||||
std::vector<cv::Point> getMinBoxes(const std::vector<cv::Point> &inVec, float &minSideLen, float &allEdgeSize);
|
||||
|
||||
float boxScoreFast(const cv::Mat &inMat, const std::vector<cv::Point> &inBox);
|
||||
|
||||
std::vector<cv::Point> unClip(const std::vector<cv::Point> &inBox, float perimeter, float unClipRatio);
|
||||
|
||||
std::vector<float> substractMeanNormalize(cv::Mat &src, const float *meanVals, const float *normVals);
|
||||
|
||||
std::vector<int> getAngleIndexes(std::vector<Angle> &angles);
|
||||
|
||||
std::vector<char *> getInputNames(Ort::Session *session);
|
||||
|
||||
std::vector<char *> getOutputNames(Ort::Session *session);
|
||||
|
||||
void getInputName(Ort::Session *session, char *&inputName);
|
||||
|
||||
void getOutputName(Ort::Session *session, char *&outputName);
|
||||
|
||||
void saveImg(cv::Mat &img, const char *imgPath);
|
||||
|
||||
std::string getSrcImgFilePath(const char *path, const char *imgName);
|
||||
|
||||
std::string getResultTxtFilePath(const char *path, const char *imgName);
|
||||
|
||||
std::string getResultImgFilePath(const char *path, const char *imgName);
|
||||
|
||||
std::string getDebugImgFilePath(const char *path, const char *imgName, int i, const char *tag);
|
||||
|
||||
#endif //__OCR_UTILS_H__
|
||||
406
3rdparty/include/OcrLiteOnnx/clipper.hpp
vendored
406
3rdparty/include/OcrLiteOnnx/clipper.hpp
vendored
@@ -1,406 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* *
|
||||
* Author : Angus Johnson *
|
||||
* Version : 6.4.2 *
|
||||
* Date : 27 February 2017 *
|
||||
* Website : http://www.angusj.com *
|
||||
* Copyright : Angus Johnson 2010-2017 *
|
||||
* *
|
||||
* License: *
|
||||
* Use, modification & distribution is subject to Boost Software License Ver 1. *
|
||||
* http://www.boost.org/LICENSE_1_0.txt *
|
||||
* *
|
||||
* Attributions: *
|
||||
* The code in this library is an extension of Bala Vatti's clipping algorithm: *
|
||||
* "A generic solution to polygon clipping" *
|
||||
* Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63. *
|
||||
* http://portal.acm.org/citation.cfm?id=129906 *
|
||||
* *
|
||||
* Computer graphics and geometric modeling: implementation and algorithms *
|
||||
* By Max K. Agoston *
|
||||
* Springer; 1 edition (January 4, 2005) *
|
||||
* http://books.google.com/books?q=vatti+clipping+agoston *
|
||||
* *
|
||||
* See also: *
|
||||
* "Polygon Offsetting by Computing Winding Numbers" *
|
||||
* Paper no. DETC2005-85513 pp. 565-575 *
|
||||
* ASME 2005 International Design Engineering Technical Conferences *
|
||||
* and Computers and Information in Engineering Conference (IDETC/CIE2005) *
|
||||
* September 24-28, 2005 , Long Beach, California, USA *
|
||||
* http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef clipper_hpp
|
||||
#define clipper_hpp
|
||||
|
||||
#define CLIPPER_VERSION "6.4.2"
|
||||
|
||||
//use_int32: When enabled 32bit ints are used instead of 64bit ints. This
|
||||
//improve performance but coordinate values are limited to the range +/- 46340
|
||||
//#define use_int32
|
||||
|
||||
//use_xyz: adds a Z member to IntPoint. Adds a minor cost to perfomance.
|
||||
//#define use_xyz
|
||||
|
||||
//use_lines: Enables line clipping. Adds a very minor cost to performance.
|
||||
#define use_lines
|
||||
|
||||
//use_deprecated: Enables temporary support for the obsolete functions
|
||||
//#define use_deprecated
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <stdexcept>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <ostream>
|
||||
#include <functional>
|
||||
#include <queue>
|
||||
|
||||
namespace ClipperLib {
|
||||
|
||||
enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor };
|
||||
enum PolyType { ptSubject, ptClip };
|
||||
//By far the most widely used winding rules for polygon filling are
|
||||
//EvenOdd & NonZero (GDI, GDI+, XLib, OpenGL, Cairo, AGG, Quartz, SVG, Gr32)
|
||||
//Others rules include Positive, Negative and ABS_GTR_EQ_TWO (only in OpenGL)
|
||||
//see http://glprogramming.com/red/chapter11.html
|
||||
enum PolyFillType { pftEvenOdd, pftNonZero, pftPositive, pftNegative };
|
||||
|
||||
#ifdef use_int32
|
||||
typedef int cInt;
|
||||
static cInt const loRange = 0x7FFF;
|
||||
static cInt const hiRange = 0x7FFF;
|
||||
#else
|
||||
typedef signed long long cInt;
|
||||
static cInt const loRange = 0x3FFFFFFF;
|
||||
static cInt const hiRange = 0x3FFFFFFFFFFFFFFFLL;
|
||||
typedef signed long long long64; //used by Int128 class
|
||||
typedef unsigned long long ulong64;
|
||||
|
||||
#endif
|
||||
|
||||
struct IntPoint {
|
||||
cInt X;
|
||||
cInt Y;
|
||||
#ifdef use_xyz
|
||||
cInt Z;
|
||||
IntPoint(cInt x = 0, cInt y = 0, cInt z = 0): X(x), Y(y), Z(z) {};
|
||||
#else
|
||||
IntPoint(cInt x = 0, cInt y = 0): X(x), Y(y) {};
|
||||
#endif
|
||||
|
||||
friend inline bool operator== (const IntPoint& a, const IntPoint& b)
|
||||
{
|
||||
return a.X == b.X && a.Y == b.Y;
|
||||
}
|
||||
friend inline bool operator!= (const IntPoint& a, const IntPoint& b)
|
||||
{
|
||||
return a.X != b.X || a.Y != b.Y;
|
||||
}
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
typedef std::vector< IntPoint > Path;
|
||||
typedef std::vector< Path > Paths;
|
||||
|
||||
inline Path& operator <<(Path& poly, const IntPoint& p) {poly.push_back(p); return poly;}
|
||||
inline Paths& operator <<(Paths& polys, const Path& p) {polys.push_back(p); return polys;}
|
||||
|
||||
std::ostream& operator <<(std::ostream &s, const IntPoint &p);
|
||||
std::ostream& operator <<(std::ostream &s, const Path &p);
|
||||
std::ostream& operator <<(std::ostream &s, const Paths &p);
|
||||
|
||||
struct DoublePoint
|
||||
{
|
||||
double X;
|
||||
double Y;
|
||||
DoublePoint(double x = 0, double y = 0) : X(x), Y(y) {}
|
||||
DoublePoint(IntPoint ip) : X((double)ip.X), Y((double)ip.Y) {}
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifdef use_xyz
|
||||
typedef void (*ZFillCallback)(IntPoint& e1bot, IntPoint& e1top, IntPoint& e2bot, IntPoint& e2top, IntPoint& pt);
|
||||
#endif
|
||||
|
||||
enum InitOptions {ioReverseSolution = 1, ioStrictlySimple = 2, ioPreserveCollinear = 4};
|
||||
enum JoinType {jtSquare, jtRound, jtMiter};
|
||||
enum EndType {etClosedPolygon, etClosedLine, etOpenButt, etOpenSquare, etOpenRound};
|
||||
|
||||
class PolyNode;
|
||||
typedef std::vector< PolyNode* > PolyNodes;
|
||||
|
||||
class PolyNode
|
||||
{
|
||||
public:
|
||||
PolyNode();
|
||||
virtual ~PolyNode(){};
|
||||
Path Contour;
|
||||
PolyNodes Childs;
|
||||
PolyNode* Parent;
|
||||
PolyNode* GetNext() const;
|
||||
bool IsHole() const;
|
||||
bool IsOpen() const;
|
||||
int ChildCount() const;
|
||||
private:
|
||||
//PolyNode& operator =(PolyNode& other);
|
||||
unsigned Index; //node index in Parent.Childs
|
||||
bool m_IsOpen;
|
||||
JoinType m_jointype;
|
||||
EndType m_endtype;
|
||||
PolyNode* GetNextSiblingUp() const;
|
||||
void AddChild(PolyNode& child);
|
||||
friend class Clipper; //to access Index
|
||||
friend class ClipperOffset;
|
||||
};
|
||||
|
||||
class PolyTree: public PolyNode
|
||||
{
|
||||
public:
|
||||
~PolyTree(){ Clear(); };
|
||||
PolyNode* GetFirst() const;
|
||||
void Clear();
|
||||
int Total() const;
|
||||
private:
|
||||
//PolyTree& operator =(PolyTree& other);
|
||||
PolyNodes AllNodes;
|
||||
friend class Clipper; //to access AllNodes
|
||||
};
|
||||
|
||||
bool Orientation(const Path &poly);
|
||||
double Area(const Path &poly);
|
||||
int PointInPolygon(const IntPoint &pt, const Path &path);
|
||||
|
||||
void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType = pftEvenOdd);
|
||||
void SimplifyPolygons(const Paths &in_polys, Paths &out_polys, PolyFillType fillType = pftEvenOdd);
|
||||
void SimplifyPolygons(Paths &polys, PolyFillType fillType = pftEvenOdd);
|
||||
|
||||
void CleanPolygon(const Path& in_poly, Path& out_poly, double distance = 1.415);
|
||||
void CleanPolygon(Path& poly, double distance = 1.415);
|
||||
void CleanPolygons(const Paths& in_polys, Paths& out_polys, double distance = 1.415);
|
||||
void CleanPolygons(Paths& polys, double distance = 1.415);
|
||||
|
||||
void MinkowskiSum(const Path& pattern, const Path& path, Paths& solution, bool pathIsClosed);
|
||||
void MinkowskiSum(const Path& pattern, const Paths& paths, Paths& solution, bool pathIsClosed);
|
||||
void MinkowskiDiff(const Path& poly1, const Path& poly2, Paths& solution);
|
||||
|
||||
void PolyTreeToPaths(const PolyTree& polytree, Paths& paths);
|
||||
void ClosedPathsFromPolyTree(const PolyTree& polytree, Paths& paths);
|
||||
void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths);
|
||||
|
||||
void ReversePath(Path& p);
|
||||
void ReversePaths(Paths& p);
|
||||
|
||||
struct IntRect { cInt left; cInt top; cInt right; cInt bottom; };
|
||||
|
||||
//enums that are used internally ...
|
||||
enum EdgeSide { esLeft = 1, esRight = 2};
|
||||
|
||||
//forward declarations (for stuff used internally) ...
|
||||
struct TEdge;
|
||||
struct IntersectNode;
|
||||
struct LocalMinimum;
|
||||
struct OutPt;
|
||||
struct OutRec;
|
||||
struct Join;
|
||||
|
||||
typedef std::vector < OutRec* > PolyOutList;
|
||||
typedef std::vector < TEdge* > EdgeList;
|
||||
typedef std::vector < Join* > JoinList;
|
||||
typedef std::vector < IntersectNode* > IntersectList;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//ClipperBase is the ancestor to the Clipper class. It should not be
|
||||
//instantiated directly. This class simply abstracts the conversion of sets of
|
||||
//polygon coordinates into edge objects that are stored in a LocalMinima list.
|
||||
class ClipperBase
|
||||
{
|
||||
public:
|
||||
ClipperBase();
|
||||
virtual ~ClipperBase();
|
||||
virtual bool AddPath(const Path &pg, PolyType PolyTyp, bool Closed);
|
||||
bool AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed);
|
||||
virtual void Clear();
|
||||
IntRect GetBounds();
|
||||
bool PreserveCollinear() {return m_PreserveCollinear;};
|
||||
void PreserveCollinear(bool value) {m_PreserveCollinear = value;};
|
||||
protected:
|
||||
void DisposeLocalMinimaList();
|
||||
TEdge* AddBoundsToLML(TEdge *e, bool IsClosed);
|
||||
virtual void Reset();
|
||||
TEdge* ProcessBound(TEdge* E, bool IsClockwise);
|
||||
void InsertScanbeam(const cInt Y);
|
||||
bool PopScanbeam(cInt &Y);
|
||||
bool LocalMinimaPending();
|
||||
bool PopLocalMinima(cInt Y, const LocalMinimum *&locMin);
|
||||
OutRec* CreateOutRec();
|
||||
void DisposeAllOutRecs();
|
||||
void DisposeOutRec(PolyOutList::size_type index);
|
||||
void SwapPositionsInAEL(TEdge *edge1, TEdge *edge2);
|
||||
void DeleteFromAEL(TEdge *e);
|
||||
void UpdateEdgeIntoAEL(TEdge *&e);
|
||||
|
||||
typedef std::vector<LocalMinimum> MinimaList;
|
||||
MinimaList::iterator m_CurrentLM;
|
||||
MinimaList m_MinimaList;
|
||||
|
||||
bool m_UseFullRange;
|
||||
EdgeList m_edges;
|
||||
bool m_PreserveCollinear;
|
||||
bool m_HasOpenPaths;
|
||||
PolyOutList m_PolyOuts;
|
||||
TEdge *m_ActiveEdges;
|
||||
|
||||
typedef std::priority_queue<cInt> ScanbeamList;
|
||||
ScanbeamList m_Scanbeam;
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class Clipper : public virtual ClipperBase
|
||||
{
|
||||
public:
|
||||
Clipper(int initOptions = 0);
|
||||
bool Execute(ClipType clipType,
|
||||
Paths &solution,
|
||||
PolyFillType fillType = pftEvenOdd);
|
||||
bool Execute(ClipType clipType,
|
||||
Paths &solution,
|
||||
PolyFillType subjFillType,
|
||||
PolyFillType clipFillType);
|
||||
bool Execute(ClipType clipType,
|
||||
PolyTree &polytree,
|
||||
PolyFillType fillType = pftEvenOdd);
|
||||
bool Execute(ClipType clipType,
|
||||
PolyTree &polytree,
|
||||
PolyFillType subjFillType,
|
||||
PolyFillType clipFillType);
|
||||
bool ReverseSolution() { return m_ReverseOutput; };
|
||||
void ReverseSolution(bool value) {m_ReverseOutput = value;};
|
||||
bool StrictlySimple() {return m_StrictSimple;};
|
||||
void StrictlySimple(bool value) {m_StrictSimple = value;};
|
||||
//set the callback function for z value filling on intersections (otherwise Z is 0)
|
||||
#ifdef use_xyz
|
||||
void ZFillFunction(ZFillCallback zFillFunc);
|
||||
#endif
|
||||
protected:
|
||||
virtual bool ExecuteInternal();
|
||||
private:
|
||||
JoinList m_Joins;
|
||||
JoinList m_GhostJoins;
|
||||
IntersectList m_IntersectList;
|
||||
ClipType m_ClipType;
|
||||
typedef std::list<cInt> MaximaList;
|
||||
MaximaList m_Maxima;
|
||||
TEdge *m_SortedEdges;
|
||||
bool m_ExecuteLocked;
|
||||
PolyFillType m_ClipFillType;
|
||||
PolyFillType m_SubjFillType;
|
||||
bool m_ReverseOutput;
|
||||
bool m_UsingPolyTree;
|
||||
bool m_StrictSimple;
|
||||
#ifdef use_xyz
|
||||
ZFillCallback m_ZFill; //custom callback
|
||||
#endif
|
||||
void SetWindingCount(TEdge& edge);
|
||||
bool IsEvenOddFillType(const TEdge& edge) const;
|
||||
bool IsEvenOddAltFillType(const TEdge& edge) const;
|
||||
void InsertLocalMinimaIntoAEL(const cInt botY);
|
||||
void InsertEdgeIntoAEL(TEdge *edge, TEdge* startEdge);
|
||||
void AddEdgeToSEL(TEdge *edge);
|
||||
bool PopEdgeFromSEL(TEdge *&edge);
|
||||
void CopyAELToSEL();
|
||||
void DeleteFromSEL(TEdge *e);
|
||||
void SwapPositionsInSEL(TEdge *edge1, TEdge *edge2);
|
||||
bool IsContributing(const TEdge& edge) const;
|
||||
bool IsTopHorz(const cInt XPos);
|
||||
void DoMaxima(TEdge *e);
|
||||
void ProcessHorizontals();
|
||||
void ProcessHorizontal(TEdge *horzEdge);
|
||||
void AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
|
||||
OutPt* AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
|
||||
OutRec* GetOutRec(int idx);
|
||||
void AppendPolygon(TEdge *e1, TEdge *e2);
|
||||
void IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &pt);
|
||||
OutPt* AddOutPt(TEdge *e, const IntPoint &pt);
|
||||
OutPt* GetLastOutPt(TEdge *e);
|
||||
bool ProcessIntersections(const cInt topY);
|
||||
void BuildIntersectList(const cInt topY);
|
||||
void ProcessIntersectList();
|
||||
void ProcessEdgesAtTopOfScanbeam(const cInt topY);
|
||||
void BuildResult(Paths& polys);
|
||||
void BuildResult2(PolyTree& polytree);
|
||||
void SetHoleState(TEdge *e, OutRec *outrec);
|
||||
void DisposeIntersectNodes();
|
||||
bool FixupIntersectionOrder();
|
||||
void FixupOutPolygon(OutRec &outrec);
|
||||
void FixupOutPolyline(OutRec &outrec);
|
||||
bool IsHole(TEdge *e);
|
||||
bool FindOwnerFromSplitRecs(OutRec &outRec, OutRec *&currOrfl);
|
||||
void FixHoleLinkage(OutRec &outrec);
|
||||
void AddJoin(OutPt *op1, OutPt *op2, const IntPoint offPt);
|
||||
void ClearJoins();
|
||||
void ClearGhostJoins();
|
||||
void AddGhostJoin(OutPt *op, const IntPoint offPt);
|
||||
bool JoinPoints(Join *j, OutRec* outRec1, OutRec* outRec2);
|
||||
void JoinCommonEdges();
|
||||
void DoSimplePolygons();
|
||||
void FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec);
|
||||
void FixupFirstLefts2(OutRec* InnerOutRec, OutRec* OuterOutRec);
|
||||
void FixupFirstLefts3(OutRec* OldOutRec, OutRec* NewOutRec);
|
||||
#ifdef use_xyz
|
||||
void SetZ(IntPoint& pt, TEdge& e1, TEdge& e2);
|
||||
#endif
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class ClipperOffset
|
||||
{
|
||||
public:
|
||||
ClipperOffset(double miterLimit = 2.0, double roundPrecision = 0.25);
|
||||
~ClipperOffset();
|
||||
void AddPath(const Path& path, JoinType joinType, EndType endType);
|
||||
void AddPaths(const Paths& paths, JoinType joinType, EndType endType);
|
||||
void Execute(Paths& solution, double delta);
|
||||
void Execute(PolyTree& solution, double delta);
|
||||
void Clear();
|
||||
double MiterLimit;
|
||||
double ArcTolerance;
|
||||
private:
|
||||
Paths m_destPolys;
|
||||
Path m_srcPoly;
|
||||
Path m_destPoly;
|
||||
std::vector<DoublePoint> m_normals;
|
||||
double m_delta, m_sinA, m_sin, m_cos;
|
||||
double m_miterLim, m_StepsPerRad;
|
||||
IntPoint m_lowest;
|
||||
PolyNode m_polyNodes;
|
||||
|
||||
void FixOrientations();
|
||||
void DoOffset(double delta);
|
||||
void OffsetPoint(int j, int& k, JoinType jointype);
|
||||
void DoSquare(int j, int k);
|
||||
void DoMiter(int j, int k, double r);
|
||||
void DoRound(int j, int k);
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class clipperException : public std::exception
|
||||
{
|
||||
public:
|
||||
clipperException(const char* description): m_descr(description) {}
|
||||
virtual ~clipperException() throw() {}
|
||||
virtual const char* what() const throw() {return m_descr.c_str();}
|
||||
private:
|
||||
std::string m_descr;
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
} //ClipperLib namespace
|
||||
|
||||
#endif //clipper_hpp
|
||||
|
||||
|
||||
44
3rdparty/include/OcrLiteOnnx/getopt.h
vendored
44
3rdparty/include/OcrLiteOnnx/getopt.h
vendored
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* getopt - POSIX like getopt for Windows console Application
|
||||
*
|
||||
* win-c - Windows Console Library
|
||||
* Copyright (c) 2015 Koji Takami
|
||||
* Released under the MIT license
|
||||
* https://github.com/takamin/win-c/blob/master/LICENSE
|
||||
*/
|
||||
#ifndef _GETOPT_H_
|
||||
#define _GETOPT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
int getopt(int argc, char *const argv[],
|
||||
const char *optstring);
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
|
||||
struct option {
|
||||
const char *name;
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
int getopt_long(int argc, char *const argv[],
|
||||
const char *optstring,
|
||||
const struct option *longopts, int *longindex);
|
||||
/****************************************************************************
|
||||
int getopt_long_only(int argc, char* const argv[],
|
||||
const char* optstring,
|
||||
const struct option* longopts, int* longindex);
|
||||
****************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // _GETOPT_H_
|
||||
54
3rdparty/include/OcrLiteOnnx/main.h
vendored
54
3rdparty/include/OcrLiteOnnx/main.h
vendored
@@ -1,54 +0,0 @@
|
||||
#ifndef __MAIN_H__
|
||||
#define __MAIN_H__
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
static const struct option long_options[] = {
|
||||
{"models", required_argument, NULL, 'd'},
|
||||
{"det", required_argument, NULL, '1'},
|
||||
{"cls", required_argument, NULL, '2'},
|
||||
{"rec", required_argument, NULL, '3'},
|
||||
{"keys", required_argument, NULL, '4'},
|
||||
{"image", required_argument, NULL, 'i'},
|
||||
{"numThread", required_argument, NULL, 't'},
|
||||
{"padding", required_argument, NULL, 'p'},
|
||||
{"maxSideLen", required_argument, NULL, 's'},
|
||||
{"boxScoreThresh", required_argument, NULL, 'b'},
|
||||
{"boxThresh", required_argument, NULL, 'o'},
|
||||
{"unClipRatio", required_argument, NULL, 'u'},
|
||||
{"doAngle", required_argument, NULL, 'a'},
|
||||
{"mostAngle", required_argument, NULL, 'A'},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"loopCount", required_argument, NULL, 'l'},
|
||||
{NULL, no_argument, NULL, 0}
|
||||
};
|
||||
|
||||
const char *usageMsg = "(-d --models) (-1 --det) (-2 --cls) (-3 --rec) (-4 --keys) (-i --image)\n"\
|
||||
"[-t --numThread] [-p --padding] [-s --maxSideLen]\n" \
|
||||
"[-b --boxScoreThresh] [-o --boxThresh] [-u --unClipRatio]\n" \
|
||||
"[-a --noAngle] [-A --mostAngle]\n\n";
|
||||
|
||||
const char *requiredMsg = "-d --models: models directory.\n" \
|
||||
"-1 --det: model file name of det.\n" \
|
||||
"-2 --cls: model file name of cls.\n" \
|
||||
"-3 --rec: model file name of rec.\n" \
|
||||
"-4 --keys: keys file name.\n" \
|
||||
"-i --image: path of target image.\n\n";
|
||||
|
||||
const char *optionalMsg = "-t --numThread: value of numThread(int), default: 4\n" \
|
||||
"-p --padding: value of padding(int), default: 50\n" \
|
||||
"-s --maxSideLen: Long side of picture for resize(int), default: 1024\n" \
|
||||
"-b --boxScoreThresh: value of boxScoreThresh(float), default: 0.6\n" \
|
||||
"-o --boxThresh: value of boxThresh(float), default: 0.3\n" \
|
||||
"-u --unClipRatio: value of unClipRatio(float), default: 2.0\n" \
|
||||
"-a --doAngle: Enable(1)/Disable(0) Angle Net, default: Enable\n" \
|
||||
"-A --mostAngle: Enable(1)/Disable(0) Most Possible AngleIndex, default: Enable\n\n";
|
||||
|
||||
const char *otherMsg = "-v --version: show version\n" \
|
||||
"-h --help: print this help\n\n";
|
||||
|
||||
const char *example1Msg = "Example1: %s --models models --det det.onnx --cls cls.onnx --rec rec.onnx --keys keys.txt --image 1.jpg\n";
|
||||
const char *example2Msg = "Example2: %s -d models -1 det.onnx -2 cls.onnx -3 rec.onnx -4 keys.txt -i 1.jpg -t 4 -p 50 -s 0 -b 0.6 -o 0.3 -u 2.0 -a 1 -A 1\n";
|
||||
|
||||
#endif //__MAIN_H__
|
||||
6
3rdparty/include/OcrLiteOnnx/version.h
vendored
6
3rdparty/include/OcrLiteOnnx/version.h
vendored
@@ -1,6 +0,0 @@
|
||||
#ifndef __OCR_VERSION_H__
|
||||
#define __OCR_VERSION_H__
|
||||
|
||||
#define VERSION "1.5.1.20210128"
|
||||
|
||||
#endif //__OCR_VERSION_H__
|
||||
37
3rdparty/include/PaddleOCR/exports.h
vendored
Normal file
37
3rdparty/include/PaddleOCR/exports.h
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
// The way how the function is called
|
||||
#if !defined(OCR_CALL)
|
||||
#if defined(_WIN32)
|
||||
#define OCR_CALL __stdcall
|
||||
#else
|
||||
#define OCR_CALL
|
||||
#endif /* _WIN32 */
|
||||
#endif /* OCR_CALL */
|
||||
|
||||
// The function exported symbols
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define OCR_IMPORT __declspec(dllimport)
|
||||
#define OCR_EXPORT __declspec(dllexport)
|
||||
#define OCR_LOCAL
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define OCR_IMPORT __attribute__ ((visibility ("default")))
|
||||
#define OCR_EXPORT __attribute__ ((visibility ("default")))
|
||||
#define OCR_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#else
|
||||
#define OCR_IMPORT
|
||||
#define OCR_EXPORT
|
||||
#define OCR_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OCR_EXPORTS // defined if we are building the DLL (instead of using it)
|
||||
#define OCRAPI_PORT OCR_EXPORT
|
||||
#else
|
||||
#define OCRAPI_PORT OCR_IMPORT
|
||||
#endif // OCR_EXPORTS
|
||||
|
||||
#define OCRAPI OCRAPI_PORT OCR_CALL
|
||||
|
||||
#define OCRLOCAL OCR_LOCAL OCR_CALL
|
||||
39
3rdparty/include/PaddleOCR/paddle_ocr.h
vendored
Normal file
39
3rdparty/include/PaddleOCR/paddle_ocr.h
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include "exports.h"
|
||||
|
||||
struct paddle_ocr_t;
|
||||
typedef int OCR_ERROR;
|
||||
typedef unsigned char uint8_t;
|
||||
|
||||
#define OCR_SUCCESS 0
|
||||
#define OCR_FAILURE 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OCRAPI_PORT paddle_ocr_t* OCR_CALL PaddleOcrCreate(
|
||||
const char* det_model_dir, const char* rec_model_dir,
|
||||
const char* char_list_file, const char* cls_model_dir);
|
||||
|
||||
void OCRAPI PaddleOcrDestroy(paddle_ocr_t* ocr_ptr);
|
||||
|
||||
OCR_ERROR OCRAPI PaddleOcrDet(
|
||||
paddle_ocr_t* ocr_ptr, const uint8_t* encode_buf, size_t encode_buf_size,
|
||||
int* out_boxes, size_t* out_boxes_size,
|
||||
double* out_times, size_t* out_times_size);
|
||||
|
||||
OCR_ERROR OCRAPI PaddleOcrRec(
|
||||
paddle_ocr_t* ocr_ptr, const uint8_t* encode_buf, size_t encode_buf_size,
|
||||
char** out_strs, float* out_scores, size_t* out_size,
|
||||
double* out_times, size_t* out_times_size);
|
||||
|
||||
OCR_ERROR OCRAPI PaddleOcrSystem(
|
||||
paddle_ocr_t* ocr_ptr, const uint8_t* encode_buf, size_t encode_buf_size, bool with_cls,
|
||||
int* out_boxes, char** out_strs, float* out_scores, size_t* out_size,
|
||||
double* out_times, size_t* out_times_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
BIN
3rdparty/lib/OcrLiteOnnx.lib
vendored
BIN
3rdparty/lib/OcrLiteOnnx.lib
vendored
Binary file not shown.
BIN
3rdparty/lib/ppocr.lib
vendored
Normal file
BIN
3rdparty/lib/ppocr.lib
vendored
Normal file
Binary file not shown.
1
3rdparty/resource/PaddleOCR/det/version.txt
vendored
Normal file
1
3rdparty/resource/PaddleOCR/det/version.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
ch_ppocr_mobile_v2.0_det_prune_infer
|
||||
File diff suppressed because it is too large
Load Diff
1
3rdparty/resource/PaddleOCR/rec/version.txt
vendored
Normal file
1
3rdparty/resource/PaddleOCR/rec/version.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
ch_ppocr_mobile_v2.0_rec_slim_infer
|
||||
24
CMakeLists.txt
Normal file
24
CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(MeoAssistantArknights)
|
||||
|
||||
include_directories(include 3rdparty/include)
|
||||
aux_source_directory(src/MeoAssistant SRC)
|
||||
add_definitions(-DASST_DLL_EXPORTS)
|
||||
|
||||
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
|
||||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
||||
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/MP>")
|
||||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/MP>")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
add_library(MeoAssistant SHARED ${SRC})
|
||||
|
||||
find_library(Opencv_LIB NAMES opencv_world453 PATHS 3rdparty/lib)
|
||||
find_library(PaddleOCR_LIB NAMES ppocr PATHS 3rdparty/lib)
|
||||
find_library(Penguin_LIB NAMES penguin-stats-recognize PATHS 3rdparty/lib)
|
||||
find_library(MeoJson_LIB NAMES libmeojson PATHS 3rdparty/lib)
|
||||
|
||||
target_link_libraries(MeoAssistant ${Opencv_LIB} ${PaddleOCR_LIB} ${Penguin_LIB} ${MeoJson_LIB})
|
||||
@@ -1,69 +1,71 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31912.275
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeoAssistance", "src\MeoAssistance\MeoAssistance.vcxproj", "{362D1E30-F5AE-4279-9985-65C27B3BA300}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{6C4B8D52-51D1-45F8-AAEC-808035443FD6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCaller", "tools\TestCaller\TestCaller.vcxproj", "{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300} = {362D1E30-F5AE-4279-9985-65C27B3BA300}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeoAsstGui", "src\MeoAsstGui\MeoAsstGui.csproj", "{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300} = {362D1E30-F5AE-4279-9985-65C27B3BA300}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TransparentImageCvt", "tools\TransparentImageCvt\TransparentImageCvt.vcxproj", "{093A3174-A27E-4D23-B64E-16F9448AD5AC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||
RelWithDebInfo|x86 = RelWithDebInfo|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x64.ActiveCfg = Release|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x64.Build.0 = Release|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x86.ActiveCfg = Release|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x64.ActiveCfg = Release|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x64.Build.0 = Release|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x86.ActiveCfg = Release|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|Any CPU
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x64.ActiveCfg = Release|x64
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x64.Build.0 = Release|x64
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x86.ActiveCfg = Release|Win32
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x86.Build.0 = Release|Win32
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64} = {6C4B8D52-51D1-45F8-AAEC-808035443FD6}
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC} = {6C4B8D52-51D1-45F8-AAEC-808035443FD6}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4F2C0E4B-4FE9-47C6-A878-6BD2FAD8B9B2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31912.275
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{6C4B8D52-51D1-45F8-AAEC-808035443FD6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCaller", "tools\TestCaller\TestCaller.vcxproj", "{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300} = {362D1E30-F5AE-4279-9985-65C27B3BA300}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeoAsstGui", "src\MeoAsstGui\MeoAsstGui.csproj", "{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300} = {362D1E30-F5AE-4279-9985-65C27B3BA300}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TransparentImageCvt", "tools\TransparentImageCvt\TransparentImageCvt.vcxproj", "{093A3174-A27E-4D23-B64E-16F9448AD5AC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeoAssistant", "src\MeoAssistant\MeoAssistant.vcxproj", "{362D1E30-F5AE-4279-9985-65C27B3BA300}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||
RelWithDebInfo|x86 = RelWithDebInfo|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x64.ActiveCfg = Release|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x64.Build.0 = Release|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x86.ActiveCfg = Release|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|Any CPU
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x64.ActiveCfg = Release|x64
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x64.Build.0 = Release|x64
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x86.ActiveCfg = Release|Win32
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x86.Build.0 = Release|Win32
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x86.Build.0 = Release|Win32
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x64.ActiveCfg = Release|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x64.Build.0 = Release|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x86.ActiveCfg = Release|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x86.Build.0 = Release|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
|
||||
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64} = {6C4B8D52-51D1-45F8-AAEC-808035443FD6}
|
||||
{093A3174-A27E-4D23-B64E-16F9448AD5AC} = {6C4B8D52-51D1-45F8-AAEC-808035443FD6}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4F2C0E4B-4FE9-47C6-A878-6BD2FAD8B9B2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
13
README.md
13
README.md
@@ -11,9 +11,9 @@
|
||||
<img alt="platform" src="https://img.shields.io/badge/platform-Windows%2064bit-%230078D6?logo=windows">
|
||||
</div>
|
||||
<div>
|
||||
<img alt="license" src="https://img.shields.io/github/license/MistEO/MeoAssistance-Arknights">
|
||||
<img alt="commit" src="https://img.shields.io/github/commit-activity/m/MistEO/MeoAssistance-Arknights?color=%23ff69b4">
|
||||
<img alt="stars" src="https://img.shields.io/github/stars/MistEO/MeoAssistance-Arknights?style=social">
|
||||
<img alt="license" src="https://img.shields.io/github/license/MistEO/MeoAssistantArknights">
|
||||
<img alt="commit" src="https://img.shields.io/github/commit-activity/m/MistEO/MeoAssistantArknights?color=%23ff69b4">
|
||||
<img alt="stars" src="https://img.shields.io/github/stars/MistEO/MeoAssistantArknights?style=social">
|
||||
</div>
|
||||
<br>
|
||||
|
||||
@@ -38,8 +38,8 @@ A Game Assistant for Arknights
|
||||
|
||||
## 下载地址
|
||||
|
||||
[稳定版](https://github.com/MistEO/MeoAssistance/releases/latest)
|
||||
[测试版](https://github.com/MistEO/MeoAssistance/releases)
|
||||
[稳定版](https://github.com/MistEO/MeoAssistantArknights/releases/latest)
|
||||
[测试版](https://github.com/MistEO/MeoAssistantArknights/releases)
|
||||
|
||||
## 模拟器支持
|
||||
|
||||
@@ -208,7 +208,8 @@ A Game Assistant for Arknights
|
||||
### 开源库
|
||||
|
||||
- 图像识别库:[opencv](https://github.com/opencv/opencv.git)
|
||||
- 文字识别库:[chineseocr_lite](https://github.com/DayBreak-u/chineseocr_lite.git)
|
||||
- ~~文字识别库:[chineseocr_lite](https://github.com/DayBreak-u/chineseocr_lite.git)~~
|
||||
- 文字识别库:[PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
|
||||
- 关卡掉落识别:[企鹅物流识别](https://github.com/KumoSiunaus/penguin-stats-recognize-v3)
|
||||
- C++ JSON库:[meojson](https://github.com/MistEO/meojson.git)
|
||||
- C++ 运算符解析器:[calculator](https://github.com/kimwalisch/calculator)
|
||||
|
||||
@@ -7,7 +7,7 @@ clone_depth: 1
|
||||
before_build:
|
||||
- ps: nuget restore
|
||||
build:
|
||||
project: MeoAssistance.sln
|
||||
project: MeoAssistantArknights.sln
|
||||
parallel: true
|
||||
verbosity: minimal
|
||||
notifications:
|
||||
|
||||
@@ -2,37 +2,41 @@
|
||||
|
||||
#include "AsstPort.h"
|
||||
|
||||
namespace asst {
|
||||
class Assistant;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef void (MEO_CALL* AsstCallback)(int msg, const char* detail_json, void* custom_arg);
|
||||
typedef void (ASST_CALL* AsstCallback)(int msg, const char* detail_json, void* custom_arg);
|
||||
|
||||
MEOAPI_PORT void* MEO_CALL AsstCreate(const char* dirname);
|
||||
MEOAPI_PORT void* MEO_CALL AsstCreateEx(const char* dirname, AsstCallback callback, void* custom_arg);
|
||||
void MEOAPI AsstDestroy(void* p_asst);
|
||||
ASSTAPI_PORT asst::Assistant* ASST_CALL AsstCreate(const char* dirname);
|
||||
ASSTAPI_PORT asst::Assistant* ASST_CALL AsstCreateEx(const char* dirname, AsstCallback callback, void* custom_arg);
|
||||
void ASSTAPI AsstDestroy(asst::Assistant* p_asst);
|
||||
|
||||
bool MEOAPI AsstCatchDefault(void* p_asst);
|
||||
bool MEOAPI AsstCatchEmulator(void* p_asst);
|
||||
bool MEOAPI AsstCatchCustom(void* p_asst, const char* address);
|
||||
bool MEOAPI AsstCatchFake(void* p_asst);
|
||||
bool ASSTAPI AsstCatchDefault(asst::Assistant* p_asst);
|
||||
bool ASSTAPI AsstCatchEmulator(asst::Assistant* p_asst);
|
||||
bool ASSTAPI AsstCatchCustom(asst::Assistant* p_asst, const char* address);
|
||||
bool ASSTAPI AsstCatchFake(asst::Assistant* p_asst);
|
||||
|
||||
bool MEOAPI AsstAppendFight(void* p_asst, int max_mecidine, int max_stone, int max_times);
|
||||
bool MEOAPI AsstAppendAward(void* p_asst);
|
||||
bool MEOAPI AsstAppendVisit(void* p_asst);
|
||||
bool MEOAPI AsstAppendMall(void* p_asst, bool with_shopping);
|
||||
//bool MEOAPI AsstAppendProcessTask(void* p_asst, const char* task);
|
||||
bool MEOAPI AsstAppendInfrast(void* p_asst, int work_mode, const char** order, int order_size, const char* uses_of_drones, double dorm_threshold);
|
||||
bool MEOAPI AsstAppendRecruit(void* p_asst, int max_times, const int select_level[], int select_len, const int confirm_level[], int confirm_len, bool need_refresh);
|
||||
bool MEOAPI AsstAppendDebug(void* p_asst);
|
||||
bool ASSTAPI AsstAppendFight(asst::Assistant* p_asst, int max_mecidine, int max_stone, int max_times);
|
||||
bool ASSTAPI AsstAppendAward(asst::Assistant* p_asst);
|
||||
bool ASSTAPI AsstAppendVisit(asst::Assistant* p_asst);
|
||||
bool ASSTAPI AsstAppendMall(asst::Assistant* p_asst, bool with_shopping);
|
||||
//bool ASSTAPI AsstAppendProcessTask(asst::Assistant* p_asst, const char* task);
|
||||
bool ASSTAPI AsstAppendInfrast(asst::Assistant* p_asst, int work_mode, const char** order, int order_size, const char* uses_of_drones, double dorm_threshold);
|
||||
bool ASSTAPI AsstAppendRecruit(asst::Assistant* p_asst, int max_times, const int select_level[], int select_len, const int confirm_level[], int confirm_len, bool need_refresh);
|
||||
bool ASSTAPI AsstAppendDebug(asst::Assistant* p_asst);
|
||||
|
||||
bool MEOAPI AsstStartRecruitCalc(void* p_asst, const int select_level[], int required_len, bool set_time);
|
||||
bool MEOAPI AsstStart(void* p_asst);
|
||||
bool MEOAPI AsstStop(void* p_asst);
|
||||
bool ASSTAPI AsstStartRecruitCalc(asst::Assistant* p_asst, const int select_level[], int required_len, bool set_time);
|
||||
bool ASSTAPI AsstStart(asst::Assistant* p_asst);
|
||||
bool ASSTAPI AsstStop(asst::Assistant* p_asst);
|
||||
|
||||
bool MEOAPI AsstSetPenguinId(void* p_asst, const char* id);
|
||||
//bool MEOAPI AsstSetParam(void* p_asst, const char* type, const char* param, const char* value);
|
||||
bool ASSTAPI AsstSetPenguinId(asst::Assistant* p_asst, const char* id);
|
||||
//bool ASSTAPI AsstSetParam(asst::Assistant* p_asst, const char* type, const char* param, const char* value);
|
||||
|
||||
MEOAPI_PORT const char* MEO_CALL AsstGetVersion();
|
||||
ASSTAPI_PORT const char* ASST_CALL AsstGetVersion();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,37 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
// The way how the function is called
|
||||
#if !defined(MEO_CALL)
|
||||
#if !defined(ASST_CALL)
|
||||
#if defined(_WIN32)
|
||||
#define MEO_CALL __stdcall
|
||||
#define ASST_CALL __stdcall
|
||||
#else
|
||||
#define MEO_CALL
|
||||
#define ASST_CALL
|
||||
#endif /* _WIN32 */
|
||||
#endif /* MEO_CALL */
|
||||
#endif /* ASST_CALL */
|
||||
|
||||
// The function exported symbols
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define MEO_DLL_IMPORT __declspec(dllimport)
|
||||
#define MEO_DLL_EXPORT __declspec(dllexport)
|
||||
#define MEO_DLL_LOCAL
|
||||
#define ASST_DLL_IMPORT __declspec(dllimport)
|
||||
#define ASST_DLL_EXPORT __declspec(dllexport)
|
||||
#define ASST_DLL_LOCAL
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define MEO_DLL_IMPORT __attribute__ ((visibility ("default")))
|
||||
#define MEO_DLL_EXPORT __attribute__ ((visibility ("default")))
|
||||
#define MEO_DLL_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#define ASST_DLL_IMPORT __attribute__ ((visibility ("default")))
|
||||
#define ASST_DLL_EXPORT __attribute__ ((visibility ("default")))
|
||||
#define ASST_DLL_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#else
|
||||
#define MEO_DLL_IMPORT
|
||||
#define MEO_DLL_EXPORT
|
||||
#define MEO_DLL_LOCAL
|
||||
#define ASST_DLL_IMPORT
|
||||
#define ASST_DLL_EXPORT
|
||||
#define ASST_DLL_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MEO_DLL_EXPORTS // defined if we are building the DLL (instead of using it)
|
||||
#define MEOAPI_PORT MEO_DLL_EXPORT
|
||||
#ifdef ASST_DLL_EXPORTS // defined if we are building the DLL (instead of using it)
|
||||
#define ASSTAPI_PORT ASST_DLL_EXPORT
|
||||
#else
|
||||
#define MEOAPI_PORT MEO_DLL_IMPORT
|
||||
#endif // MEO_DLL_EXPORTS
|
||||
#define ASSTAPI_PORT ASST_DLL_IMPORT
|
||||
#endif // ASST_DLL_EXPORTS
|
||||
|
||||
#define MEOAPI MEOAPI_PORT MEO_CALL
|
||||
#define ASSTAPI ASSTAPI_PORT ASST_CALL
|
||||
|
||||
#define MEOLOCAL MEO_DLL_LOCAL MEO_CALL
|
||||
#define ASSTLOCAL ASST_DLL_LOCAL ASST_CALL
|
||||
@@ -16,8 +16,6 @@
|
||||
0
|
||||
],
|
||||
"controlDelayRange_Doc": "点击随机延时:每次点击操作会进行随机延时,降低封号风险(好像也没听说过谁被封号的)。格式为 [ 最小延时, 最大延时 ],单位为毫秒。例如想设置3~5秒延时,即修改为[ 3000, 5000 ],默认0~0",
|
||||
"ocrThreadNumber": 4,
|
||||
"ocrThreadNumber_Doc": "文字识别库OcrLite的线程数量,理论上开的高点识别会快点,但是会更卡。默认4",
|
||||
"adbExtraSwipeDist": 50,
|
||||
"adbExtraSwipeDist_Doc": "额外的滑动距离:adb有bug,同样的参数,偶尔会划得非常远。额外做一个短程滑动,把之前的停下来",
|
||||
"adbExtraSwipeDuration": 1000,
|
||||
|
||||
@@ -413,8 +413,8 @@
|
||||
"LastBattle": {
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [
|
||||
"上一次作战",
|
||||
"前往上一次"
|
||||
"前往上",
|
||||
"次作战"
|
||||
],
|
||||
"roi": [
|
||||
900,
|
||||
@@ -1084,47 +1084,15 @@
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [],
|
||||
"roi": [
|
||||
200,
|
||||
200,
|
||||
800,
|
||||
500
|
||||
375,
|
||||
360,
|
||||
480,
|
||||
120
|
||||
],
|
||||
"ocrReplace": [
|
||||
[
|
||||
"沮击",
|
||||
"狙击"
|
||||
],
|
||||
[
|
||||
"犯击",
|
||||
"狙击"
|
||||
],
|
||||
[
|
||||
"泪击",
|
||||
"狙击"
|
||||
],
|
||||
[
|
||||
"都出",
|
||||
"输出"
|
||||
],
|
||||
[
|
||||
"都乐",
|
||||
"输出"
|
||||
],
|
||||
[
|
||||
"抓出",
|
||||
"输出"
|
||||
],
|
||||
[
|
||||
"都任",
|
||||
"输出"
|
||||
],
|
||||
[
|
||||
"新于",
|
||||
"新手"
|
||||
],
|
||||
[
|
||||
"防拍",
|
||||
"防护"
|
||||
".+击干员",
|
||||
"狙击干员"
|
||||
]
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
#include "OcrPack.h"
|
||||
|
||||
#include <OcrLiteOnnx/OcrLiteCaller.h>
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
#include "AsstUtils.hpp"
|
||||
#include "Logger.hpp"
|
||||
|
||||
asst::OcrPack::OcrPack()
|
||||
: m_ocr_ptr(std::make_unique<OcrLiteCaller>())
|
||||
{}
|
||||
|
||||
asst::OcrPack::~OcrPack() = default;
|
||||
|
||||
bool asst::OcrPack::load(const std::string & dir)
|
||||
{
|
||||
constexpr static const char* DetName = "\\models\\dbnet.onnx";
|
||||
constexpr static const char* ClsName = "\\models\\angle_net.onnx";
|
||||
constexpr static const char* RecName = "\\models\\crnn_lite_lstm.onnx";
|
||||
constexpr static const char* KeysName = "\\models\\keys.txt";
|
||||
|
||||
const std::string dst_filename = dir + DetName;
|
||||
const std::string cls_filename = dir + ClsName;
|
||||
const std::string rec_filename = dir + RecName;
|
||||
const std::string keys_filename = dir + KeysName;
|
||||
|
||||
return m_ocr_ptr->initModels(dst_filename, cls_filename, rec_filename, keys_filename);
|
||||
}
|
||||
|
||||
void asst::OcrPack::set_param(int /*gpu_index*/, int thread_number)
|
||||
{
|
||||
// gpu_index是ncnn的参数,onnx架构的没有,预留参数接口
|
||||
m_ocr_ptr->setNumThread(thread_number);
|
||||
}
|
||||
|
||||
std::vector<asst::TextRect> asst::OcrPack::recognize(const cv::Mat & image, const asst::TextRectProc & pred)
|
||||
{
|
||||
constexpr int padding = 50;
|
||||
constexpr int maxSideLen = 0;
|
||||
constexpr float boxScoreThresh = 0.2f;
|
||||
constexpr float boxThresh = 0.3f;
|
||||
constexpr float unClipRatio = 2.0f;
|
||||
constexpr bool doAngle = false;
|
||||
constexpr bool mostAngle = false;
|
||||
|
||||
OcrResult ocr_results = m_ocr_ptr->detect(image,
|
||||
padding, maxSideLen,
|
||||
boxScoreThresh, boxThresh,
|
||||
unClipRatio, doAngle, mostAngle);
|
||||
|
||||
std::vector<TextRect> result;
|
||||
std::string log_str_raw;
|
||||
std::string log_str_proc;
|
||||
for (TextBlock& text_block : ocr_results.textBlocks) {
|
||||
if (text_block.boxPoint.size() != 4) {
|
||||
continue;
|
||||
}
|
||||
// the rect like ↓
|
||||
// 0 - 1
|
||||
// 3 - 2
|
||||
int x = text_block.boxPoint.at(0).x;
|
||||
int y = text_block.boxPoint.at(0).y;
|
||||
int width = text_block.boxPoint.at(1).x - x;
|
||||
int height = text_block.boxPoint.at(3).y - y;
|
||||
|
||||
TextRect tr{ std::move(text_block.text), Rect(x, y, width, height) };
|
||||
log_str_raw += (std::string)tr + ", ";
|
||||
if (!pred || pred(tr)) {
|
||||
log_str_proc += tr.to_string() + ", ";
|
||||
result.emplace_back(std::move(tr));
|
||||
}
|
||||
}
|
||||
Log.trace("OcrPack::recognize | raw : ", log_str_raw);
|
||||
Log.trace("OcrPack::recognize | proc : ", log_str_proc);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<asst::TextRect> asst::OcrPack::recognize(const cv::Mat & image, const asst::Rect & roi, const asst::TextRectProc & pred)
|
||||
{
|
||||
auto rect_cor = [&roi, &pred](TextRect& tr) -> bool {
|
||||
tr.rect.x += roi.x;
|
||||
tr.rect.y += roi.y;
|
||||
return pred(tr);
|
||||
};
|
||||
Log.trace("OcrPack::recognize | roi : ", roi.to_string());
|
||||
return recognize(image(utils::make_rect<cv::Rect>(roi)), rect_cor);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace asst
|
||||
{
|
||||
constexpr static const char* Version = "v2.3.6";
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "AbstractConfiger.h"
|
||||
|
||||
#include <json.h>
|
||||
#include <meojson/json.h>
|
||||
|
||||
#include "AsstUtils.hpp"
|
||||
|
||||
@@ -47,7 +47,7 @@ bool AbstractTask::sleep(unsigned millisecond)
|
||||
if (millisecond == 0) {
|
||||
return true;
|
||||
}
|
||||
auto start = std::chrono::system_clock::now();
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
long long duration = 0;
|
||||
|
||||
json::value callback_json;
|
||||
@@ -56,7 +56,7 @@ bool AbstractTask::sleep(unsigned millisecond)
|
||||
|
||||
while (!need_exit() && duration < millisecond) {
|
||||
duration = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::system_clock::now() - start)
|
||||
std::chrono::steady_clock::now() - start)
|
||||
.count();
|
||||
std::this_thread::yield();
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace asst
|
||||
void set_retry_times(int times) noexcept { m_retry_times = times; }
|
||||
void set_task_chain(std::string name) noexcept { m_task_chain = std::move(name); }
|
||||
const std::string& get_task_chain() const noexcept { return m_task_chain; }
|
||||
|
||||
|
||||
constexpr static int RetryTimesDefault = 20;
|
||||
protected:
|
||||
virtual bool _run() = 0;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,11 +23,11 @@ namespace asst
|
||||
class Controller;
|
||||
class Identify;
|
||||
|
||||
class Assistance
|
||||
class Assistant
|
||||
{
|
||||
public:
|
||||
Assistance(std::string dirname, AsstCallback callback = nullptr, void* callback_arg = nullptr);
|
||||
~Assistance();
|
||||
Assistant(std::string dirname, AsstCallback callback = nullptr, void* callback_arg = nullptr);
|
||||
~Assistant();
|
||||
|
||||
// 根据配置文件,决定捕获模拟器、USB 还是远程设备
|
||||
bool catch_default();
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <json_value.h>
|
||||
#include <meojson/json_value.h>
|
||||
|
||||
#include "Assistance.h"
|
||||
#include "Assistant.h"
|
||||
#include "AsstDef.h"
|
||||
#include "AsstUtils.hpp"
|
||||
#include "Version.h"
|
||||
|
||||
#include "Version.h"
|
||||
|
||||
#if 0
|
||||
#if _MSC_VER
|
||||
// Win32平台下Dll的入口
|
||||
@@ -30,7 +30,7 @@ BOOL APIENTRY DllMain(HINSTANCE hModule,
|
||||
}
|
||||
#elif VA_GNUC
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
AsstCallback _callback = nullptr;
|
||||
@@ -40,29 +40,29 @@ void CallbackTrans(asst::AsstMsg msg, const json::value& json, void* custom_arg)
|
||||
_callback(static_cast<int>(msg), asst::utils::utf8_to_gbk(json.to_string()).c_str(), custom_arg);
|
||||
}
|
||||
|
||||
void* AsstCreate(const char* dirname)
|
||||
asst::Assistant* AsstCreate(const char* dirname)
|
||||
{
|
||||
try {
|
||||
return new asst::Assistance(dirname);
|
||||
return new asst::Assistant(dirname);
|
||||
}
|
||||
catch (...) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void* AsstCreateEx(const char* dirname, AsstCallback callback, void* custom_arg)
|
||||
asst::Assistant* AsstCreateEx(const char* dirname, AsstCallback callback, void* custom_arg)
|
||||
{
|
||||
try {
|
||||
// 创建多实例回调会有问题,有空再慢慢整
|
||||
_callback = callback;
|
||||
return new asst::Assistance(dirname, CallbackTrans, custom_arg);
|
||||
return new asst::Assistant(dirname, CallbackTrans, custom_arg);
|
||||
}
|
||||
catch (...) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void AsstDestroy(void* p_asst)
|
||||
void AsstDestroy(asst::Assistant* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return;
|
||||
@@ -72,103 +72,102 @@ void AsstDestroy(void* p_asst)
|
||||
p_asst = nullptr;
|
||||
}
|
||||
|
||||
bool AsstCatchDefault(void* p_asst)
|
||||
bool AsstCatchDefault(asst::Assistant* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->catch_default();
|
||||
return ((asst::Assistant*)p_asst)->catch_default();
|
||||
}
|
||||
|
||||
bool AsstCatchEmulator(void* p_asst)
|
||||
bool AsstCatchEmulator(asst::Assistant* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->catch_emulator();
|
||||
return ((asst::Assistant*)p_asst)->catch_emulator();
|
||||
}
|
||||
|
||||
bool AsstCatchCustom(void* p_asst, const char* address)
|
||||
bool AsstCatchCustom(asst::Assistant* p_asst, const char* address)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->catch_custom(address);
|
||||
return ((asst::Assistant*)p_asst)->catch_custom(address);
|
||||
}
|
||||
|
||||
bool AsstCatchFake(void* p_asst)
|
||||
bool AsstCatchFake(asst::Assistant* p_asst)
|
||||
{
|
||||
#ifdef LOG_TRACE
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->catch_fake();
|
||||
return p_asst->catch_fake();
|
||||
#else
|
||||
return false;
|
||||
#endif // LOG_TRACE
|
||||
}
|
||||
|
||||
bool AsstAppendFight(void* p_asst, int max_mecidine, int max_stone, int max_times)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
asst::Assistance* ptr = (asst::Assistance*)p_asst;
|
||||
|
||||
return ptr->append_fight(max_mecidine, max_stone, max_times);
|
||||
}
|
||||
|
||||
bool AsstAppendAward(void* p_asst)
|
||||
bool AsstAppendFight(asst::Assistant* p_asst, int max_mecidine, int max_stone, int max_times)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->append_award();
|
||||
return p_asst->append_fight(max_mecidine, max_stone, max_times);
|
||||
}
|
||||
|
||||
bool AsstAppendVisit(void* p_asst)
|
||||
bool AsstAppendAward(asst::Assistant* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->append_visit();
|
||||
}
|
||||
|
||||
bool AsstAppendMall(void* p_asst, bool with_shopping)
|
||||
{
|
||||
return p_asst->append_award();
|
||||
}
|
||||
|
||||
bool AsstAppendVisit(asst::Assistant* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->append_mall(with_shopping);
|
||||
return p_asst->append_visit();
|
||||
}
|
||||
|
||||
//bool AsstAppendProcessTask(void* p_asst, const char* task)
|
||||
bool AsstAppendMall(asst::Assistant* p_asst, bool with_shopping)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return p_asst->append_mall(with_shopping);
|
||||
}
|
||||
|
||||
//bool AsstAppendProcessTask(asst::Assistant* p_asst, const char* task)
|
||||
//{
|
||||
// if (p_asst == nullptr) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// return ((asst::Assistance*)p_asst)->append_process_task(task);
|
||||
//}
|
||||
|
||||
bool AsstStartRecruitCalc(void* p_asst, const int select_level[], int required_len, bool set_time)
|
||||
// return p_asst->append_process_task(task);
|
||||
//}
|
||||
|
||||
bool AsstStartRecruitCalc(asst::Assistant* p_asst, const int select_level[], int required_len, bool set_time)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
std::vector<int> level_vector;
|
||||
level_vector.assign(select_level, select_level + required_len);
|
||||
return ((asst::Assistance*)p_asst)->start_recruit_calc(level_vector, set_time);
|
||||
return p_asst->start_recruit_calc(level_vector, set_time);
|
||||
}
|
||||
|
||||
bool AsstAppendInfrast(void* p_asst, int work_mode, const char** order, int order_size, const char* uses_of_drones, double dorm_threshold)
|
||||
bool AsstAppendInfrast(asst::Assistant* p_asst, int work_mode, const char** order, int order_size, const char* uses_of_drones, double dorm_threshold)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
@@ -176,62 +175,61 @@ bool AsstAppendInfrast(void* p_asst, int work_mode, const char** order, int orde
|
||||
std::vector<std::string> order_vector;
|
||||
order_vector.assign(order, order + order_size);
|
||||
|
||||
return ((asst::Assistance*)p_asst)->
|
||||
append_infrast(
|
||||
static_cast<asst::infrast::WorkMode>(work_mode),
|
||||
order_vector,
|
||||
uses_of_drones,
|
||||
return p_asst->append_infrast(
|
||||
static_cast<asst::infrast::WorkMode>(work_mode),
|
||||
order_vector,
|
||||
uses_of_drones,
|
||||
dorm_threshold);
|
||||
}
|
||||
|
||||
bool AsstAppendRecruit(void* p_asst, int max_times, const int select_level[], int select_len, const int confirm_level[], int confirm_len, bool need_refresh)
|
||||
}
|
||||
|
||||
bool AsstAppendRecruit(asst::Assistant* p_asst, int max_times, const int select_level[], int select_len, const int confirm_level[], int confirm_len, bool need_refresh)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
std::vector<int> required_vector;
|
||||
required_vector.assign(select_level, select_level + select_len);
|
||||
required_vector.assign(select_level, select_level + select_len);
|
||||
std::vector<int> confirm_vector;
|
||||
confirm_vector.assign(confirm_level, confirm_level + confirm_len);
|
||||
confirm_vector.assign(confirm_level, confirm_level + confirm_len);
|
||||
|
||||
return ((asst::Assistance*)p_asst)->append_recruit(max_times, required_vector, confirm_vector, need_refresh);
|
||||
return p_asst->append_recruit(max_times, required_vector, confirm_vector, need_refresh);
|
||||
}
|
||||
|
||||
bool AsstStart(void* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->start();
|
||||
}
|
||||
|
||||
bool AsstStop(void* p_asst)
|
||||
bool AsstStart(asst::Assistant* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((asst::Assistance*)p_asst)->stop();
|
||||
}
|
||||
|
||||
bool MEOAPI AsstSetPenguinId(void* p_asst, const char* id)
|
||||
{
|
||||
return p_asst->start();
|
||||
}
|
||||
|
||||
bool AsstStop(asst::Assistant* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
auto ptr = (asst::Assistance*)p_asst;
|
||||
ptr->set_penguin_id(id);
|
||||
return true;
|
||||
|
||||
return p_asst->stop();
|
||||
}
|
||||
|
||||
//bool AsstSetParam(void* p_asst, const char* type, const char* param, const char* value)
|
||||
bool AsstSetPenguinId(asst::Assistant* p_asst, const char* id)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
p_asst->set_penguin_id(id);
|
||||
return true;
|
||||
}
|
||||
|
||||
//bool AsstSetParam(asst::Assistant* p_asst, const char* type, const char* param, const char* value)
|
||||
//{
|
||||
// if (p_asst == nullptr) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// return ((asst::Assistance*)p_asst)->set_param(type, param, value);
|
||||
// return p_asst->set_param(type, param, value);
|
||||
//}
|
||||
|
||||
const char* AsstGetVersion()
|
||||
@@ -239,14 +237,14 @@ const char* AsstGetVersion()
|
||||
return asst::Version;
|
||||
}
|
||||
|
||||
bool AsstAppendDebug(void* p_asst)
|
||||
bool AsstAppendDebug(asst::Assistant* p_asst)
|
||||
{
|
||||
if (p_asst == nullptr) {
|
||||
return false;
|
||||
}
|
||||
#if LOG_TRACE
|
||||
return ((asst::Assistance*)p_asst)->append_debug();
|
||||
return p_asst->append_debug();
|
||||
#else
|
||||
return false;
|
||||
#endif // LOG_TRACE
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ namespace asst
|
||||
explicit operator Rect() const noexcept { return rect; }
|
||||
std::string to_string() const
|
||||
{
|
||||
return text + " : " + rect.to_string();
|
||||
return text + " : " + rect.to_string() + ", score: " + std::to_string(score);
|
||||
}
|
||||
TextRect& operator=(const TextRect&) = default;
|
||||
TextRect& operator=(TextRect&&) noexcept = default;
|
||||
@@ -112,6 +112,7 @@ namespace asst
|
||||
|
||||
std::string text;
|
||||
Rect rect;
|
||||
float score;
|
||||
};
|
||||
using TextRectProc = std::function<bool(TextRect&)>;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <ostream>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <json.h>
|
||||
#include <meojson/json.h>
|
||||
|
||||
namespace asst
|
||||
{
|
||||
@@ -24,8 +24,8 @@ namespace asst
|
||||
ReachedLimit, // 单个原子任务达到次数上限
|
||||
ReadyToSleep, // 准备开始睡眠
|
||||
EndOfSleep, // 睡眠结束
|
||||
AppendProcessTask, // [已弃用] 新增流程任务,Assistance内部消息,外部不需要处理
|
||||
AppendTask, // [已弃用] 新增任务,Assistance内部消息,外部不需要处理
|
||||
AppendProcessTask, // [已弃用] 新增流程任务,Assistant内部消息,外部不需要处理
|
||||
AppendTask, // [已弃用] 新增任务,Assistant内部消息,外部不需要处理
|
||||
TaskCompleted, // 单个原子任务完成
|
||||
PrintWindow, // 截图消息
|
||||
ProcessTaskStopAction, // 流程任务执行到了Stop的动作
|
||||
@@ -2,33 +2,33 @@
|
||||
|
||||
#include "Resource.h"
|
||||
#include "OcrImageAnalyzer.h"
|
||||
#include "Controller.h"
|
||||
#include "RecruitImageAnalyzer.h"
|
||||
#include "ProcessTask.h"
|
||||
#include "Controller.h"
|
||||
#include "RecruitImageAnalyzer.h"
|
||||
#include "ProcessTask.h"
|
||||
#include "RecruitTask.h"
|
||||
|
||||
void asst::AutoRecruitTask::set_select_level(std::vector<int> select_level) noexcept
|
||||
{
|
||||
m_select_level = std::move(select_level);
|
||||
}
|
||||
|
||||
void asst::AutoRecruitTask::set_confirm_level(std::vector<int> confirm_level) noexcept
|
||||
{
|
||||
m_confirm_level = std::move(confirm_level);
|
||||
}
|
||||
|
||||
void asst::AutoRecruitTask::set_need_refresh(bool need_refresh) noexcept
|
||||
{
|
||||
m_need_refresh = need_refresh;
|
||||
}
|
||||
|
||||
void asst::AutoRecruitTask::set_select_level(std::vector<int> select_level) noexcept
|
||||
{
|
||||
m_select_level = std::move(select_level);
|
||||
}
|
||||
|
||||
void asst::AutoRecruitTask::set_confirm_level(std::vector<int> confirm_level) noexcept
|
||||
{
|
||||
m_confirm_level = std::move(confirm_level);
|
||||
}
|
||||
|
||||
void asst::AutoRecruitTask::set_need_refresh(bool need_refresh) noexcept
|
||||
{
|
||||
m_need_refresh = need_refresh;
|
||||
}
|
||||
|
||||
void asst::AutoRecruitTask::set_max_times(int max_times) noexcept
|
||||
{
|
||||
m_max_times = max_times;
|
||||
}
|
||||
|
||||
bool asst::AutoRecruitTask::_run()
|
||||
{
|
||||
}
|
||||
|
||||
bool asst::AutoRecruitTask::_run()
|
||||
{
|
||||
json::value task_start_json = json::object{
|
||||
{ "task_type", "RecruitTask" },
|
||||
{ "task_chain", m_task_chain },
|
||||
@@ -36,61 +36,61 @@ bool asst::AutoRecruitTask::_run()
|
||||
m_callback(AsstMsg::TaskStart, task_start_json, m_callback_arg);
|
||||
|
||||
int delay = Resrc.cfg().get_options().task_delay;
|
||||
|
||||
|
||||
auto image = Ctrler.get_image();
|
||||
OcrImageAnalyzer start_analyzer(image);
|
||||
const auto start_task_ptr = std::dynamic_pointer_cast<OcrTaskInfo>(task.get("StartRecruit"));
|
||||
start_analyzer.set_task_info(*start_task_ptr);
|
||||
|
||||
if (!start_analyzer.analyze()) {
|
||||
return false;
|
||||
if (!start_analyzer.analyze()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto& start_res = start_analyzer.get_result();
|
||||
for (; m_cur_times < start_res.size() && m_cur_times < m_max_times; ++m_cur_times) {
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
Rect start_rect = start_res.at(m_cur_times).rect;
|
||||
Ctrler.click(start_rect);
|
||||
sleep(delay);
|
||||
|
||||
while (true) {
|
||||
RecruitTask recurit_task(m_callback, m_callback_arg);
|
||||
recurit_task.set_retry_times(10);
|
||||
recurit_task.set_param(m_select_level, true);
|
||||
recurit_task.set_task_chain(m_task_chain);
|
||||
|
||||
// 识别错误,放弃这个公招位,直接返回
|
||||
if (!recurit_task.run()) {
|
||||
m_callback(AsstMsg::RecruitError, json::value(), m_callback_arg);
|
||||
click_return_button();
|
||||
break;
|
||||
}
|
||||
|
||||
int maybe_level = recurit_task.get_maybe_level();
|
||||
|
||||
// 尝试刷新
|
||||
if (m_need_refresh && maybe_level == 3
|
||||
&& !recurit_task.get_has_special_tag()
|
||||
&& recurit_task.get_has_refresh()) {
|
||||
ProcessTask refresh_task(*this, { "RecruitRefresh" });
|
||||
if (refresh_task.run()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (std::find(m_confirm_level.cbegin(), m_confirm_level.cend(), maybe_level) != m_confirm_level.cend()) {
|
||||
ProcessTask confirm_task(*this, { "RecruitConfirm" });
|
||||
if (!confirm_task.run()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else {
|
||||
click_return_button();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Rect start_rect = start_res.at(m_cur_times).rect;
|
||||
Ctrler.click(start_rect);
|
||||
sleep(delay);
|
||||
|
||||
while (true) {
|
||||
RecruitTask recurit_task(m_callback, m_callback_arg);
|
||||
recurit_task.set_retry_times(10);
|
||||
recurit_task.set_param(m_select_level, true);
|
||||
recurit_task.set_task_chain(m_task_chain);
|
||||
|
||||
// 识别错误,放弃这个公招位,直接返回
|
||||
if (!recurit_task.run()) {
|
||||
m_callback(AsstMsg::RecruitError, json::value(), m_callback_arg);
|
||||
click_return_button();
|
||||
break;
|
||||
}
|
||||
|
||||
int maybe_level = recurit_task.get_maybe_level();
|
||||
|
||||
// 尝试刷新
|
||||
if (m_need_refresh && maybe_level == 3
|
||||
&& !recurit_task.get_has_special_tag()
|
||||
&& recurit_task.get_has_refresh()) {
|
||||
ProcessTask refresh_task(*this, { "RecruitRefresh" });
|
||||
if (refresh_task.run()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (std::find(m_confirm_level.cbegin(), m_confirm_level.cend(), maybe_level) != m_confirm_level.cend()) {
|
||||
ProcessTask confirm_task(*this, { "RecruitConfirm" });
|
||||
if (!confirm_task.run()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else {
|
||||
click_return_button();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,7 @@ void asst::Controller::pipe_working_proc()
|
||||
}
|
||||
//else if (!m_thread_idle) { // 队列中没有任务,又不是闲置的时候,就去截图
|
||||
// cmd_queue_lock.unlock();
|
||||
// auto start_time = std::chrono::system_clock::now();
|
||||
// auto start_time = std::chrono::steady_clock::now();
|
||||
// screencap();
|
||||
// cmd_queue_lock.lock();
|
||||
// if (!m_cmd_queue.empty()) {
|
||||
@@ -447,7 +447,7 @@ void asst::Controller::random_delay() const
|
||||
if (opt.control_delay_upper != 0) {
|
||||
LogTraceFunction;
|
||||
static std::default_random_engine rand_engine(
|
||||
std::chrono::system_clock::now().time_since_epoch().count());
|
||||
std::chrono::steady_clock::now().time_since_epoch().count());
|
||||
static std::uniform_int_distribution<unsigned> rand_uni(
|
||||
opt.control_delay_lower,
|
||||
opt.control_delay_upper);
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "GeneralConfiger.h"
|
||||
|
||||
#include <json.h>
|
||||
#include <meojson/json.h>
|
||||
|
||||
bool asst::GeneralConfiger::parse(const json::value& json)
|
||||
{
|
||||
@@ -17,8 +17,8 @@ bool asst::GeneralConfiger::parse(const json::value& json)
|
||||
m_options.penguin_report_cmd_line = options_json.at("penguinReportCmdLine").as_string();
|
||||
m_options.penguin_report_server = options_json.get("penguinReportServer", "CN");
|
||||
|
||||
m_options.ocr_gpu_index = options_json.get("ocrGpuIndex", -1);
|
||||
m_options.ocr_thread_number = options_json.at("ocrThreadNumber").as_integer();
|
||||
//m_options.ocr_gpu_index = options_json.get("ocrGpuIndex", -1);
|
||||
//m_options.ocr_thread_number = options_json.at("ocrThreadNumber").as_integer();
|
||||
|
||||
m_options.adb_extra_swipe_dist = options_json.get("adbExtraSwipeDist", 100);
|
||||
m_options.adb_extra_swipe_duration = options_json.get("adbExtraSwipeDuration", -1);
|
||||
@@ -27,8 +27,8 @@ namespace asst
|
||||
std::string penguin_report_cmd_line; // 企鹅数据汇报的命令
|
||||
std::string penguin_report_extra_param; // 企鹅数据汇报的命令
|
||||
std::string penguin_report_server; // 企鹅数据汇报接口"server"字段,"CN", "US", "JP" and "KR".
|
||||
int ocr_gpu_index = -1; // OcrLite使用GPU编号,-1(使用CPU)/0(使用GPU0)/1(使用GPU1)/...
|
||||
int ocr_thread_number = 0; // OcrLite线程数量
|
||||
//int ocr_gpu_index = -1; // OcrLite使用GPU编号,-1(使用CPU)/0(使用GPU0)/1(使用GPU1)/...
|
||||
//int ocr_thread_number = 0; // OcrLite线程数量
|
||||
int adb_extra_swipe_dist = 0; // 额外的滑动距离:adb有bug,同样的参数,偶尔会划得非常远。额外做一个短程滑动,把之前的停下来
|
||||
int adb_extra_swipe_duration = -1; // 额外的滑动持续时间:adb有bug,同样的参数,偶尔会划得非常远。额外做一个短程滑动,把之前的停下来。若小于0,则关闭额外滑动功能
|
||||
};
|
||||
@@ -95,7 +95,7 @@ bool asst::InfrastAbstractTask::enter_oper_list_page()
|
||||
|
||||
auto image = Ctrler.get_image();
|
||||
|
||||
// 识别右边的“进驻”按钮
|
||||
// 识别左边的“进驻”按钮
|
||||
const auto enter_task_ptr = std::dynamic_pointer_cast<OcrTaskInfo>(
|
||||
task.get("InfrastEnterOperList"));
|
||||
OcrImageAnalyzer enter_analyzer(image);
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "InfrastConfiger.h"
|
||||
|
||||
#include <json.h>
|
||||
#include <meojson/json.h>
|
||||
|
||||
bool asst::InfrastConfiger::parse(const json::value& json)
|
||||
{
|
||||
@@ -209,4 +209,4 @@ bool asst::InfrastConfiger::parse(const json::value& json)
|
||||
m_facilities_info.emplace(facility_name, std::move(fac_info));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -442,11 +442,11 @@ bool asst::InfrastProductionTask::optimal_calc()
|
||||
bool asst::InfrastProductionTask::opers_choose()
|
||||
{
|
||||
LogTraceFunction;
|
||||
bool has_error = false;
|
||||
|
||||
int count = 0;
|
||||
bool has_error = false;
|
||||
|
||||
int count = 0;
|
||||
auto& facility_info = Resrc.infrast().get_facility_info(m_facility);
|
||||
int cur_max_num_of_opers = facility_info.max_num_of_opers - m_cur_num_of_lokced_opers;
|
||||
int cur_max_num_of_opers = facility_info.max_num_of_opers - m_cur_num_of_lokced_opers;
|
||||
|
||||
while (true) {
|
||||
if (need_exit()) {
|
||||
@@ -480,9 +480,9 @@ bool asst::InfrastProductionTask::opers_choose()
|
||||
auto remove_iter = std::remove_if(cur_all_opers.begin(), cur_all_opers.end(),
|
||||
[&](const infrast::Oper& rhs) -> bool {
|
||||
return rhs.mood_ratio < m_mood_threshold;
|
||||
});
|
||||
cur_all_opers.erase(remove_iter, cur_all_opers.end());
|
||||
|
||||
});
|
||||
cur_all_opers.erase(remove_iter, cur_all_opers.end());
|
||||
|
||||
for (auto opt_iter = m_optimal_combs.begin(); opt_iter != m_optimal_combs.end();) {
|
||||
auto find_iter = std::find_if(
|
||||
cur_all_opers.cbegin(), cur_all_opers.cend(),
|
||||
@@ -539,18 +539,18 @@ bool asst::InfrastProductionTask::opers_choose()
|
||||
else {
|
||||
Log.error("opers_choose | not found oper");
|
||||
}
|
||||
}
|
||||
}
|
||||
++count;
|
||||
cur_all_opers.erase(find_iter);
|
||||
opt_iter = m_optimal_combs.erase(opt_iter);
|
||||
}
|
||||
if (m_optimal_combs.empty()) {
|
||||
if (m_optimal_combs.empty()) {
|
||||
if (count >= cur_max_num_of_opers) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
else { // 这种情况可能是萌新,可用干员人数不足以填满当前设施
|
||||
// TODO!!!
|
||||
break;
|
||||
else { // 这种情况可能是萌新,可用干员人数不足以填满当前设施
|
||||
// TODO!!!
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,4 +619,4 @@ bool asst::InfrastProductionTask::facility_list_detect()
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "ItemConfiger.h"
|
||||
|
||||
#include <json.h>
|
||||
#include <meojson/json.h>
|
||||
|
||||
bool asst::ItemConfiger::parse(const json::value& json)
|
||||
{
|
||||
@@ -9,4 +9,4 @@ bool asst::ItemConfiger::parse(const json::value& json)
|
||||
m_item_name.emplace(id, std::move(name));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -34,19 +34,19 @@ namespace asst
|
||||
template <typename... Args>
|
||||
inline void trace(Args&&... args)
|
||||
{
|
||||
constexpr static std::string_view level = "TRC";
|
||||
std::string_view level = "TRC";
|
||||
log(level, std::forward<Args>(args)...);
|
||||
}
|
||||
template <typename... Args>
|
||||
inline void info(Args&&... args)
|
||||
{
|
||||
constexpr static std::string_view level = "INF";
|
||||
std::string_view level = "INF";
|
||||
log(level, std::forward<Args>(args)...);
|
||||
}
|
||||
template <typename... Args>
|
||||
inline void error(Args&&... args)
|
||||
{
|
||||
constexpr static std::string_view level = "ERR";
|
||||
std::string_view level = "ERR";
|
||||
log(level, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace asst
|
||||
void log_init_info()
|
||||
{
|
||||
trace("-----------------------------");
|
||||
trace("MeoAssistance Process Start");
|
||||
trace("MeoAssistant Process Start");
|
||||
trace("Version", asst::Version);
|
||||
trace("Build DataTime", __DATE__, __TIME__);
|
||||
trace("Working Path", m_dirname);
|
||||
@@ -86,7 +86,7 @@ namespace asst
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void log(const std::string_view& level, Args&&... args)
|
||||
void log(std::string_view level, Args&&... args)
|
||||
{
|
||||
std::unique_lock<std::mutex> trace_lock(m_trace_mutex);
|
||||
|
||||
@@ -96,7 +96,11 @@ namespace asst
|
||||
level.data(), _getpid(), ::GetCurrentThreadId());
|
||||
|
||||
std::ofstream ofs(m_log_filename, std::ios::out | std::ios::app);
|
||||
#ifdef LOG_TRACE
|
||||
stream_args(ofs, buff, args...);
|
||||
#else
|
||||
stream_args(ofs, buff, std::forward<Args>(args)...);
|
||||
#endif
|
||||
ofs.close();
|
||||
|
||||
#ifdef LOG_TRACE
|
||||
@@ -142,20 +146,20 @@ namespace asst
|
||||
public:
|
||||
LoggerAux(const std::string& func_name)
|
||||
: m_func_name(func_name),
|
||||
m_start_time(std::chrono::system_clock::now())
|
||||
m_start_time(std::chrono::steady_clock::now())
|
||||
{
|
||||
Logger::get_instance().trace(m_func_name, " | enter");
|
||||
}
|
||||
~LoggerAux()
|
||||
{
|
||||
auto duration = std::chrono::system_clock::now() - m_start_time;
|
||||
auto duration = std::chrono::steady_clock::now() - m_start_time;
|
||||
Logger::get_instance().trace(m_func_name, " | leave,",
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(duration).count(), "ms");
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_func_name;
|
||||
std::chrono::time_point<std::chrono::system_clock> m_start_time;
|
||||
std::chrono::time_point<std::chrono::steady_clock> m_start_time;
|
||||
};
|
||||
|
||||
//static auto& log = Logger::get_instance();
|
||||
@@ -1,256 +1,256 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\AsstCaller.h" />
|
||||
<ClInclude Include="..\..\include\AsstPort.h" />
|
||||
<ClInclude Include="AbstractConfiger.h" />
|
||||
<ClInclude Include="AbstractImageAnalyzer.h" />
|
||||
<ClInclude Include="AbstractResource.h" />
|
||||
<ClInclude Include="AbstractTask.h" />
|
||||
<ClInclude Include="Assistance.h" />
|
||||
<ClInclude Include="AsstInfrastDef.h" />
|
||||
<ClInclude Include="AsstUtils.hpp" />
|
||||
<ClInclude Include="AsstDef.h" />
|
||||
<ClInclude Include="AsstMsg.h" />
|
||||
<ClInclude Include="AutoRecruitTask.h" />
|
||||
<ClInclude Include="CreditShopImageAnalyzer.h" />
|
||||
<ClInclude Include="GeneralConfiger.h" />
|
||||
<ClInclude Include="CreditShoppingTask.h" />
|
||||
<ClInclude Include="InfrastAbstractTask.h" />
|
||||
<ClInclude Include="InfrastClueImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastConfiger.h" />
|
||||
<ClInclude Include="InfrastControlTask.h" />
|
||||
<ClInclude Include="InfrastDormTask.h" />
|
||||
<ClInclude Include="InfrastFacilityImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastInfoTask.h" />
|
||||
<ClInclude Include="InfrastMfgTask.h" />
|
||||
<ClInclude Include="InfrastOfficeTask.h" />
|
||||
<ClInclude Include="InfrastOperImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastPowerTask.h" />
|
||||
<ClInclude Include="InfrastProductionTask.h" />
|
||||
<ClInclude Include="InfrastClueVacancyImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastReceptionTask.h" />
|
||||
<ClInclude Include="InfrastSmileyImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastTradeTask.h" />
|
||||
<ClInclude Include="MultiMatchImageAnalyzer.h" />
|
||||
<ClInclude Include="OcrImageAnalyzer.h" />
|
||||
<ClInclude Include="OcrPack.h" />
|
||||
<ClInclude Include="PenguinPack.h" />
|
||||
<ClInclude Include="RecruitImageAnalyzer.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="ItemConfiger.h" />
|
||||
<ClInclude Include="Logger.hpp" />
|
||||
<ClInclude Include="RecruitTask.h" />
|
||||
<ClInclude Include="PenguinUploader.h" />
|
||||
<ClInclude Include="ProcessTask.h" />
|
||||
<ClInclude Include="ProcessTaskImageAnalyzer.h" />
|
||||
<ClInclude Include="RecruitConfiger.h" />
|
||||
<ClInclude Include="RuntimeStatus.h" />
|
||||
<ClInclude Include="TaskData.h" />
|
||||
<ClInclude Include="MatchImageAnalyzer.h" />
|
||||
<ClInclude Include="TemplResource.h" />
|
||||
<ClInclude Include="UserConfiger.h" />
|
||||
<ClInclude Include="Version.h" />
|
||||
<ClInclude Include="Controller.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AbstractConfiger.cpp" />
|
||||
<ClCompile Include="AbstractImageAnalyzer.cpp" />
|
||||
<ClCompile Include="AbstractResource.cpp" />
|
||||
<ClCompile Include="AbstractTask.cpp" />
|
||||
<ClCompile Include="AutoRecruitTask.cpp" />
|
||||
<ClCompile Include="CreditShopImageAnalyzer.cpp" />
|
||||
<ClCompile Include="CreditShoppingTask.cpp" />
|
||||
<ClCompile Include="InfrastAbstractTask.cpp" />
|
||||
<ClCompile Include="InfrastClueImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastConfiger.cpp" />
|
||||
<ClCompile Include="InfrastControlTask.cpp" />
|
||||
<ClCompile Include="InfrastDormTask.cpp" />
|
||||
<ClCompile Include="InfrastFacilityImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastInfoTask.cpp" />
|
||||
<ClCompile Include="InfrastMfgTask.cpp" />
|
||||
<ClCompile Include="InfrastOfficeTask.cpp" />
|
||||
<ClCompile Include="InfrastOperImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastPowerTask.cpp" />
|
||||
<ClCompile Include="InfrastProductionTask.cpp" />
|
||||
<ClCompile Include="InfrastClueVacancyImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastReceptionTask.cpp" />
|
||||
<ClCompile Include="InfrastSmileyImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastTradeTask.cpp" />
|
||||
<ClCompile Include="MultiMatchImageAnalyzer.cpp" />
|
||||
<ClCompile Include="OcrImageAnalyzer.cpp" />
|
||||
<ClCompile Include="OcrPack.cpp" />
|
||||
<ClCompile Include="PenguinPack.cpp" />
|
||||
<ClCompile Include="RecruitImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Resource.cpp" />
|
||||
<ClCompile Include="Assistance.cpp" />
|
||||
<ClCompile Include="AsstCaller.cpp" />
|
||||
<ClCompile Include="GeneralConfiger.cpp" />
|
||||
<ClCompile Include="ItemConfiger.cpp" />
|
||||
<ClCompile Include="RecruitTask.cpp" />
|
||||
<ClCompile Include="PenguinUploader.cpp" />
|
||||
<ClCompile Include="ProcessTask.cpp" />
|
||||
<ClCompile Include="ProcessTaskImageAnalyzer.cpp" />
|
||||
<ClCompile Include="RecruitConfiger.cpp" />
|
||||
<ClCompile Include="RuntimeStatus.cpp" />
|
||||
<ClCompile Include="TaskData.cpp" />
|
||||
<ClCompile Include="MatchImageAnalyzer.cpp" />
|
||||
<ClCompile Include="TemplResource.cpp" />
|
||||
<ClCompile Include="UserConfiger.cpp" />
|
||||
<ClCompile Include="Controller.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\resource\config.json" />
|
||||
<None Include="..\..\resource\infrast.json" />
|
||||
<None Include="..\..\resource\tasks.json" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{362d1e30-f5ae-4279-9985-65c27b3ba300}</ProjectGuid>
|
||||
<RootNamespace>MeoAssistance</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)include;$(SolutionDir)3rdparty\include;$(SolutionDir)3rdparty\include\meojson;$(SolutionDir)\3rdparty\include\opencv;$(SolutionDir)\3rdparty\include\opencv2;$(SolutionDir)3drPart\include\OcrLiteNcnn;;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(TargetDir);$(SolutionDir)\3rdparty\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)include;$(SolutionDir)3rdparty\include;$(SolutionDir)3rdparty\include\meojson;$(SolutionDir)3rdparty\include\opencv;$(SolutionDir)3rdparty\include\opencv2;$(SolutionDir)3drPart\include\OcrLiteNcnn;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(TargetDir);$(SolutionDir)\3rdparty\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;MEO_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libmeojson.lib;OcrLiteOnnx.lib;opencv_world453.lib;penguin-stats-recognize.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\AsstCaller.h" />
|
||||
<ClInclude Include="..\..\include\AsstPort.h" />
|
||||
<ClInclude Include="AbstractConfiger.h" />
|
||||
<ClInclude Include="AbstractImageAnalyzer.h" />
|
||||
<ClInclude Include="AbstractResource.h" />
|
||||
<ClInclude Include="AbstractTask.h" />
|
||||
<ClInclude Include="Assistant.h" />
|
||||
<ClInclude Include="AsstInfrastDef.h" />
|
||||
<ClInclude Include="AsstUtils.hpp" />
|
||||
<ClInclude Include="AsstDef.h" />
|
||||
<ClInclude Include="AsstMsg.h" />
|
||||
<ClInclude Include="AutoRecruitTask.h" />
|
||||
<ClInclude Include="CreditShopImageAnalyzer.h" />
|
||||
<ClInclude Include="GeneralConfiger.h" />
|
||||
<ClInclude Include="CreditShoppingTask.h" />
|
||||
<ClInclude Include="InfrastAbstractTask.h" />
|
||||
<ClInclude Include="InfrastClueImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastConfiger.h" />
|
||||
<ClInclude Include="InfrastControlTask.h" />
|
||||
<ClInclude Include="InfrastDormTask.h" />
|
||||
<ClInclude Include="InfrastFacilityImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastInfoTask.h" />
|
||||
<ClInclude Include="InfrastMfgTask.h" />
|
||||
<ClInclude Include="InfrastOfficeTask.h" />
|
||||
<ClInclude Include="InfrastOperImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastPowerTask.h" />
|
||||
<ClInclude Include="InfrastProductionTask.h" />
|
||||
<ClInclude Include="InfrastClueVacancyImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastReceptionTask.h" />
|
||||
<ClInclude Include="InfrastSmileyImageAnalyzer.h" />
|
||||
<ClInclude Include="InfrastTradeTask.h" />
|
||||
<ClInclude Include="MultiMatchImageAnalyzer.h" />
|
||||
<ClInclude Include="OcrImageAnalyzer.h" />
|
||||
<ClInclude Include="OcrPack.h" />
|
||||
<ClInclude Include="PenguinPack.h" />
|
||||
<ClInclude Include="RecruitImageAnalyzer.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="ItemConfiger.h" />
|
||||
<ClInclude Include="Logger.hpp" />
|
||||
<ClInclude Include="RecruitTask.h" />
|
||||
<ClInclude Include="PenguinUploader.h" />
|
||||
<ClInclude Include="ProcessTask.h" />
|
||||
<ClInclude Include="ProcessTaskImageAnalyzer.h" />
|
||||
<ClInclude Include="RecruitConfiger.h" />
|
||||
<ClInclude Include="RuntimeStatus.h" />
|
||||
<ClInclude Include="TaskData.h" />
|
||||
<ClInclude Include="MatchImageAnalyzer.h" />
|
||||
<ClInclude Include="TemplResource.h" />
|
||||
<ClInclude Include="UserConfiger.h" />
|
||||
<ClInclude Include="Version.h" />
|
||||
<ClInclude Include="Controller.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AbstractConfiger.cpp" />
|
||||
<ClCompile Include="AbstractImageAnalyzer.cpp" />
|
||||
<ClCompile Include="AbstractResource.cpp" />
|
||||
<ClCompile Include="AbstractTask.cpp" />
|
||||
<ClCompile Include="AutoRecruitTask.cpp" />
|
||||
<ClCompile Include="CreditShopImageAnalyzer.cpp" />
|
||||
<ClCompile Include="CreditShoppingTask.cpp" />
|
||||
<ClCompile Include="InfrastAbstractTask.cpp" />
|
||||
<ClCompile Include="InfrastClueImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastConfiger.cpp" />
|
||||
<ClCompile Include="InfrastControlTask.cpp" />
|
||||
<ClCompile Include="InfrastDormTask.cpp" />
|
||||
<ClCompile Include="InfrastFacilityImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastInfoTask.cpp" />
|
||||
<ClCompile Include="InfrastMfgTask.cpp" />
|
||||
<ClCompile Include="InfrastOfficeTask.cpp" />
|
||||
<ClCompile Include="InfrastOperImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastPowerTask.cpp" />
|
||||
<ClCompile Include="InfrastProductionTask.cpp" />
|
||||
<ClCompile Include="InfrastClueVacancyImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastReceptionTask.cpp" />
|
||||
<ClCompile Include="InfrastSmileyImageAnalyzer.cpp" />
|
||||
<ClCompile Include="InfrastTradeTask.cpp" />
|
||||
<ClCompile Include="MultiMatchImageAnalyzer.cpp" />
|
||||
<ClCompile Include="OcrImageAnalyzer.cpp" />
|
||||
<ClCompile Include="OcrPack.cpp" />
|
||||
<ClCompile Include="PenguinPack.cpp" />
|
||||
<ClCompile Include="RecruitImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Resource.cpp" />
|
||||
<ClCompile Include="Assistant.cpp" />
|
||||
<ClCompile Include="AsstCaller.cpp" />
|
||||
<ClCompile Include="GeneralConfiger.cpp" />
|
||||
<ClCompile Include="ItemConfiger.cpp" />
|
||||
<ClCompile Include="RecruitTask.cpp" />
|
||||
<ClCompile Include="PenguinUploader.cpp" />
|
||||
<ClCompile Include="ProcessTask.cpp" />
|
||||
<ClCompile Include="ProcessTaskImageAnalyzer.cpp" />
|
||||
<ClCompile Include="RecruitConfiger.cpp" />
|
||||
<ClCompile Include="RuntimeStatus.cpp" />
|
||||
<ClCompile Include="TaskData.cpp" />
|
||||
<ClCompile Include="MatchImageAnalyzer.cpp" />
|
||||
<ClCompile Include="TemplResource.cpp" />
|
||||
<ClCompile Include="UserConfiger.cpp" />
|
||||
<ClCompile Include="Controller.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\resource\config.json" />
|
||||
<None Include="..\..\resource\infrast.json" />
|
||||
<None Include="..\..\resource\tasks.json" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{362d1e30-f5ae-4279-9985-65c27b3ba300}</ProjectGuid>
|
||||
<RootNamespace>MeoAssistant</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)include;$(SolutionDir)3rdparty\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(TargetDir);$(SolutionDir)\3rdparty\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)include;$(SolutionDir)3rdparty\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(TargetDir);$(SolutionDir)\3rdparty\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;ASST_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libmeojson.lib;ppocr.lib;opencv_world453.lib;penguin-stats-recognize.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /e /y /i /c $(SolutionDir)resource $(TargetDir)resource
|
||||
xcopy /e /y /i /c $(SolutionDir)3rdparty\resource $(TargetDir)resource</Command>
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent>
|
||||
<Message>copy resource</Message>
|
||||
</PostBuildEvent>
|
||||
<PreLinkEvent>
|
||||
<Command>xcopy /e /y /i /c $(SolutionDir)3rdparty\bin $(TargetDir)</Command>
|
||||
</PreLinkEvent>
|
||||
<PreLinkEvent>
|
||||
<Message>copy 3rd party dll</Message>
|
||||
</PreLinkEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>
|
||||
</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;MEO_DLL_EXPORTS;LOG_TRACE;DEBUG_API;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libmeojson.lib;OcrLiteOnnx.lib;opencv_world453.lib;penguin-stats-recognize.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
xcopy /e /y /i /c $(SolutionDir)3rdparty\resource $(TargetDir)resource</Command>
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent>
|
||||
<Message>copy resource</Message>
|
||||
</PostBuildEvent>
|
||||
<PreLinkEvent>
|
||||
<Command>xcopy /e /y /i /c $(SolutionDir)3rdparty\bin $(TargetDir)</Command>
|
||||
</PreLinkEvent>
|
||||
<PreLinkEvent>
|
||||
<Message>copy 3rd party dll</Message>
|
||||
</PreLinkEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>
|
||||
</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;ASST_DLL_EXPORTS;LOG_TRACE;DEBUG_API;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libmeojson.lib;ppocr.lib;opencv_world453.lib;penguin-stats-recognize.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /e /y /i /c $(SolutionDir)resource $(TargetDir)resource
|
||||
xcopy /e /y /i /c $(SolutionDir)3rdparty\resource $(TargetDir)resource</Command>
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent>
|
||||
<Message>copy resource</Message>
|
||||
</PostBuildEvent>
|
||||
<PreLinkEvent>
|
||||
<Command>xcopy /e /y /i /c $(SolutionDir)3rdparty\bin $(TargetDir)</Command>
|
||||
</PreLinkEvent>
|
||||
<PreLinkEvent>
|
||||
<Message>copy 3rd party dll</Message>
|
||||
</PreLinkEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
xcopy /e /y /i /c $(SolutionDir)3rdparty\resource $(TargetDir)resource</Command>
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent>
|
||||
<Message>copy resource</Message>
|
||||
</PostBuildEvent>
|
||||
<PreLinkEvent>
|
||||
<Command>xcopy /e /y /i /c $(SolutionDir)3rdparty\bin $(TargetDir)</Command>
|
||||
</PreLinkEvent>
|
||||
<PreLinkEvent>
|
||||
<Message>copy 3rd party dll</Message>
|
||||
</PreLinkEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
@@ -1,365 +1,365 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Caller">
|
||||
<UniqueIdentifier>{81d86994-0d89-4cc2-aa6f-d726a0bd0490}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Task">
|
||||
<UniqueIdentifier>{3b93d9f2-728c-4a22-bc13-57ce7df5806c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Task">
|
||||
<UniqueIdentifier>{1ef28df7-c174-4032-bbcf-9722ae53852d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Caller">
|
||||
<UniqueIdentifier>{557d6d96-11d9-46e1-b611-b2b8216abea6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\ImageAnalyzer">
|
||||
<UniqueIdentifier>{1a8ffc31-8eb3-4af6-9065-634de2463a3e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\ImageAnalyzer">
|
||||
<UniqueIdentifier>{c6a0898b-5dd7-4437-981c-00e53b30a60d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Resource">
|
||||
<UniqueIdentifier>{07a812fe-6b28-4be0-b6d4-33554824d3c5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Resource">
|
||||
<UniqueIdentifier>{74bd94e1-4973-412a-a17a-d8457de387af}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Utils">
|
||||
<UniqueIdentifier>{87c9dee5-847b-41e6-818e-387a6385ea8b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Utils">
|
||||
<UniqueIdentifier>{a5c43813-70af-4b0e-94ac-9ddecc2e4a3c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\ImageAnalyzer\Infrast">
|
||||
<UniqueIdentifier>{a37e0b23-e8f8-499c-adf5-9990277e9ffe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\ImageAnalyzer\General">
|
||||
<UniqueIdentifier>{51165426-1842-491a-b5d5-9d26c59facdd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\ImageAnalyzer\General">
|
||||
<UniqueIdentifier>{c600668a-0d70-4694-b1e5-6a78cffd0b1a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\ImageAnalyzer\Infrast">
|
||||
<UniqueIdentifier>{d173e449-880b-4064-bbab-97007e3d090b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Task\Infrast">
|
||||
<UniqueIdentifier>{fc8aa302-89bb-4016-924d-10177dc8b334}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Task\Infrast">
|
||||
<UniqueIdentifier>{9a6160e3-cd35-4dda-ba04-23ede1878740}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Controller.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Assistance.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RecruitConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GeneralConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AsstDef.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AsstUtils.hpp">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Version.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Logger.hpp">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\AsstCaller.h">
|
||||
<Filter>头文件\Caller</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\AsstPort.h">
|
||||
<Filter>头文件\Caller</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AbstractTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RecruitTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ProcessTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AsstMsg.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AbstractConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="UserConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CreditShoppingTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PenguinUploader.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ItemConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ProcessTaskImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TemplResource.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AbstractResource.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="OcrPack.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PenguinPack.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RecruitImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CreditShopImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AbstractImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MatchImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MultiMatchImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="OcrImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastSmileyImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastFacilityImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RuntimeStatus.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastClueVacancyImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastAbstractTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastDormTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastInfoTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastMfgTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastOfficeTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastPowerTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastProductionTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastReceptionTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastTradeTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastClueImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AsstInfrastDef.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastOperImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TaskData.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AutoRecruitTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastControlTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Controller.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Assistance.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RecruitConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneralConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AbstractTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RecruitTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ProcessTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AsstCaller.cpp">
|
||||
<Filter>源文件\Caller</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AbstractConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UserConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CreditShoppingTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PenguinUploader.cpp">
|
||||
<Filter>源文件\Utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ItemConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ProcessTaskImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TemplResource.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AbstractResource.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OcrPack.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PenguinPack.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RecruitImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Resource.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CreditShopImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastSmileyImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AbstractImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\General</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MatchImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\General</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MultiMatchImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\General</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OcrImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\General</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastFacilityImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RuntimeStatus.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastAbstractTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastDormTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastInfoTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastMfgTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastOfficeTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastPowerTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastProductionTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastTradeTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastClueVacancyImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastClueImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastReceptionTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastOperImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TaskData.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AutoRecruitTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastControlTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\resource\config.json">
|
||||
<Filter>资源文件</Filter>
|
||||
</None>
|
||||
<None Include="..\..\resource\tasks.json">
|
||||
<Filter>资源文件</Filter>
|
||||
</None>
|
||||
<None Include="..\..\resource\infrast.json">
|
||||
<Filter>资源文件</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Caller">
|
||||
<UniqueIdentifier>{81d86994-0d89-4cc2-aa6f-d726a0bd0490}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Task">
|
||||
<UniqueIdentifier>{3b93d9f2-728c-4a22-bc13-57ce7df5806c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Task">
|
||||
<UniqueIdentifier>{1ef28df7-c174-4032-bbcf-9722ae53852d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Caller">
|
||||
<UniqueIdentifier>{557d6d96-11d9-46e1-b611-b2b8216abea6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\ImageAnalyzer">
|
||||
<UniqueIdentifier>{1a8ffc31-8eb3-4af6-9065-634de2463a3e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\ImageAnalyzer">
|
||||
<UniqueIdentifier>{c6a0898b-5dd7-4437-981c-00e53b30a60d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Resource">
|
||||
<UniqueIdentifier>{07a812fe-6b28-4be0-b6d4-33554824d3c5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Resource">
|
||||
<UniqueIdentifier>{74bd94e1-4973-412a-a17a-d8457de387af}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Utils">
|
||||
<UniqueIdentifier>{87c9dee5-847b-41e6-818e-387a6385ea8b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Utils">
|
||||
<UniqueIdentifier>{a5c43813-70af-4b0e-94ac-9ddecc2e4a3c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\ImageAnalyzer\Infrast">
|
||||
<UniqueIdentifier>{a37e0b23-e8f8-499c-adf5-9990277e9ffe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\ImageAnalyzer\General">
|
||||
<UniqueIdentifier>{51165426-1842-491a-b5d5-9d26c59facdd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\ImageAnalyzer\General">
|
||||
<UniqueIdentifier>{c600668a-0d70-4694-b1e5-6a78cffd0b1a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\ImageAnalyzer\Infrast">
|
||||
<UniqueIdentifier>{d173e449-880b-4064-bbab-97007e3d090b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\Task\Infrast">
|
||||
<UniqueIdentifier>{fc8aa302-89bb-4016-924d-10177dc8b334}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\Task\Infrast">
|
||||
<UniqueIdentifier>{9a6160e3-cd35-4dda-ba04-23ede1878740}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Controller.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Assistant.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RecruitConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GeneralConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AsstDef.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AsstUtils.hpp">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Version.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Logger.hpp">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\AsstCaller.h">
|
||||
<Filter>头文件\Caller</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\AsstPort.h">
|
||||
<Filter>头文件\Caller</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AbstractTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RecruitTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ProcessTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AsstMsg.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AbstractConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="UserConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CreditShoppingTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PenguinUploader.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ItemConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ProcessTaskImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TemplResource.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AbstractResource.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="OcrPack.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PenguinPack.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RecruitImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CreditShopImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AbstractImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MatchImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MultiMatchImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="OcrImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastSmileyImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastConfiger.h">
|
||||
<Filter>头文件\Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastFacilityImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RuntimeStatus.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastClueVacancyImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastAbstractTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastDormTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastInfoTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastMfgTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastOfficeTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastPowerTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastProductionTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastReceptionTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastTradeTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastClueImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AsstInfrastDef.h">
|
||||
<Filter>头文件\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastOperImageAnalyzer.h">
|
||||
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TaskData.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AutoRecruitTask.h">
|
||||
<Filter>头文件\Task</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InfrastControlTask.h">
|
||||
<Filter>头文件\Task\Infrast</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Controller.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Assistant.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RecruitConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneralConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AbstractTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RecruitTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ProcessTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AsstCaller.cpp">
|
||||
<Filter>源文件\Caller</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AbstractConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UserConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CreditShoppingTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PenguinUploader.cpp">
|
||||
<Filter>源文件\Utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ItemConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ProcessTaskImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TemplResource.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AbstractResource.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OcrPack.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PenguinPack.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RecruitImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Resource.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CreditShopImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastSmileyImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AbstractImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\General</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MatchImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\General</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MultiMatchImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\General</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OcrImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\General</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastConfiger.cpp">
|
||||
<Filter>源文件\Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastFacilityImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RuntimeStatus.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastAbstractTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastDormTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastInfoTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastMfgTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastOfficeTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastPowerTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastProductionTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastTradeTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastClueVacancyImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastClueImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastReceptionTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastOperImageAnalyzer.cpp">
|
||||
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TaskData.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AutoRecruitTask.cpp">
|
||||
<Filter>源文件\Task</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfrastControlTask.cpp">
|
||||
<Filter>源文件\Task\Infrast</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\resource\config.json">
|
||||
<Filter>资源文件</Filter>
|
||||
</None>
|
||||
<None Include="..\..\resource\tasks.json">
|
||||
<Filter>资源文件</Filter>
|
||||
</None>
|
||||
<None Include="..\..\resource\infrast.json">
|
||||
<Filter>资源文件</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,54 +1,55 @@
|
||||
#include "OcrImageAnalyzer.h"
|
||||
|
||||
#include "AsstUtils.hpp"
|
||||
#include "Logger.hpp"
|
||||
#include "Resource.h"
|
||||
|
||||
bool asst::OcrImageAnalyzer::analyze()
|
||||
{
|
||||
m_ocr_result.clear();
|
||||
|
||||
std::vector<TextRectProc> preds_vec;
|
||||
|
||||
if (!m_replace.empty()) {
|
||||
TextRectProc text_replace = [&](TextRect& tr) -> bool {
|
||||
for (const auto& [old_str, new_str] : m_replace) {
|
||||
tr.text = utils::string_replace_all(tr.text, old_str, new_str);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
preds_vec.emplace_back(text_replace);
|
||||
}
|
||||
|
||||
if (!m_required.empty()) {
|
||||
if (m_full_match) {
|
||||
TextRectProc required_match = [&](TextRect& tr) -> bool {
|
||||
return std::find(m_required.cbegin(), m_required.cend(), tr.text) != m_required.cend();
|
||||
};
|
||||
preds_vec.emplace_back(required_match);
|
||||
}
|
||||
else {
|
||||
TextRectProc required_search = [&](TextRect& tr) -> bool {
|
||||
auto is_sub = [&tr](const std::string& str) -> bool {
|
||||
return tr.text.find(str) != std::string::npos;
|
||||
};
|
||||
return std::find_if(m_required.cbegin(), m_required.cend(), is_sub) != m_required.cend();
|
||||
};
|
||||
preds_vec.emplace_back(required_search);
|
||||
}
|
||||
}
|
||||
|
||||
preds_vec.emplace_back(m_pred);
|
||||
|
||||
TextRectProc all_pred = [&](TextRect& tr) -> bool {
|
||||
for (auto pred : preds_vec) {
|
||||
if (pred && !pred(tr)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
m_ocr_result = Resrc.ocr().recognize(m_image, m_roi, all_pred);
|
||||
//log.trace("ocr result", m_ocr_result);
|
||||
return !m_ocr_result.empty();
|
||||
}
|
||||
#include "OcrImageAnalyzer.h"
|
||||
|
||||
#include <regex>
|
||||
|
||||
#include "Logger.hpp"
|
||||
#include "Resource.h"
|
||||
|
||||
bool asst::OcrImageAnalyzer::analyze()
|
||||
{
|
||||
m_ocr_result.clear();
|
||||
|
||||
std::vector<TextRectProc> preds_vec;
|
||||
|
||||
if (!m_replace.empty()) {
|
||||
TextRectProc text_replace = [&](TextRect& tr) -> bool {
|
||||
for (const auto& [regex, new_str] : m_replace) {
|
||||
tr.text = std::regex_replace(tr.text, std::regex(regex), new_str);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
preds_vec.emplace_back(text_replace);
|
||||
}
|
||||
|
||||
if (!m_required.empty()) {
|
||||
if (m_full_match) {
|
||||
TextRectProc required_match = [&](TextRect& tr) -> bool {
|
||||
return std::find(m_required.cbegin(), m_required.cend(), tr.text) != m_required.cend();
|
||||
};
|
||||
preds_vec.emplace_back(required_match);
|
||||
}
|
||||
else {
|
||||
TextRectProc required_search = [&](TextRect& tr) -> bool {
|
||||
auto is_sub = [&tr](const std::string& str) -> bool {
|
||||
return tr.text.find(str) != std::string::npos;
|
||||
};
|
||||
return std::find_if(m_required.cbegin(), m_required.cend(), is_sub) != m_required.cend();
|
||||
};
|
||||
preds_vec.emplace_back(required_search);
|
||||
}
|
||||
}
|
||||
|
||||
preds_vec.emplace_back(m_pred);
|
||||
|
||||
TextRectProc all_pred = [&](TextRect& tr) -> bool {
|
||||
for (auto pred : preds_vec) {
|
||||
if (pred && !pred(tr)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
m_ocr_result = Resrc.ocr().recognize(m_image, m_roi, all_pred, m_without_det);
|
||||
//log.trace("ocr result", m_ocr_result);
|
||||
return !m_ocr_result.empty();
|
||||
}
|
||||
@@ -1,61 +1,64 @@
|
||||
#pragma once
|
||||
#include "AbstractImageAnalyzer.h"
|
||||
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "AsstDef.h"
|
||||
|
||||
namespace asst
|
||||
{
|
||||
class OcrImageAnalyzer : public AbstractImageAnalyzer
|
||||
{
|
||||
public:
|
||||
using AbstractImageAnalyzer::AbstractImageAnalyzer;
|
||||
virtual ~OcrImageAnalyzer() = default;
|
||||
|
||||
virtual bool analyze() override;
|
||||
|
||||
void set_required(std::vector<std::string> required, bool full_match = false) noexcept
|
||||
{
|
||||
m_required = std::move(required);
|
||||
m_full_match = full_match;
|
||||
}
|
||||
void set_replace(std::unordered_map<std::string, std::string> replace) noexcept
|
||||
{
|
||||
m_replace = std::move(replace);
|
||||
}
|
||||
void set_task_info(OcrTaskInfo task_info) noexcept
|
||||
{
|
||||
m_required = std::move(task_info.text);
|
||||
m_full_match = task_info.need_full_match;
|
||||
m_replace = std::move(task_info.replace_map);
|
||||
|
||||
set_roi(task_info.roi);
|
||||
correct_roi();
|
||||
auto& cache_roi = task_info.region_of_appeared;
|
||||
if (task_info.cache && !cache_roi.empty()) {
|
||||
if (cache_roi.area() < m_roi.area()) {
|
||||
m_roi = cache_roi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void set_pred(const TextRectProc& pred)
|
||||
{
|
||||
m_pred = pred;
|
||||
}
|
||||
const std::vector<TextRect>& get_result() const noexcept
|
||||
{
|
||||
return m_ocr_result;
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<TextRect> m_ocr_result;
|
||||
std::vector<std::string> m_required;
|
||||
bool m_full_match = false;
|
||||
std::unordered_map<std::string, std::string> m_replace;
|
||||
TextRectProc m_pred = nullptr;
|
||||
};
|
||||
}
|
||||
#pragma once
|
||||
#include "AbstractImageAnalyzer.h"
|
||||
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "AsstDef.h"
|
||||
|
||||
namespace asst
|
||||
{
|
||||
class OcrImageAnalyzer : public AbstractImageAnalyzer
|
||||
{
|
||||
public:
|
||||
using AbstractImageAnalyzer::AbstractImageAnalyzer;
|
||||
virtual ~OcrImageAnalyzer() = default;
|
||||
|
||||
virtual bool analyze() override;
|
||||
|
||||
void set_required(std::vector<std::string> required, bool full_match = false) noexcept
|
||||
{
|
||||
m_required = std::move(required);
|
||||
m_full_match = full_match;
|
||||
}
|
||||
void set_replace(std::unordered_map<std::string, std::string> replace) noexcept
|
||||
{
|
||||
m_replace = std::move(replace);
|
||||
}
|
||||
void set_task_info(OcrTaskInfo task_info) noexcept
|
||||
{
|
||||
m_required = std::move(task_info.text);
|
||||
m_full_match = task_info.need_full_match;
|
||||
m_replace = std::move(task_info.replace_map);
|
||||
|
||||
set_roi(task_info.roi);
|
||||
correct_roi();
|
||||
auto& cache_roi = task_info.region_of_appeared;
|
||||
if (task_info.cache && !cache_roi.empty()) {
|
||||
m_roi = cache_roi;
|
||||
m_without_det = true;
|
||||
}
|
||||
else {
|
||||
m_without_det = false;
|
||||
}
|
||||
}
|
||||
|
||||
void set_pred(const TextRectProc& pred)
|
||||
{
|
||||
m_pred = pred;
|
||||
}
|
||||
const std::vector<TextRect>& get_result() const noexcept
|
||||
{
|
||||
return m_ocr_result;
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<TextRect> m_ocr_result;
|
||||
std::vector<std::string> m_required;
|
||||
bool m_full_match = false;
|
||||
std::unordered_map<std::string, std::string> m_replace;
|
||||
TextRectProc m_pred = nullptr;
|
||||
bool m_without_det = false;
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user