mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-11 12:43:04 +08:00
Fix input test of template matching
This commit is contained in:
@@ -105,8 +105,9 @@ def match_template(image, template, pad_input=False, mode='constant',
|
||||
|
||||
if image.ndim not in (2, 3) or template.ndim not in (2, 3):
|
||||
raise ValueError("Only 2- and 3-D images supported.")
|
||||
if image.ndim != template.ndim:
|
||||
raise ValueError("Dimensionality of template must match image.")
|
||||
if image.ndim < template.ndim:
|
||||
raise ValueError("Dimensionality of template must be less than or "
|
||||
"equal to the dimensionality of image.")
|
||||
if np.any(np.less(image.shape, template.shape)):
|
||||
raise ValueError("Image must be larger than template.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user