import imgsim
import cv2
vtr = imgsim.Vectorizer()
red1_img = cv2.imread("./images/00437_01_01.jpeg")
red2_img = cv2.imread("./images/00437_01_10.jpeg")
red3_img = cv2.imread("./images/00437_01_19.jpeg")
blue1_img = cv2.imread("./images/00439_01_08.jpeg")
blue2_img = cv2.imread("./images/00439_01_11.jpeg")
blue3_img = cv2.imread("./images/00439_01_19.jpeg")
red1 = vtr.vectorize(red1_img)
red2 = vtr.vectorize(red2_img)
red3 = vtr.vectorize(red3_img)
blue1 = vtr.vectorize(blue1_img)
blue2 = vtr.vectorize(blue2_img)
blue3 = vtr.vectorize(blue3_img)
dist0 = imgsim.distance(red1, red2)
print("red1 red2 =", round(dist0, 2))
dist1 = imgsim.distance(red1, red3)
print("red1 red3 =", round(dist1, 2))
dist2 = imgsim.distance(red2, red3)
print("red2 red3 =", round(dist2, 2))
dist3 = imgsim.distance(blue1, blue2)
print("blue1 blue2 =", round(dist3, 2))
dist4 = imgsim.distance(blue1, blue3)
print("blue1 blue3 =", round(dist4, 2))
dist5 = imgsim.distance(blue2, blue3)
print("blue2 blue3 =", round(dist5, 2))
dist6 = imgsim.distance(red1, blue1)
print("red1 blue1 =", round(dist6, 2))
dist7 = imgsim.distance(red1, blue2)
print("red1 blue2 =", round(dist7, 2))
dist8 = imgsim.distance(red1, blue3)
print("red1 blue3 =", round(dist8, 2))
dist9 = imgsim.distance(red2, blue1)
print("red2 blue1 =", round(dist9, 2))
dist10 = imgsim.distance(red2, blue2)
print("red2 blue2 =", round(dist10, 2))
dist11 = imgsim.distance(red2, blue3)
print("red2 blue3 =", round(dist11, 2))
dist12 = imgsim.distance(red3, blue1)
print("red3 blue1 =", round(dist12, 2))
dist13 = imgsim.distance(red3, blue2)
print("red3 blue2 =", round(dist13, 2))
dist14 = imgsim.distance(red3, blue3)
print("red3 blue3 =", round(dist14, 2))