使用 vb.net 如何从验证码图像中提取文本
你的一些研究可以走很长的路。 为了回答您的问题,有一项名为"验证码死亡"(http://www.deathbycaptcha.eu)的服务。 他们有一个.NET API,而且非常可靠。
下面是用于解码验证码的示例 C# 代码:
// Do not forget to reference DeathByCaptcha.dll in your project!
using DeathByCaptcha;
// Put your DBC credentials here.
// Use HttpClient class if you want to use HTTP API.
Client client = (Client) new SocketClient(USERNAME, PASSWORD);
// Put your CAPTCHA file name, stream, or vector of bytes,
// and desired timeout (in seconds) here:
Captcha captcha = client.Decode(CAPTCHA_FILE_NAME, TIMEOUT);
if (captcha.Solved && captcha.Correct) {
Console.WriteLine("CAPTCHA {0}: {1}", captcha.Id, captcha.Text);
// Report the CAPTCHA if solved incorrectly.
// Make sure the CAPTCHA was in fact incorrectly solved!
if ( ... ) {
client.Report(captcha);
}
}
// Repeat for other CAPTCHAs
易于翻译成 VB