|
@@ -738,6 +738,7 @@ int cutPaper(int pageNum, std::string strJsonPath, std::string strPaperPath, std
|
|
cv::Mat cut = src(rc_ansInfo);
|
|
cv::Mat cut = src(rc_ansInfo);
|
|
cv::imwrite(szJpgPath, cut);
|
|
cv::imwrite(szJpgPath, cut);
|
|
|
|
|
|
|
|
+ int index = 1;
|
|
for (auto& iter : vecTranslate)
|
|
for (auto& iter : vecTranslate)
|
|
{
|
|
{
|
|
cv::Rect rcOcr = std::get<0>(iter);
|
|
cv::Rect rcOcr = std::get<0>(iter);
|
|
@@ -746,10 +747,10 @@ int cutPaper(int pageNum, std::string strJsonPath, std::string strPaperPath, std
|
|
{
|
|
{
|
|
char szOcrJpgPath[MAX_PATH] = { 0 };
|
|
char szOcrJpgPath[MAX_PATH] = { 0 };
|
|
char szOcrJpgText[MAX_PATH] = { 0 };
|
|
char szOcrJpgText[MAX_PATH] = { 0 };
|
|
- sprintf(szOcrJpgPath, "%s\\%s\\%d_%s_%ld_%d_%d_%d_%d.jpg", strSavePath.c_str(), ret ? "abnormal_small" : "normal_small", pageNum, id.c_str(), dwCount,
|
|
|
|
- rcOcr.x - rc_ansInfo.x, rcOcr.y - rc_ansInfo.y, rcOcr.width, rcOcr.height);
|
|
|
|
- sprintf(szOcrJpgText, "%s\\%s\\%d_%s_%ld_%d_%d_%d_%d.txt", strSavePath.c_str(), ret ? "abnormal_small" : "normal_small", pageNum, id.c_str(), dwCount,
|
|
|
|
- rcOcr.x - rc_ansInfo.x, rcOcr.y - rc_ansInfo.y, rcOcr.width, rcOcr.height);
|
|
|
|
|
|
+ sprintf(szOcrJpgPath, "%s\\%s\\%d_%s_%ld_%d_%d_%d_%d_%d.jpg", strSavePath.c_str(), ret ? "abnormal_small" : "normal_small", pageNum, id.c_str(), dwCount,
|
|
|
|
+ rcOcr.x - rc_ansInfo.x, rcOcr.y - rc_ansInfo.y, rcOcr.width, rcOcr.height, index);
|
|
|
|
+ sprintf(szOcrJpgText, "%s\\%s\\%d_%s_%ld_%d_%d_%d_%d_%d.txt", strSavePath.c_str(), ret ? "abnormal_small" : "normal_small", pageNum, id.c_str(), dwCount,
|
|
|
|
+ rcOcr.x - rc_ansInfo.x, rcOcr.y - rc_ansInfo.y, rcOcr.width, rcOcr.height, index);
|
|
|
|
|
|
CFile zip3;
|
|
CFile zip3;
|
|
zip3.Open(CA2T(szOcrJpgText), CFile::modeCreate | CFile::modeWrite);
|
|
zip3.Open(CA2T(szOcrJpgText), CFile::modeCreate | CFile::modeWrite);
|
|
@@ -759,7 +760,7 @@ int cutPaper(int pageNum, std::string strJsonPath, std::string strPaperPath, std
|
|
cv::Mat cut = src(rcOcr);
|
|
cv::Mat cut = src(rcOcr);
|
|
cv::imwrite(szOcrJpgPath, cut);
|
|
cv::imwrite(szOcrJpgPath, cut);
|
|
|
|
|
|
- break;
|
|
|
|
|
|
+ index++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|