diff --git a/src/python/app/command/parser.py b/src/python/app/command/parser.py index d4abc8e..48fe02e 100644 --- a/src/python/app/command/parser.py +++ b/src/python/app/command/parser.py @@ -12,8 +12,6 @@ from app.operation.roll import RollOperation from app.operation.rotate90 import Rotate90Operation -from app.operation.scale import ScaleOperation -from app.operation.translate import TranslateOperation def get_parser() -> ArgumentParser: diff --git a/src/python/app/operation/grayscale.py b/src/python/app/operation/grayscale.py index 0163aee..512d5be 100644 --- a/src/python/app/operation/grayscale.py +++ b/src/python/app/operation/grayscale.py @@ -23,10 +23,12 @@ def parser(cls, parser: ArgumentParser) -> None: pass def __call__(self, args: Namespace, input_image: Image) -> Image: - return Image(np.expand_dims(np.clip( + return Image(np.repeat(np.expand_dims(np.clip( 0.2126 * input_image.data[:, :, 0] + 0.7152 * input_image.data[:, :, 1] + 0.0722 * input_image.data[:, :, 1], a_min=0., a_max=255.).astype(np.uint8), + axis=-1), + repeats=3, axis=-1))