| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3586 人关注过本帖
标题:如何识别字母的验证码?
只看楼主 加入收藏
hiop
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-6-30
收藏
 问题点数:0 回复次数:19 
如何识别字母的验证码?
单纯为了学习技术,从最简单的情况分析,无扭曲无变形无干扰
数字的特征库如下,那字母的特征库如何建立比较有效?
public static int[] number6 = {
0,0,1,1,1,1,
0,1,0,0,0,0,
1,0,0,0,0,0,
1,0,1,1,0,0,
1,1,0,0,1,0,
1,0,0,0,0,1,
1,0,0,0,0,1,
0,1,0,0,1,0,
0,0,1,1,0,0
};

public static int[] number0 = {
0,0,1,1,0,0,
0,1,0,0,1,0,
1,0,0,0,0,1,
1,0,0,0,0,1,
1,0,0,0,0,1,
1,0,0,0,0,1,
1,0,0,0,0,1,
0,1,0,0,1,0,
0,0,1,1,0,0
};

public static int[] number1 = {
0,0,1,1,0,0,
0,1,0,1,0,0,
0,0,0,1,0,0,
0,0,0,1,0,0,
0,0,0,1,0,0,
0,0,0,1,0,0,
0,0,0,1,0,0,
0,0,0,1,0,0,
0,1,1,1,1,1
};

public static int[] number2 = {
1,1,1,1,0,0,
0,0,0,0,1,0,
0,0,0,0,1,0,
0,0,0,0,1,0,
0,0,0,1,0,0,
0,0,1,0,0,0,
0,1,0,0,0,0,
1,0,0,0,0,0,
1,1,1,1,1,0
};

public static int[] number3 = {
1,1,1,1,0,0,
0,0,0,0,1,0,
0,0,0,0,1,0,
0,0,0,1,0,0,
0,1,1,0,0,0,
0,0,0,1,0,0,
0,0,0,0,1,0,
0,0,0,0,1,0,
0,1,1,1,0,0
};

public static int[] number4 = {
0,0,0,0,1,0,
0,0,0,1,1,0,
0,0,1,0,1,0,
0,1,0,0,1,0,
1,0,0,0,1,0,
1,1,1,1,1,1,
0,0,0,0,1,0,
0,0,0,0,1,0,
0,0,0,0,1,0
};

public static int[] number5 = {
1,1,1,1,1,0,
1,0,0,0,0,0,
1,0,0,0,0,0,
1,1,1,0,0,0,
0,0,0,1,0,0,
0,0,0,0,1,0,
0,0,0,0,1,0,
0,0,0,1,0,0,
1,1,1,0,0,0
};

public static int[] number7 = {
1,1,1,1,1,1,
0,0,0,0,0,1,
0,0,0,0,1,0,
0,0,0,1,0,0,
0,0,0,1,0,0,
0,0,1,0,0,0,
0,0,1,0,0,0,
0,1,0,0,0,0,
0,1,0,0,0,0
};

public static int[] number8 = {
0,1,1,1,1,0,
1,0,0,0,0,1,
1,0,0,0,0,1,
0,1,0,0,1,0,
0,1,1,1,1,0,
1,0,0,0,0,1,
1,0,0,0,0,1,
1,0,0,0,0,1,
0,1,1,1,1,0
};

public static int[] number9 = {
0,0,1,1,0,0,
0,1,0,0,1,0,
1,0,0,0,0,1,
1,0,0,0,0,1,
0,1,0,0,1,1,
0,0,1,1,0,1,
0,0,0,0,0,1,
0,0,0,0,1,0,
1,1,1,1,0,0
};

搜索更多相关主题的帖子: 字母 验证 
2007-06-30 21:56
神vLinux飘飘x
Rank: 2
等 级:新手上路
威 望:3
帖 子:436
专家分:0
注 册:2007-1-4
收藏
得分:0 
用程序截取下来。

首先判断4个位置的字母应该出现在那个矩形的方框中,然后把每个方框中的0-1像素取下,这样就得到模板了
2007-07-01 01:39
hiop
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-6-30
收藏
得分:0 
那是不是说要基于验证码的图片规律来取得模板?
OK,这一步基本知道了
那更复杂的情况有扭曲的时候要怎么处理?
2007-07-01 07:02
hiop
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-6-30
收藏
得分:0 
二值化->消噪->腐蚀->消噪->膨胀

其中的腐蚀和膨胀是怎么处理的?
2007-07-01 07:25
神vLinux飘飘x
Rank: 2
等 级:新手上路
威 望:3
帖 子:436
专家分:0
注 册:2007-1-4
收藏
得分:0 
呵呵,这个要说就麻烦了。我最近要考试,而且又不是专门研究图像识别
2007-07-01 10:14
hiop
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-6-30
收藏
得分:0 
000001100000
000001100000
000011110000
000011110000
000010010000
000110011000
000110011000
000110011000
001100001100
001100001100
001111111100
001111111100
011000000110
011000000110
011000000110
110000000011
110000000011
000000000000


