read_images: Read images into an array

Description Usage Arguments Value

Description

This function reads in a set of images and returns all images as an array.

Usage

1
2
3
4
read_images(colormode = "Color", dim_images = NULL, folder, file_names,
  which_images, x = seq_len(dim_images[1]), y = seq_len(dim_images[2]),
  col_out = seq_len(dim_images[3]), col_in, sum1 = FALSE, norm_it = FALSE,
  norm_type = "sum1", colorspace = "rgb", relative = FALSE)

Arguments

colormode

the output colormode: either "Color" (default) or "Grayscale"

dim_images

the dimension of the output array

folder

the path of the folder which contains the images

file_names

a vector giving the names of the input files

which_images

indices of the images to read, relative to file_names

x

Vector of x-coordinates to read in. Default NULL results in a grid of all possible values.

y

Vector of y-coordinates to read in. Default NULL results in a grid of all possible values.

col_out

which color-channels shall be read in?

col_in

which color-channels has the input image?

sum1

TRUE: Pixel intensities are normed to sum=1, i.e. relative intensities are computed, default is FALSE

norm_it

TRUE: Images are normed so that column, row and colour channel intensities have sum=1 or mean=0, default is FALSE

norm_type

Type of normalization, either sum of each image = 1, i.e., "sum1", or mean of each image = 0, i.e., "mean0", default "sum1"

colorspace

either "rgb" or "hsv", default is "rgb"

relative

TRUE: If only one colour channel shall be extracted from a colour image, then this channel is returned relatively to the other two channels, default is FALSE.

Value

An array containing the images. If sum1=TRUE, then the third colour channel is dropped to save memory.


phenofun documentation built on Jan. 22, 2017, 9:01 p.m.