今天想刷个投票页面,需要识别验证码,网上搜啊,找到一个图片验证码识别类,改动一下用起来很舒服啊^_^ 因为每种类验证码的字符表都不一样,所以需要事先得到此种验证码的字符表 方法呢,就是在调试模式输出一下就看到了 代码如下 UnCodeBase.cs using System; using System.Collections.Generic; using System.Text; using System.Collections; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; namespace BallotAiying2 { class UnCodebase { public Bitmap bmpobj; public UnCodebase(Bitmap pic) { // if (pic.PixelFormat == PixelFormat.Format8bppIndexed) bmpobj = new Bitmap(pic); //转换为Format32bppRgb } /// /// 根据RGB,计算灰度值 /// /// Color值 /// 灰度值,整型 private int GetGrayNumColor(System.Drawing.Color posClr) [...]
强大的图片验证码识别代码
今天想刷个投票页面,需要识别验证码,网上搜啊,找到一个图片验证码识别类,改动一下用起来很舒服啊^_^ 因为每种类验证码的字符表都不一样,所以需要事先得到此种验证码的字符表 方法呢,就是在调试模式输出一下就看到了 代码如下 UnCodeBase.cs using System; using System.Collections.Generic; using System.Text; using System.Collections; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; namespace BallotAiying2 { class UnCodebase { public Bitmap bmpobj; public UnCodebase(Bitmap pic) { // if (pic.PixelFormat == PixelFormat.Format8bppIndexed) bmpobj = new Bitmap(pic); //转换为Format32bppRgb } /// /// 根据RGB,计算灰度值 /// /// Color值 /// 灰度值,整型 private int GetGrayNumColor(System.Drawing.Color posClr) [...]
点这里阅读全文