* change all the files to utf-8 without bom.

* use a few best test parameters chosen from grid search.
* add image to res.
v1.6alpha
liuruoze 9 years ago
parent 38fa1b402c
commit 822fafa0e4

7
.gitignore vendored

@ -1,6 +1,8 @@
.idea/
_build/
resources/image/tmp/
resources/image/native_test/*.jpg
*.suo
*.sdf
*.opensdf
@ -32,3 +34,8 @@ obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
*.obj
*.cache
*.log
[Bb]in

@ -11,9 +11,9 @@ namespace easypr {
enum
{
PR_DETECT_SOBEL = 0x01, /**Sobel detect typeusing twice Sobel */
PR_DETECT_SOBEL = 0x01, /**Sobel detect type, using twice Sobel */
PR_DETECT_COLOR = 0x02, /**Color detect type */
PR_DETECT_CMSER = 0x04, /**Character detect typeusing mser */
PR_DETECT_CMSER = 0x04, /**Character detect type, using mser */
};
static const char* kDefaultSvmPath = "resources/model/svm.xml";

@ -24,14 +24,14 @@ namespace easypr {
public:
CPlateRecognize();
//! 车牌检测与字符识别
//! 车牌检测与字符识别
int plateRecognize(Mat src, std::vector<CPlate> &licenseVec, int img_index = 0);
int plateRecognize(Mat src, std::vector<std::string> &licenseVec);
int plateRecognizeAsText(Mat src, std::vector<CPlate> &licenseVec);
int plateRecognizeAsTextNM(Mat src, std::vector<CPlate> &licenseVec);
//! 生活模式与工业模式切换
//! 生活模式与工业模式切换
inline void setLifemode(bool param) { CPlateDetect::setPDLifemode(param); }
inline void setDetectType(int param) { CPlateDetect::setDetectType(param); }

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -239,7 +239,7 @@ namespace easypr {
}
float chineseMaxThresh = 0.25;
float chineseMaxThresh = 0.2f;
//float chineseMaxThresh = CParams::instance()->getParam2f();
if (maxVal >= 0.9 || (isChinese && maxVal >= chineseMaxThresh)) {

@ -52,7 +52,7 @@ int CCharsRecognise::charsRecognise(CPlate& plate, std::string& plateLicense) {
Mat plateMat = plate.getPlateMat();
// 判断车牌颜色以此确认threshold方法
// 判断车牌颜色以此确认threshold方法
Color color;
if (plate.getPlateLocateType() == CMSER) {
color = plate.getPlateColor();

@ -237,6 +237,8 @@ bool slideChineseWindow(Mat& image, Rect mr, Mat& newRoi, Color plateType, float
int CCharsSegment::charsSegment(Mat input, vector<Mat>& resultVec, Color color) {
if (!input.data) return 0x01;
Color plateType = color;
Mat input_grey;
cvtColor(input, input_grey, CV_BGR2GRAY);
@ -251,7 +253,6 @@ int CCharsSegment::charsSegment(Mat input, vector<Mat>& resultVec, Color color)
// 二值化
// 根据车牌的不同颜色使用不同的阈值判断方法
// TODO使用MSER来提取这些轮廓
//if (BLUE == plateType) {
// // cout << "BLUE" << endl;
// img_threshold = input_grey.clone();
@ -285,8 +286,6 @@ int CCharsSegment::charsSegment(Mat input, vector<Mat>& resultVec, Color color)
// CV_THRESH_OTSU + CV_THRESH_BINARY);
//}
Color plateType = color;
img_threshold = input_grey.clone();
spatial_ostu(img_threshold, 8, 2, plateType);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save