Learn R Programming

Rvision (version 0.6.0)

ones: Create a One-Filled Image

Description

ones creates an Image object filled with ones.

Usage

ones(nrow, ncol, nchan = 3, bitdepth = "8U", colorspace = "BGR")

Arguments

nrow

An integer indicating desired the number of rows for the image.

ncol

An integer indicating desired the number of columns for the image.

nchan

An integer indicating the desired number of channels for the image.

bitdepth

A string indicating the desired bit depth for the image. Options are "8U" (the default), "8S", "16U", "16S", "32S", "32F", and "64F".

colorspace

A string indicating the desired color space for the image.

Value

An Image object.

See Also

Image, zeros

Examples

Run this code
# NOT RUN {
one <- ones(100, 100)

# }

Run the code above in your browser using DataLab