Viết ứng dụng đơn giản Tesseract OCR bằng Java

Post Reply
Posts: 4
Joined: Tue Apr 16, 2019 4:25 pm

Viết ứng dụng đơn giản Tesseract OCR bằng Java

Post by khanhlv »

Tuy cái này cũ lắm rồi, công nghệ cũng chẳng có gì mời, nhưng đôi khi vẫn có thể sử dụng cho những bài toán đơn giản ví dụ tác thông tin chứng mình thư, số công tơ điện, công tơ ước ….

Hãy cùng xem một ví dụ rất đơn giản về OCR được triển khai trong Java.

Bước 1: Download tessdata[eng.traineddata]

Bước 2: Lấy hình ảnh muốn bóc tách lấy chữ

Bước 3: Thêm dependency vào tệp pom.xml

Code: Select all

Bước 4: Viết đoạn mã thực hiện OCR

Code: Select all

package tess.test.TestTesseract;


import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

public class Test {
 public static void main(String []args) {
	 Tesseract tesseract = new Tesseract();
	 try {
		String text = tesseract.doOCR(new File("D:/DataScienceCollection/Images/digit.jpg"));		
	 } catch (TesseractException e) {		
Bước 5: Chạy thôi nào

P/S: Bạn có thể dùng Google Vision API để bóc tách, dữ liệu sẽ trả về dạng REST JSON.

Tham khảo: ... bang-java/

Posts: 3
Joined: Tue Sep 03, 2019 4:11 am

finance graduate schemes

Post by Hamptonol »

movie rental
ремонт квартир цены по видам работ
Ways to improve credit score – Video
<p>#How #to #Improve #your #Credit #Score #by #100 #points #in #30 #days Ways to improve credit score How to improve your credit score by 100 points in 30 days BY Randall Yates If you search for ways to improve your credit score online you’ll see the same suggestions over and over. If you have bad credit, you can increase your FICO score significantly in just 30 days. Because I’ve not only done it myself for my credit. I have personally helped hundreds of homebuyers raise their scores so they could get approved for a mortgage. And I did it in ...</p>
<p>The post Ways to improve credit score – Video appeared first on Invest.</p>
fashion nova coupon - cronos stock New Mexico News
Details: Hotel News Fresh News.

Posts: 18
Joined: Sat Jul 27, 2019 7:42 pm

second hand cars in kochi

Post by IZRAELol »

cottage rentals
косметический ремонт комнаты
Internet marketing for insurance agents ) Video
<p>#Insurance #Agency #SEO #Services #Company #- #View #Proven #Results Internet marketing for insurance agents Insurance Agency SEO – Internet Marketing with Proven Results. Insurance SEO Company – Services with Proven Results. No Risk SEO is likely your best fit if you are looking for insurance agency SEO company. Pretty bold claim, huh? Our President, Jason […]</p>
<p>The post Internet marketing for insurance agents ) Video appeared first on South Africa Finance.</p>
dennys coupon - dow jones stock Kansas News
Analytics: Connecticut Business Fresh News.

Posts: 17
Joined: Fri Feb 14, 2020 11:51 am


Post by htbgshild »

help me write a thesis thesis writing services help with a thesis statement <a href="">thesis topic</a> writing a phd thesis
good thesis statements thesis services help thesis <a href="">thesis consultant</a> phd thesis database

Posts: 10
Joined: Mon Aug 12, 2019 2:30 am

silver proof coins

Post by Nebraskaol »

lamborghini rental
ремонт ванных комнат
Affordable healthcare insurance & Video
<p>#Affordable #healthcare #insurance Affordable healthcare insurance Shopping for Health Insurance? We can help you with that! How’s a great plan that’s affordable sound to you? Our Mission Is to Help Americans Find Affordable Health Insurance Finding a great health insurance policy you can afford shouldn’t be so complicated! You could easily spend hours hunting for […]</p>
<p>The post Affordable healthcare insurance & Video appeared first on Finance News.</p>
overstock furniture - dow jones live California News
Facts: Wyoming Business Advanced News.

Posts: 5
Joined: Fri Sep 13, 2019 7:53 am
Location: USA

credit one financial

Post by Lincolnol »

tent rental
ремонт домов и квартир
What is a good credit score \ Video
<p>#What #is #a #Good #Credit #Score: #2018 #Range #- #Chart What is a good credit score What is a Good Credit Score: 2018 Range & Chart What is a Good Credit Score: 2018 Range & Chart So you’re in the market for a major purchase in your life, you need to rent an apartment, or […]</p>
<p>The post What is a good credit score \ Video appeared first on Arlington Finance.</p>
hobby lobby coupon - cvs stock Maine News
Details: Ghana Finance Daily News.

Post Reply