BUG: Fix internal import in template matching.

This commit is contained in:
Stefan van der Walt
2012-05-09 12:53:29 -07:00
parent d5eac3b4e5
commit d19d45850f
+3 -3
View File
@@ -3,7 +3,7 @@
import numpy as np
import _template
from skimage.util.dtype import _convert
from skimage.util.dtype import convert
def match_template(image, template, pad_input=False):
@@ -67,8 +67,8 @@ def match_template(image, template, pad_input=False):
"""
if np.any(np.less(image.shape, template.shape)):
raise ValueError("Image must be larger than template.")
image = _convert(image, np.float32)
template = _convert(template, np.float32)
image = convert(image, np.float32)
template = convert(template, np.float32)
if pad_input:
pad_size = tuple(np.array(image.shape) + np.array(template.shape) - 1)