kopt: fix OCR segmentation mode (#12726)

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).
This commit is contained in:
Benoit Pierre
2024-11-11 12:44:22 +01:00
committed by GitHub
parent 9e91abedda
commit 18d2ec6761

View File

@@ -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,
}