導航:首頁 > 文字圖片 > java識別圖片中的文字

java識別圖片中的文字

發布時間:2022-08-21 17:59:06

1. java 如何讀取附加到圖片上的文字

圖片上的文字是沒法讀取的,以為這涉及到圖像處理。非常非常復雜!因為如果你非要讀取圖片上的文字,不是幾行代碼可以搞定的,首相從matlaB開始學,了解什麼是圖像處理。然後再開發相應的jar包。當然,你也可以使用相關的軟體工具,比如識圖軟體,通過讀取軟體的反饋也算是讀取了圖片上的文字

2. 如何用Java及OCR開發批量圖片內容轉文字

可以到雲脈OCR SDK開發者平台下載文檔識別API介面文檔啊,開發支持Java、C++、C、 object pascal及objective-C等多種語言!可以用接入的OCR識別功能輕松實現批量圖片內容轉文字的操作

3. java如何提高百度文字識別的准確度

java文字識別程序的關鍵是尋找一個可以調用的OCR引擎。tesseract-ocr就是一個這樣的OCR引擎,在1985年到1995年由HP實驗室開發,現在在Google。tesseract-ocr 3.0發布,支持中文。不過tesseract-ocr 3.0不是圖形化界面的客戶端,別人寫的FreeOCR圖形化客戶端還不支持導入新的 3.0 traineddata。但這標志著,現在有自由的中文OCR軟體了。
java中使用tesseract-ocr3.01的步驟如下:
1.下載安裝tesseract-ocr-setup-3.01-1.exe(3.0以上版本才增加了中文識別)
2.在安裝向導中可以選擇需要下載的語言包。
3.到網上搜索下載java圖形處理所需的2個包:jai_imageio-1.1-alpha.jar,swingx-1.6.1.jar
4.java程序清單:
文字識別私有化部署方案
可部署至「本地伺服器」的文字識別服務,支持主流 CPU/GPU 環境及國產化系統部署,通用場景、卡證、票據、iOCR 等各類 OCR 模型及自定義平台均可提供容器化部署包,在專有網路環境下一鍵部署應用,保障數據私密性。同時,可提供通用型一體機或國產化一體機,軟硬一體交付,開箱即用,統一維保
快捷部署
容器化打包,支持本地物理機、私有雲等多種部署方式,提供一鍵部署工具和常用運維工具,快速接入、高效運維
數據安全
專有網路環境下本地化部署,數據無需公網上傳,實現業務網路公私分離,保障企業核心生產數據的私密性要求
適配廣泛
CPU 及 GPU 環境均可部署,主流 GPU 顯卡類型均已適配,並可支持國產化系統部署
授權靈活
根據QPS和使用期限進行授權,可自由選擇不同QPS配置,靈活適應不同場景、不同業務的並發量需求
成為開發者
三步完成賬號的基本注冊與認證:
STEP1:點擊網路AI開放平台導航右側的控制台,選擇需要使用的AI服務項。若為未登錄狀態,將跳轉至登錄界面,請您使用網路賬號登錄。如還未持有網路賬戶,可以點擊此處注冊網路賬戶。
STEP2:首次使用,登錄後將會進入開發者認證頁面,請填寫相關信息完成開發者認證。註:(如您之前已經是網路雲用戶或網路開發者中心用戶,此步可略過)。
STEP3:通過控制台左側導航,選擇產品服務-人工智慧,進入具體AI服務項的控制面板(如文字識別、人臉識別),進行相關業務操作。
希望能幫到你,謝謝!

4. 用java怎麼獲得一張圖片上的一個文字的坐標點 求高手解答

//提示:坐標依次列印在命令符窗口
//提示:坐標依次列印在命令符窗口
//提示:坐標依次列印在命令符窗口
//不就是監聽滑鼠事件嗎?
importjavax.swing.*;
importjava.awt.*;
importjava.awt.event.*;
importjavax.swing.border.Border;

