2014-10-08 13 views
6

OCR'yi tesseract için yeniyim. Bir görüntüyü tif'e dönüştürmeye çalıştım ve pencerelerdeki cmd'yi kullanarak tesseract'tan çıkan çıktıyı görmek için çalıştırdım, ama yapamadım. Bana yardımcı olabilir misiniz? Kullanılacak komut ne olacak?Windows komut satırında tesseract ocr'yi test edebilir miyim?

enter image description here

+0

açıklayınız ne daha detaylı çalıştım. – Vish

+0

@Vish Siteye tesseract kitaplığı yükledim. ve cmd'den metin resmini dönüştürmeyi denedim. tesseract imagename.tif çıktı. Ama hiçbir çıktı alamadım. – Akunar

+0

Yazdığınız sözdizimi için çıktı, bir dosyada, output.txt'de saklanır. Böyle bir dosya oluşturuldu mu kontrol ettiniz? Ayrıca, TIF Dosyanızı bir yere yükleyebilir misiniz? Biraz zaman alırsam tesseract yüklememi kontrol edebilirim. – Vish

cevap

12

tesseract.exe sözdizimi tesseract.exe inputimage output-text-file olduğunu en basit:

İşte benim örnek bir resimdir. Buradaki varsayım, tesseract.exe dosyasının PATH ortam değişkenine eklenmesidir. Metin bağımsız değişkeni tanımak çok zorsa, -psm N bağımsız değişkenini ekleyebilirsiniz.

Ben doğruluk düzeyi yeterince iyi değil sürece (herhangi bir -psm anahtarlar olmadan) düzenli sözdizimi, ekli görüntü ile yeterince iyi çalışıyor görüyoruz.

İngilizce olmayan karakterlerin (reçete yanındaki sembol gibi) tanınmadığını unutmayın; varsayılan kurulumum sadece İngilizce eğitim verilerini içerir. İşte

teserakt sözdizimi açıklaması aşağıda verilmiştir:

C:\Users\vish\Desktop>tesseract.exe 
Usage:tesseract.exe imagename outputbase [-l lang] [-psm pagesegmode] [configfile...] 

pagesegmode values are: 
0 = Orientation and script detection (OSD) only. 
1 = Automatic page segmentation with OSD. 
2 = Automatic page segmentation, but no OSD, or OCR 
3 = Fully automatic page segmentation, but no OSD. (Default) 
4 = Assume a single column of text of variable sizes. 
5 = Assume a single uniform block of vertically aligned text. 
6 = Assume a single uniform block of text. 
7 = Treat the image as a single text line. 
8 = Treat the image as a single word. 
9 = Treat the image as a single word in a circle. 
10 = Treat the image as a single character. 
-l lang and/or -psm pagesegmode must occur before anyconfigfile. 

Single options: 
    -v --version: version info 
    --list-langs: list available languages for tesseract engine 

Ve burada görüntü için çıkış var (NOT: Ben indirilen olduğunda, bir PNG resmi dönüştürülür):

C:\Users\vish\Desktop>tesseract.exe ECL8R.png out.txt 
Tesseract Open Source OCR Engine v3.02 with Leptonica 

C:\Users\vish\Desktop>type out.txt.txt 
1 Project Background 

A prescription (R) is a written order by a physician or medical doctor to a pharmacist in the form of 
medication instructions for an individual patient. You can't get prescription medicines unless someone 
with authority prescribes them. Usually, this means a written prescription from your doctor. Dentists, 

optometrists, midwives and nurse practitioners may also be authorized to prescribe medicines for you. 

It can also be defined as an order to take certain medications. 

A prescription has legal implications; this means the prescriber must assume his responsibility for the 
clinical care ofthe patient. 

Recently, the term "prescriptionΓÇ¥ has known a wider usage being used for clinical assessments, 
İlgili konular