Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 37accd7

Browse files
more readable formating
1 parent 0b3ddff commit 37accd7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212

1313
#%% Get image and templates by cropping
1414
image = coins()
15+
1516
smallCoin = image[37:37+38, 80:80+41]
1617
bigCoin = image[14:14+59,302:302+65]
18+
listTemplates = [('small', smallCoin),
19+
('big', bigCoin)]
1720

1821

1922
#%% Perform matching
20-
tableHit = MTM.matchTemplates([('small', smallCoin), ('big', bigCoin)], image, score_threshold=0.3, method=cv2.TM_CCOEFF_NORMED, maxOverlap=0) # Correlation-score
21-
#tableHit = MTM.matchTemplates([('small', smallCoin), ('big', bigCoin)], image, score_threshold=0.4, method=cv2.TM_SQDIFF_NORMED, maxOverlap=0) # Difference-score
23+
tableHit = MTM.matchTemplates(listTemplates, image, score_threshold=0.3, method=cv2.TM_CCOEFF_NORMED, maxOverlap=0) # Correlation-score
24+
#tableHit = MTM.matchTemplates(listTemplates, image, score_threshold=0.4, method=cv2.TM_SQDIFF_NORMED, maxOverlap=0) # Difference-score
2225

2326
print("Found {} coins".format(len(tableHit)))
2427
print(tableHit)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /