导航:首页 > 文字图片 > java从图片提取文字

java从图片提取文字

发布时间:2022-07-03 11:44:43

❶ java截图后怎么用tesseract 文字识别

网上传的代码示例大多是在Windows下安装Tesseract ORC后通过CMD命令操作进行图识别操作.而 Tess4j 针对Tesseract 提供了JNI支持,同时还提供了一些图片操作的工具类,提供比如图片放大,旋转,黑白处理,锐化 等用来提高识别率的操作.操作十分方便. T

❷ 用JAVA编写一个程序识别图片上的文字

这种想法太疯狂了。。目前能实现辨别图片里的数字是正常的,辨别英文也有点难度,中文就更难了。。辨别图像里面的文字数字,不是想象的那么简单的,要从像素着手的,比较特定区域的像素,然后程序做出判断,程序实现起来还是比较复杂的

❸ java是否可以从图片中抠出里面的数字 Java SE

你好很高兴告诉你:JAVA可以做到,你只要学习到了JAVA的IO机制 就知道该怎么做了。

❹ java 如何读取附加到图片上的文字

图片上的文字是没法读取的,以为这涉及到图像处理。非常非常复杂!因为如果你非要读取图片上的文字,不是几行代码可以搞定的,首相从matlaB开始学,了解什么是图像处理。然后再开发相应的jar包。当然,你也可以使用相关的软件工具,比如识图软件,通过读取软件的反馈也算是读取了图片上的文字

❺ java 实现图片的文字识别

摘要图像识别是目前很热门的研究领域,涉及的知识很广,包括信息论、模式识别、模糊数学、图像编码、内容分类等等。本文仅对使用Java实现了一个简单的图像文本二值处理,关于识别并未实现。
步骤
建立文本字符模板二值矩阵
对测试字符进行二值矩阵化处理
代码
/*
* @(#)StdModelRepository.java
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
* You should have received a of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package cn.e.ynu.sei.recognition.util;import java.awt.Image;import java.awt.image.BufferedImage;import java.io.File;import java.io.IOException;import java.util.ArrayList;import java.util.List;import java.util.logging.Level;import java.util.logging.Logger;import javax.imageio.ImageIO;/** * Hold character charImgs as standard model repository.
* @author 88250
* @version 1.0.0.0, Mar 20, 2008
*/
public class StdModelRepository {
/** * hold character images
*/ List charImgs = new ArrayList();
/** * default width of a character
*/ static int width = 16 /** * default height of a character
*/ static int height = 28 /** * standard character model matrix
*/ public int[][][] stdCharMatrix = new int[27][width][height];
/** * Default constructor.
*/ public StdModelRepository() {
BufferedImage lowercase = null try {
lowercase = ImageIO.read(new File("lowercase.png"));
} catch (IOException ex) {
Logger.getLogger(StdModelRepository.class.getName()).
log(Level.SEVERE, null, ex);
}
for (int i = 0 i < 26 i++) {
charImgs.add(lowercase.getSubimage(i * width,
0,
width,
height));
}
for (int i = 0 i < charImgs.size(); i++) {
Image image = charImgs.get(i);
int[] pixels = ImageUtils.getPixels(image,
image.getWidth(null),
image.getHeight(null));
stdCharMatrix[i] = ImageUtils.getSymbolMatrix(pixels, 0).clone();
ImageUtils.displayMatrix(stdCharMatrix[i]);
}
}
}
/*
* @(#)ImageUtils.java
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
* You should have received a of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package cn.e.ynu.sei.recognition.util;import java.awt.Image;import java.awt.image.PixelGrabber;import java.util.logging.Level;import java.util.logging.Logger;/** * Mainipulation of image data.
* @author 88250
* @version 1.0.0.3, Mar 20, 2008
*/
public class ImageUtils {
/** * Return all of the pixel values of sepecified <code>image< .>* @param image the sepecified image
* @param width width of the image
* @param height height of the image
* @return */ public static int[] getPixels(Image image, int width, int height) {
int[] pixels = new int[width * height];
try {
new PixelGrabber(image, 0, 0, width, height, pixels, 0, width).grabPixels();
} catch (InterruptedException ex) {
Logger.getLogger(ImageUtils.class.getName()).
log(Level.SEVERE, null, ex);
}
return pixels;
}
资源来自:
http://blog.csdn.net/chief1985/article/details/2229572

❻ java有读取图片里面文字的方法吗

使用tesseract-ocr,可以识别简单的验证码,中文没尝试过

阅读全文

与java从图片提取文字相关的资料

热点内容
女主叫小麦的泰剧 浏览:152
我的夫人韩国百科 浏览:788
李晨电影开出租车叫什么电影 浏览:241
李彩潭酒醉的什么电影 浏览:451
四级的欧美电影 浏览:65
桂花花图片大全大图 浏览:284
林雪便利店叫什么电影 浏览:916
韩国公认最好看的穿越电影 浏览:329
梦幻流泪图片高清 浏览:134
免费的动作片 浏览:667
二次元动漫古风图片 浏览:132
男生免费看片的网址 浏览:310
7排电影院3排 浏览:824
秋千上喂葡萄是什么电影古代的 浏览:219
刘海头像图片男生冷酷 浏览:1003
电影里有一个叫肖恩的医生 浏览:313
染妹动漫可爱图片 浏览:122
电影院牵手图片 浏览:185
pdf图片怎么拆分 浏览:580
中性短发女生发型图片 浏览:16