Rank Filters {rimage}R Documentation

Rank filters (minImg and maxImg)

Description

These functions apply a rank filter among 3x3 neighbors to a given image.

Usage

minImg(img)
maxImg(img)

Arguments

img target image

Details

In 'minImg', filter replaces a pixel in question with the minimum value among 3x3 neighbors. In 'maxImg', filter replaces a pixel in question with the maximum value among 3x3 neighbors.

Value

object of imagematrix class whose the size is as same as target

Examples

  data(logo)
  op <- par(mfrow=c(2,2))
  plot(logo, main="Original Image")            # original 
  plot(minImg(logo), main="Minimum-Filtered Image")   # minimum filtered
  plot(maxImg(logo), main="Maximum-Filtered Image")   # maximum filtered
  par(op)

[Package rimage version 0.5-7 Index]