mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-11 21:22:22 +00:00
Compare commits
1 Commits
master
...
fix/tesser
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24c0a2c2ee |
@@ -266,7 +266,9 @@ struct lib_hardsubx_ctx *_init_hardsubx(struct ccx_s_options *options)
|
||||
|
||||
int ret = -1;
|
||||
|
||||
if (!strncmp("4.", TessVersion(), 2) || !strncmp("5.", TessVersion(), 2))
|
||||
// Tesseract 4+ uses different tessdata path convention and default OEM mode
|
||||
// Use >= '4' check to handle future versions (5, 6, 7, etc.)
|
||||
if (TessVersion()[0] >= '4')
|
||||
{
|
||||
char tess_path[1024];
|
||||
if (ccx_options.ocr_oem < 0)
|
||||
|
||||
@@ -191,7 +191,9 @@ void *init_ocr(int lang_index)
|
||||
}
|
||||
|
||||
ctx->api = TessBaseAPICreate();
|
||||
if (!strncmp("4.", TessVersion(), 2) || !strncmp("5.", TessVersion(), 2))
|
||||
// Tesseract 4+ uses different tessdata path convention and default OEM mode
|
||||
// Use >= '4' check to handle future versions (5, 6, 7, etc.)
|
||||
if (TessVersion()[0] >= '4')
|
||||
{
|
||||
char tess_path[1024];
|
||||
snprintf(tess_path, 1024, "%s%s%s", tessdata_path, "/", "tessdata");
|
||||
|
||||
Reference in New Issue
Block a user