在vb.net中将图像文件转换为文本 [英] Converting an image file to text in vb.net

查看:92
本文介绍了在vb.net中将图像文件转换为文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dim text As String = TextEdit1.Text
       Dim Height As Integer = 30
       Dim Width As Integer = 150
       Dim FileName As String = "MyImage"
       Dim objBitmap As New Bitmap(Width, Height)
       objBitmap.Save("C:\" & FileName & ".jpg", ImageFormat.Jpeg)



编写此代码是为了创建图像文件.它从文本框中读取文本,并在本地驱动器中创建一个图像文件("MyImage").

现在我想从图像中读取文本并在文本框中显示该文本.
例如,如果我在文本框中输入了Jagdish并创建了一个图像文件.
现在下一个我要从图像文件中读取文本"Jagdish",并将其显示在文本框中.

任何人都可以帮忙找出解决方案吗?


在此先感谢



This code is written to create an image file. it reads the text from the textbox and creates an image file("MyImage") in local drive.

now i want to read the text from image and display that text in textbox.
For example if i have entered Jagdish in textbox and creted an image file.
now next i want to read the text "Jagdish" from image file and display it in text box.

Can anyone please help to find out the solution?


Thanks in Advance

推荐答案

查看OCR: ^ ]可以帮助您.
Look at OCR: google[^] can help.


这是 OCR -光学字符识别"的相关要求.下面的CodeProject问题解答线程对此进行了详细介绍.

可以从扫描的PDF文档和图像中提取文本在asp.net [
This is OCR - "Optical Character Recognition" related requirement. This is covered in great details in below CodeProject Question-Answer thread.

Is this possible to Extract Text from Scanned PDF Documents and Images in asp.net[^]


这篇关于在vb.net中将图像文件转换为文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