Skip to content

Commit 46c4edb

Browse files
committed
add test when template as large
1 parent 2cb6d6f commit 46c4edb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@
3333
plt.imshow(Overlay)
3434

3535
#%% 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
36+
# Comment all except one to test them
37+
MTM.matchTemplates(listTemplates, image, searchBox=(0,0,20,20)) # larger than search region
38+
MTM.matchTemplates(listTemplates,
39+
image,
40+
searchBox=(0,0) + bigCoin.shape[::-1]) # as large as search region
3741

3842
tooLarge = ("tooLarge", np.pad(image, 1))
39-
tableHit = MTM.matchTemplates([tooLarge], image) # larger than image
43+
MTM.matchTemplates([tooLarge], image) # larger than image
4044

4145
#%% Use GluonCV for display
4246
import gluoncv as gcv

0 commit comments

Comments
 (0)