Skip to content

Commit

Permalink
kopt: fix OCR segmentation mode (koreader#12726)
Browse files Browse the repository at this point in the history
Previously unused by `libk2pdfopt`, the `ocr_type` argument passed to `k2pdfopt_tocr_single_word`
and forwarded to `ocrtess_ocrwords_from_bmp8` now has a big impact for some languages (e.g. Arabic).
  • Loading branch information
benoit-pierre authored Nov 11, 2024
1 parent 9e91abe commit 18d2ec6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/document/koptinterface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local KoptInterface = {
-- in `$TESSDATA_PREFIX/` on more recent versions).
tessocr_data = not os.getenv('TESSDATA_PREFIX') and DataStorage:getDataDir().."/data/tessdata" or nil,
ocr_lang = "eng",
ocr_type = 3, -- default 0, for more accuracy use 3
ocr_type = -1, -- default: assume a single uniform block of text.
last_context_size = nil,
default_context_size = 1024*1024,
}
Expand Down

0 comments on commit 18d2ec6

Please sign in to comment.