SpatialPack (version 0.3-8196)

clipping: 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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataCamp Workspace