1.2.5 版本,haitungaga

1.3
liuruoze 10 years ago
parent 02ae886cbb
commit 1f3c184b18

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -901,3 +901,11 @@
总图片数:120张, 未识出图片:7张, 定位率:94.1667%
平均字符差距:2.00885个, 完全匹配数:27张, 完全匹配率:23.8938%
总时间:93秒, 平均执行时间:0.775秒
2015-04-22 09:51:17
总图片数:120张, 未识出图片:11张, 定位率:90.8333%
平均字符差距:1.49541个, 完全匹配数:48张, 完全匹配率:44.0367%
总时间:96秒, 平均执行时间:0.8秒
2015-04-22 10:09:59
总图片数:120张, 未识出图片:1张, 定位率:99.1667%
平均字符差距:0.714286个, 完全匹配数:81张, 完全匹配率:68.0672%
总时间:258秒, 平均执行时间:2.15秒

File diff suppressed because it is too large Load Diff

@ -3,53 +3,61 @@
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides
*/
namespace easypr {
CCharsRecognise::CCharsRecognise()
: m_charsSegment(nullptr), m_charsIdentify(nullptr) {
m_charsSegment = new CCharsSegment();
m_charsIdentify = new CCharsIdentify();
}
CCharsRecognise::~CCharsRecognise() {
if (m_charsSegment) {
delete m_charsSegment;
m_charsSegment = nullptr;
}
if (m_charsIdentify) {
delete m_charsIdentify;
m_charsIdentify = nullptr;
}
}
void CCharsRecognise::LoadANN(string s) {
m_charsIdentify->LoadModel(s.c_str());
}
int CCharsRecognise::charsRecognise(Mat plate, string& plateLicense, int index) {
//车牌字符方块集合
vector<Mat> matVec;
string plateIdentify = "";
int result = m_charsSegment->charsSegment(plate, matVec, index);
if (result == 0) {
int num = matVec.size();
for (int j = 0; j < num; j++) {
Mat charMat = matVec[j];
bool isChinses = false;
//默认首个字符块是中文字符
if (j == 0) isChinses = true;
string charcater = m_charsIdentify->charsIdentify(charMat, isChinses);
plateIdentify = plateIdentify + charcater;
}
}
plateLicense = plateIdentify;
return 0;
}
} /*! \namespace easypr*/
namespace easypr{
CCharsRecognise::CCharsRecognise()
{
//cout << "CCharsRecognise" << endl;
m_charsSegment = new CCharsSegment();
m_charsIdentify = new CCharsIdentify();
}
void CCharsRecognise::LoadANN(string s)
{
m_charsIdentify->LoadModel(s.c_str());
}
string CCharsRecognise::charsRecognise(Mat plate)
{
return m_charsIdentify->charsIdentify(plate);
}
int CCharsRecognise::charsRecognise(Mat plate, string& plateLicense, int index)
{
//车牌字符方块集合
vector<Mat> matVec;
string plateIdentify = "";
int result = m_charsSegment->charsSegment(plate, matVec);
if (result == 0)
{
int num = matVec.size();
for (int j = 0; j < num; j++)
{
Mat charMat = matVec[j];
bool isChinses = false;
bool isSpeci=false;
//默认首个字符块是中文字符
if (j == 0)
isChinses = true;
if(j==1)
isSpeci=true;
string charcater = m_charsIdentify->charsIdentify(charMat, isChinses,isSpeci);
plateIdentify = plateIdentify + charcater;
}
}
plateLicense = plateIdentify;
if (plateLicense.size() < 7)
{
return -1;
}
return result;
}
} /*! \namespace easypr*/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -8,6 +8,7 @@ namespace easypr{
CPlate::CPlate()
{
//cout << "CPlate" << endl;
bColored = true;
}
} /*! \namespace easypr*/

