@@ -36,6 +36,52 @@ python -m ocr --help
3636```
3737
3838``` sh
39+ usage: __main__.py [-h] -i IMAGE [-c] [-t TEXT_OUTPUT_FILENAME]
40+ [-f IMAGE_OUTPUT_FILENAME] [-v] [--getGrayScaleImage]
41+ [--removeNoise] [--applyThresholding]
42+ [--applyThresholdingInv] [--getDilatedImage]
43+ [--getErodedImage] [--applyOpening] [--applyClosing]
44+ [--getCannyResult]
45+
46+ A simple tesseract python script to get text from input image. by default this
47+ list of preprocessing functions is used [getGrayScaleImage, removeNoise,
48+ applyThresholdingInv, getDilatedImage]
49+
50+ optional arguments:
51+ -h, --help show this help message and exit
52+ -i IMAGE, --image IMAGE
53+ path to input image
54+ -c, --show-final-image
55+ show the final image with an overlay of the text
56+ recognised. (default: False)
57+ -t TEXT_OUTPUT_FILENAME, --text-output-filename TEXT_OUTPUT_FILENAME
58+ file name to put the text output in. (default:
59+ output.txt)
60+ -f IMAGE_OUTPUT_FILENAME, --image-output-filename IMAGE_OUTPUT_FILENAME
61+ filename to output the final image in. (default:
62+ output.png)
63+ -v, --verbose Show intermediate images. (default: False)
64+ --getGrayScaleImage (PreProcessing) adds getGrayScaleImage to
65+ preprocessing. order is important.
66+ --removeNoise (PreProcessing) adds removeNoise to preprocessing.
67+ order is important.
68+ --applyThresholding (PreProcessing) adds applyThresholding to
69+ preprocessing. order is important.
70+ --applyThresholdingInv
71+ (PreProcessing) adds applyThresholdingInv to
72+ preprocessing. order is important.
73+ --getDilatedImage (PreProcessing) adds getDilatedImage to preprocessing.
74+ order is important.
75+ --getErodedImage (PreProcessing) adds getErodedImage to preprocessing.
76+ order is important.
77+ --applyOpening (PreProcessing) adds applyOpening to preprocessing.
78+ order is important.
79+ --applyClosing (PreProcessing) adds applyClosing to preprocessing.
80+ order is important.
81+ --getCannyResult (PreProcessing) adds getCannyResult to preprocessing.
82+ order is important.
83+
84+ Source: https://github.com/TheDigitalPhoenixX/Simple-Tesseract-Python-OCR
3985```
4086
4187#### Example
0 commit comments