generateNoisePattern: Generate sinusoid noise pattern

View source: R/generateNoisePattern.R

generateNoisePatternR Documentation

Generate sinusoid noise pattern

Description

Generate sinusoid noise pattern

Usage

generateNoisePattern(
  img_size = 512,
  nscales = 5,
  noise_type = "sinusoid",
  sigma = 25,
  pre_0.3.0 = FALSE
)

Arguments

img_size

Width and height of the noise pattern, in pixels. It must be divisible by 2^(nscales - 1), because the finest scale tiles the image with that many patches per side.

nscales

Number of spatial scales (default: 5). Each additional scale adds a higher spatial frequency. img_size must be divisible by 2^(nscales - 1).

noise_type

Noise pattern type: sinusoid (default) or gabor.

sigma

Sigma of the Gabor patches when noise_type = 'gabor' (default: 25).

pre_0.3.0

Boolean: build the noise pattern the way rcicr did before version 0.3.0. Leave it at FALSE unless you need to recreate that old behaviour.

Value

The noise basis: a list holding the 3D array of patches (patches), an index array of the same size mapping each pixel to its contrast parameter (patchIdx), and the noise_type and generator_version.

Examples

generateNoisePattern(256)

rcicr documentation built on Sept. 27, 2026, 5:07 p.m.