OCR running error
I want to convert tiff to txt file,but error is occur
richTextBox1.Text = string.Empty;
MODI.Document doc1 = new MODI.Document();
doc1.Create("C:\\Users\\Dhirendra\\Desktop\\file con\\images_3_.tiff");
doc1.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true,true);---Ocr erroor Here
string strText = String.Empty;
MODI.Image img = (MODI.Image)doc1.Images[0];
MODI.Layout layout = img.Layout;
for (int i = 0; i < layout.Words.Count; i++)
{
MODI.Word word = (MODI.Word)layout.Words[i];
if (extractedText.Length > 0)
{
extractedText += " ";
}
extractedText += word.Text;
richTextBox1.Text = extractedText;
// File.Delete("C:\\Users\\Dhirendra\\Desktop\\file con\\Raster_and_Vector.tiff");
}
layout = null;
img = null; // !!!
doc1.Close(false);
doc1 = null;
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
GC.WaitForPendingFinalizers();
//textBox1.Text = strText;
richTextBox1.Text = strText;
File.Delete("C:\\Users\\Dhirendra\\Desktop\\file con\\images_3_.tiff");
7 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jony GreenPosted Oct 18, 2015, 11:34 PM
Sameer AlOdwanPosted Jun 17, 2014, 10:30 AM
I did a quick search and found the following article that you can start from:
http://www.codeproject.com/Articles/10130/OCR-with-Microsoft-Office
I'm little more familiar with leadtools OCR and it gave good & accurate results from what I remember.
If you still face problems after seeing the article above, please provide more details so that the community can help you.
Ring ZhongPosted Dec 23, 2013, 2:49 AM
If the text is stored in bitmap format, then OCR is the technology you need to use to extract text from it.
Also you can try the method,
http://www.codeproject.com/Articles/15186/Bitonal-TIFF-Image-Converter-for-NET
arron leePosted Dec 22, 2013, 11:04 PM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Yiigo.Imaging.Basic.Convert;
using Yiigo.Imaging.TIFF;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public static string FolderName = "c:/";
private void button1_Click(object sender, EventArgs e)
{
ImageConverter.ConvertImageFormat("c:/demo.tif", "c:/image.text");
Or you can also google it and select an OCR whose way of processing is simple
and fast to help you with the related work. Remember to check its free trial
package first if possible. I hope you success. Good luck.
Best regards,
Arron
barcode addictPosted Nov 27, 2013, 1:47 AM
Sanjeeb LenkaPosted Jun 27, 2013, 1:21 AM
http://www.rasteredge.com/how-to/csharp-imaging/tiff-convert-text/
dsfd fdsfPosted Jun 26, 2013, 11:59 PM