normalize: Normalization for a matrix

View source: R/image.R

normalizeR Documentation

Normalization for a matrix

Description

This function normalizes an image matrix so that the minimum value is 0 and the maximum value is 1.

Usage

normalize(img)

Arguments

img

target image

Value

Image matrix in which minimum value is 0 and maximum value is 1.

Examples

  data(twelve)
  x <- RGB2gray(twelve, method = "RMY")
  x <- normalize(x)
  plot(as.raster(x))

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