genbinimg: Generating a binary image

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/genbinimg.R

Description

Generates a binary image matrix having the rectangular blocks through its diagonal.

Usage

1
genbinimg(nb=10, disp=TRUE, seed=NULL)

Arguments

nb

An integer describes the number of rectangle blocks to be generated on the diagonal of binary image.

disp

A logical value whether generated binary image will be displayed or not. The default value is TRUE.

seed

An integer for reproducibility purpose. The default value is NULL.

Details

This function is used to generate binary images in different structures in order to test the performance of an examined VAT algorithm.

Value

binimg

Matrix for generated binary image.

k

An integer for the number of clusters.

Author(s)

Zeynel Cebeci

References

Cebeci, Z. & Yildiz, F. (2015). Gorsel Kumelenme Egilimi Degerlendirmesi ve R'de Uygulamasi. Cukurova Universitesi Ziraat Fakultesi Dergisi, 30 (2) : 1-8. (URL: https://dergipark.org.tr/en/download/article-file/219860)

See Also

binimage, findk, findk2, greyimage, vatimage, vatdisp

Examples

1
2
3
4
5
6
7
# Generate a binary image with 5 rectangle blocks on its diagonal
genbinimg(nb=5, disp=TRUE, seed=1923)

# Generate a binary image with 10 rectangle blocks on its diagonal
imgres <- genbinimg(nb=10, disp=FALSE)
binmat <- imgres$binimg
image(binmat)

zcebeci/VatAna documentation built on Dec. 25, 2019, 7:07 p.m.