clipping: Clipping image

View source: R/image.R

clippingR Documentation

Clipping image

Description

This function returns the image which restricts pixel value from the specified range.

Usage

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

Arguments

img

input grayscale image matrix.

low

lowest value.

high

highest value.

Value

grayscale image matrix with the same size as img.

Examples

data(texmos2)
plot(as.raster(texmos2))

# the appearance of next one doesn't change because of normalization
x <- normalize(2 * texmos2)
plot(as.raster(x))
title(main = "Doubled pixel value with normalization", font.main = 1)

# the next one is saturated as expected
x <- clipping(2 * texmos2)
plot(as.raster(x))
title(main = "Doubled pixel value with clipping", font.main = 1)

SpatialPack documentation built on Sept. 29, 2024, 5:06 p.m.