* add MDO ratio judge to remove small lines in zh-cuan and ostu-level to remove false slide window.

v1.6alpha
liuruoze 9 years ago
parent 92b3bab054
commit b8af57c3d8

@ -1862,3 +1862,13 @@ Recall:88.3398%, Precise:91.9465%, Fscore:90.1071%.
Recall:33.9553%, Precise:62.5128%, Fscore:44.0071%.
0-error:11.7647%, 1-error:29.4118%, Chinese-precise:17.6471%
总时间:54秒, 平均执行时间:1.08秒
2016-06-26 15:52:16
总图片数:50, Plates count:44, 未识出图片:44, 定位率:0%
Recall:0%, Precise:0%, Fscore:0%.
0-error:0%, 1-error:0%, Chinese-precise:100%
总时间:455秒, 平均执行时间:9.1秒
2016-06-26 16:15:42
总图片数:50, Plates count:44, 未识出图片:44, 定位率:0%
Recall:0%, Precise:0%, Fscore:0%.
0-error:0%, 1-error:0%, Chinese-precise:100%
总时间:385秒, 平均执行时间:7.7秒

@ -28,6 +28,7 @@ namespace easypr {
m_characterStr = "";
m_score = 0;
m_isChinese = false;
m_ostuLevel = 125;
}
CCharacter(const CCharacter& other)
@ -37,6 +38,7 @@ namespace easypr {
m_characterStr = other.m_characterStr;
m_score = other.m_score;
m_isChinese = other.m_isChinese;
m_ostuLevel = other.m_ostuLevel;
}
inline void setCharacterMat(Mat param) { m_characterMat = param; }
@ -54,10 +56,11 @@ namespace easypr {
inline void setIsChinese(bool param) { m_isChinese = param; }
inline bool getIsChinese() const { return m_isChinese; }
inline bool getIsStrong() const { return m_score >= 0.9; }
inline void setOstuLevel(double param) { m_ostuLevel = param; }
inline double getOstuLevel() const { return m_ostuLevel; }
inline bool getIsStrong() const { return m_score >= 0.9; }
inline bool getIsWeak() const { return m_score < 0.9 && m_score >= 0.5; }
inline bool getIsLittle() const { return m_score < 0.5; }
bool operator < (const CCharacter& other) const
@ -86,6 +89,9 @@ namespace easypr {
//! weather is chinese
bool m_isChinese;
//! ostu level
double m_ostuLevel;
////! m_score >= 0.9
//bool isStrong;

@ -101,7 +101,7 @@ Mat adaptive_image_from_points(const std::vector<Point>& points,
const Scalar& forgroundColor = Scalar(255, 255, 255), bool gray = true);
// Calculate a rect have same length and width and remains the center
Rect adaptive_charrect_from_rect(const Rect& rect);
Rect adaptive_charrect_from_rect(const Rect& rect, int maxwidth, int maxheight);
//! 计算一个安全的Rect
bool calcSafeRect(const RotatedRect& roi_rect, const Mat& src,

@ -24,41 +24,43 @@ namespace easypr {
public:
CPlate() { }
CPlate(const CPlate& plate) {
m_plateMat = plate.m_plateMat;
m_score = plate.m_score;
m_platePos = plate.m_platePos;
m_plateStr = plate.m_plateStr;
m_locateType = plate.m_locateType;
m_line = plate.m_line;
m_leftPoint = plate.m_leftPoint;
m_rightPoint = plate.m_rightPoint;
m_mergeCharRect = plate.m_mergeCharRect;
m_maxCharRect = plate.m_maxCharRect;
m_distVec = plate.m_distVec;
m_mserCharVec = plate.m_mserCharVec;
m_reutCharVec = plate.m_reutCharVec;
CPlate(const CPlate& other) {
m_plateMat = other.m_plateMat;
m_score = other.m_score;
m_platePos = other.m_platePos;
m_plateStr = other.m_plateStr;
m_locateType = other.m_locateType;
m_line = other.m_line;
m_leftPoint = other.m_leftPoint;
m_rightPoint = other.m_rightPoint;
m_mergeCharRect = other.m_mergeCharRect;
m_maxCharRect = other.m_maxCharRect;
m_distVec = other.m_distVec;
m_mserCharVec = other.m_mserCharVec;
m_reutCharVec = other.m_reutCharVec;
m_ostuLevel = other.m_ostuLevel;
}
CPlate& operator=(const CPlate& plate) {
if (this != &plate) {
m_plateMat = plate.m_plateMat;
m_score = plate.m_score;
m_platePos = plate.m_platePos;
m_plateStr = plate.m_plateStr;
m_locateType = plate.m_locateType;
m_line = plate.m_line;
m_leftPoint = plate.m_leftPoint;
m_rightPoint = plate.m_rightPoint;
m_mergeCharRect = plate.m_mergeCharRect;
m_maxCharRect = plate.m_maxCharRect;
m_distVec = plate.m_distVec;
m_mserCharVec = plate.m_mserCharVec;
m_reutCharVec = plate.m_reutCharVec;
CPlate& operator=(const CPlate& other) {
if (this != &other) {
m_plateMat = other.m_plateMat;
m_score = other.m_score;
m_platePos = other.m_platePos;
m_plateStr = other.m_plateStr;
m_locateType = other.m_locateType;
m_line = other.m_line;
m_leftPoint = other.m_leftPoint;
m_rightPoint = other.m_rightPoint;
m_mergeCharRect = other.m_mergeCharRect;
m_maxCharRect = other.m_maxCharRect;
m_distVec = other.m_distVec;
m_mserCharVec = other.m_mserCharVec;
m_reutCharVec = other.m_reutCharVec;
m_ostuLevel = other.m_ostuLevel;
}
return *this;
}
@ -96,6 +98,9 @@ namespace easypr {
inline void setPlatDistVec(Vec2i param) { m_distVec = param; }
inline Vec2i getPlateDistVec() const { return m_distVec; }
inline void setOstuLevel(double param) { m_ostuLevel = param; }
inline double getOstuLevel() const { return m_ostuLevel; }
inline void setMserCharacter(const std::vector<CCharacter>& param) { m_mserCharVec = param; }
inline void addMserCharacter(CCharacter param) { m_mserCharVec.push_back(param); }
inline std::vector<CCharacter> getCopyOfMserCharacters() { return m_mserCharVec; }
@ -130,6 +135,9 @@ namespace easypr {
//! plate likely
double m_score;
//! avg ostu level
double m_ostuLevel;
//! middle line
Vec4f m_line;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 53 KiB

@ -14,9 +14,7 @@
</image>
<image>
<imageName>´¨A113YP</imageName>
<taggedRectangles>
<taggedRectangle x="348" y="207" width="123" height="26" rotation="0" locateType="0">蓝牌:津A113YP</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>´¨A561WP</imageName>
@ -32,9 +30,7 @@
</image>
<image>
<imageName>´¨AE8H60</imageName>
<taggedRectangles>
<taggedRectangle x="429" y="332" width="122" height="36" rotation="-1" locateType="0">蓝牌:云AF8H6U</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>´¨AGU052</imageName>
@ -42,21 +38,15 @@
</image>
<image>
<imageName>´¨AGU801</imageName>
<taggedRectangles>
<taggedRectangle x="424" y="236" width="26" height="64" rotation="-88" locateType="1">蓝牌:新KSU8Q1</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>´¨AKM065</imageName>
<taggedRectangles>
<taggedRectangle x="450" y="189" width="106" height="22" rotation="0" locateType="0">蓝牌:辽AKNMA5</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>´¨AKQ291</imageName>
<taggedRectangles>
<taggedRectangle x="406" y="158" width="93" height="31" rotation="0" locateType="0">蓝牌:青AYQ291</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>´¨AM1186</imageName>
@ -76,33 +66,23 @@
</image>
<image>
<imageName>´¨AUU093</imageName>
<taggedRectangles>
<taggedRectangle x="406" y="200" width="39" height="117" rotation="-88" locateType="0">蓝牌:川AUU093</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>´¨AY116F</imageName>
<taggedRectangles>
<taggedRectangle x="427" y="191" width="37" height="107" rotation="-88" locateType="1">蓝牌:青AY116F</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>´¨AZ408T</imageName>
<taggedRectangles>
<taggedRectangle x="313" y="317" width="127" height="30" rotation="-2" locateType="0">蓝牌:闽A7408T</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>´¨R35779</imageName>
<taggedRectangles>
<taggedRectangle x="495" y="236" width="125" height="36" rotation="0" locateType="0">黄牌:京V11579</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>¹ðATK071</imageName>
<taggedRectangles>
<taggedRectangle x="765" y="370" width="90" height="29" rotation="-5" locateType="0">蓝牌:鲁A1AQ11</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>»¦ALB022</imageName>
@ -130,9 +110,7 @@
</image>
<image>
<imageName>ÕãL11921</imageName>
<taggedRectangles>
<taggedRectangle x="745" y="1070" width="155" height="43" rotation="-2" locateType="0">黄牌:川1NL119</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>ÕãL66736</imageName>
@ -144,15 +122,11 @@
</image>
<image>
<imageName>ÓåBE7773</imageName>
<taggedRectangles>
<taggedRectangle x="840" y="350" width="65" height="209" rotation="-82" locateType="0">蓝牌:渝BE777K</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>ÔÁA2HQ34</imageName>
<taggedRectangles>
<taggedRectangle x="1460" y="803" width="188" height="51" rotation="-1" locateType="0">蓝牌:陕2HQ34</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>ÔÁA5DP12</imageName>
@ -184,9 +158,7 @@
</image>
<image>
<imageName>ÔÁSK903B</imageName>
<taggedRectangles>
<taggedRectangle x="1371" y="768" width="203" height="47" rotation="0" locateType="0">蓝牌:桂9K9D3B</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>ÔÁX30479</imageName>
@ -202,15 +174,11 @@
</image>
<image>
<imageName>ËÕA66U71</imageName>
<taggedRectangles>
<taggedRectangle x="498" y="480" width="47" height="246" rotation="-88" locateType="0">蓝牌:豫A66BZ1</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>ËÕAD6A99</imageName>
<taggedRectangles>
<taggedRectangle x="489" y="395" width="238" height="66" rotation="-1" locateType="1">蓝牌:苏AD6A99</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>ËÕAP0966</imageName>
@ -226,9 +194,7 @@
</image>
<image>
<imageName>Ô¥U00000</imageName>
<taggedRectangles>
<taggedRectangle x="890" y="652" width="107" height="33" rotation="-1" locateType="1">蓝牌:粤U00GQG</taggedRectangle>
</taggedRectangles>
<taggedRectangles/>
</image>
<image>
<imageName>¸ÓK11978</imageName>

File diff suppressed because it is too large Load Diff

@ -91,8 +91,8 @@ namespace easypr {
// 设置要处理的一张图片中最多有多少车牌
pr.setMaxPlates(4);
pr.setDetectType(PR_DETECT_COLOR | PR_DETECT_SOBEL);
//pr.setDetectType(PR_DETECT_CMSER);
//pr.setDetectType(PR_DETECT_COLOR | PR_DETECT_SOBEL);
pr.setDetectType(PR_DETECT_CMSER);
//CPlateDetect pd;
//pd.setDetectType(PR_DETECT_CMSER);

Loading…
Cancel
Save