NIMBUZZ TOOLS FORUM-2016
Kєяλℓλ-ßυzZ ►☻◄ ƒøяυλ⁄(-2016

✽✽✽✽✽✽✽✽✽✽✽✽ нι gυєѕт ✽✽✽✽✽✽✽✽✽✽✽✽✽✽

♚♚♚♚ωєℓ¢σмє тσ ♚kєяαℓα♕ßυzz♚ zσηє♚♚♚♚

ρℓєαѕє яєgιѕтєя тσ gєт ƒυℓℓ α¢¢єѕѕ αη∂ ∂σωηℓσα∂ ѕтυƒƒ . σηℓү яεgιsтεяε∂ мεмвεя αℓℓσωε∂ vιεω sρεcιαℓ zσηε αη∂ ∂σωηℓσα∂ sтυғғ.

тнαηк уσυ

вαℓυ кяιsнηα !
Top posters
330 Posts - 27%
275 Posts - 23%
127 Posts - 11%
107 Posts - 9%
69 Posts - 6%
54 Posts - 4%
53 Posts - 4%
53 Posts - 4%
51 Posts - 4%
Top posting users this week
Top posting users this month

Share
View previous topicGo downView next topic
avatar
KßZ ►☻◄ ƒøяυλ⁄(-мємвєя
KßZ ►☻◄ ƒøяυλ⁄(-мємвєя
samir shrilimkar
POSTS : 17
REPUTATION : 3
KBZ TEAM POINTS : 35
JOIN DATE : 2015-09-17
View user profile

Topic How To Recognise Captcha In C# With OCR Testract Engine

on Sun Dec 27, 2015 7:19 am
1. Step Creat A form And Drop Down A pictureBox on Form And Two TextBox One For Captcha Image Url And Another For Captcha Recognise Answer
2. Step Fisrt Of all Add tessnet2_32.dll in Your Refrance Library With Project. 
3. Step Copy All Code  Below Than Paste It on Your Project.



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using tessnet2;

namespace Captch_Recogniser
{
    public partial class Form1 : Form
    {
       public Form1()
        {
            InitializeComponent();
        }
      string session = string.Empty;
       Tesseract ocr = new Tesseract();


       private void loadcaptcha() // Add Fuction For Get Captcha Image and Reply In A textBox
        {
            try
            {
                session = string.Empty;
                Random r = new Random();
                for (int i = 0; i < 9; i++)
                {
                    session += "abcdefghijklmnopqrstuvwxyz"[r.Next(10)]; 
                }
                pictureBox1.ImageLocation = "http://siteAddress.com/captcha" + session;
                pictureBox1.Load();
                var image = new Bitmap(pictureBox1.Image);
                Tesseract ocr = new Tesseract();
                ocr.SetVariable("tessedit_char_whitelist", "abcdefghijklmnopqrstuvwxyz");// Here tessedit_char_whitelist Use For Recognise Only Alphabates wich is Followed by "...
" After Comma , //
                ocr.Init(@"C:\Users\Admin\Desktop\Captcha_Recognise\tessdata", "eng", false);   //Testract Engine Address wich is save in tessdata Folder Andd tessdata Folder must be add in Your Project Folder Without Rename It //
                var result = ocr.DoOCR(image, Rectangle.Empty);
                string ad = "";
                foreach (Word word in result)
                    ad += word.Text;
                txtcap.Text = ad;// txtcap.Text is Captcha Reply TextBox
                System.Threading.Thread.Sleep(2000);
               
            }
            catch { }
        }
  }


}







Download Link For tessdata Captcha Recognisation Engine :  https://www.mediafire.com/?4z21z4rs6ataf4n




Download tessnet2_32.dll From Here : https://www.mediafire.com/?9jcn1a2mkm5jwk6




For More Add Me At [You must be registered and logged in to see this link.]
View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum