clipping: Clipping image

Description Usage Arguments Value Examples

View source: R/imagematrix.R

Description

This function returns the image which restricts pixel value from the specified lowest value to the specified highest value in the original image. This means that the pixels which have lower value than the given lowest (default: 0) are replaced to the lowest and the pixels have greater value than the given highest (default: 1) are replaced to the highest.

Usage

1
clipping(img, low=0, high=1)

Arguments

img

target image

low

lowest value

high

highest value

Value

Data of the same mode as 'img'

Examples

1
2
3
4
5
6
7
8
9
  data()
  op <- par(mfrow=c(2,2))
  plot(, main="Source Image")

  # the appearance of next one doesn't change because of normalization.
  plot(normalize(2*), main="Doubled pixel value with normalization")

  # the next one is saturated as expected
  plot(clipping(2*), main="Doubled pixel value with clipping")

ripa documentation built on May 29, 2017, 5:39 p.m.

Related to clipping in ripa...