vb.net を使用してキャプチャ画像からテキストを抽出する方法
8281 次
1 に答える
2
あなたの側でのちょっとした調査は、大いに役立つ可能性があります。あなたの質問に答えるために、「Death By Captcha」(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 に答える