You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTTP request's config_vars property has no effect when using the Docker setup with Docker image tleyden5iwx/open-ocr-2 (Version 2 / Tesseract 4.00).
When using Version 1 based on the original Docker image tleyden5iwx/open-ocr, config_vars property allows to pass command line config arguments like tessedit_char_whitelist to Tesseract. This does not work with tleyden5iwx/open-ocr-2.
Example request allowing only digits as result character set: $ curl -X POST -H "Content-Type: application/json" -d '{"img_url":"http://bit.ly/ocrimage","engine":"tesseract", "engine_args":{"config_vars":{"tessedit_char_whitelist":"0123456789"}, "psm":"3"}}' http://$DOCKER_HOST:$HTTP_PORT/ocr
Response body with tleyden5iwx/open-ocr-2: You can create local variables for the pipelines within the template by prefixing the variable name with a "$" sign. Variable names have to be composed of alphanumeric characters and the underscore. In the example below I have used a few variations that work for variable names.
The text was updated successfully, but these errors were encountered:
The HTTP request's
config_vars
property has no effect when using the Docker setup with Docker imagetleyden5iwx/open-ocr-2
(Version 2 / Tesseract 4.00).When using Version 1 based on the original Docker image
tleyden5iwx/open-ocr
,config_vars
property allows to pass command line config arguments liketessedit_char_whitelist
to Tesseract. This does not work withtleyden5iwx/open-ocr-2
.Example request allowing only digits as result character set:
$ curl -X POST -H "Content-Type: application/json" -d '{"img_url":"http://bit.ly/ocrimage","engine":"tesseract", "engine_args":{"config_vars":{"tessedit_char_whitelist":"0123456789"}, "psm":"3"}}' http://$DOCKER_HOST:$HTTP_PORT/ocr
Response body with
tleyden5iwx/open-ocr
:011 2111 01133126 10031 31 111165 1 01 116 1 1 61 11635 1211 11 116 811111 13126 13 1 1 3 3161 116 31 211113 1131116 1211 1 1 5 5 3711 211 1311 16 112111135 1121 16 0 1 3 001111 053 1 0 311 1121111111161 6113111012813 5111 21 116 11111 161 8001 6 111 116 63211111 16 1 610 1 1121 16 118611 1 1155 31 1 0115 1131 01 1 1 01 31 211113 112111133
Response body with
tleyden5iwx/open-ocr-2
:You can create local variables for the pipelines within the template by prefixing the variable name with a "$" sign. Variable names have to be composed of alphanumeric characters and the underscore. In the example below I have used a few variations that work for variable names.
The text was updated successfully, but these errors were encountered: