Motion Analysis and Object Tracking

Acc

Comments from the Wiki

void cvAcc(const CvArr* image, CvArr* sum, const CvArr* mask=NULL)

Adds a frame to an accumulator.

Parameters:
  • image – Input image, 1- or 3-channel, 8-bit or 32-bit floating point. (each channel of multi-channel image is processed independently)
  • sum – Accumulator with the same number of channels as input image, 32-bit or 64-bit floating-point
  • mask – Optional operation mask

The function adds the whole image image or its selected region to the accumulator sum :

\texttt{sum} (x,y)  \leftarrow \texttt{sum} (x,y) +  \texttt{image} (x,y)  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0

MultiplyAcc

Comments from the Wiki

void cvMultiplyAcc(const CvArr* image1, const CvArr* image2, CvArr* acc, const CvArr* mask=NULL)

Adds the product of two input images to the accumulator.

Parameters:
  • image1 – First input image, 1- or 3-channel, 8-bit or 32-bit floating point (each channel of multi-channel image is processed independently)
  • image2 – Second input image, the same format as the first one
  • acc – Accumulator with the same number of channels as input images, 32-bit or 64-bit floating-point
  • mask – Optional operation mask

The function adds the product of 2 images or their selected regions to the accumulator acc :

\texttt{acc} (x,y)  \leftarrow \texttt{acc} (x,y) +  \texttt{image1} (x,y)  \cdot \texttt{image2} (x,y)  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0

RunningAvg

Comments from the Wiki

void cvRunningAvg(const CvArr* image, CvArr* acc, double alpha, const CvArr* mask=NULL)

Updates the running average.

Parameters:
  • image – Input image, 1- or 3-channel, 8-bit or 32-bit floating point (each channel of multi-channel image is processed independently)
  • acc – Accumulator with the same number of channels as input image, 32-bit or 64-bit floating-point
  • alpha – Weight of input image
  • mask – Optional operation mask

The function calculates the weighted sum of the input image image and the accumulator acc so that acc becomes a running average of frame sequence:

\texttt{acc} (x,y)  \leftarrow (1- \alpha )  \cdot \texttt{acc} (x,y) +  \alpha \cdot \texttt{image} (x,y)  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0

where \alpha regulates the update speed (how fast the accumulator forgets about previous frames).

SquareAcc

Comments from the Wiki

void cvSquareAcc(const CvArr* image, CvArr* sqsum, const CvArr* mask=NULL)

Adds the square of the source image to the accumulator.

Parameters:
  • image – Input image, 1- or 3-channel, 8-bit or 32-bit floating point (each channel of multi-channel image is processed independently)
  • sqsum – Accumulator with the same number of channels as input image, 32-bit or 64-bit floating-point
  • mask – Optional operation mask

The function adds the input image image or its selected region, raised to power 2, to the accumulator sqsum :

\texttt{sqsum} (x,y)  \leftarrow \texttt{sqsum} (x,y) +  \texttt{image} (x,y)^2  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0

Table Of Contents

Previous topic

Planar Subdivisions

Next topic

Feature Detection

This Page