OCR в Linux на PDF
felipeБях писал за OCR и Линукс, но сега ми се наложи да разпозная pdf, който съдържа картинки на текст. Тъй като tesseract разпознава отделни tif-ове, как да направим магията?
Отговорът намерих след 5 секунди в Google –
http://www.linuxforums.org/forum/art-imaging-linux/58248-pdf-tiff-any-other-image-type.html
Където четем следното:
try using gs. I do this quite a bit and on a large scale. the command I use is:
gs -SDEVICE=tiffg4 -r600x600 -sPAPERSIZE=letter -sOutputFile={output folder}/{basename}_%04d.tif -dNOPAUSE -dBATCH — {pdf filename}
you can change the -SDEVICE to jpeg if you are dealing with color, the -r is resolution ( I think default is 72dpi) the %04d.tiff appends the tifs with a 4 digit sequence starting with 0001. the -dNOPAUSE -dBATCH are the options that you use for multipage pdf to a batch of tiffs. (i.e. a 100 page pdf will get you 100 tif files)
За мен сработи. Гениално!






