Learn R Programming

SPUTNIK (version 1.4.2)

smoothImage,ms.image-method: Apply Gaussian smoothing to an MS image.

Description

Apply Gaussian smoothing to an MS image.

Usage

# S4 method for ms.image
smoothImage(object, sigma = 2)

Value

ms.image-class smoothed msImage.

Arguments

object

ms.image-class object. See msImage.

sigma

numeric (default = 2). Standard deviation of the smoothing Gaussian kernel.

Examples

Run this code
## Load package
library("SPUTNIK")

## Create ms.image-class object
msIm <- msImage(values = matrix(rnorm(200), 40, 50), name = "test", scale = TRUE)

## Smooth the image colors
msImSmoothed <- smoothImage(msIm, sigma = 5)

Run the code above in your browser using DataLab