File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,14 @@ USAGE
55
55
# Get information about orientation and script detection
56
56
print (pytesseract.image_to_osd(Image.open(' test.png' )))
57
57
58
- # In order to bypass the internal image conversions, just use relative or absolute image path
59
- # NOTE : If you don't use supported images, tesseract will return error
58
+ # In order to bypass the image conversions of pytesseract , just use relative or absolute image path
59
+ # NOTE : In this case you should provide tesseract supported images or tesseract will return error
60
60
print (pytesseract.image_to_string(' test.png' ))
61
61
62
- # get a searchable PDF
62
+ # Get a searchable PDF
63
63
pdf = pytesseract.image_to_pdf_or_hocr(' test.png' , extension = ' pdf' )
64
64
65
- # get HOCR output
65
+ # Get HOCR output
66
66
hocr = pytesseract.image_to_pdf_or_hocr(' test.png' , extension = ' hocr' )
67
67
68
68
Support for OpenCV image/NumPy array objects
@@ -80,13 +80,11 @@ Add the following config, if you have tessdata error like: "Error opening data f
80
80
81
81
.. code- block:: python
82
82
83
- tessdata_dir_config = r ' --tessdata-dir "<replace_with_your_tessdata_dir_path>"'
84
83
# Example config: r'--tessdata-dir "C:\Program Files (x86)\Tesseract-OCR\tessdata"'
85
84
# It's important to add double quotes around the dir path.
86
-
85
+ tessdata_dir_config = r ' --tessdata-dir "<replace_with_your_tessdata_dir_path>" '
87
86
pytesseract.image_to_string(image, lang = ' chi_sim' , config = tessdata_dir_config)
88
87
89
-
90
88
** Functions**
91
89
92
90
* ** get_tesseract_version** Returns the Tesseract version installed in the system.
You can’t perform that action at this time.
0 commit comments