VB,将图片转化成文字的原理是什么呢?如何实现?
答案:3 悬赏:80 手机版
解决时间 2021-12-31 05:17
- 提问者网友:难遇难求
- 2021-12-30 11:02
VB,将图片转化成文字的原理是什么呢?如何实现?
最佳答案
- 五星知识达人网友:躲不过心动
- 2021-12-30 11:24
原型:
int WINAPI icePub_createWordBmpFile(char *strWord,char *strBmpFilename,int bmpWidth,int bmpHeight)
输入:strWord 文本串
strBmpFilename 待生成BMP图片文件名
bmpWidth BMP文件宽度
bmpHeight BMP文件高度
输出:
Private Declare Function icePub_createWordBmpFile Lib "icePubDll.dll" (ByVal strWord As String, ByVal strBmpFilename As String, ByVal bmpWidth As Integer, ByVal bmpHeight As Integer) As Integer
Dim a2 As Long
a2 = icePub_createWordBmpFile("月光", App.Path+"\word.bmp", 32, 16)
原型:
int WINAPI icePub_imgToFileTextImg(char *strImgFilename,char *strTextFilename,char *strFenge,char ch)
输入:strImgFilename 待处理图像文件 (会被强制2值化)
strTextFilename 待生成文本图案文件名
strFenge 列之间分隔符
ch 文本图案填充字符
输出:
Private Declare Function icePub_imgToFileTextImg Lib "icePubDll.dll" (ByVal strImgFilename As String, ByVal strFilename As String, ByVal strFenge As String, ByVal ch As Byte) As Integer
Dim a2 As Long
Dim ch As Byte
ch = Asc("*")
a2 = icePub_imgToFileTextImg(App.Path+"\word.bmp","txtimg.txt","",ch)
int WINAPI icePub_createWordBmpFile(char *strWord,char *strBmpFilename,int bmpWidth,int bmpHeight)
输入:strWord 文本串
strBmpFilename 待生成BMP图片文件名
bmpWidth BMP文件宽度
bmpHeight BMP文件高度
输出:
Private Declare Function icePub_createWordBmpFile Lib "icePubDll.dll" (ByVal strWord As String, ByVal strBmpFilename As String, ByVal bmpWidth As Integer, ByVal bmpHeight As Integer) As Integer
Dim a2 As Long
a2 = icePub_createWordBmpFile("月光", App.Path+"\word.bmp", 32, 16)
原型:
int WINAPI icePub_imgToFileTextImg(char *strImgFilename,char *strTextFilename,char *strFenge,char ch)
输入:strImgFilename 待处理图像文件 (会被强制2值化)
strTextFilename 待生成文本图案文件名
strFenge 列之间分隔符
ch 文本图案填充字符
输出:
Private Declare Function icePub_imgToFileTextImg Lib "icePubDll.dll" (ByVal strImgFilename As String, ByVal strFilename As String, ByVal strFenge As String, ByVal ch As Byte) As Integer
Dim a2 As Long
Dim ch As Byte
ch = Asc("*")
a2 = icePub_imgToFileTextImg(App.Path+"\word.bmp","txtimg.txt","",ch)
全部回答
- 1楼网友:躲不过心动
- 2021-12-30 12:52
相似度
- 2楼网友:你哪知我潦倒为你
- 2021-12-30 11:41
你好!
ocr 取图片上的像素构成点阵图,汉字就是点阵图,比较图形后,将对应成功后,用汉字形式显示出来。
希望对你有所帮助,望采纳。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