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 47af89b

Browse files
committed
test
1 parent 973b782 commit 47af89b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎my08-opencv玩游戏game/连连看/compare_photos.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def compare(i, j, img):
4949
# if abs(image_difference-1)>0.5:
5050
# if image_difference < 0.1:
5151
# pairs.append((i, j, x, y, image_difference))
52-
if res[0][0] > 0.9 and (i != x and j != y):
52+
if res[0][0] >= 0.9 and (i != x and j != y):
5353
pairs.append((i, j, x, y, res[0][0]))
5454
print('--------')
5555

@@ -62,6 +62,9 @@ def compare(i, j, img):
6262
print(pairs)#33对?
6363
#[(0, 0, 5, 3, 0.93773538), (0, 3, 2, 6, 0.94418496), (0, 3, 3, 4, 0.97784418), (0, 3, 5, 6, 0.91531861), (0, 3, 7, 4, 0.90034771), (0, 4, 1, 5, 0.9859665), (0, 4, 2, 5, 0.97593749), (0, 4, 5, 7, 0.92510819), (1, 0, 2, 4, 0.95577663), (1, 0, 2, 5, 0.93438679), (1, 0, 3, 2, 0.98244762), (1, 0, 5, 1, 0.95950162), (1, 0, 5, 7, 0.9012484), (1, 0, 7, 3, 0.91213149), (1, 2, 4, 3, 0.97030866), (1, 3, 7, 5, 0.90350145), (1, 4, 3, 5, 0.92840946), (1, 4, 3, 6, 0.92976296), (1, 5, 5, 7, 0.93449652), (2, 1, 6, 4, 0.91386253), (2, 4, 5, 7, 0.95080549), (2, 5, 5, 7, 0.95228308), (3, 2, 5, 7, 0.94026983), (3, 2, 7, 3, 0.95594138), (3, 4, 5, 6, 0.96190572), (3, 4, 8, 7, 0.90763825), (4, 1, 7, 2, 0.95110172), (4, 3, 6, 6, 0.95759535), (5, 1, 7, 3, 0.97735828), (5, 2, 8, 3, 0.96606308), (5, 6, 8, 7, 0.92764288), (6, 0, 7, 3, 0.96886152), (7, 4, 8, 7, 0.93397516)]
6464

65+
66+
67+
#Test
6568
# 1, 0, 1, 5
6669
a = mat[1][0]
6770
b = mat[1][5]

0 commit comments

Comments
(0)

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