TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sakshi tiwari
NA
16
5.9k
Image to text conversion
Feb 9 2017 5:00 AM
I am trying to convert image to text using emguCV but it is showing me error tess.reconize instance not set for reference. My code is
using Emgu.CV;
using Emgu.Util;
using Emgu.CV.CvEnum;
using Emgu.CV.OCR;
using Emgu.CV.Structure;
using Emgu.CV.UI;
using Emgu.CV.Util;
namespace jo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Tesseract tess;
Image img;
private void button1_Click(object sender, EventArgs e)
{
DialogResult dr = openFileDialog1.ShowDialog();
if (dr == DialogResult.OK)
{
textBox1.Text = openFileDialog1.FileName;
}
img = Image.FromFile(openFileDialog1.FileName);
pictureBox1.Image = img; pro(); textBox2.Text = tess.GetText();
}
public void load()
{
try
{
tess = new Tesseract("tessdata", "eng", Tesseract.OcrEngineMode.OEM_DEFAULT);
}
catch (Exception ex)
{
MessageBox.Show(ex.GetBaseException().ToString());
} }
private void Form1_Load(object sender, EventArgs e)
{ load(); }
public void pro() { tess.Recognize<Bgr>(new Image<Bgr, byte>(textBox1.Text)); } } }?
Reply
Answers (
1
)
textmode week of textbox
How can i add a tab in a text ( string)