Functions | |
CV_EXPORTS_W void | cv::accumulate (InputArray src, InputOutputArray dst, InputArray mask=noArray()) |
Adds an image to the accumulator image. More... | |
CV_EXPORTS_W void | cv::accumulateSquare (InputArray src, InputOutputArray dst, InputArray mask=noArray()) |
Adds the square of a source image to the accumulator image. More... | |
CV_EXPORTS_W void | cv::accumulateProduct (InputArray src1, InputArray src2, InputOutputArray dst, InputArray mask=noArray()) |
Adds the per-element product of two input images to the accumulator image. More... | |
CV_EXPORTS_W void | cv::accumulateWeighted (InputArray src, InputOutputArray dst, double alpha, InputArray mask=noArray()) |
Updates a running average. More... | |
CV_EXPORTS_W Point2d | cv::phaseCorrelate (InputArray src1, InputArray src2, InputArray window=noArray(), CV_OUT double *response=0) |
The function is used to detect translational shifts that occur between two images. More... | |
CV_EXPORTS_W void | cv::createHanningWindow (OutputArray dst, Size winSize, int type) |
This function computes a Hanning window coefficients in two dimensions. More... | |
CV_EXPORTS_W void | cv::divSpectrums (InputArray a, InputArray b, OutputArray c, int flags, bool conjB=false) |
Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum. More... | |
CV_EXPORTS_W void cv::accumulate | ( | InputArray | src, |
InputOutputArray | dst, | ||
InputArray | mask = noArray() |
||
) |
Adds an image to the accumulator image.
The function adds src or some of its elements to dst :
The function supports multi-channel images. Each channel is processed independently.
The function cv::accumulate can be used, for example, to collect statistics of a scene background viewed by a still camera and for the further foreground-background segmentation.
src | Input image of type CV_8UC(n), CV_16UC(n), CV_32FC(n) or CV_64FC(n), where n is a positive integer. |
dst | Accumulator image with the same number of channels as input image, and a depth of CV_32F or CV_64F. |
mask | Optional operation mask. |
CV_EXPORTS_W void cv::accumulateProduct | ( | InputArray | src1, |
InputArray | src2, | ||
InputOutputArray | dst, | ||
InputArray | mask = noArray() |
||
) |
Adds the per-element product of two input images to the accumulator image.
The function adds the product of two images or their selected regions to the accumulator dst :
The function supports multi-channel images. Each channel is processed independently.
src1 | First input image, 1- or 3-channel, 8-bit or 32-bit floating point. |
src2 | Second input image of the same type and the same size as src1 . |
dst | Accumulator image with the same number of channels as input images, 32-bit or 64-bit floating-point. |
mask | Optional operation mask. |
CV_EXPORTS_W void cv::accumulateSquare | ( | InputArray | src, |
InputOutputArray | dst, | ||
InputArray | mask = noArray() |
||
) |
Adds the square of a source image to the accumulator image.
The function adds the input image src or its selected region, raised to a power of 2, to the accumulator dst :
The function supports multi-channel images. Each channel is processed independently.
src | Input image as 1- or 3-channel, 8-bit or 32-bit floating point. |
dst | Accumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point. |
mask | Optional operation mask. |
CV_EXPORTS_W 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:
That is, alpha regulates the update speed (how fast the accumulator "forgets" about earlier images). The function supports multi-channel images. Each channel is processed independently.
src | Input image as 1- or 3-channel, 8-bit or 32-bit floating point. |
dst | Accumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point. |
alpha | Weight of the input image. |
mask | Optional operation mask. |
CV_EXPORTS_W 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 (both width and height must be > 1) |
type | Created array type |
CV_EXPORTS_W void cv::divSpectrums | ( | InputArray | a, |
InputArray | b, | ||
OutputArray | c, | ||
int | flags, | ||
bool | conjB = false |
||
) |
Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum.
The function cv::divSpectrums performs the per-element division of the first array by the second array. The arrays are CCS-packed or complex matrices that are results of a real or complex Fourier transform.
a | first input array. |
b | second input array of the same size and type as src1 . |
c | output array of the same size and type as src1 . |
flags | operation flags; currently, the only supported flag is cv::DFT_ROWS, which indicates that each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a 0 as value. |
conjB | optional flag that conjugates the second input array before the multiplication (true) or not (false). |
CV_EXPORTS_W Point2d cv::phaseCorrelate | ( | InputArray | src1, |
InputArray | src2, | ||
InputArray | window = noArray() , |
||
CV_OUT 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 cross-power spectrum of two supplied source arrays. The arrays are padded if needed with getOptimalDFTSize.
The function performs the following equations:
where is the forward DFT.
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). |