runBatch: Batch analysis

Description Usage Arguments Value Author(s) See Also Examples

View source: R/resultsFunctions.R

Description

runBatch analyzes all image sequences in a specified directory. Use this function when settings have been optimized previously on a single or selection of movies/image sequences.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
runBatch(
  path,
  settings = NULL,
  dirnames = NULL,
  nImages = 1:30,
  pixelRange = NULL,
  threshold = -0.1,
  qthreshold = NULL,
  select = "dark",
  nn = NULL,
  incThres = NULL,
  plotOutput = FALSE,
  plotType = "trajectories",
  L = 20,
  R = 2,
  weight = c(1, 1, 1),
  autoThres = FALSE,
  perFrame = FALSE,
  methodBg = "mean",
  frames = NULL,
  saveAll = FALSE
)

Arguments

path

A character vector of path name that contains all directories with image sequences.

settings

Object of class 'tracked' containing all optimized settings in attributes, as obtained from trackParticles. Alternatively, settings can be specified using arguments described below.

dirnames

If not all image sequences should be analyzed, specify which files to use as a character string.

nImages

See loadImages

pixelRange

See identifyParticles

threshold

See identifyParticles

qthreshold

See identifyParticles

select

See identifyParticles

nn

Name of artificial neural net if apply it to images. Default is NULL, resulting in no neural net being applied.

incThres

Minimum number of frames that a particle must be present. By default, automated estimate is used.

plotOutput

Default is FALSE. Set TRUE to plot results.

plotType

Default is 'trajectories'. Other options are 'sizes' and 'animation'.

L

See trackParticles

R

See trackParticles

weight

See trackParticles

autoThres

See identifyParticles

perFrame

See identifyParticles

methodBg

See createBackground

frames

See identifyParticles

saveAll

Logical. Set TRUE to save for each image sequence the full object obtained from loadImages. Default is FALSE.

Value

Dataframe with estimated population size for each image sequence.

Author(s)

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

See Also

loadImages, createBackground, subtractBackground, identifyParticles, trackParticles.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
## Simulate 3 image sequences
wd <- getwd()
folders <- paste0(rep("images",3),1:3)
populations <- c(15,25,50)
dir.create("./batchTest")
setwd("./batchTest")
for(i in 1:length(folders)){
  dir.create(folders[i])
  traj <- simulTrajec(path=folders[i],
                      nframes=30,nIndividuals=populations[i],
                      h=0.01,rho=0.9,
                      sizes=runif(populations[i],0.004,0.006))
}
setwd(wd)
batchpath <- "./batchTest"
results <- runBatch(path=batchpath,
                    nImages=1:30,threshold=-0.1,select='dark',
                    pixelRange=c(1,100),L=50,R=3,
                    incThres=10)
results

## End(Not run)

trackdem documentation built on Sept. 25, 2021, 1:07 a.m.