-1

使用 vb.net 如何从验证码图像中提取文本

4

1 回答 1

2

你的一点研究可以有很长的路要走。为了回答您的问题,有一项名为“验证码死亡”的服务 (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

于 2012-05-24T11:59:45.253 回答