1.3
liuruoze 10 years ago
parent b7899bb08f
commit 20bb7a0733

@ -1165,3 +1165,7 @@
总图片数:204张, 未识出图片:6张, 定位率:97.0588%
平均字符差距:0.520202个, 完全匹配数:145张, 完全匹配率:73.2323%
总时间:182秒, 平均执行时间:0.892157秒
2015-07-29 18:44:33
总图片数:204张, 未识出图片:6张, 定位率:97.0588%
平均字符差距:0.520202个, 完全匹配数:145张, 完全匹配率:73.2323%
总时间:174秒, 平均执行时间:0.852941秒

@ -204,7 +204,7 @@ int CCharsSegment::charsSegment(Mat input, vector<Mat>& resultVec) {
if (specIndex < sortedRect.size())
chineseRect = GetChineseRect(sortedRect[specIndex]);
else
return -3;
return 0x04;
if (m_debug) {
Mat chineseMat(img_threshold, chineseRect);
@ -221,22 +221,20 @@ int CCharsSegment::charsSegment(Mat input, vector<Mat>& resultVec) {
newSortedRect.push_back(chineseRect);
RebuildRect(sortedRect, newSortedRect, specIndex);
if (newSortedRect.size() == 0) return -3;
if (newSortedRect.size() == 0) return 0x05;
for (size_t i = 0; i < newSortedRect.size(); i++) {
Rect mr = newSortedRect[i];
Mat auxRoi(img_threshold, mr);
if (1) {
auxRoi = preprocessChar(auxRoi);
if (m_debug) {
stringstream ss(stringstream::in | stringstream::out);
ss << "resources/image/tmp/debug_char_auxRoi_" << (i)
<< ".jpg";
utils::imwrite(ss.str(), auxRoi);
}
resultVec.push_back(auxRoi);
auxRoi = preprocessChar(auxRoi);
if (m_debug) {
stringstream ss(stringstream::in | stringstream::out);
ss << "resources/image/tmp/debug_char_auxRoi_" << (i)
<< ".jpg";
utils::imwrite(ss.str(), auxRoi);
}
resultVec.push_back(auxRoi);
}
return 0;

Loading…
Cancel
Save