Skip to content

Commit 2cb6d6f

Browse files
committed
add test for template larger then image/search region
1 parent 37accd7 commit 2cb6d6f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test.py

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
plt.figure()
3333
plt.imshow(Overlay)
3434

35+
#%% Check that it is raising an error if template is larger than image or search region
36+
tableHit = MTM.matchTemplates(listTemplates, image, searchBox=(0,0,20,20)) # larger than search region
37+
38+
tooLarge = ("tooLarge", np.pad(image, 1))
39+
tableHit = MTM.matchTemplates([tooLarge], image) # larger than image
40+
3541
#%% Use GluonCV for display
3642
import gluoncv as gcv
3743

0 commit comments

Comments
 (0)