完整的字符切割
- 原理:垂直投影。
- 限制切割出来的字符宽度要大于车牌总宽度的七分之一。
- http://blog.csdn.net/lxx_123456/article/details/79078570该篇博客无法对汉字进行完整切割,本次进行改善,可把车牌进行完整的字符切割。
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
using namespace cv;
using namespace std;
vector<Mat> verticalProjectionMat(Mat Image)
{
int perPixelValue;
int width = Image.cols;
int height = Image.rows;
printf("图片的宽%d图片的高%d", height,width);
int* projectValArry = new int[width];
memset(projectValArry, 0, width * 4);