| | |
| | | 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); |
| | |
| | | } |
| | | 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]; |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |