From a0e6586e634605186f82d6fef3e422da20486f26 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 9 Jan 2019 13:51:44 +0100 Subject: [PATCH] Fix documentation for page segmentation mode 2 It never worked, so add a comment that the implementation is missing. Add also a to-do comment. Signed-off-by: Stefan Weil --- doc/tesseract.1.asc | 2 +- src/api/tesseractmain.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/tesseract.1.asc b/doc/tesseract.1.asc index 0aca4f7d..88f3bed7 100644 --- a/doc/tesseract.1.asc +++ b/doc/tesseract.1.asc @@ -67,7 +67,7 @@ OPTIONS 0 = Orientation and script detection (OSD) only. 1 = Automatic page segmentation with OSD. - 2 = Automatic page segmentation, but no OSD, or OCR. + 2 = Automatic page segmentation, but no OSD, or OCR. (not implemented) 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. diff --git a/src/api/tesseractmain.cpp b/src/api/tesseractmain.cpp index cbe21ded..d3de788e 100644 --- a/src/api/tesseractmain.cpp +++ b/src/api/tesseractmain.cpp @@ -129,7 +129,7 @@ static void PrintHelpForPSM() { "Page segmentation modes:\n" " 0 Orientation and script detection (OSD) only.\n" " 1 Automatic page segmentation with OSD.\n" - " 2 Automatic page segmentation, but no OSD, or OCR.\n" + " 2 Automatic page segmentation, but no OSD, or OCR. (not implemented)\n" " 3 Fully automatic page segmentation, but no OSD. (Default)\n" " 4 Assume a single column of text of variable sizes.\n" " 5 Assume a single uniform block of vertically aligned text.\n" @@ -646,6 +646,8 @@ int main(int argc, char** argv) { const tesseract::PageIterator* it = api.AnalyseLayout(); if (it) { + // TODO: Implement output of page segmentation, see documentation + // ("Automatic page segmentation, but no OSD, or OCR"). it->Orientation(&orientation, &direction, &order, &deskew_angle); tprintf( "Orientation: %d\nWritingDirection: %d\nTextlineOrder: %d\n"