OpenCV
3.2.0
Open Source Computer Vision

Functions  
void  cv::accumulate (InputArray src, InputOutputArray dst, InputArray mask=noArray()) 
Adds an image to the accumulator. More...  
void  cv::accumulateProduct (InputArray src1, InputArray src2, InputOutputArray dst, InputArray mask=noArray()) 
Adds the perelement product of two input images to the accumulator. More...  
void  cv::accumulateSquare (InputArray src, InputOutputArray dst, InputArray mask=noArray()) 
Adds the square of a source image to the accumulator. More...  
void  cv::accumulateWeighted (InputArray src, InputOutputArray dst, double alpha, InputArray mask=noArray()) 
Updates a running average. More...  
void  cv::createHanningWindow (OutputArray dst, Size winSize, int type) 
This function computes a Hanning window coefficients in two dimensions. More...  
Point2d  cv::phaseCorrelate (InputArray src1, InputArray src2, InputArray window=noArray(), double *response=0) 
The function is used to detect translational shifts that occur between two images. More...  
void cv::accumulate  (  InputArray  src, 
InputOutputArray  dst,  
InputArray  mask = noArray() 

) 
Adds an image to the accumulator.
The function adds src or some of its elements to dst :
\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]
The function supports multichannel images. Each channel is processed independently.
The functions accumulate* can be used, for example, to collect statistics of a scene background viewed by a still camera and for the further foregroundbackground segmentation.
src  Input image as 1 or 3channel, 8bit or 32bit floating point. 
dst  Accumulator image with the same number of channels as input image, 32bit or 64bit floatingpoint. 
mask  Optional operation mask. 
void cv::accumulateProduct  (  InputArray  src1, 
InputArray  src2,  
InputOutputArray  dst,  
InputArray  mask = noArray() 

) 
Adds the perelement product of two input images to the accumulator.
The function adds the product of two images or their selected regions to the accumulator dst :
\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src1} (x,y) \cdot \texttt{src2} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]
The function supports multichannel images. Each channel is processed independently.
src1  First input image, 1 or 3channel, 8bit or 32bit floating point. 
src2  Second input image of the same type and the same size as src1 . 
dst  Accumulator with the same number of channels as input images, 32bit or 64bit floatingpoint. 
mask  Optional operation mask. 
void cv::accumulateSquare  (  InputArray  src, 
InputOutputArray  dst,  
InputArray  mask = noArray() 

) 
Adds the square of a source image to the accumulator.
The function adds the input image src or its selected region, raised to a power of 2, to the accumulator dst :
\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src} (x,y)^2 \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]
The function supports multichannel images. Each channel is processed independently.
src  Input image as 1 or 3channel, 8bit or 32bit floating point. 
dst  Accumulator image with the same number of channels as input image, 32bit or 64bit floatingpoint. 
mask  Optional operation mask. 
void cv::accumulateWeighted  (  InputArray  src, 
InputOutputArray  dst,  
double  alpha,  
InputArray  mask = noArray() 

) 
Updates a running average.
The function calculates the weighted sum of the input image src and the accumulator dst so that dst becomes a running average of a frame sequence:
\[\texttt{dst} (x,y) \leftarrow (1 \texttt{alpha} ) \cdot \texttt{dst} (x,y) + \texttt{alpha} \cdot \texttt{src} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]
That is, alpha regulates the update speed (how fast the accumulator "forgets" about earlier images). The function supports multichannel images. Each channel is processed independently.
src  Input image as 1 or 3channel, 8bit or 32bit floating point. 
dst  Accumulator image with the same number of channels as input image, 32bit or 64bit floatingpoint. 
alpha  Weight of the input image. 
mask  Optional operation mask. 
void cv::createHanningWindow  (  OutputArray  dst, 
Size  winSize,  
int  type  
) 
This function computes a Hanning window coefficients in two dimensions.
See (http://en.wikipedia.org/wiki/Hann_function) and (http://en.wikipedia.org/wiki/Window_function) for more information.
An example is shown below:
dst  Destination array to place Hann coefficients in 
winSize  The window size specifications 
type  Created array type 
Point2d cv::phaseCorrelate  (  InputArray  src1, 
InputArray  src2,  
InputArray  window = noArray() , 

double *  response = 0 

) 
The function is used to detect translational shifts that occur between two images.
The operation takes advantage of the Fourier shift theorem for detecting the translational shift in the frequency domain. It can be used for fast image registration as well as motion estimation. For more information please see http://en.wikipedia.org/wiki/Phase_correlation
Calculates the crosspower spectrum of two supplied source arrays. The arrays are padded if needed with getOptimalDFTSize.
The function performs the following equations:
\[\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}\]
where \(\mathcal{F}\) is the forward DFT.\[R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{\mathbf{G}_a \mathbf{G}_b^*}\]
\[r = \mathcal{F}^{1}\{R\}\]
\[(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}\]
src1  Source floating point array (CV_32FC1 or CV_64FC1) 
src2  Source floating point array (CV_32FC1 or CV_64FC1) 
window  Floating point array with windowing coefficients to reduce edge effects (optional). 
response  Signal power within the 5x5 centroid around the peak, between 0 and 1 (optional). 