Fix bug in array padding, template matching

This commit is contained in:
Johannes Schönberger
2013-12-08 18:54:02 +01:00
parent cff007827c
commit 783c04baec
8 changed files with 108 additions and 154 deletions
+2 -1
View File
@@ -108,7 +108,8 @@ def test_pad_input():
image[mid, -9:-4] -= template # full min template centered at 12
image[mid, -3:] += template[:, :3] # half max template centered at 18
result = match_template(image, template, pad_input=True)
result = match_template(image, template, pad_input=True,
constant_values=image.mean())
# get the max and min results.
sorted_result = np.argsort(result.flat)