public static void MatchTemplate(
InputArray image,
InputArray templ,
OutputArray result,
TemplateMatchModes method,
InputArray mask = null)
{
if (image == null)
throw new ArgumentNullException(nameof(image));
if (templ == null)
throw new ArgumentNullException(nameof(templ));
if (result == null)
throw new ArgumentNullException(nameof(result));
image.ThrowIfDisposed();
templ.ThrowIfDisposed();
result.ThrowIfNotReady();
if (mask != null)
mask.ThrowIfDisposed();
NativeMethods.imgproc_matchTemplate(image.CvPtr, templ.CvPtr, result.CvPtr, (int)method, ToPtr(mask));
GC.KeepAlive(image);
GC.KeepAlive(templ);
result.Fix();
GC.KeepAlive(mask);
}
#endregion