Skip to content

Commit a2b2a8f

Browse files
committed
add doc
1 parent dcb1c85 commit a2b2a8f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

MTM/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def _findLocalMin_(corrMap, score_threshold=0.4):
4848
def computeScoreMap(template, image, method=cv2.TM_CCOEFF_NORMED, mask=None):
4949
"""
5050
Compute score map provided numpy array for template and image (automatically converts images if necessary).
51+
A mask can be provided to limit the comparison of the pixel values to a fraction of the template region.
52+
The mask should have the same dimensions and image type than the template.
5153
5254
Return
5355
------
@@ -186,7 +188,7 @@ def matchTemplates(listTemplates, image, method=cv2.TM_CCOEFF_NORMED, N_object=f
186188
187189
Parameters
188190
----------
189-
- listTemplates : list of tuples (LabelString, template, mask (optional))
191+
- listTemplates : list of tuples as (LabelString, template, mask (optional))
190192
templates to search in each image, associated to a label
191193
labelstring : string
192194
template : numpy array (grayscale or RGB)

0 commit comments

Comments
 (0)