GenImg: Generate black-and-white images

Description Usage Arguments Value Examples

View source: R/ImgSeg.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
9
######## 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)))

KoulMde documentation built on Jan. 13, 2021, 3:01 p.m.

Related to GenImg in KoulMde...