導航:首頁 > 文字圖片 > 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從圖片提取文字相關的資料

熱點內容
挑戰者游戲姜恩惠 瀏覽:295
在線免費播 瀏覽:88
王家大院拍的電影 瀏覽:927
包裝紙做衣服圖片 瀏覽:704
古代玉器圖片加文字 瀏覽:797
國內女演員露點電影 瀏覽:749
太陽之城電影在線免費 瀏覽:635
led屏幕怎麼放圖片 瀏覽:220
夏天男衣服搭配圖片 瀏覽:770
橋本愛實代表作品 瀏覽:9
生活的瑪麗在線日劇的女主角是誰 瀏覽:12
有一部小說主角叫李鋒的 瀏覽:999
章子怡露胸的電影 瀏覽:391
有四個絕世侍女的小說 瀏覽:237
貓眼客戶電話 瀏覽:408
韓國愛情尺寸度電免費bd 瀏覽:936
生活資助申領系統如何導入圖片 瀏覽:437
ps圖片清晰文字變部分模糊 瀏覽:921
電影激情床戲推薦 瀏覽:292
翁虹三圾片子有哪些1005翁虹三圾片子有哪些 瀏覽:352