Skip to content

Commit

Permalink
Fix documentation for page segmentation mode 2
Browse files Browse the repository at this point in the history
It never worked, so add a comment that the implementation is missing.
Add also a to-do comment.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jan 9, 2019
1 parent 62b8575 commit a0e6586
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/tesseract.1.asc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion src/api/tesseractmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit a0e6586

Please sign in to comment.