string Results = string.Empty; string path = @"D:\OCR\test.jpg"; // string path = Server.MapPath("~/Images/test.jpg"); Bitmap image = new Bitmap(path); tessnet2.Tesseract ocr = new tessnet2.Tesseract(); ocr.Init(null, "eng", false); // To use correct tessdata //To recognise the text in the selected image area (x cordinate,y cordinate,width,height) if (rdSelectedAreaTextImage.Checked == true) { int xCoordinate = int.Parse(txtXCooridnate.Text); int yCoordinate = int.Parse(txtYCooridnate.Text); List<tessnet2.Word> r1 = ocr.DoOCR(image, new Rectangle(xCoordinate, yCoordinate, 1187, 623)); foreach (tessnet2.Word word in r1) //if (word.Text.Contains("About")) { // Console.WriteLine("{0} : {1}", word.Confidence, word.Text); Results += word.Text; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)