2017-07-25 48 views
0

我需要使用pytesseract将几个页面的image.tif转录为文本。 我有下面的代码:pytesseract和image.tif文件

> From PIL import Image 
> Import pytesseract 
> Pytesseract.pytesseract.tesseract_cmd = 'C:/Program Files (x86)/Tesseract- 
> OCR/tesseract ' 
> Print (pytesseract.image_to_string (Image.open ('CAMARA.tif'), lang = "spa")) 

的问题是,只提取冷杉页面。我如何提取所有这些?

回答

0

我想你只提到过一个图像“camara.tif”,首先你必须将所有的pdf页面转换成图像,你可以看到这个link这样做。

接下来使用pytesseract逐个遍历图像以从图像中提取文本。

相关问题