Method: Magick::Image#morphology

Defined in:
ext/RMagick/rmimage.cpp

#morphology(method_v, iterations, kernel_v) ⇒ Magick::Image

Apply a user supplied kernel to the image according to the given mophology method.

Parameters:

  • method_v (Magick::MorphologyMethod)

    the morphology method

  • iterations (Numeric)

    apply the operation this many times (or no change). A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1.

  • kernel_v (Magick::KernelInfo)

    morphology kernel to apply

Returns:



4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
# File 'ext/RMagick/rmimage.cpp', line 4687

VALUE
Image_morphology(VALUE self, VALUE method_v, VALUE iterations, VALUE kernel_v)
{
    static VALUE default_channels_const = 0;

    if(!default_channels_const)
    {
        default_channels_const = rb_const_get(Module_Magick, rb_intern("DefaultChannels"));
    }

    return Image_morphology_channel(self, default_channels_const, method_v, iterations, kernel_v);
}