Skip to content

Commit 37befdf

Browse files
committed
Add option for --distort_image
1 parent 0a36b38 commit 37befdf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/training/tesstrain_utils.py

+5
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ def check_file_readable(*filenames):
172172
"--noextract_font_properties", dest="extract_font_properties", action="store_false"
173173
)
174174

175+
parser.add_argument(
176+
"--distort_image", dest="distort_image", help="--distort_image=true."
177+
)
178+
175179
tessdata_group = parser.add_argument_group(
176180
"tessdata",
177181
"OPTIONAL flag to specify location of existing traineddata files, required during feature extraction. If unspecified will use TESSDATA_PREFIX defined in the current environment.",
@@ -310,6 +314,7 @@ def generate_font_image(ctx, font, exposure, char_spacing):
310314
f"--exposure={exposure}",
311315
f"--outputbase={outbase}",
312316
f"--max_pages={ctx.max_pages}",
317+
f"--distort_image={ctx.distort_image}",
313318
]
314319

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

0 commit comments

Comments
 (0)