| Cv2PhaseCorrelate Method |
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.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static Point2d PhaseCorrelate(
InputArray src1,
InputArray src2,
InputArray window,
out double response
)
Public Shared Function PhaseCorrelate (
src1 As InputArray,
src2 As InputArray,
window As InputArray,
<OutAttribute> ByRef response As Double
) As Point2d
public:
static Point2d PhaseCorrelate(
InputArray^ src1,
InputArray^ src2,
InputArray^ window,
[OutAttribute] double% response
)
static member PhaseCorrelate :
src1 : InputArray *
src2 : InputArray *
window : InputArray *
response : float byref -> Point2d
Parameters
- src1
- Type: OpenCvSharpInputArray
Source floating point array (CV_32FC1 or CV_64FC1) - src2
- Type: OpenCvSharpInputArray
Source floating point array (CV_32FC1 or CV_64FC1) - window
- Type: OpenCvSharpInputArray
Floating point array with windowing coefficients to reduce edge effects (optional). - response
- Type: SystemDouble
Signal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Return Value
Type:
Point2ddetected phase shift(sub-pixel) between the two arrays.
See Also