> Tesseract doesn't deskew the output image I think what we are arguing is about preprocessing, which is done before segmentation in tesseract. So what is the output image are you talking about?
Btw, I found a similar Github issue in tesseract repo and in my experiment no deskewing is done in preprocessing. https://github.com/tesseract-ocr/tesseract/issues/677 Do you agree with this experimental result? And we need to deskew the input image before passing the image to any of the tesseract's pipelines? On Tuesday, February 7, 2017 at 4:43:30 PM UTC+9, James R Barlow wrote: > > Tesseract doesn't deskew the output image. It makes no changes to the > output image. > > What it does try to do is find a local baseline to account for text that > is skewed. I believe it may be capable of finding low order polynomial > baselines as well to account for certain distortions. This is strictly a > tool to improve OCR results. You can see the results in the output of the > "hocr" renderer. > > Example hocr output for a straight line with no skew: > > <span class='ocr_line' id='line_1_1' title="bbox 882 131 1656 217; > baseline 0 -17; x_size 87; x_descenders 17; x_ascenders 21"> > > Interpretation in hocr spec of "baseline": > https://kba.github.io/hocr-spec/1.2/#propdef-baseline > > > You will get better results if you globally deskew and cleanup the image > using other methods such as Leptonica's deskew function. > > OCRmyPDF is a tool I develop that wraps tesseract. It can perform deskew > using Leptonica before it delegates OCR to tesseract. > > > On Sunday, 22 January 2017 15:40:20 UTC-8, Pedro Correia wrote: >> >> Hi there, >> I've been reading Tesseract's code and I've realized that are several >> skew estimation functions around. However I am really confused: does >> Tesseract actually deskew the image? >> Here [1] we find that "The line finding algorithm is designed so that a >> skewed page can be recognized without having to de-skew, thus saving loss >> of image quality." Does it mean that no deskewing is done? >> On the other hand, I've seen some posts around here referring to >> Leptonica's deskewing algorithm, even though I couldn't find any call to >> it's functions anywhere in Tesseract's code. >> So, can anyone explain the real deal to me? >> Thanks in advance! >> >> [1]: >> https://github.com/tesseract-ocr/docs/blob/master/tesseracticdar2007.pdf >> >> -- 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/a0180146-4f60-4d57-aa50-e62a4b34da18%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

