0db2ef87c3b18aab99e2653369dabaa0f9129f87,imgaug/augmenters/blur.py,MotionBlur,__init__,#MotionBlur#Any#Any#Any#Any#Any#Any#,1015
Before Change
def __init__(self, k=(3, 7), angle=(0, 360), direction=(-1.0, 1.0), order=1,
seed=None, name=None, **old_kwargs):
// TODO allow (1, None) and set to identity matrix if k == 1
k_param = iap.handle_discrete_param(
k, "k", value_range=(3, None), tuple_to_uniform=True,
list_to_choice=True, allow_floats=False)
angle_param = iap.handle_continuous_param(
angle, "angle", value_range=None, tuple_to_uniform=True,
list_to_choice=True)
direction_param = iap.handle_continuous_param(
direction, "direction", value_range=(-1.0-1e-6, 1.0+1e-6),
tuple_to_uniform=True, list_to_choice=True)
matrix_gen = _MotionBlurMatrixGenerator(k_param, angle_param,
direction_param, order)
super(MotionBlur, self).__init__(
matrix_gen,
seed=seed, name=name, **old_kwargs)
After Change
// opencv method only supports uint8
assert image.dtype.name == "uint8", (
"Expected image with dtype \"uint8\", "
"got \"%s\"." % (image.dtype.name,))
shape_is_hw = (image.ndim == 2)
shape_is_hw1 = (image.ndim == 3 and image.shape[-1] == 1)
shape_is_hw3 = (image.ndim == 3 and image.shape[-1] == 3)
assert shape_is_hw or shape_is_hw1 or shape_is_hw3, (
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: aleju/imgaug
Commit Name: 0db2ef87c3b18aab99e2653369dabaa0f9129f87
Time: 2020-01-25
Author: kontakt@ajung.name
File Name: imgaug/augmenters/blur.py
Class Name: MotionBlur
Method Name: __init__
Project Name: aleju/imgaug
Commit Name: 0db2ef87c3b18aab99e2653369dabaa0f9129f87
Time: 2020-01-25
Author: kontakt@ajung.name
File Name: imgaug/augmenters/contrast.py
Class Name: AllChannelsCLAHE
Method Name: __init__
Project Name: aleju/imgaug
Commit Name: c8c8540ac9d0ea3e3c77ccef2386b47f38dd4fd0
Time: 2020-01-13
Author: kontakt@ajung.name
File Name: imgaug/augmenters/contrast.py
Class Name: SigmoidContrast
Method Name: __init__