/**
*我想建立個界面,可以載入本機中圖片。
*載入後可以通過滑鼠點擊獲得圖片上任意點坐標。
*提問者:sunny929929-試用期一級
*/
{
privateJLabeltipLabel;

/**
*main()
*/
publicstaticvoidmain(String[]args){
MyPictureframe=newMyPicture();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}

/**
*constructor
*/
publicMyPicture(){
setSize(800,600);//根據要求調整大小
setLocation(100,100);
setTitle("獲得圖片上任意點坐標");
setResizable(false);

Containercon=getContentPane();

ImageIconbgIcon=newImageIcon("bgpic.jpg");//注意圖片的路徑
ImagePanelbackpicPanel=newImagePanel(bgIcon);
backpicPanel.addMouseListener(this);
con.add(backpicPanel,BorderLayout.CENTER);

tipLabel=newJLabel("--------------------提示:坐標依次列印在屏幕上!--------------------");
con.add(tipLabel,BorderLayout.SOUTH);
}

/**
*
*/
publicvoidmousePressed(MouseEvente){
intx=e.getX();
inty=e.getY();
Stringmessage="("+x+","+y+")";
tipLabel.setText(message);
System.out.println(message);

}

publicvoidmouseReleased(MouseEvente){

}

publicvoidmouseEntered(MouseEvente){

}

publicvoidmouseExited(MouseEvente){

}

publicvoidmouseClicked(MouseEvente){

}

}

/**
*類ImagePanel,用於添加背景圖片
*/
classImagePanelextendsJPanel{
privateImageimg;
publicImagePanel(ImageIconimageIcon){
img=imageIcon.getImage();
}

publicvoidpaintComponent(Graphicsg){
super.paintComponent(g);
g.drawImage(img,0,0,this);
}

}

5. 用JAVA編寫一個程序識別圖片上的文字;這個難題你實現了嗎

這種不是個人可以處理的,也不是java的強項,去找提供ocr api的廠商吧。

6. java有讀取圖片裡面文字的方法嗎

使用tesseract-ocr,可以識別簡單的驗證碼,中文沒嘗試過

7. 用JAVA編寫一個程序識別圖片上的文字

這種想法太瘋狂了。。目前能實現辨別圖片里的數字是正常的,辨別英文也有點難度,中文就更難了。。辨別圖像裡面的文字數字,不是想像的那麼簡單的,要從像素著手的,比較特定區域的像素,然後程序做出判斷,程序實現起來還是比較復雜的

8. 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

9. 怎麼用java實現圖片裡面的數字識別

圖片是由點組成(或者是別的方法),記錄點的位置、顏色,控制點就行了。至於ocr,有難度,首先要製作文字的變化范圍及整個字各部分的聯系,這還是簡單的。然後,圖像分解就行了。額,我不會編程,稍微會點c++,所以這個回答就是假設如果我做這種程序的思路。

閱讀全文

與java識別圖片中的文字相關的資料

熱點內容
美術花盆和花的圖片簡單 瀏覽:146
水果怎麼擺好看圖片 瀏覽:537
千與千尋人物圖片大全 瀏覽:243
委屈漫畫圖片女孩 瀏覽:403
背景圖片簡約可愛清新 瀏覽:927
圖片狼抱著一個女孩 瀏覽:172
文檔中圖片如何快捷設置大小 瀏覽:256
貂蟬去衣服圖片大全 瀏覽:92
美女背影高清壁紙圖片全屏 瀏覽:62
圖片如何設置標題 瀏覽:808
漂亮文字動態圖片大全 瀏覽:65
七天打卡表可愛圖片 瀏覽:35
波波頭發型效果圖片 瀏覽:659
圖片插入word中無法選中怎麼辦 瀏覽:221
大叔洗衣服的圖片 瀏覽:446
Word里圖片置頂如何加空格 瀏覽:203
蔣丞圖片高清動漫 瀏覽:305
放美女和平精英圖片 瀏覽:388
黑鼻子可愛圖片 瀏覽:855
word轉換pdf時圖片丟失 瀏覽:292