@ -4,7 +4,7 @@
Namespace where all the C++ EasyPR functionality resides
*/
namespace easypr{
//int iiname=0;
CPlateDetect::CPlateDetect()
{
//cout << "CPlateDetect" << endl;
@ -55,7 +55,7 @@ int CPlateDetect::plateDetect(Mat src, vector<Mat>& resultVec, int index)
}
int CPlateDetect::plateDetectDeep(Mat src, vector<Mat>& resultVec, bool showDetectArea, int index)
int CPlateDetect::plateDetectDeep(Mat src, vector<CPlate>& resultVec, bool showDetectArea, int index)
{
vector<Mat> resultPlates;
@ -70,10 +70,8 @@ int CPlateDetect::plateDetectDeep(Mat src, vector<Mat>& resultVec, bool showDete
//如果颜色查找找到n个以上包含n个的车牌就不再进行Sobel查找了。
const int color_find_max = m_maxPlates;
Mat result;
src.copyTo(result);
m_plateLocate->plateColorLocate(src, color_Plates, index);
m_plateJudge->plateJudge(color_Plates, color_result_Plates);
@ -84,17 +82,12 @@ int CPlateDetect::plateDetectDeep(Mat src, vector<Mat>& resultVec, bool showDete
RotatedRect minRect = plate.getPlatePos();
Point2f rect_points[4];
minRect.points(rect_points);
for (int j = 0; j < 4; j++)
line(result, rect_points[j], rect_points[(j + 1) % 4], Scalar(0, 255, 255), 2, 8);
all_result_Plates.push_back(plate);
}
if (color_result_Plates.size() >= color_find_max)
{
//如果颜色查找找到n个以上包含n个的车牌就不再进行Sobel查找了。
}
else
{
m_plateLocate->plateSobelLocate(src, sobel_Plates, index);
m_plateJudge->plateJudge(sobel_Plates, sobel_result_Plates);
@ -103,11 +96,7 @@ int CPlateDetect::plateDetectDeep(Mat src, vector<Mat>& resultVec, bool showDete
{
CPlate plate = sobel_result_Plates[i];
RotatedRect minRect = plate.getPlatePos();
Point2f rect_points[4];
minRect.points( rect_points );
for( int j = 0; j < 4; j++ )
line(result, rect_points[j], rect_points[(j+1)%4], Scalar(0,0,255), 2, 8 );
plate.bColored = false;
all_result_Plates.push_back(plate);
}
@ -117,85 +106,73 @@ int CPlateDetect::plateDetectDeep(Mat src, vector<Mat>& resultVec, bool showDete
{
// 把截取的车牌图像依次放到左上角
CPlate plate = all_result_Plates[i];
Mat plate_area = plate.getPlateMat();
int height = m_plateLocate->HEIGHT;
int width = m_plateLocate->WIDTH;
assert(height*i + height < result.rows);
Mat imageRoi = result(Rect(0, 0 + height*i, width, height));
addWeighted(imageRoi, 0, plate_area, 1, 0, imageRoi);
resultVec.push_back(plate_area);
resultVec.push_back(plate);
}
if (showDetectArea)
{
namedWindow("EasyPR", CV_WINDOW_AUTOSIZE);
showResult(result);
destroyWindow("EasyPR");
}
if (0)
{
stringstream ss(stringstream::in | stringstream::out);
ss << "image/tmp/" << index << "_" << 9 <<"_result" << ".jpg";
imwrite(ss.str(), result);
}
return 0;
}
int CPlateDetect::showResult(const Mat& result)
{
const int RESULTWIDTH = 640; //640 930
const int RESULTHEIGHT = 540; //540 710
const int RESULTWIDTH = 1000; //640 930
const int RESULTHEIGHT = 810; //540 710
Mat img_window;
img_window.create(RESULTHEIGHT, RESULTWIDTH, CV_8UC3);
/*if(cbgImage_ && cbgImage_->width == result.cols/4*4 && cbgImage_->height == result.rows)
{
for (int i=0;i<cbgImage_->height;++i)
{
for (int j=0;j<cbgImage_->width;++j)
{
cbgImage_->imageData[i*cbgImage_->widthStep+j*3] = result.data[i*result.step[0]+j*3+2];
cbgImage_->imageData[i*cbgImage_->widthStep+j*3+1] = result.data[i*result.step[0]+j*3+2+1];
cbgImage_->imageData[i*cbgImage_->widthStep+j*3+2] = result.data[i*result.step[0]+j*3];
}
int nRows = result.rows;
int nCols = result.cols;
}
}*/
Mat result_resize;
if (nCols <= img_window.cols && nRows <= img_window.rows) {
result_resize = result;
//Mat img_window;
//img_window.create(RESULTHEIGHT, RESULTWIDTH, CV_8UC3);
} else if (nCols > img_window.cols && nRows <= img_window.rows) {
float scale = float(img_window.cols) / float(nCols);
resize(result, result_resize, Size(), scale, scale, CV_INTER_AREA);
//int nRows = result.rows;
//int nCols = result.cols;
} else if (nCols <= img_window.cols && nRows > img_window.rows) {
float scale = float(img_window.rows) / float(nRows);
resize(result, result_resize, Size(), scale, scale, CV_INTER_AREA);
//Mat result_resize;
//if (nCols <= img_window.cols && nRows <= img_window.rows) {
// result_resize = result;
} else if (nCols > img_window.cols && nRows > img_window.rows) {
Mat result_middle;
float scale = float(img_window.cols) / float(nCols);
resize(result, result_middle, Size(), scale, scale, CV_INTER_AREA);
//} else if (nCols > img_window.cols && nRows <= img_window.rows) {
// float scale = float(img_window.cols) / float(nCols);
// resize(result, result_resize, Size(), scale, scale, CV_INTER_AREA);
if (result_middle.rows > img_window.rows) {
float scale = float(img_window.rows) / float(result_middle.rows);
resize(result_middle, result_resize, Size(), scale, scale, CV_INTER_AREA);
//} else if (nCols <= img_window.cols && nRows > img_window.rows) {
// float scale = float(img_window.rows) / float(nRows);
// resize(result, result_resize, Size(), scale, scale, CV_INTER_AREA);
}
else {
result_resize = result_middle;
}
} else {
result_resize = result;
}
//} else if (nCols > img_window.cols && nRows > img_window.rows) {
// Mat result_middle;
// float scale = float(img_window.cols) / float(nCols);
// resize(result, result_middle, Size(), scale, scale, CV_INTER_AREA);
Mat imageRoi = img_window(Rect((RESULTWIDTH - result_resize.cols) / 2, (RESULTHEIGHT - result_resize.rows) / 2,
result_resize.cols, result_resize.rows));
addWeighted(imageRoi, 0, result_resize, 1, 0, imageRoi);
// if (result_middle.rows > img_window.rows) {
// float scale = float(img_window.rows) / float(result_middle.rows);
// resize(result_middle, result_resize, Size(), scale, scale, CV_INTER_AREA);
imshow("EasyPR", img_window);
waitKey(0);
// }
// else {
// result_resize = result_middle;
// }
//} else {
// result_resize = result;
//}
//Mat imageRoi = img_window(Rect((RESULTWIDTH - result_resize.cols) / 2, (RESULTHEIGHT - result_resize.rows) / 2,
// result_resize.cols, result_resize.rows));
//addWeighted(imageRoi, 0, result_resize, 1, 0, imageRoi);
//imshow("EasyPR", img_window);
return 0;
}

@ -62,7 +62,7 @@ int CPlateJudge::plateJudge(const Mat& inMat,int& result)
Mat p = features.reshape(1, 1);
p.convertTo(p, CV_32FC1);
int response = (int)svm.predict(p);
float response = svm.predict(p);
result = response;
return 0;
@ -95,13 +95,33 @@ int CPlateJudge::plateJudge(const vector<CPlate>& inVec,
for (int j = 0; j < num; j++)
{
CPlate inPlate = inVec[j];
Mat inMat = inPlate.getPlateMat();
//Mat inMat = inPlate.getPlateMat();
int response = -1;
plateJudge(inMat, response);
//int response = -1;
//plateJudge(inMat, response);
if (response == 1)
resultVec.push_back(inPlate);
//if (response == 1)
// resultVec.push_back(inPlate);
//else
//{
// int w = inMat.cols;
// int h = inMat.rows;
// //ÔÙÈ¡Öм䲿·ÖÅжÏÒ»´Î
// Mat tmpmat = inMat(Rect(w*0.05,h*0.1,w*0.9,h*0.8));
// Mat tmpDes = inMat.clone();
// resize(tmpmat,tmpDes,Size(inMat.size()));
//
// plateJudge(tmpDes, response);
// if (response == 1)
// resultVec.push_back(inPlate);
//}
resultVec.push_back(inPlate);
}
return 0;
}

File diff suppressed because it is too large Load Diff

@ -36,40 +36,98 @@ CPlateRecognize::CPlateRecognize()
// return result;
//}
int CPlateRecognize::plateRecognize(Mat src, vector<string>& licenseVec, int index)
int CPlateRecognize::plateRecognize(Mat src, vector<string>& licenseVec,int index)
{
// 车牌方块集合
vector<Mat> plateVec;
vector<CPlate> plateVec;
// 如果设置了Debug模式就依次显示所有的图片
bool showDetectArea = getPDDebug();
showDetectArea=0;
// 进行深度定位使用颜色信息与二次Sobel
int resultPD = plateDetectDeep(src, plateVec, showDetectArea, 0);
Mat result;
src.copyTo(result);
if (resultPD == 0)
{
int num = plateVec.size();
int resultCR = 0;
int index = 0;
for (int j = 0; j < num; j++)
{
Mat plate = plateVec[j];
CPlate item = plateVec[j];
Mat plate = item.getPlateMat();
//获取车牌颜色
string plateType = getPlateColor(plate);
//获取车牌号
string plateIdentify = "";
int resultCR = charsRecognise(plate, plateIdentify, index * 10 + j);
int resultCR = charsRecognise(plate, plateIdentify);
if (resultCR == 0)
{
string license = plateType + ":" + plateIdentify;
licenseVec.push_back(license);
//int height = 36;
//int width = 136;
//if(height*index + height < result.rows)
//{
// Mat imageRoi = result(Rect(0, 0 + height*index, width, height));
// addWeighted(imageRoi, 0, plate, 1, 0, imageRoi);
//
// CvxText text("simhei.ttf");
// float p = 0.5;
// CvScalar size(cvScalar(8,0.5,0.1));
// text.setFont(NULL, &size, NULL, &p); // 透明处理
// text.putText(result, license.c_str(), Point(width,height*(index+1)));
//
//}
//index++;
RotatedRect minRect = item.getPlatePos();
Point2f rect_points[4];
minRect.points( rect_points );
if(item.bColored)
{
for (int j = 0; j < 4; j++)
{
line(result, rect_points[j], rect_points[(j + 1) % 4], Scalar(255, 255, 0), 2, 8);
//颜色定位车牌,黄色方框
}
}
else
{
for( int j = 0; j < 4; j++ )
{
line(result, rect_points[j], rect_points[(j+1)%4], Scalar(0,0,255), 2, 8 );//sobel定位车牌红色方框
}
}
}
}
}
showResult(result);
return resultPD;
}

@ -24,18 +24,13 @@ class CCharsIdentify
public:
CCharsIdentify();
//! 字符分割
string charsIdentify(Mat, bool);
//! ×Ö·û¼ø±ð
string charsIdentify(Mat, bool, bool);
string charsIdentify(Mat input);
//! 字符分类
int classify(Mat, bool);
//create the accumulation histograms,img is a binary image, t is 水平或垂直
Mat ProjectedHistogram(Mat img, int t);
//! 获得字符的特征图
Mat features(Mat in, int sizeData);
int classify(Mat, bool,bool);
int classify(Mat f);
//! 装载ANN模型
void LoadModel();

@ -22,66 +22,54 @@ Namespace where all the C++ EasyPR functionality resides
*/
namespace easypr {
class CCharsRecognise {
public:
CCharsRecognise();
~CCharsRecognise();
//! 字符分割与识别
int charsRecognise(Mat, String&, int =0);
//! 装载ANN模型
void LoadANN(string s);
//! 是否开启调试模式
inline void setCRDebug(int param) { m_charsSegment->setDebug(param); }
//! 获取调试模式状态
inline int getCRDebug() { return m_charsSegment->getDebug(); }
//! 获得车牌颜色
inline string getPlateColor(Mat input) const {
string color = "未知";
Color result = getPlateType(input, true);
if (BLUE == result) color = "蓝牌";
if (YELLOW == result) color = "黄牌";
return color;
}
//! 设置变量
inline void setLiuDingSize(int param) {
m_charsSegment->setLiuDingSize(param);
}
inline void setColorThreshold(int param) {
m_charsSegment->setColorThreshold(param);
}
inline void setBluePercent(float param) {
m_charsSegment->setBluePercent(param);
}
inline float getBluePercent() const {
return m_charsSegment->getBluePercent();
}
inline void setWhitePercent(float param) {
m_charsSegment->setWhitePercent(param);
}
inline float getWhitePercent() const {
return m_charsSegment->getWhitePercent();
}
private:
//!字符分割
CCharsSegment* m_charsSegment;
//! 字符识别
CCharsIdentify* m_charsIdentify;
};
} /* \namespace easypr */
class CCharsRecognise
{
public:
CCharsRecognise();
//! 字符分割与识别
int charsRecognise(Mat, String&, int = 0);
string charsRecognise(Mat plate);
//! 装载ANN模型
void LoadANN(string s);
//! 是否开启调试模式
inline void setCRDebug(int param){ m_charsSegment->setDebug(param); }
//! 获取调试模式状态
inline int getCRDebug(){ return m_charsSegment->getDebug(); }
//! 获得车牌颜色
inline string getPlateColor(Mat input) const
{
string color = "未知";
Color result = getPlateType(input, true);
if (BLUE == result)
color = "蓝牌";
if (YELLOW == result)
color = "黄牌";
return color;
}
//! 设置变量
inline void setLiuDingSize(int param){ m_charsSegment->setLiuDingSize(param); }
inline void setColorThreshold(int param){ m_charsSegment->setColorThreshold(param); }
inline void setBluePercent(float param){ m_charsSegment->setBluePercent(param); }
inline float getBluePercent() const { return m_charsSegment->getBluePercent(); }
inline void setWhitePercent(float param){ m_charsSegment->setWhitePercent(param); }
inline float getWhitePercent() const { return m_charsSegment->getWhitePercent(); }
private:
//!字符分割
CCharsSegment* m_charsSegment;
//! 字符识别
CCharsIdentify* m_charsIdentify;
};
} /* \namespace easypr */
#endif /* endif __CHARS_RECOGNISE_H__ */

@ -26,7 +26,7 @@ namespace easypr {
CCharsSegment();
//! 字符分割
int charsSegment(Mat, vector<Mat>&, int = 0);
int charsSegment(Mat, vector<Mat>&);
//! 字符尺寸验证
bool verifyCharSizes(Mat r);
@ -58,7 +58,7 @@ namespace easypr {
inline float getWhitePercent() const { return m_WhitePercent; }
//! 是否开启调试模式常量默认0代表关闭
static const int DEFAULT_DEBUG = 0;
static const int DEFAULT_DEBUG = 1;
//! preprocessChar所用常量
static const int CHAR_SIZE = 20;
@ -66,7 +66,7 @@ namespace easypr {
static const int VERTICAL = 0;
//! preprocessChar所用常量
static const int DEFAULT_LIUDING_SIZE = 9;
static const int DEFAULT_LIUDING_SIZE = 7;
static const int DEFAULT_MAT_WIDTH = 136;
static const int DEFAULT_COLORTHRESHOLD = 150;

@ -18,17 +18,25 @@ namespace easypr {
//! 返回true或fasle
bool plateColorJudge(const Mat& src, const Color r, const bool adaptive_minsv);
//clearLiuDing
bool bFindLeftRightBound(Mat& bound_threshold,int& posLeft,int& posRight);
bool bFindLeftRightBound1(Mat& bound_threshold,int& posLeft,int& posRight);
bool bFindLeftRightBound2(Mat& bound_threshold,int& posLeft,int& posRight);
//去除车牌上方的钮钉
//计算每行元素的阶跃数如果小于X认为是柳丁将此行全部填0涂黑
//X的推荐值为可根据实际调整
Mat clearLiuDing(Mat img);
bool clearLiuDing(Mat& img);
void clearLiuDingOnly(Mat& img);
void clearLiuDing(Mat mask,int& top,int& bottom);
//! 获得车牌颜色
Color getPlateType(const Mat& src, const bool adaptive_minsv);
//! 直方图均衡
Mat histeq(Mat in);
Mat features(Mat in, int sizeData);
int ThresholdOtsu(Mat mat);
// !获取垂直和水平方向直方图
Mat ProjectedHistogram(Mat img, int t);

@ -20,6 +20,7 @@ namespace easypr {
class CPlate
{
public:
bool bColored;
CPlate();
//! ÉčÖĂÓëśÁČĄąäÁż

@ -33,7 +33,7 @@ public:
int plateDetect(Mat, vector<Mat>&, int index = 0);
//! 深度车牌检测使用颜色与二次Sobel法综合
int plateDetectDeep(Mat src, vector<Mat>& resultVec, bool showDetectArea = true, int index = 0);
int plateDetectDeep(Mat src, vector<CPlate>& resultVec, bool showDetectArea = true, int index = 0);
int showResult(const Mat& result);

@ -7,7 +7,7 @@
// Copyright: liuruoze
// Reference: Mastering OpenCV with Practical Computer Vision Projects
// Reference: CSDN Bloger taotao1233
// Desciption:
// Desciption:
// Defines CPlateLocate
//////////////////////////////////////////////////////////////////////////
#ifndef __PLATE_JUDGE_H__
@ -18,12 +18,13 @@
#include "feature.h"
#include "core_func.h"
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides
*/
namespace easypr {
class CPlateJudge
class CPlateJudge
{
public:
CPlateJudge();
@ -64,4 +65,4 @@ private:
} /*! \namespace easypr*/
#endif /* endif __PLATE_JUDGE_H__ */
#endif /* endif __PLATE_JUDGE_H__ */

@ -17,7 +17,7 @@
#include "prep.h"
#include "plate.h"
#include "core_func.h"
class LabInfo;
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides
*/
@ -36,7 +36,8 @@ public:
//! Sobel第二次搜索
//! 对大小和形状做限制,生成参考坐标
int sobelSecSearch(const Mat& bound, Point2f refpoint, vector<RotatedRect>& outRects);
int sobelSecSearch( Mat& bound, Point2f refpoint, vector<RotatedRect>& outRects);
int sobelSecSearchPart( Mat& bound, Point2f refpoint, vector<RotatedRect>& outRects);
//! 抗扭斜处理
int deskew(const Mat& src, const Mat& src_b, vector<RotatedRect>& inRects, vector<CPlate>& outPlates);
@ -63,6 +64,7 @@ public:
//! Sobel定位法
int plateSobelLocate(Mat src, vector<CPlate>& candPlates, int index = 0);
int sobelOperT(const Mat& in, Mat& out, int blurSize, int morphW, int morphH);
//! Color搜索
int colorSearch(const Mat& src, const Color r, Mat& out, vector<RotatedRect>& outRects, int index = 0);
@ -136,7 +138,7 @@ public:
static const int DEFAULT_ANGLE = 60;//30
//! 是否开启调试模式常量默认0代表关闭
static const int DEFAULT_DEBUG = 0;
static const int DEFAULT_DEBUG = 1;
protected:
//! 高斯模糊所用变量
@ -157,6 +159,8 @@ protected:
//! 是否开启调试模式0关闭非0开启
int m_debug;
LabInfo * m_labItem;
};
} /*! \namespace easypr*/

@ -28,7 +28,7 @@ public:
CPlateRecognize();
//! 车牌检测与字符识别
int plateRecognize(Mat, vector<string>&, int = 0);
int plateRecognize(Mat, vector<string>&, int index = 0);
//! 生活模式与工业模式切换
inline void setLifemode(bool param)
@ -65,4 +65,4 @@ private:
} /* \namespace easypr */
#endif /* endif __PLATE_RECOGNITION_H__ */
#endif /* endif __PLATE_RECOGNITION_H__ */

@ -69,7 +69,7 @@ int acurayTest(const string& test_path) {
Mat src = imread(filepath);
vector<string> plateVec;
int result = pr.plateRecognize(src, plateVec,i);
int result = pr.plateRecognize(src, plateVec, i);
if (result == 0) {
int num = plateVec.size();

@ -239,12 +239,16 @@ int test_chars_identify()
{
Mat resultMat = resultVec[j];
bool isChinses = false;
bool isSpec = false;
//默认首个字符块是中文字符
if (j == 0)
isChinses = true;
string charcater = ci.charsIdentify(resultMat, isChinses);
if (j == 1)
isSpec = true;
string charcater = ci.charsIdentify(resultMat, isChinses, isSpec);
plateIdentify = plateIdentify + charcater;
}
}
@ -270,13 +274,12 @@ int test_plate_detect()
cout << "test_plate_detect" << endl;
Mat src = imread("image/plate_detect.jpg");
//Mat src = imread("image/baidu_image/test1.jpg");
vector<Mat> resultVec;
CPlateDetect pd;
pd.setPDLifemode(true);
int result = pd.plateDetectDeep(src, resultVec);
int result = pd.plateDetect(src, resultVec);
if (result == 0)
{
int num = resultVec.size();
@ -286,7 +289,7 @@ int test_plate_detect()
imshow("plate_detect", resultMat);
waitKey(0);
}
destroyWindow("plate_detect");
destroyWindow("plate_detect");
}
return result;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save