subtractBackground {trackdem} | R Documentation |
Background subtraction
Description
subtractBackground
subtracts each image from a
previously created still background.
The objects created through the function contain all changing
pixels (i.e. movement).
Usage
subtractBackground(bg, colorimages = NULL)
Arguments
bg |
Array containing still background, as returned from
|
colorimages |
Array containing all frames, obtained by
|
Value
Returns array of class 'TrDm' and 'sbg' with same size as images, subtracted from background.
Author(s)
Marjolein Bruijning, Caspar A. Hallmann & Marco D. Visser
Examples
## 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)
plot(allImages)
## End(Not run)
[Package trackdem version 0.7.2 Index]