Browse Source

--export-step fixes

tags/v1.2.5
Ivan Bravo Bravo 6 months ago
parent
commit
1dc4d7d7e3
2 changed files with 3 additions and 3 deletions
  1. 0
    1
      argv/run/argument.py
  2. 3
    2
      processing/image.py

+ 0
- 1
argv/run/argument.py View File

@@ -15,7 +15,6 @@ def arg_export_step(parser):
parser.add_argument(
"--export-step",
type=int,
default=4,
help="Export step image."
"Steps are : \n"
"0 : dress -> correct [OPENCV]\n"

+ 3
- 2
processing/image.py View File

@@ -93,12 +93,13 @@ class ImageProcessing(Processing):
# todo: refactor me, please!
if self._args.get('export_step'):
if self._args.get('export_step') == (step-1):
step_path = self._args.get('export_step_path') or os.path.join(self.__output_path, '..', 'export.png')
step_path = self._args.get('export_step_path') or os.path.abspath(os.path.join(self.__output_path, '..', 'export.png'))

write_image(r, step_path)

Conf.log.debug("Export Step Image Of {} Execution".format(
Conf.log.debug("Export Step Image Of {} Execution: {}".format(
camel_case_to_str(p.__name__),
step_path
))

if self.__altered_path:

Loading…
Cancel
Save