From 3a7175115f6b194ad850fb14e854dd62521faca0 Mon Sep 17 00:00:00 2001 From: fritz-hh Date: Fri, 3 Oct 2014 16:03:02 +0200 Subject: [PATCH] roadmap arguments specified --- ROADMAP.md | 49 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 97a20853..c518f437 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -4,6 +4,8 @@ Recoding in 5 python modules - Less platform dependent implementation - Higher versality (wrt addition of new intput / output file tytes) +The functionality of each module is described below: + Normalize inputs (inputs can be a pdf file, an image, a folder containing images) ---------------- @@ -28,7 +30,10 @@ Preprocess normalized inputs (perform jobs in parallel) - Correct skew angle - Cleaning (if requested by user) - Clean image - Perform OCR (perform jobs in parallel) + +Perform OCR (perform jobs in parallel) +----------- + - Perform OCR and save resulting hocr file for each respective page (perfom jobs in parallel) Generate output for each page @@ -46,13 +51,39 @@ Build final output - Verify conformity to pdf/1-a - -New temp folder structure +Tmp folder structure ========================= - - tmp_xxxxx/ - - a_raw_images (either from images or extracted from pdf file) - - b_preprocessed_images (after deswing anf cleaning) - - c_hocr_files - - d_output_pages (one file per page (at first 1 pdf file per page. Later on other formats might be supported) - - e_final_output (concatenate output pages and conversion into PDF/1-a standard, Later on support other formats) +- tmp_xxxxx/ + - a_raw_images (either from images or extracted from pdf file) + - b_preprocessed_images (after deswing anf cleaning) + - c_ocr_out + - d_output_pages (one file per page (at first 1 pdf file per page. Later on other formats might be supported) + - e_output_final (concatenate output pages and conversion into PDF/1-a standard, Later on support other formats) + +ocrmypdf arguments +================== + +- Overall parameters + - [-h] : Display this help message + - [-v] : Increase the verbosity (this option can be used more than once) (e.g. -vvv) + - [-k] : Do not delete the temporary files + - [-g] : Activate debug mode (max verbosity, keep tmp files, generate debug pages) +- Nomalization parameters: + - [-o dpi] : If page resolution is lower x dpi, provide OCR engine with an oversampled image. (Can improve OCR results) + - [-f] : Force to OCR the whole document, even if some page already contain font data + - [-s] : If pages contain font data, do not OCR that page, but include the page (as is) in the final output. +- Prepocessing parameters: + - [-r] : Correct orientation before performing OCR + - [-d] : Deskew each page before performing OCR + - [-c] : Clean each page before performing OCR + - [-i] : Incorporate cleaned image in final output +- OCR parameters: + - [-l lan1[+lan2...] : Document language(s). Multiple languages may be specified, separated by '+' characters. + - [-C cfg] : Pass an additional cofg file to the tesseract OCR engine. (this option can be used more than once) +- output generation parameters: + - None by now +- input files: + - inputpath : path to image, pdf file or folder to be processed +- output files: + - outputfile1 [outputfile2 ...] : *.pdf file or *.txt file to be generated (this argumente can be repeated if both pdf and txt file should be generated