imgNErosionDilation {biOps}R Documentation

Erosion/Dilation multiple apply

Description

This function applies n erosions followed by n dilations to the given image. Approaches an N depth opening

Usage

imgNErosionDilation(imgdata, mask, n)

Arguments

imgdata The image
mask Mask to apply operation
n Times to apply each operation

Value

return an imagedata object

Note

This function accepts binary images only and will treat gray scale ones as binary images.

See Also

imgBinaryErosion imgBinaryDilation

Examples

        ## Not run: 
                x <- readJpeg(system.file("samples", "violet.jpg", package="biOps"))
                mat <- matrix (0, dim, dim)
                mask <- imagedata (mat, "grey", dim, dim)
                y <- imgNErosionDilation(x, mask, 5)
        
## End(Not run)

[Package biOps version 0.2.1 Index]