找回密码
 加入
搜索
查看: 5878|回复: 7

[图形处理] 如何识别一张图片上的数字?

  [复制链接]
发表于 2011-6-30 10:41:51 | 显示全部楼层 |阅读模式
如何识别一张图片上的数字?那位高手有算法,分享一下!
发表于 2011-6-30 12:39:41 | 显示全部楼层
曾经设计过这样的一个算法。
另外,如果你贴上图片的话可能问题会比较容易解决
发表于 2011-6-30 12:39:44 | 显示全部楼层
本帖最后由 tryhi 于 2011-6-30 16:00 编辑

这一个5*8的像素组成的数字根据其中七点(不知道能不能用6点,反正我最少想出七点)判断出数字。

If $numx1 = 1 And $numx2 = 0 And $numx3 = 0 And $numx4 = 0 And $numx5 = 0 And $numx6 = 0 And $numx7 = 0 Then Return 0
If $numx1 = 0 And $numx2 = 0 And $numx3 = 0 And $numx4 = 1 And $numx5 = 0 And $numx6 = 1 And $numx7 = 0 Then Return 1
If $numx1 = 0 And $numx2 = 0 And $numx3 = 0 And $numx4 = 1 And $numx5 = 0 And $numx6 = 0 And $numx7 = 1 Then Return 2
If $numx1 = 0 And $numx2 = 0 And $numx3 = 0 And $numx4 = 0 And $numx5 = 0 And $numx6 = 1 And $numx7 = 0 Then Return 3
If $numx1 = 0 And $numx2 = 1 And $numx3 = 0 And $numx4 = 0 And $numx5 = 0 And $numx6 = 0 And $numx7 = 1 Then Return 4
If $numx1 = 1 And $numx2 = 1 And $numx3 = 1 And $numx4 = 0 And $numx5 = 0 And $numx6 = 1 And $numx7 = 0 Then Return 5
If $numx1 = 1 And $numx2 = 1 And $numx3 = 0 And $numx4 = 0 And $numx5 = 0 And $numx6 = 1 And $numx7 = 0 Then Return 6
If $numx1 = 0 And $numx2 = 0 And $numx3 = 1 And $numx4 = 1 And $numx5 = 0 And $numx6 = 1 And $numx7 = 0 Then Return 7
If $numx1 = 0 And $numx2 = 1 And $numx3 = 0 And $numx4 = 0 And $numx5 = 0 And $numx6 = 1 And $numx7 = 0 Then Return 8
If $numx1 = 1 And $numx2 = 0 And $numx3 = 0 And $numx4 = 1 And $numx5 = 1 And $numx6 = 0 And $numx7 = 0 Then Return 9
发表于 2011-6-30 13:31:11 | 显示全部楼层
验证码???
 楼主| 发表于 2011-7-4 20:45:15 | 显示全部楼层
不是,看来这个问题比较复杂,打算换一种思路来解顽皮遇到的问题了
发表于 2011-7-6 01:59:08 | 显示全部楼层
这一个5*8的像素组成的数字根据其中七点(不知道能不能用6点,反正我最少想出七点)判断出数字。
tryhi 发表于 2011-6-30 12:39


请问,你这算法是基于哪种字体的?能有通用的算法吗?
发表于 2011-7-10 14:17:38 | 显示全部楼层
楼主想做验证码么???
发表于 2011-7-11 17:53:39 | 显示全部楼层
请问,你这算法是基于哪种字体的?能有通用的算法吗?
easefull 发表于 2011-7-6 01:59



    字体我忘了,好像跟右下角的时间同种字体,没有通用性,必须5x8,而且是确定字体,可惜我确定点的分析过程被我删了,不然对你应该有用。我这个月不用电脑,所以没办法详细说了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-14 14:11 , Processed in 0.075697 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表