资源简介
基于opencv实现车牌识别之字符定位部分

代码片段和文件信息
#include
#include
#include
#include
#include
#include
#include “lib/normal.h“
#include “lib/cutchar.h“
#define DEBUG
#ifdef DEBUG
#define DE(format ...) printf(format ## __VA_ARGS__)
#else
#define DE(format ...) while(0)
#endif
int main(int argc char** argv){
Mat img img_2 img_3 img_4 img_5 img_w;
IplImage pI_1;
IplImage pI_2;
int width reWidth=30 wWidth=20 pic_width;
int height reHeight=100 wHeight = 20;
char str[2];
int i = 0 j = 0 k;
int threshold = 0 pic_ArrNumber tmp;
int vArr[reHeight];
int **pic_Arr;
CvScalar s1;
float percentage = 0.0;
if(argc < 2){
DE(“Please input argv[1]\n“);
return -1;
}
img = cv::imread(argv[1]);
namedWindow(str);
imshow(str img);
width = img.rows;
height = img.cols;
pic_gray(img img_2);
threshold = histogram_Calculate(img_2 5);
DE(“threshold:%d\n“threshold);
pic_Thresholding(img_2 threshold);
detectionchange(img_2 img_3 7);
carCard_Resize(img_3 img_4 reWidth reHeight);
pic_Thresholding(img_4 60);
pI_1 = img_4;
verProjection_calculate(img_4 vArr reHeight);
pic_Arr = verProjection_cut(vArr reHeight &pic_ArrNumber);
for(i=0; i< pic_ArrNumber; i++){
printf(“pic_ArrNumber:%d: %d %d\n“ pic_ArrNumber pic_Arr[i][0] pic_Arr[i][1]);
pic_width = pic_Arr[i][1] - pic_Arr[i][0];
if(pic_width < 3){
continue;
}
img_5 = cv::Mat(reWidth pic_Arr[i][1] - pic_Arr[i][0] CV_8UC1 1);
pI_2 = img_5;
for(j=0; j for(k=pic_Arr[i][0]; k s1 = cvGet2D(&pI_1 j k);
cvSet2D(&pI_2 j k-pic_Arr[i][0] s1);
}
}
percentage = pixelPercentage(img_5);
if(percentage < 0.1){
continue;
}
if(pic_width < 6){
printf(“the %d is 1\n“ i);
continue;
}
carCard_Resize(img_5 img_w wWidth wHeight);
pic_Thresholding(img_w 60);
sprintf(str “%d“ i+20);
namedWindow(str);
imshow(str img_w);
}
sprintf(str “%d“ i+3);
namedWindow(str);
imshow(str img_4);
waitKey(0);
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 82562 2015-02-11 13:24 字符分割\1_cutchar\cutchar
文件 2392 2015-02-09 20:17 字符分割\1_cutchar\large.jpg
文件 2708 2015-02-11 13:23 字符分割\1_cutchar\lib\cutchar.cpp
文件 731 2015-02-11 09:39 字符分割\1_cutchar\lib\cutchar.h
文件 6190 2015-02-10 09:53 字符分割\1_cutchar\lib\normal.cpp
文件 1156 2015-02-09 15:08 字符分割\1_cutchar\lib\normal.h
文件 2630 2015-02-11 09:01 字符分割\1_cutchar\lib\_2X68R~7
文件 2085 2015-02-11 13:24 字符分割\1_cutchar\main.cpp
文件 370 2015-02-09 16:13 字符分割\1_cutchar\Makefile
文件 13571 2015-02-09 20:16 字符分割\1_cutchar\tmp\tmp
文件 1245 2015-02-09 20:15 字符分割\1_cutchar\tmp\tmp.cpp
文件 1466 2015-02-09 14:46 字符分割\carcard\1.jpg
文件 2847 2015-02-09 14:46 字符分割\carcard\2.jpg
文件 2111 2015-02-09 14:46 字符分割\carcard\3.jpg
文件 10921 2015-02-09 14:46 字符分割\carcard\4.jpg
文件 2682 2015-02-09 14:47 字符分割\carcard\5.jpg
文件 1654 2015-02-09 14:47 字符分割\carcard\6.jpg
文件 13347 2015-02-09 14:47 字符分割\carcard\7.jpg
文件 2922 2015-02-09 14:47 字符分割\carcard\9.jpg
文件 2541 2015-02-09 20:22 字符分割\large.jpg
目录 0 2015-02-11 13:36 字符分割\1_cutchar\lib
目录 0 2015-02-11 13:36 字符分割\1_cutchar\tmp
目录 0 2015-02-11 13:36 字符分割\1_cutchar
目录 0 2015-02-11 13:36 字符分割\carcard
目录 0 2015-02-11 13:36 字符分割
----------- --------- ---------- ----- ----
156131 25
相关资源
- 基于OpenCV的数字识别468815
- 使用opencv去掉二值化图像中黑色面积
- opencv环境配置
- win10 64位下编译的opencv4.5.5库,opencv
- Halcon车牌识别
- 百度API车牌识别DEMO.rar
- NVIDIAOpticalFlowSDK-79c6cee80a2df9a196f20afd6
- opencv_contrib-3.4.0.zip
- opencv2.4.9源码分析——SIFT
- 用两个摄像头实现,双目标定,双目
- opencv_traincascade训练分类器,手势识别
- opencv3.0交叉编译用parallel.cpp
- 基于opencv的图像识别识别图像中的色
- 基于openCV的识别特定颜色区域
- 基于OpenCV的分水岭算法实现
- QT+opencv+OCR 身份证号码,银行卡号识别
- opencv视频特定颜色区域识别
- 把RGB转换为HSV和HSI然后根据黄色和蓝
- opencv视觉测距
- 基于Qt和opencv的身份证号码识别系统
- 易泊车牌识别停车计费系统介绍
- opencv_ffmpeg249.dll
- SfM稀疏三维点云重建--完整工程文件
- 基于opencv的数人头程序源代码
- 利用OpenCV中的Stitcher类实现全景图像拼
- opencv实现的sift算法源码,包含了图像
- openCV 上的小波变换
- 基于OPENCV的车牌识别系统设计
- 617张国内车牌60-17bmp图片用于OpenCV正样
- hog特征提取,c版本代码
评论
共有 条评论