GenImg {KoulMde}R Documentation

Generate black-and-white images

Description

Create various images such as circle, rectangle and random dots.

Usage

GenImg(nx, ny, Type = 1, bNoise = FALSE, sig_noise = 0.1)

Arguments

nx

- Width of an image.

ny

- Length of an image.

Type

- Type of an image: 1, 2, and 3 for rectangle, circle, and random dots, respectively.

bNoise

- Option for including noise: TRUE or FALSE.

sig_noise

- Strength of noise: numeric value between 0 and 0.5.

Value

A list of information of a generated image.

Examples



######## Generate a 10x10 black-and-white rectangle image with some noise
nx=10
ny=10
Type=1
bNoise=TRUE
sig_noise=0.1
lst = GenImg(nx,ny,Type, bNoise, sig_noise)
ImgMat = lst$ImgMat
image(ImgMat, axes = FALSE, col = grey(seq(0, 1, length = 256)))




[Package KoulMde version 3.2.1 Index]