Skip to content

Commit

Permalink
Merge branch 'Micooz-master-gbk'
Browse files Browse the repository at this point in the history
  • Loading branch information
liuruoze committed Apr 22, 2015
2 parents 06cb6a5 + a66f01f commit 442cc12
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)

project (EasyPR)

list(APPEND CMAKE_CXX_FLAGS "-std=c++0x")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

find_package(OpenCV REQUIRED)

Expand Down
4 changes: 4 additions & 0 deletions run_accuracy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -925,3 +925,7 @@
��ͼƬ��:120��, δʶ��ͼƬ:1��, ��λ��:99.1667%
ƽ���ַ����:0.714286��, ��ȫƥ����:81��, ��ȫƥ����:68.0672%
��ʱ��:243��, ƽ��ִ��ʱ��:2.025��
2015-04-22 17:39:09
��ͼƬ��:120��, δʶ��ͼƬ:1��, ��λ��:99.1667%
ƽ���ַ����:0.714286��, ��ȫƥ����:81��, ��ȫƥ����:68.0672%
��ʱ��:251��, ƽ��ִ��ʱ��:2.09167��
1 change: 1 addition & 0 deletions src/core/plate_detect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ int CPlateDetect::plateDetectDeep(Mat src, vector<CPlate>& resultVec, bool showD
CPlate plate = all_result_Plates[i];
resultVec.push_back(plate);
}

return 0;
}

Expand Down
6 changes: 4 additions & 2 deletions src/core/plate_locate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1583,8 +1583,9 @@ int CPlateLocate::plateLocate(Mat src, vector<Mat>& resultVec, int index)
//large the rect for more
if (!verifySizes(mr))
{
cv::Mat& roi = dst_blue(safeBoundRect);
cv::Mat roi = dst_blue(safeBoundRect);
roi.setTo(0);
cv::swap(roi, dst_blue);
}
else
{
Expand Down Expand Up @@ -1637,8 +1638,9 @@ int CPlateLocate::plateLocate(Mat src, vector<Mat>& resultVec, int index)
//large the rect for more
if (!verifySizes(mr))
{
cv::Mat& roi = dst_yellow(safeBoundRect);
cv::Mat roi = dst_yellow(safeBoundRect);
roi.setTo(0);
cv::swap(roi, dst_yellow);
}
else
{
Expand Down
9 changes: 5 additions & 4 deletions src/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,18 +275,19 @@ int test_plate_detect()

Mat src = imread("image/plate_detect.jpg");

vector<Mat> resultVec;
vector<CPlate> resultVec;
CPlateDetect pd;
pd.setPDLifemode(true);

int result = pd.plateDetect(src, resultVec);
int result = pd.plateDetectDeep(src, resultVec);
if (result == 0)
{
int num = resultVec.size();
for (int j = 0; j < num; j++)
{
Mat resultMat = resultVec[j];
imshow("plate_detect", resultMat);
CPlate resultMat = resultVec[j];

imshow("plate_detect", resultMat.getPlateMat());
waitKey(0);
}
destroyWindow("plate_detect");
Expand Down
6 changes: 3 additions & 3 deletions src/util/learn_prepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
using namespace easypr;

//! 将以下路径改成你的位置
char * notlabelPath = "F:/data/easypr-data/notlabel";
char * hasPaltePath = "F:/data/easypr-data/learn/hasPlate/";
char * noPlatePath = "F:/data/easypr-data/learn/noPlate/";
const char * notlabelPath = "F:/data/easypr-data/notlabel";
const char * hasPaltePath = "F:/data/easypr-data/learn/hasPlate/";
const char * noPlatePath = "F:/data/easypr-data/learn/noPlate/";

//! 读取not label data,生成learn data
void label_data()
Expand Down
2 changes: 1 addition & 1 deletion src/util/mc_data_prepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void getLearnData()
void changeFileName()
{
//char * filePath = "F:/data/easypr-data/learndata";
char * filePath = "F:/data/PlateLocate/pic1";
const char * filePath = "F:/data/PlateLocate/pic1";

////获取该路径下的所有文件
auto files = Utils::getFiles(filePath);
Expand Down

0 comments on commit 442cc12

Please sign in to comment.