From 9190340264f947b7978072aad4b0d9660f9f891f Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 16 一月 2023 18:09:13 +0800
Subject: [PATCH] '交易策略优化'

---
 ConsoleApplication/main.cpp |   23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/ConsoleApplication/main.cpp b/ConsoleApplication/main.cpp
index 0001558..7294656 100644
--- a/ConsoleApplication/main.cpp
+++ b/ConsoleApplication/main.cpp
@@ -157,7 +157,7 @@
 	ImgUtil::init();
 	OpenCLExcuter* openCLExcuter = new OpenCLExcuter();
 	openCLExcuter->init();
-	cv::Mat img = cv::imread("C:\\Users\\Administrator\\Desktop\\ocr\\l2_trade_queue_2.png");
+	cv::Mat img = cv::imread("C:\\Users\\Administrator\\Desktop\\ocr\\trade\\Snipaste_2023-01-13_18-23-34.png");
 	uchar* datas = (uchar*)malloc(sizeof(uchar) * img.rows * img.cols);
 	if (img.channels() == 4)
 	{
@@ -172,7 +172,7 @@
 	cv::Mat binary;
 	threshold(img1, binary, 96, 255, cv::THRESH_BINARY);
 
-	cv::imwrite("C:\\Users\\Administrator\\Desktop\\ocr\\l2_trade_queue_gray.png", img1);
+	cv::imwrite("C:\\Users\\Administrator\\Desktop\\ocr\\trade\\Snipaste_2023-01-13_18-23-34_gray.png", img1);
 
 }
 
@@ -187,17 +187,9 @@
 	OpenCLExcuter* openCLExcuter = new OpenCLExcuter();
 	openCLExcuter->init();
 	L2DataCapture *capture = new L2DataCapture();
-	HWND win = THSActionUtil::getL2Win();
-	CaptureUtil::init(win);
-	
-	while (TRUE)
-	{
-		//cv::Mat img = cv::imread("C:\\Users\\Administrator\\Desktop\\ocr\\l2_trade_queue_2_2.png");
-		cv::Mat img = CaptureUtil::capture(0, CAPTURE_TYPE_TRADE_QUEUE);
-		L2TradeQueue tradeQueue = capture->captureLevel2TradeQueueData(openCLExcuter, img, 0);
-		printf("\n");
-		Sleep(10);
-	}
+	cv::Mat img = cv::imread("C:\\Users\\Administrator\\Desktop\\ocr\\l2_trade_queue_3.png");
+	L2TradeQueue tradeQueue = capture->captureLevel2TradeQueueData(openCLExcuter, img, 0);
+	printf("\n");
 }
 
 void testCaptureL2TradeQueue() {
@@ -215,7 +207,7 @@
 	ImgUtil::init();
 	TradeListCapture* capture = new TradeListCapture();
 	capture->init(NULL,NULL,NULL);
-	cv::Mat oimg = cv::imread("C:\\Users\\Administrator\\Desktop\\ocr\\trade\\Snipaste_2022-12-23_09-42-19.png");
+	cv::Mat oimg = cv::imread("C:\\Users\\Administrator\\Desktop\\ocr\\trade\\Snipaste_2023-01-03_09-33-57.png");
 	capture->captureSimpleTradeDelegateInfo(oimg);
 }
 
@@ -228,8 +220,7 @@
 
 
 int main() {
-	//grayImg();
-	testTradeSuccess();
+	grayImg();
 	return 1;
 	//testL2();
 	//if (TRUE) {

--
Gitblit v1.8.0