def Sharpen(alpha=<NUM_LIT:0>, lightness=<NUM_LIT:1>, name=None, deterministic=False, random_state=None):
alpha_param = iap.handle_continuous_param(alpha, "<STR_LIT>", value_range=(<NUM_LIT:0>, <NUM_LIT:1.0>), tuple_to_uniform=True,<EOL>list_to_choice=True)<EOL>lightness_param = iap.handle_continuous_param(lightness, "<STR_LIT>", value_range=(<NUM_LIT:0>, None), tuple_to_uniform=True,<EOL>list_to_choice=True)<EOL>def create_matrices(image, nb_channels, random_state_func):<EOL><INDENT>alpha_sample = alpha_param.draw_sample(random_state=random_state_func)<EOL>ia.do_assert(<NUM_LIT:0> <= alpha_sample <= <NUM_LIT:1.0>)<EOL>lightness_sample = lightness_param.draw_sample(random_state=random_state_func)<EOL>matrix_nochange = np.array([<EOL>[<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>],<EOL>[<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>],<EOL>[<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>]<EOL>], dtype=np.float32)<EOL>matrix_effect = np.array([<EOL>[-<NUM_LIT:1>, -<NUM_LIT:1>, -<NUM_LIT:1>],<EOL>[-<NUM_LIT:1>, <NUM_LIT:8>+lightness_sample, -<NUM_LIT:1>],<EOL>[-<NUM_LIT:1>, -<NUM_LIT:1>, -<NUM_LIT:1>]<EOL>], dtype=np.float32)<EOL>matrix = (<NUM_LIT:1>-alpha_sample) * matrix_nochange + alpha_sample * matrix_effect<EOL>return [matrix] * nb_channels<EOL><DEDENT>if name is None:<EOL><INDENT>name = "<STR_LIT>" % (ia.caller_name(),)<EOL><DEDENT>return Convolve(create_matrices, name=name, deterministic=deterministic, random_state=random_state)<EOL>
Augmenter that sharpens images and overlays the result with the original image.

dtype support::

    See ``imgaug.augmenters.convolutional.Convolve``.

Parameters
----------
alpha : number or tuple of number or list of number or imgaug.parameters.StochasticParameter, optional
    Visibility of the sharpened image. At 0, only the original image is
    visible, at 1.0 only its sharpened version is visible.

        * If an int or float, exactly that value will be used.
        * If a tuple ``(a, b)``, a random value from the range ``a <= x <= b`` will
          be sampled per image.
        * If a list, then a random value will be sampled from that list
          per image.
        * If a StochasticParameter, a value will be sampled from the
          parameter per image.

lightness : number or tuple of number or list of number or imgaug.parameters.StochasticParameter, optional
    Parameter that controls the lightness/brightness of the sharped image.
    Sane values are somewhere in the range ``(0.5, 2)``.
    The value 0 results in an edge map. Values higher than 1 create bright
    images. Default value is 1.

        * If an int or float, exactly that value will be used.
        * If a tuple ``(a, b)``, a random value from the range ``a <= x <= b`` will
          be sampled per image.
        * If a list, then a random value will be sampled from that list
          per image.
        * If a StochasticParameter, a value will be sampled from the
          parameter per image.

name : None or str, optional
    See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

deterministic : bool, optional
    See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

random_state : None or int or numpy.random.RandomState, optional
    See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

Examples
--------
>>> aug = Sharpen(alpha=(0.0, 1.0))

sharpens input images and overlays the sharpened image by a variable
amount over the old image.

>>> aug = Sharpen(alpha=(0.0, 1.0), lightness=(0.75, 2.0))

sharpens input images with a variable lightness in the range
``0.75 <= x <= 2.0`` and with a variable alpha.