Added missing "std::" prefix to plate_detect.cpp

v1.6alpha
Micooz 10 years ago
parent 67fd93400a
commit f5f45759e3

@ -41,7 +41,7 @@ Mat colorMatch(const Mat& src, Mat& match, const Color r,
// 转到HSV空间进行处理颜色搜索主要使用的是H分量进行蓝色与黄色的匹配工作
cvtColor(src, src_hsv, CV_BGR2HSV);
vector<Mat> hsvSplit;
std::vector<Mat> hsvSplit;
split(src_hsv, hsvSplit);
equalizeHist(hsvSplit[2], hsvSplit[2]);
merge(hsvSplit, src_hsv);
@ -141,7 +141,7 @@ Mat colorMatch(const Mat& src, Mat& match, const Color r,
// 获取颜色匹配后的二值灰度图
Mat src_grey;
vector<Mat> hsvSplit_done;
std::vector<Mat> hsvSplit_done;
split(src_hsv, hsvSplit_done);
src_grey = hsvSplit_done[2];
@ -366,7 +366,7 @@ void clearLiuDingOnly(Mat& img) {
//计算每行元素的阶跃数如果小于X认为是柳丁将此行全部填0涂黑
// X的推荐值为可根据实际调整
bool clearLiuDing(Mat& img) {
vector<float> fJump;
std::vector<float> fJump;
int whiteCount = 0;
const int x = 7;
Mat jump = Mat::zeros(1, img.rows, CV_32F);
@ -510,7 +510,7 @@ Mat histeq(Mat in) {
Mat out(in.size(), in.type());
if (in.channels() == 3) {
Mat hsv;
vector<Mat> hsvSplit;
std::vector<Mat> hsvSplit;
cvtColor(in, hsv, CV_BGR2HSV);
split(hsv, hsvSplit);
equalizeHist(hsvSplit[2], hsvSplit[2]);

@ -1,4 +1,4 @@
#include "easypr/plate.h"
#include "easypr/core/plate.h"
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides

@ -1,13 +1,9 @@
#include "easypr/core/plate_detect.h"
#include "easypr/util/util.h"
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides
*/
namespace easypr {
CPlateDetect::CPlateDetect() {
// cout << "CPlateDetect" << endl;
m_plateLocate = new CPlateLocate();
m_plateJudge = new CPlateJudge();
@ -20,18 +16,16 @@ CPlateDetect::~CPlateDetect() {
SAFE_RELEASE(m_plateJudge);
}
void CPlateDetect::LoadSVM(string s) { m_plateJudge->LoadModel(s.c_str()); }
int CPlateDetect::plateDetect(Mat src, vector<CPlate>& resultVec,
int CPlateDetect::plateDetect(Mat src, std::vector<CPlate>& resultVec,
bool showDetectArea, int index) {
vector<Mat> resultPlates;
std::vector<Mat> resultPlates;
vector<CPlate> color_Plates;
vector<CPlate> sobel_Plates;
vector<CPlate> color_result_Plates;
vector<CPlate> sobel_result_Plates;
std::vector<CPlate> color_Plates;
std::vector<CPlate> sobel_Plates;
std::vector<CPlate> color_result_Plates;
std::vector<CPlate> sobel_result_Plates;
vector<CPlate> all_result_Plates;
std::vector<CPlate> all_result_Plates;
//如果颜色查找找到n个以上包含n个的车牌就不再进行Sobel查找了。
const int color_find_max = m_maxPlates;
@ -39,11 +33,6 @@ int CPlateDetect::plateDetect(Mat src, vector<CPlate>& resultVec,
m_plateLocate->plateColorLocate(src, color_Plates, index);
m_plateJudge->plateJudge(color_Plates, color_result_Plates);
// for (int i=0;i<color_Plates.size();++i)
//{
// color_result_Plates.push_back(color_Plates[i]);
//}
for (size_t i = 0; i < color_result_Plates.size(); i++) {
CPlate plate = color_result_Plates[i];
@ -56,11 +45,6 @@ int CPlateDetect::plateDetect(Mat src, vector<CPlate>& resultVec,
m_plateLocate->plateSobelLocate(src, sobel_Plates, index);
m_plateJudge->plateJudge(sobel_Plates, sobel_result_Plates);
/*for (int i=0;i<sobel_Plates.size();++i)
{
sobel_result_Plates.push_back(sobel_Plates[i]);
}*/
for (size_t i = 0; i < sobel_result_Plates.size(); i++) {
CPlate plate = sobel_result_Plates[i];
@ -138,4 +122,4 @@ int CPlateDetect::showResult(const Mat& result) {
return 0;
}
} /*! \namespace easypr*/
}
Loading…
Cancel
Save