这个怎么样?
2007-07-01 10:18
hiop
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-6-30
收藏
得分:0 
烟雨平生
他对验证码识别应该比较熟悉
2007-07-01 10:19
hiop
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-6-30
收藏
得分:0 
分辨率太高,比较识别速度就慢
太低又不足以识别
取什么值比较合适是个问题
2007-07-01 10:23
hiop
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-6-30
收藏
得分:0 
000001100000
000001100000
000011110000
000011110000
000010010000
000110011000
000110011000
000110011000
001100001100
001100001100
001111111100
001111111100
011000000110
011000000110
011000000110
110000000011
110000000011
000000000000

111111110000
111111111000
110000011000
110000001100
110000001100
110000001100
110000001100
110000011000
111111110000
111111110000
110000011100
110000000110
110000000110
110000000110
110000000110
110000001110
111111111100
111111110000

000011111000
000111111100
001100001110
011000000110
011000000011
110000000011
110000000011
110000000000
110000000000
110000000000
110000000000
110000000011
110000000011
011000000011
011000000110
011100001110
001111111100
000011111000

111111100000
111111111000
110000111100
110000001100
110000001100
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000001100
110000001100
110000111000
111111110000
111111100000

111111111100
111111111100
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
111111111100
111111111100
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
111111111110
111111111110

111111111110
111111111110
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
111111111000
111111111000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000

000011110000
001111111000
011100001100
011000000110
011000000110
110000000110
110000000000
110000000000
110000000000
110000111110
110000111110
110000000110
110000000110
111000000110
011000000110
011100001110
001111111110
000011110110

110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
111111111110
111111111110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110

000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000

000000001100
000000001100
000000001100
000000001100
000000001100
000000001100
000000001100
000000001100
000000001100
000000001100
000000001100
110000001100
110000001100
110000001100
110000001100
011000011000
011111111000
000111100000

110000000111
110000001110
110000011100
110000111000
110001110000
110001100000
110011000000
110111000000
111111000000
111101100000
111001110000
110000110000
110000011000
110000011000
110000001100
110000001110
110000000110
110000000111

110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
111111111110
111111111110

111000001110
111000001110
111000001110
111100011110
111100011110
111100011110
111100011110
110110110110
110110110110
110110110110
110110110110
110111110110
110011100110
110011100110
110011100110
110011100110
110011100110
110001000110

110000000110
111000000110
111000000110
111100000110
111100000110
110110000110
110110000110
110011000110
110011000110
110001100110
110001100110
110000110110
110000110110
110000011110
110000011110
110000001110
110000001110
110000000110

000011110000
001111111100
011100001110
011000000110
011000000110
110000000011
110000000011
110000000011
110000000011
110000000011
110000000011
110000000011
110000000011
110000000011
011000000110
011000000110
011100001110
001111111100

111111111100
110000001100
110000000110
110000000110
110000000110
110000000110
110000000110
110000001100
111111111000
111111110000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000
110000000000

000111110000
001111111000
011100011100
011000001100
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000100110
110000110110
110000111110
011000111100
011100011100
001111111100
000111101110
000000000100

111111110000
111111111100
110000011100
110000000110
110000000110
110000000110
110000000110
110000001100
111111111100
111111110000
110000110000
110000110000
110000011000
110000011000
110000001100
110000001110
110000000110
110000000111

000111110000
011111111000
011000011000
110000001100
110000001100
110000000000
111000000000
011110000000
000111110000
000001111000
000000011100
000000001110
110000000110
110000000110
110000000110
011100001100
011111111100
000111110000

111111111100
111111111100
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000
000011000000

110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
110000000110
011000001100
011111111100
000111110000

110000000011
110000000011
011000000110
011000000110
011000000110
001100001100
001100001100
001100001100
001100001100
000110011000
000110011000
000110011000
000110011000
000011110000
000011110000
000011110000
000001100000
000001100000

110001100011
110001100011
110011110011
110011110011
010011110010
011011110110
011011110110
011010010110
011010010110
011110011110
011110011110
011110011110
011110011110
001110011100
001100001100
001100001100
001100001100
000000000000

011000000110
001100001100
001100001100
000110011000
000110011000
000011110000
000011110000
000001100000
000001100000
000011110000
000011110000
000110011000
000110011000
001100001100
001100001100
011000000110
011000000110
110000000011

110000000011
011000000110
011100000110
001100001100
001110011100
000110011000
000111111000
000011110000
000011110000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000

011111111110
011111111110
000000001110
000000011100
000000011000
000000111000
000000110000
000001110000
000011100000
000011000000
000111000000
000110000000
001110000000
011100000000
011000000000
111000000000
111111111110
111111111110




最简单的情况
2007-07-01 11:06
神vLinux飘飘x
Rank: 2
等 级:新手上路
威 望:3
帖 子:436
专家分:0
注 册:2007-1-4
收藏
得分:0 
我观察了 一下,你就匹配每个模板的第一行就行了。
2007-07-01 11:46
快速回复:如何识别字母的验证码?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.042728 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved