On 17/04/2016 14:45, John Timuty wrote:
Hi there! ^_^
I didn't know how to compile so I had to download Cygwin because only
there i got a compiled text2image.exe..
But now i have it and tried to use it. This is what i get when i execute
command.
John@John-PC /cygdrive/c/cygwin/training
$ *text2image --text=C:\Users\John\Desktop\12345.txt
--outputbase=ENG.BradleyHandITC.exp0 --font='BradleyHandITC' *
*--fonts_dir=C:\Users\John\Desktop\fnt*
----------------------------------------------------------------------------------------------------------------
FcInitiReinitialize failed!!
Could not find font named BradleyHandITC. Pango suggested font
Please correct --font arg.:Error:Assert failed:in file
/cygdrive/e/cyg_pub/devel/tesseract/tesseract-ocr-3.04.01-1.i686/src/tesseract-3.04.01/training/text2image.cpp,
line 437
Segmentation fault (core dumped)
----------------------------------------------------------------------------------------------------------------
Seriously, what does that mean?
In the font's dir, there is a BradleyHandITC*.TTF* (TRUETYPE)
I don't know what wrong i am doing? Do i need
a BradleyHandITC.*OTF* too? (OPENTYPE) to work properly?
I have successfully trained a font before but i want to add more pages
to increase the accuracy.
Please Help. I am very close to start training tesseract.
As you are using cygwin,
paths must use the POSIX convention so replace
C:\Users\John\Desktop\12345.txt with
/cygdrive/c/Users/John/Desktop/12345.txt
C:\Users\John\Desktop\fnt with
cygdrive/c/Users/John/Desktop/fnt
I suspect the segfault is coming from this problem.
About the font the best way to add it to the cygwin fonts is to
copy the BradleyHandITC*.TTF to /usr/share/fonts/TTF
and rebuild the font cache. So
cp cygdrive/c/Users/John/Desktop/fnt/*.TTF /usr/share/fonts/TTF
rm /usr/share/fonts/TTF/fonts.dir
fc-cache -f /usr/share/fonts/TTF
after that with
fc-list |grep TTF
You can see your new installed fonts with their canonical names.
Regards
Marco
--
You received this message because you are subscribed to the Google Groups
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/19ab0639-4a7d-2756-26d5-d55132c27c34%40gmail.com.
For more options, visit https://groups.google.com/d/optout.