Skip to content

Commit

Permalink
Add option for --distort_image
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreeshrii committed Mar 15, 2019
1 parent 0a36b38 commit 37befdf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/training/tesstrain_utils.py
Expand Up @@ -172,6 +172,10 @@ def check_file_readable(*filenames):
"--noextract_font_properties", dest="extract_font_properties", action="store_false"
)

parser.add_argument(
"--distort_image", dest="distort_image", help="--distort_image=true."
)

tessdata_group = parser.add_argument_group(
"tessdata",
"OPTIONAL flag to specify location of existing traineddata files, required during feature extraction. If unspecified will use TESSDATA_PREFIX defined in the current environment.",
Expand Down Expand Up @@ -310,6 +314,7 @@ def generate_font_image(ctx, font, exposure, char_spacing):
f"--exposure={exposure}",
f"--outputbase={outbase}",
f"--max_pages={ctx.max_pages}",
f"--distort_image={ctx.distort_image}",
]

# add --writing_mode=vertical-upright to common_args if the font is
Expand Down

0 comments on commit 37befdf

Please sign in to comment.