pub fn match_template(
    image: &GrayImage,
    template: &GrayImage,
    method: MatchTemplateMethod,
) -> Image<Luma<f32>> {
    use MatchTemplateMethod as M;

    let input = &ImageTemplate::new(image, template);
    match method {
        M::SumOfSquaredErrors => methods::Sse::match_template(input),
        M::SumOfSquaredErrorsNormalized => methods::SseNormalized::match_template(input),
        M::CrossCorrelation => methods::Ccorr::match_template(input),
        M::CrossCorrelationNormalized => methods::CcorrNormalized::match_template(input),
    }
}
Slides a `template` over an `image` and scores the match at each point using
the requested `method`.

The returned image has dimensions `image.width() - template.width() + 1` by
`image.height() - template.height() + 1`.

See [`MatchTemplateMethod`] for details of the matching methods.

# Panics

If either dimension of `template` is not strictly less than the corresponding dimension
of `image`.
src/template_matching.rs