| identifyParticles | R Documentation |
identifyParticles identifies moving particles using the
subtracted images obtained from subtractBackground. Function
uses Connected Component Labeling and obtains particle statistics based on
code developed for the orphaned
package SDMTools (written by Jeremy VanDerWal).
identifyParticles(
sbg,
threshold = -0.1,
pixelRange = NULL,
qthreshold = NULL,
select = "dark",
colorimages = NULL,
autoThres = FALSE,
perFrame = FALSE,
frames = NULL
)
sbg |
Array containing images containing all moving particles,
as obtained from |
threshold |
Thresholds for including particles. A numeric vector
containing three values; one for each color. Otherwise, supply one value
which is to be used for all three colors. For a chosen quantile
for each frame, use |
pixelRange |
Default is |
qthreshold |
Default is |
select |
Select dark particles ( |
colorimages |
Array containing original color images. By default, the original color images are obtained from global environment. |
autoThres |
Logical. |
perFrame |
Logical. If |
frames |
When |
Returns a dataframe of class 'TrDm' and 'particles', containing particle statistics with identified particles for each frame
Marjolein Bruijning, Caspar A. Hallmann & Marco D. Visser
## 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)
partIden <- identifyParticles(allImages,threshold=-0.1,
pixelRange=c(3,400))
plot(partIden)
summary(partIden)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.