Skip to content

Commit

Permalink
Merge branch 'hotfix/Channel'
Browse files Browse the repository at this point in the history
  • Loading branch information
g199209 committed Jan 4, 2016
2 parents bb571f8 + 9037ba8 commit c70c1c7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions LPR/LPR.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
**************************************************************
* @file LRP.cpp
* @file LPR.cpp
* @author 高明飞
* @version V0.3
* @date 2015-12-11
* @version V0.3.2
* @date 2016-01-04
*
* @brief 车牌识别核心算法部分
*
Expand Down Expand Up @@ -45,10 +45,10 @@ void LPR::binary(cv::Mat & Img)
// 中值滤波
medianBlur(Img, Img, 7);

// 提取B通道转为灰度图
// 提取G通道转为灰度图
vector<Mat> mv;
split(Img, mv);
Img = mv[2];
Img = mv[1];

// 计算平均灰度值
uchar ThreVal = (uchar)cv::mean(Img).val[0];
Expand Down
6 changes: 3 additions & 3 deletions LPR/LPR.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
**************************************************************
* @file LRP.h
* @file LPR.h
* @author 高明飞
* @version V0.3
* @date 2015-12-11
* @version V0.3.1
* @date 2016-01-04
*
* @brief 车牌识别核心算法部分
*
Expand Down
10 changes: 5 additions & 5 deletions LPR/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
**************************************************************
* @file main.cpp
* @author 高明飞
* @version V0.3
* @date 2015-12-11
* @version V0.3.1
* @date 2016-01-04
*
* @brief 车牌模式识别主程序入口
*
Expand Down Expand Up @@ -48,16 +48,16 @@ int main()
Mat img;
string result;
PlateImg ImgProvider = PlateImg(IMG_PATH);
LPR myLRP = LPR();
LPR myLPR = LPR();

namedWindow("LPR", CV_WINDOW_NORMAL);

myLRP.Standard(STANDARD_PATH, FeatureVec);
myLPR.Standard(STANDARD_PATH, FeatureVec);

for (int i = 0; i < ImgProvider.ImgNum; i++)
{
img = imread(ImgProvider.GetImgPath(i));
result = myLRP.Identify(img, IdentifyNeighbor);
result = myLPR.Identify(img, IdentifyNeighbor);

cout << "==========================" << endl;
cout << "LPR Result: "<< result << endl;
Expand Down

0 comments on commit c70c1c7

Please sign in to comment.