backgrounder: Reconstruct the Background of a Video

Description Usage Arguments Value Author(s) Examples

View source: R/backgrounder.R

Description

This function attempts to reconstruct the background of a video that was filmed from a fixed point of view.

Usage

1
2
3
4
5
6
7
8
backgrounder(
  video,
  n = 10,
  method = "median",
  prob = 0.025,
  start = NULL,
  end = NULL
)

Arguments

video

A video object as produced by video.

n

The number of images of the video that will be used to reconstruct the background.

method

The name of a method to reconstruct the background. There are currently 4 methods available: "median" (uses the median value of each pixel as background), "min" (uses the minimum value of each pixel as background), "max" (uses the maximum value of each pixel as background), and "quant" (uses an arbitrary quantile value of each pixel as background).

prob

If method = "quant", the quantile value to use.

start, end

The start and end frames of the video to use for the background reconstruction. If not set, the first and last frames will be used.

Value

And Image object.

Author(s)

Simon Garnier, garnier@njit.edu

Examples

1
2
3
cctv <- Rvision::video(system.file("sample_vid/Walk3.mp4", package = "Rvision"))
background <- backgrounder(cctv, 20)
plot(background)

swarm-lab/trackR documentation built on April 19, 2021, 3:02 p.m.