loadImages: Load .png images

Description Usage Arguments Value Author(s) Examples

Description

loadImages loads png images as three dimensional arrays. The objects created through the function can be used for image analysis.

Usage

1
2
3
4
5
6
7
loadImages(
  dirPictures,
  filenames = NULL,
  nImages = 1:30,
  xranges = NULL,
  yranges = NULL
)

Arguments

dirPictures

The path of the folder where the images can be found.

filenames

Default is NULL, or all files. If all files should NOT be loaded, here specify which files to use, as a character string.

nImages

Numeric vector specifying which images in the directory should be loaded; default is 1:30.

xranges

By default the full image is loaded; specify to subset the number of columns.

yranges

By default the full image is loaded; specify to subset the number of rows.

Value

Array of class 'TrDm' and 'colorimages' containing all loaded images.

Author(s)

Marjolein Bruijning, Caspar A. Hallmann & Marco D. Visser

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
dir.create("images")
## Create image sequence
traj <- simulTrajec(path="images",
                    nframes=30,nIndividuals=20,domain="square",
                    h=0.01,rho=0.9,
                    sizes=runif(20,0.004,0.006))
## Load images
dir <- "images"
allFullImages <- loadImages (dirPictures=dir,nImages=1:30)
plot(allFullImages)

## End(Not run)

marjoleinbruijning/trackdem documentation built on Sept. 29, 2021, 7:52 a.m.