degrade: Degradation of an image

Description Usage Arguments Value Examples

View source: R/degrade.R

Description

This function degrades a high resolution image into a low resolution image.

Usage

1
2
degrade(z, L = 1, s = cbind(0, 0), noise = 0, blur = 1, L1 = L,
  L2 = L)

Arguments

z

a cimgobject containing the high resolution image

L

numeric indicating the overall scale change. This parameter will be override by L1 or L2

s

numeric p by 2 matrix containing the registration parameters

noise

numeric indicating the standard deviation of the noise or an cimgobject that will be added to the resampled z

blur

numeric indicating the blur range (for uniform blur) or an cimg object with the blur kernel to be convolved with z if nothing is provided an default kernel will be used.

L1

numeric indicating the directional scale change

L2

numeric indicating the directional scale change

Value

A degraded cimgobject

Examples

1
2
3
4
degraded.lenna <- degrade(lenna, L = 4, noise = 0.05, blur = 3)
par(mfrow = c(1,2), mar = c(0,0,1,0)+0.1)
plot(lenna, axes = FALSE, interp = FALSE, main = 'Original Lenna')
plot(degraded.lenna, axes = FALSE, interp = FALSE, main = 'Degraded Lenna')

redR documentation built on May 2, 2019, 3:47 p.m.

Related to degrade in redR...