mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-09 11:33:41 +08:00
Change _template.match_template variables to float.
Template and image in test are converted to float32 before passing to `match_template`. This change is temporary: `match_template` should convert these variables internally.
This commit is contained in:
@@ -5,8 +5,9 @@ from numpy.random import randn
|
||||
|
||||
def test_template():
|
||||
size = 100
|
||||
image = np.zeros((400, 400))
|
||||
image = np.zeros((400, 400), dtype=np.float32)
|
||||
target = np.tri(size) + np.tri(size)[::-1]
|
||||
target = target.astype(np.float32)
|
||||
target_positions = [(50, 50), (200, 200)]
|
||||
for x, y in target_positions:
|
||||
image[x:x + size, y:y + size] = target
|
||||
|
||||
Reference in New Issue
Block a user