QQ的验证码文字识别
来源:互联网 发布:腾讯视频软件下载 编辑:程序博客网 时间:2024/04/30 02:58
添加对应命名空间
using System.Drawing;
using System.Drawing.Imaging;
using System.Net;
using System.IO;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://ptlogin2.qq.com/getimage?aid=15000102&0.3881952033255094");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream requestStream = response.GetResponseStream();
Bitmap sourceBm = new Bitmap(requestStream);
//去色
for (int i = 0; i < sourceBm.Width; i++)
{
for (int j = 0; j < sourceBm.Height; j++)
{
Color c = sourceBm.GetPixel(i, j);
int l = (int)(c.R * 0.3 + c.G * 0.59 + c.B * 0.11);
sourceBm.SetPixel(i, j, Color.FromArgb(l, l, l));
}
}
//去杂色
for (int i = 0; i < sourceBm.Width; i++)
{
for (int j = 0; j < sourceBm.Height; j++)
{
Color c = sourceBm.GetPixel(i, j);
if(c.R>=122)
sourceBm.SetPixel(i, j, Color.FromArgb(255, 255, 255));
else
sourceBm.SetPixel(i, j, Color.FromArgb(0, 0, 0));
}
}
MemoryStream ms = new MemoryStream();
sourceBm.Save(ms, ImageFormat.Gif);
sourceBm.Dispose();
requestStream.Dispose();
Response.ClearContent();
Response.ContentType = "image/gif";
Response.BinaryWrite(ms.ToArray());
ms.Dispose();
Response.End();
在获取验证码文字的特征码时遇到问题,QQ的验证码文字都连在一起,程序无法自动获取文字的特征码。看来验证码使用连字这个方式极大的提高了自动识别的门槛。
图片地址:http://captcha.qq.com/getimage
- QQ的验证码文字识别
- qq验证码识别
- QQ验证码识别源代码
- qq验证码识别系统
- 验证码识别参考,qq验证码识别的一个源代码,现在已不可用,但是可以作为参考
- Python 批量下载验证码图片及切割验证码图片,识别验证码,并以识别的文字重命令验证码
- 验证码的识别
- 使用轮廓以及扇形扫描实现qq的验证码识别
- QQ验证码识别源代码(C#/NET1.1)
- QQ验证码识别源代码(C#/NET1.1)
- QQ验证码识别源代码(C#/NET1.1)
- QQ验证码识别源代码(C#/NET1.1)
- Delphi QQ网页登陆验证码获取显示(非识别)
- QQ验证码识别源代码(DOT NET1.1)
- QQ验证码识别源代码(C#/NET1.1)
- QQ验证码识别(版本较旧,思路才是王道)
- QQ验证码识别源代码(C#/NET1.1)
- QQ验证码识别代码,现在已经不可用
- 淘宝网UED官方博客
- 设置 gridview 数据 居中 显示
- csv文件在excel中长数字显示为#的问题-08-21-2013
- VC中的tab控件的用法
- grails--下拉菜单的制作
- QQ的验证码文字识别
- CComboBox控件详解
- 驱动学习笔记(二)
- 淘宝中间件团队博客
- "The Old Man and the Sea"-读书笔记(20130908)
- [K/3Cloud]DBServiceHelper.ExecuteDataSet(this.Context, sql)) 返回数据问题
- VC中StatusBar使用方法
- QQ验证码识别源代码(C#/NET1.1)
- hrbust1869比某个数大的最小的数(set upper_bound)