aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/gaussian_blur.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-08-30 01:57:00 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-08-30 01:57:00 +0300
commit61f13a8708cfb0adadf31b3d1ffe5f70b1103e0f (patch)
tree5386c793836e85801fd2c9116b83b191247c63b5 /bin/gaussian_blur.py
parentfactor common code out (diff)
downloadfilters-61f13a8708cfb0adadf31b3d1ffe5f70b1103e0f.tar.gz
filters-61f13a8708cfb0adadf31b3d1ffe5f70b1103e0f.zip
more useful help messages + README update
Diffstat (limited to 'bin/gaussian_blur.py')
-rw-r--r--bin/gaussian_blur.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/gaussian_blur.py b/bin/gaussian_blur.py
index d530547..c2aa79a 100644
--- a/bin/gaussian_blur.py
+++ b/bin/gaussian_blur.py
@@ -26,15 +26,18 @@ def _main_gaussian_blur(
image.save(output_path, output)
def _parse_args(args=sys.argv):
- parser = argparse.ArgumentParser()
- parser.add_argument('img_path')
- parser.add_argument('--output', '-o',
- dest='output_path', default=None)
+ parser = argparse.ArgumentParser(
+ description='Apply Gaussian blur to an image.')
+ parser.add_argument('img_path', help='source image file path')
+ parser.add_argument('--output', '-o', dest='output_path', default=None,
+ help='save new image to a file')
parser.add_argument('--sigma', '-s',
- type=float, default=DEFAULT_SIGMA)
+ type=float, default=DEFAULT_SIGMA,
+ help='specify the sigma coefficient in the Gaussian formula')
parser.add_argument('--radius', '-r',
type=cmd_line.parse_non_negative_integer,
- default=DEFAULT_RADIUS)
+ default=DEFAULT_RADIUS,
+ help='specify convolution kernel radius')
return parser.parse_args(args[1:])
def _main(args=sys.argv):