admin
2022-09-30 1a16b19acb23a4f28bafd01f3ed80fb225a96c3e
ConsoleApplication/LimitUpCapture.cpp
@@ -246,8 +246,8 @@
         path.append(to_string(i)).append("_").append(to_string(j)).append(".jpg");
         //cv::imwrite(path, cv::Mat(grayImg, cv::Rect(sx, sy, ex - sx + 1, ey - sy + 1)));
      }
      int sx = splitResult[(ele_count_per_line * i + 0) * 4 + 0];
      int ex = splitResult[(ele_count_per_line * i + 0) * 4 + 2];
      int sx = splitResult[(ele_count_per_line * i + 1) * 4 + 0];
      int ex = splitResult[(ele_count_per_line * i + 1) * 4 + 2];
      if (ex - sx < 40) {
      //噪点数据
         excudeIndexs.insert(i);
@@ -338,6 +338,7 @@
         }
         percent.append(to_string(numberResult[i][num_length_per_ele * 4 + j]));
      }
      /*
      if (percent == "0000.00") {
         int sx = splitResult[(ele_count_per_line * i + 4) * 4 + 0];
         int sy = splitResult[(ele_count_per_line * i + 4) * 4 + 1];
@@ -347,6 +348,7 @@
         path.append(to_string(i)).append("_").append(".jpg");
         cv::imwrite(path, cv::Mat(grayImg, cv::Rect(sx, sy, ex - sx + 1, ey - sy + 1)));
      }
      */
      limitUpData.index = i;
      limitUpData.code = code;
@@ -449,15 +451,21 @@
         PostMessage(win, WM_MOUSEWHEEL, 0, MAKEWORD(x, y));
         Sleep(200);
         cv::Mat oimg = CaptureUtil::capture(win);
         list<LimitUpData> codes = captureLimitUpCodes(oimg);
         for (list<LimitUpData>::iterator ele = codes.begin();ele != codes.end();ele++) {
            string code = (*ele).code;
            if (codesSet.count(code) == 0) {
               codesSet.insert(code);
               flist.push_back(*ele);
         try {
            list<LimitUpData> codes = captureLimitUpCodes(oimg);
            for (list<LimitUpData>::iterator ele = codes.begin();ele != codes.end();ele++) {
               string code = (*ele).code;
               if (codesSet.count(code) == 0) {
                  codesSet.insert(code);
                  flist.push_back(*ele);
               }
            }
            codes.clear();
         }
         codes.clear();
         catch (string e) {
            cout << e << endl;
         }
         Sleep(50);
      }
   }