Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data MatchTemplateMethod
- data MatchTemplateNormalisation
- matchTemplate :: (depth `In` '[Word8, Float], Length searchShape <= 2) => Mat (S searchShape) (S 1) (S depth) -> Mat (S '[th, tw]) (S 1) (S depth) -> MatchTemplateMethod -> MatchTemplateNormalisation -> CvExcept (Mat (S '[rh, rw]) (S 1) (S Float))
Documentation
data MatchTemplateMethod Source #
MatchTemplateSqDiff |
|
MatchTemplateCCorr |
|
MatchTemplateCCoeff |
|
data MatchTemplateNormalisation Source #
Whether to use normalisation. See MatchTemplateMethod
.
:: (depth `In` '[Word8, Float], Length searchShape <= 2) | |
=> Mat (S searchShape) (S 1) (S depth) | Image where the search is running. It must be 8-bit or 32-bit floating-point. |
-> Mat (S '[th, tw]) (S 1) (S depth) | Searched template. It must be not greater than the source image and have the same data type. |
-> MatchTemplateMethod | Parameter specifying the comparison method. |
-> MatchTemplateNormalisation | Normalise |
-> CvExcept (Mat (S '[rh, rw]) (S 1) (S Float)) | Map of comparison results. It must be single-channel 32-bit floating-point. If image is and templ is , then result is . |
Compares a template against overlapped image regions.
The function slides through image, compares the overlapped patches of size against templ using the specified method and stores the comparison results in result . Here are the formulae for the available comparison methods ( denotes image, template, result). The summation is done over template and/or the image patch: