Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: need online hotel managment project in .net Pin
Jason Gleim6-Sep-13 9:06
professionalJason Gleim6-Sep-13 9:06 
GeneralRe: need online hotel managment project in .net Pin
Eddy Vluggen6-Sep-13 13:41
professionalEddy Vluggen6-Sep-13 13:41 
GeneralRe: need online hotel managment project in .net Pin
Mycroft Holmes6-Sep-13 13:56
professionalMycroft Holmes6-Sep-13 13:56 
AnswerRe: need online hotel managment project in .net Pin
Abhinav S6-Sep-13 17:06
Abhinav S6-Sep-13 17:06 
AnswerRe: need online hotel managment project in .net Pin
BillWoodruff6-Sep-13 18:18
professionalBillWoodruff6-Sep-13 18:18 
GeneralRe: need online hotel managment project in .net Pin
Mycroft Holmes6-Sep-13 22:13
professionalMycroft Holmes6-Sep-13 22:13 
GeneralRe: need online hotel managment project in .net Pin
BillWoodruff7-Sep-13 19:31
professionalBillWoodruff7-Sep-13 19:31 
QuestionAt last i got this Tessnet2 ocr to work. Now how do i extract specific text/numbers from an image ? Pin
chocolade6-Sep-13 7:19
chocolade6-Sep-13 7:19 
This is the code that is working for me:

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

namespace OCR
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            string path = @"D:\timessquaretif.tif";
            Bitmap image = new Bitmap(path);
            Tesseract ocr = new Tesseract();
            ocr.SetVariable("tessedit_char_whitelist", "0123456789"); // If digit only
            ocr.Init(@"C:\TEMP\tessdata\tessdata", "eng", false); // To use correct tessdata
            List<tessnet2.Word> result = ocr.DoOCR(image, Rectangle.Empty);
            foreach (tessnet2.Word word in result)
                //Console.WriteLine("{0} : {1}", word.Confidence, word.Text);
            listBox1.Items.Add(string.Format("{0} : {1}", word.Confidence, word.Text));
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}



The problem is that in the listBox i see many numbers and near them words letters and chars.
In the image tiff one im using with my code there is on the bottom a Date and Time for example: September 5,13 | 6:06am

How can i extract only the date and time so in the listBox i will see on one line: September 5,13 6:06am or September 5 13 6:06am

Any ideas ?


Thanks.
AnswerRe: At last i got this Tessnet2 ocr to work. Now how do i extract specific text/numbers from an image ? Pin
Eddy Vluggen6-Sep-13 8:42
professionalEddy Vluggen6-Sep-13 8:42 
QuestionWindows Azure or Microsoft Sync Framework Pin
msr_codeproject5-Sep-13 22:30
msr_codeproject5-Sep-13 22:30 
AnswerRe: Windows Azure or Microsoft Sync Framework Pin
Richard MacCutchan5-Sep-13 23:44
mveRichard MacCutchan5-Sep-13 23:44 
AnswerRe: Windows Azure or Microsoft Sync Framework Pin
Jason Gleim6-Sep-13 5:06
professionalJason Gleim6-Sep-13 5:06 
Questionhow can i discover winodws server model manufacturer and serial number details using SNMP Pin
superselector5-Sep-13 18:20
superselector5-Sep-13 18:20 
AnswerRe: how can i discover winodws server model manufacturer and serial number details using SNMP Pin
jschell6-Sep-13 8:42
jschell6-Sep-13 8:42 
AnswerRe: how can i discover winodws server model manufacturer and serial number details using SNMP Pin
Dave Kreskowiak6-Sep-13 14:34
mveDave Kreskowiak6-Sep-13 14:34 
QuestionI cant make this ocr of microsoft to work in c# why ? please help me Pin
chocolade5-Sep-13 13:48
chocolade5-Sep-13 13:48 
AnswerRe: I cant make this ocr of microsoft to work in c# why ? please help me Pin
Brisingr Aerowing5-Sep-13 15:18
professionalBrisingr Aerowing5-Sep-13 15:18 
GeneralRe: I cant make this ocr of microsoft to work in c# why ? please help me Pin
chocolade5-Sep-13 16:48
chocolade5-Sep-13 16:48 
GeneralRe: I cant make this ocr of microsoft to work in c# why ? please help me Pin
Mycroft Holmes5-Sep-13 17:57
professionalMycroft Holmes5-Sep-13 17:57 
GeneralRe: I cant make this ocr of microsoft to work in c# why ? please help me Pin
Bernhard Hiller5-Sep-13 21:27
Bernhard Hiller5-Sep-13 21:27 
QuestionEFCaching Provider error "The provider did not return a DbSpatialServices instance." Pin
rafaelcn5-Sep-13 13:41
rafaelcn5-Sep-13 13:41 
SuggestionPeekyPokey - a USB board for h/w programming in .NET Pin
hanzibal25-Sep-13 6:54
hanzibal25-Sep-13 6:54 
GeneralRe: PeekyPokey - a USB board for h/w programming in .NET Pin
Thomas Daniels5-Sep-13 7:12
mentorThomas Daniels5-Sep-13 7:12 
GeneralRe: PeekyPokey - a USB board for h/w programming in .NET Pin
hanzibal25-Sep-13 7:29
hanzibal25-Sep-13 7:29 
Questionupdate a formview that allows paging (dynamic data website)‏ Pin
marounmm5-Sep-13 3:25
marounmm5-Sep-13 3:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.