-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from aatmanvaidya/docs-ocr
docs: documentation for tesseract ocr operator
- Loading branch information
Showing
3 changed files
with
174 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 17 additions & 1 deletion
18
docs/src/pages/operators/detect-text-in-image-tesseract.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
## documentation for tesseract OCR | ||
## Documentation for Tesseract OCR Operator | ||
|
||
For each language support, we need to install separate tesseract operators for each language. Right now the current operator only supports English and Hindi languages. | ||
|
||
For Linux, you can follow these links to understand how and what modules to install for each language. | ||
- https://tesseract-ocr.github.io/tessdoc/Installation.html | ||
- https://www.loc.gov/standards/iso639-2/php/code_list.php | ||
|
||
To extract text from an image, we pass the image through a tesseract function like this | ||
|
||
``` | ||
data = pytesseract.image_to_string(image, lang='eng+hin', config='--psm 6 --oem 1') | ||
``` | ||
|
||
Here the config settings help us define some more insight into the image and LSTM blocks for the image extraction engines. | ||
|
||
You can take a look at the operator and the test of the operator for the entire code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters