Bonjour Freddy,
Ta question m'a relancé.
scale-factor fonctionne parfaitement quand il figure dans un .bat :
Code: Select all
C:\OCR_auto\produits\Capture2Text\Capture2Text_CLI.exe -lEnglish --scale-factor 4.5 -i c:\temp\short.jpg -o c:\temp\short.txt
Ainsi en jouant sur le langage et ce paramètre, on voit que la qualité de la sortie OCR varie beaucoup.
Par contre, --scale-factor ne fonctionne pas quand il est lancé via
Code: Select all
var process_OCR = new Process({ ....
Apparemment, ici seuls les paramètres précédés d'un seul "-" sont reconnus.
(Je n'utilise que cette forme dans le script que j'avais proposé sur ce forum)
Ainsi -lFrench (ne pas mettre de blanc entre '-l' et la langue) est reconnu, pas --language French ou --languageFrench
Heureusement, beaucoup de paramètres ont une version "-" et une version "--"
Les paramètres :
Code: Select all
-?, -h, --help Displays this help.
-v, --version Displays version information.
-b, --line-breaks Do not remove line breaks from OCR text.
-d, --debug Output captured image and pre-processed
image for debugging purposes.
--debug-timestamp Append timestamp to debug images when
using the -d option.
-f, --images-file <file> File that contains paths of image files to
OCR. One path per line.
-i, --image <file> Image file to OCR. You may OCR multiple
image files like so: "-i <img1> -i <img2>
-i <img3>"
-l, --language <language> OCR language to use. Case-sensitive.
Default is "English". Use the
--show-languages option to list installed
OCR languages.
-o, --output-file <file> Output OCR text to this file. If not
specified, stdout will be used.
--output-file-append Append to file when using the -o option.
-s, --screen-rect <"x1 y1 x2 y2"> Coordinates of rectangle that defines area
of screen to OCR.
-t, --vertical OCR vertical text. If not specified,
horizontal text is assumed.
-w, --show-languages Show installed languages that may be used
with the "--language" option.
--output-format <format> Format to use when outputting OCR text.
You may use these tokens:
${capture} : OCR Text.
${linebreak} : Line break (\r\n).
${tab} : Tab character.
${timestamp} : Time that screen or each
file was processed.
${file} : File that was processed or
screen rect.
Default format is "${capture}${linebreak}".
--whitelist <characters> Only recognize the provided characters.
Example: "0123456789".
--blacklist <characters> Do not recognize the provided characters.
Example: "0123456789".
--clipboard Output OCR text to the clipboard.
--trim-capture During OCR preprocessing, trim captured
image to foreground pixels and add a thin
border.
--deskew During OCR preprocessing, attempt to
compensate for slanted text.
--scale-factor <factor> Scale factor to use during pre-processing.
Range: [0.71, 5.0]. Default is 3.5.
--tess-config-file <file>