質問編集履歴
1
ソースコードの変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,13 +9,15 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
def main():
|
12
|
-
im1 = cv2.imread("Tulips.jpg",0)
|
12
|
+
im1 = cv2.imread("C:\Users\wakimoto\testimg\Tulips.jpg",0)
|
13
|
-
im2 = cv2.imread("Tulips2.jpg",0)
|
13
|
+
im2 = cv2.imread("C:\Users\wakimoto\testimg\Tulips2.jpg",0)
|
14
|
+
print(im1)
|
14
15
|
|
15
16
|
hist1 = cv2.calcHist([im1],[0],None,[256],[0,256])
|
16
17
|
hist2 = cv2.calcHist([im2],[0],None,[256],[0,256])
|
17
18
|
|
18
19
|
d = cv2.compareHist(hist1,hist2,0)
|
20
|
+
#類似度dは0から1の範囲で出るらしい
|
19
21
|
print(d)
|
20
22
|
|
21
23
|
|