Commit bd7c21d8 authored by Arthur Cinader's avatar Arthur Cinader

Fix explanation to refelect how matching currently works.

parent 0ed250cb
...@@ -70,13 +70,12 @@ that should be used to find the match. ...@@ -70,13 +70,12 @@ that should be used to find the match.
- The mask must have the same dimensions as the template - The mask must have the same dimensions as the template
- The mask should be a grayscale image where each pixel contains some value from black to white. - The mask should have a CV_8U or CV_32F depth and the same number of channels
Pixels that are white are fully included in calculating the best match. Pixels that are black as the template image. In CV_8U case, the mask values are treated as binary,
are excluded from the match. A value between black and white will include some of i.e. zero and non-zero. In CV_32F case, the values should fall into [0..1]
the match in proportion to how dark the pixel is. Although the image should be a grayscale whose range and the template pixels will be multiplied by the corresponding mask pixel
output from the file command should look something like: "PNG image data, 128 x 128, 8-bit gray values. Since the input images in the sample have the CV_8UC3 type, the mask
+alpha, non-interlaced", opencv will read the image into an rgb matrix that will be applied is also read as color image.
during the image match.
![](images/Template_Matching_Mask_Example.jpg) ![](images/Template_Matching_Mask_Example.jpg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment