摘要: #include "fastdeploy/vision.h" #include #include #include #include #include #include #include #include "opencv2/opencv.hpp" int homeAttackMapX = 977; 阅读全文
posted @ 2023-07-19 04:23 (⊃・ᴥ・)つ 阅读(9) 评论(0) 推荐(0) 编辑
摘要: ```c++ Pix *mat8ToPix(cv::Mat *mat8) { Pix *pixd = pixCreate(mat8->size().width, mat8->size().height, 8); for(int y=0; yrows; y++) { for(int x=0; xcol 阅读全文
posted @ 2023-07-18 23:49 (⊃・ᴥ・)つ 阅读(8) 评论(0) 推荐(0) 编辑
摘要: ```c++ bool checkIsHome(const std::string *ADB_IP, cv::Mat *mat, fastdeploy::vision::detection::YOLOv5 *homemodelPoint) { screenShot(ADB_IP, mat); cv: 阅读全文
posted @ 2023-07-18 23:47 (⊃・ᴥ・)つ 阅读(5) 评论(0) 推荐(0) 编辑
摘要: ```c++ class deviceINFO { /* data */ // adbip // touch stream // mat // model指针 public: std::string ADB_IP; FILE *touchFile; cv::Mat *mat; fastdeploy: 阅读全文
posted @ 2023-07-18 23:46 (⊃・ᴥ・)つ 阅读(14) 评论(0) 推荐(0) 编辑
摘要: ## fork子进程 ### 原函数 ```c++ void forktest(int *i, pid_t parentid) { tesseract::TessBaseAPI *chi_api = new tesseract::TessBaseAPI(); if (chi_api->Init("/ 阅读全文
posted @ 2023-07-18 23:35 (⊃・ᴥ・)つ 阅读(4) 评论(0) 推荐(0) 编辑
摘要: ## 时间控制相关函数 一些需要备注的网站: https://www.cnblogs.com/terrasse/p/fast-adb.html https://developer.android.google.cn/ndk/downloads?spm=a2c6h.12873639.article-d 阅读全文
posted @ 2023-07-18 23:16 (⊃・ᴥ・)つ 阅读(17) 评论(0) 推荐(0) 编辑
摘要: ## minitouch控制函数封装 minitouch的github地址: ### 1.原函数 ```c++ void click(FILE *wirteFile, const std::string *ADB_IP, int x, int y) { std::string s = "d 0 " 阅读全文
posted @ 2023-07-18 22:53 (⊃・ᴥ・)つ 阅读(53) 评论(0) 推荐(0) 编辑
摘要: ## minicap截图 ### 1.原函数 ```c++ void screenShot(const std::string *ADB_IP, cv::Mat *mat) { // 首先,运行runShellAndReturn获取file指针 std::string cmd = "adb -s " 阅读全文
posted @ 2023-07-18 22:40 (⊃・ᴥ・)つ 阅读(57) 评论(0) 推荐(0) 编辑
摘要: ## popen命令的封装 ### 1.源码 ```c++ int runShellNoReturn(const char *cmd, const char *mode) { FILE *file = popen(cmd, mode); if (file == NULL) { return 1; } 阅读全文
posted @ 2023-07-18 22:37 (⊃・ᴥ・)つ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: ## 从内存中读取图像 ### 1.源码 ```c++ void createMatFromMem(FILE *file, cv::Mat *mat) { uchar *mem_pic = new uchar[6268932 / sizeof(uchar)]; long size = 0; frea 阅读全文
posted @ 2023-07-18 22:36 (⊃・ᴥ・)つ 阅读(18) 评论(0) 推荐(0) 编辑