findThreshold: Find threshold

Description Usage Arguments Value Author(s) Examples

Description

This function can help to find a threshold value to distinguish noise from particles of interest.

Usage

1
findThreshold(images, frame = 1, colorimages = NULL)

Arguments

images

Array containing images containing all moving particles, as obtained from subtractBackground.

frame

Number specifying which frame to use. Default is frame 1.

colorimages

Array containing original color images. By default, the original color images are obtained from the global environment.

Value

Returns the number that is interactively chosen by the user. Use this threshold value in identifyParticles.

Author(s)

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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)
stillBack <- createBackground(allFullImages,method="mean")
allImages <- subtractBackground(stillBack)
thr <- findThreshold(allImages,frame=10)

## End(Not run)

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