J'ai essayé de trier les objets de l'image du plat de steak-⑤ Détection de point de fonction d'image similaire

introduction

Dans J'ai essayé de trier les objets de l'image du plat de steak-③ Détection de carte de chaleur d'image similaire, j'ai détecté des images similaires par carte de chaleur. Cependant, comme autre méthode, j'ai essayé de voir quel serait le résultat lors de la détection de points caractéristiques.

Source de référence

Code source

grouping_image2


#!/usr/local/bin/python
# -*- coding: utf-8 -*-

import cv2
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import selectivesearch
import os
import sys

def main():
    # loading lena image
    img = cv2.imread("{Chemin de l'image}")

    # perform selective search
    img_lbl, regions = selectivesearch.selective_search(
        img,
        scale=500,
        sigma=0.9,
        min_size=10
    )

    candidates = set()

    for r in regions:
        # excluding same rectangle (with different segments)
        if r['rect'] in candidates:
            continue

        # excluding regions smaller than 2000 pixels
        if r['size'] < 2000:
            continue

        # distorted rects
        x, y, w, h = r['rect']

        if w / h > 1.2 or h / w > 1.2:
            continue

        candidates.add(r['rect'])

    # draw rectangles on the original image
    fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(6, 6))
    ax.imshow(img)

    overlaps = {}

    #Comptez le nombre de chevauchements et attribuez-les au tableau.
    for x, y, w, h in candidates:
        group = '%s_%s_%s_%s' % (x, y, w, h)

        for x2, y2, w2, h2 in candidates:
            if x2 - w < x < x2 + w2 and y2 - h < y < y2 + h2:

                if not group in overlaps:
                    overlaps[group] = 0

                overlaps[group] = overlaps[group] + 1

    #Sort les fichiers avec 30 chevauchements ou plus (30 est défini arbitrairement comme un seuil).
    for key, overlap in enumerate(overlaps):
        if overlap > 30:
            for x, y, w, h in candidates:
                group = '%s_%s_%s_%s' % (x, y, w, h)

                if group in overlaps:
                    cv2.imwrite("{Chemin du répertoire}" + str(group) + '.jpg', img[y:y + h, x:x + w])

    image_dir = "{Chemin du répertoire}"
    target_files = os.listdir(image_dir)
    files = os.listdir(image_dir)

    group_images = {}

    for target_file in target_files:
        if target_file == '.DS_Store':
            continue

        #Chargez le fichier image.
        target_image_path = image_dir + target_file
        target_image = cv2.imread(target_image_path)

        #Générez des données de points caractéristiques.
        bf = cv2.BFMatcher(cv2.NORM_HAMMING)
        # detector = cv2.AKAZE_create()
        detector = cv2.ORB_create()
        (target_kp, target_des) = detector.detectAndCompute(target_image, None)

        similarity_images = {}

        for file in files:
            if file == '.DS_Store' or file == target_file:
                continue
            try:
                #Chargez le fichier image.
                comparing_image_path = image_dir + file
                comparing_image = cv2.imread(comparing_image_path)

                #Générez des données de points caractéristiques.
                (comparing_kp, comparing_des) = detector.detectAndCompute(comparing_image, None)

                #La distance entre les points caractéristiques est calculée pour calculer la similitude des images.
                matches = bf.match(target_des, comparing_des)

                #Convertit le résultat en notation probabiliste.
                dist = [m.distance for m in matches]
                probability = sum(dist) / len(dist)
            except cv2.error:
                probability = 100000

            #Produit la similitude.
            print("target file: " + target_file, "file: " + file, "similarity: " + str(probability))

if __name__ == "__main__":
    main()

résultat

Pour ORB

('target file: 0_0_553_419.jpg', 'file: 0_0_599_419.jpg', 'similarity: 10.066')
('target file: 0_0_553_419.jpg', 'file: 137_146_120_74.jpg', 'similarity: 114.752')
('target file: 0_0_553_419.jpg', 'file: 137_45_404_229.jpg', 'similarity: 57.85')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 161_184_89_58.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 178_121_226_133.jpg', 'similarity: 72.288')
('target file: 0_0_553_419.jpg', 'file: 178_45_363_220.jpg', 'similarity: 60.832')
('target file: 0_0_553_419.jpg', 'file: 178_45_363_229.jpg', 'similarity: 60.274')
('target file: 0_0_553_419.jpg', 'file: 227_285_134_108.jpg', 'similarity: 74.564')
('target file: 0_0_553_419.jpg', 'file: 227_285_135_111.jpg', 'similarity: 73.186')
('target file: 0_0_553_419.jpg', 'file: 229_45_312_220.jpg', 'similarity: 63.454')
('target file: 0_0_553_419.jpg', 'file: 229_49_156_125.jpg', 'similarity: 66.79')
('target file: 0_0_553_419.jpg', 'file: 238_49_147_113.jpg', 'similarity: 69.928')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 238_96_63_66.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 273_0_326_365.jpg', 'similarity: 59.974')
('target file: 0_0_553_419.jpg', 'file: 273_174_119_91.jpg', 'similarity: 107.31')
('target file: 0_0_553_419.jpg', 'file: 273_8_227_127.jpg', 'similarity: 72.85')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 286_208_84_54.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 286_208_85_55.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 289_210_81_52.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 297_49_88_88.jpg', 'similarity: 89.28')
('target file: 0_0_553_419.jpg', 'file: 301_0_298_268.jpg', 'similarity: 66.55')
('target file: 0_0_553_419.jpg', 'file: 301_0_298_365.jpg', 'similarity: 62.89')
('target file: 0_0_553_419.jpg', 'file: 31_0_100_119.jpg', 'similarity: 84.416')
('target file: 0_0_553_419.jpg', 'file: 31_0_258_143.jpg', 'similarity: 79.114')
('target file: 0_0_553_419.jpg', 'file: 31_0_258_191.jpg', 'similarity: 71.458')
('target file: 0_0_553_419.jpg', 'file: 31_0_529_414.jpg', 'similarity: 18.948')
('target file: 0_0_553_419.jpg', 'file: 31_0_533_416.jpg', 'similarity: 20.062')
('target file: 0_0_553_419.jpg', 'file: 329_45_212_220.jpg', 'similarity: 71.26')
('target file: 0_0_553_419.jpg', 'file: 336_45_205_220.jpg', 'similarity: 71.14')
('target file: 0_0_553_419.jpg', 'file: 379_259_161_122.jpg', 'similarity: 77.456')
('target file: 0_0_553_419.jpg', 'file: 39_112_521_302.jpg', 'similarity: 32.126')
('target file: 0_0_553_419.jpg', 'file: 39_115_521_299.jpg', 'similarity: 32.158')
('target file: 0_0_553_419.jpg', 'file: 405_174_126_94.jpg', 'similarity: 82.138')
('target file: 0_0_553_419.jpg', 'file: 408_303_156_113.jpg', 'similarity: 75.892')
('target file: 0_0_553_419.jpg', 'file: 408_305_156_111.jpg', 'similarity: 75.468')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 525_366_74_53.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 52_184_224_199.jpg', 'similarity: 57.48')
('target file: 0_0_553_419.jpg', 'file: 52_184_311_211.jpg', 'similarity: 48.768')
('target file: 0_0_553_419.jpg', 'file: 52_230_194_153.jpg', 'similarity: 63.69')
('target file: 0_0_553_419.jpg', 'file: 52_230_224_153.jpg', 'similarity: 62.202')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 545_258_54_107.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 56_0_200_113.jpg', 'similarity: 83.034')
('target file: 0_0_553_419.jpg', 'file: 56_0_217_116.jpg', 'similarity: 82.33')
('target file: 0_0_553_419.jpg', 'file: 57_245_167_106.jpg', 'similarity: 73.444')
('target file: 0_0_553_419.jpg', 'file: 57_245_167_112.jpg', 'similarity: 71.926')
('target file: 0_0_553_419.jpg', 'file: 57_245_167_134.jpg', 'similarity: 69.264')
('target file: 0_0_553_419.jpg', 'file: 57_45_484_334.jpg', 'similarity: 31.454')
('target file: 0_0_553_419.jpg', 'file: 57_45_496_334.jpg', 'similarity: 30.714')
('target file: 0_0_553_419.jpg', 'file: 59_0_197_113.jpg', 'similarity: 82.358')
('target file: 0_0_553_419.jpg', 'file: 70_268_146_110.jpg', 'similarity: 78.664')
('target file: 0_0_599_419.jpg', 'file: 0_0_553_419.jpg', 'similarity: 10.04')
('target file: 0_0_599_419.jpg', 'file: 137_146_120_74.jpg', 'similarity: 114.648')
('target file: 0_0_599_419.jpg', 'file: 137_45_404_229.jpg', 'similarity: 57.818')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 161_184_89_58.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 178_121_226_133.jpg', 'similarity: 72.058')
('target file: 0_0_599_419.jpg', 'file: 178_45_363_220.jpg', 'similarity: 60.514')
('target file: 0_0_599_419.jpg', 'file: 178_45_363_229.jpg', 'similarity: 59.968')
('target file: 0_0_599_419.jpg', 'file: 227_285_134_108.jpg', 'similarity: 73.962')
('target file: 0_0_599_419.jpg', 'file: 227_285_135_111.jpg', 'similarity: 72.458')
('target file: 0_0_599_419.jpg', 'file: 229_45_312_220.jpg', 'similarity: 62.952')
('target file: 0_0_599_419.jpg', 'file: 229_49_156_125.jpg', 'similarity: 66.496')
('target file: 0_0_599_419.jpg', 'file: 238_49_147_113.jpg', 'similarity: 69.24')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 238_96_63_66.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 273_0_326_365.jpg', 'similarity: 57.856')
('target file: 0_0_599_419.jpg', 'file: 273_174_119_91.jpg', 'similarity: 107.078')
('target file: 0_0_599_419.jpg', 'file: 273_8_227_127.jpg', 'similarity: 72.558')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 286_208_84_54.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 286_208_85_55.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 289_210_81_52.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 297_49_88_88.jpg', 'similarity: 88.796')
('target file: 0_0_599_419.jpg', 'file: 301_0_298_268.jpg', 'similarity: 64.96')
('target file: 0_0_599_419.jpg', 'file: 301_0_298_365.jpg', 'similarity: 60.608')
('target file: 0_0_599_419.jpg', 'file: 31_0_100_119.jpg', 'similarity: 84.626')
('target file: 0_0_599_419.jpg', 'file: 31_0_258_143.jpg', 'similarity: 78.84')
('target file: 0_0_599_419.jpg', 'file: 31_0_258_191.jpg', 'similarity: 71.386')
('target file: 0_0_599_419.jpg', 'file: 31_0_529_414.jpg', 'similarity: 20.542')
('target file: 0_0_599_419.jpg', 'file: 31_0_533_416.jpg', 'similarity: 21.168')
('target file: 0_0_599_419.jpg', 'file: 329_45_212_220.jpg', 'similarity: 70.852')
('target file: 0_0_599_419.jpg', 'file: 336_45_205_220.jpg', 'similarity: 70.748')
('target file: 0_0_599_419.jpg', 'file: 379_259_161_122.jpg', 'similarity: 77.396')
('target file: 0_0_599_419.jpg', 'file: 39_112_521_302.jpg', 'similarity: 32.466')
('target file: 0_0_599_419.jpg', 'file: 39_115_521_299.jpg', 'similarity: 32.054')
('target file: 0_0_599_419.jpg', 'file: 405_174_126_94.jpg', 'similarity: 82.374')
('target file: 0_0_599_419.jpg', 'file: 408_303_156_113.jpg', 'similarity: 75.978')
('target file: 0_0_599_419.jpg', 'file: 408_305_156_111.jpg', 'similarity: 75.418')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 525_366_74_53.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 52_184_224_199.jpg', 'similarity: 57.374')
('target file: 0_0_599_419.jpg', 'file: 52_184_311_211.jpg', 'similarity: 49.128')
('target file: 0_0_599_419.jpg', 'file: 52_230_194_153.jpg', 'similarity: 63.664')
('target file: 0_0_599_419.jpg', 'file: 52_230_224_153.jpg', 'similarity: 62.094')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 545_258_54_107.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 56_0_200_113.jpg', 'similarity: 82.618')
('target file: 0_0_599_419.jpg', 'file: 56_0_217_116.jpg', 'similarity: 82.058')
('target file: 0_0_599_419.jpg', 'file: 57_245_167_106.jpg', 'similarity: 73.52')
('target file: 0_0_599_419.jpg', 'file: 57_245_167_112.jpg', 'similarity: 71.722')
('target file: 0_0_599_419.jpg', 'file: 57_245_167_134.jpg', 'similarity: 69.116')
('target file: 0_0_599_419.jpg', 'file: 57_45_484_334.jpg', 'similarity: 32.522')
('target file: 0_0_599_419.jpg', 'file: 57_45_496_334.jpg', 'similarity: 31.93')
('target file: 0_0_599_419.jpg', 'file: 59_0_197_113.jpg', 'similarity: 82.124')
('target file: 0_0_599_419.jpg', 'file: 70_268_146_110.jpg', 'similarity: 78.432')
('target file: 137_146_120_74.jpg', 'file: 0_0_553_419.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 0_0_599_419.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 137_45_404_229.jpg', 'similarity: 0.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 161_184_89_58.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 178_121_226_133.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 178_45_363_220.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 178_45_363_229.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 227_285_134_108.jpg', 'similarity: 59.0')
('target file: 137_146_120_74.jpg', 'file: 227_285_135_111.jpg', 'similarity: 54.0')
('target file: 137_146_120_74.jpg', 'file: 229_45_312_220.jpg', 'similarity: 60.0')
('target file: 137_146_120_74.jpg', 'file: 229_49_156_125.jpg', 'similarity: 57.0')
('target file: 137_146_120_74.jpg', 'file: 238_49_147_113.jpg', 'similarity: 72.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 238_96_63_66.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 273_0_326_365.jpg', 'similarity: 65.0')
('target file: 137_146_120_74.jpg', 'file: 273_174_119_91.jpg', 'similarity: 89.0')
('target file: 137_146_120_74.jpg', 'file: 273_8_227_127.jpg', 'similarity: 82.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 286_208_84_54.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 286_208_85_55.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 289_210_81_52.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 297_49_88_88.jpg', 'similarity: 72.0')
('target file: 137_146_120_74.jpg', 'file: 301_0_298_268.jpg', 'similarity: 66.0')
('target file: 137_146_120_74.jpg', 'file: 301_0_298_365.jpg', 'similarity: 67.0')
('target file: 137_146_120_74.jpg', 'file: 31_0_100_119.jpg', 'similarity: 71.0')
('target file: 137_146_120_74.jpg', 'file: 31_0_258_143.jpg', 'similarity: 73.0')
('target file: 137_146_120_74.jpg', 'file: 31_0_258_191.jpg', 'similarity: 71.0')
('target file: 137_146_120_74.jpg', 'file: 31_0_529_414.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 31_0_533_416.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 329_45_212_220.jpg', 'similarity: 62.0')
('target file: 137_146_120_74.jpg', 'file: 336_45_205_220.jpg', 'similarity: 62.0')
('target file: 137_146_120_74.jpg', 'file: 379_259_161_122.jpg', 'similarity: 71.0')
('target file: 137_146_120_74.jpg', 'file: 39_112_521_302.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 39_115_521_299.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 405_174_126_94.jpg', 'similarity: 77.0')
('target file: 137_146_120_74.jpg', 'file: 408_303_156_113.jpg', 'similarity: 86.0')
('target file: 137_146_120_74.jpg', 'file: 408_305_156_111.jpg', 'similarity: 85.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 525_366_74_53.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 52_184_224_199.jpg', 'similarity: 65.0')
('target file: 137_146_120_74.jpg', 'file: 52_184_311_211.jpg', 'similarity: 60.0')
('target file: 137_146_120_74.jpg', 'file: 52_230_194_153.jpg', 'similarity: 70.0')
('target file: 137_146_120_74.jpg', 'file: 52_230_224_153.jpg', 'similarity: 70.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 545_258_54_107.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 56_0_200_113.jpg', 'similarity: 68.0')
('target file: 137_146_120_74.jpg', 'file: 56_0_217_116.jpg', 'similarity: 69.0')
('target file: 137_146_120_74.jpg', 'file: 57_245_167_106.jpg', 'similarity: 71.0')
('target file: 137_146_120_74.jpg', 'file: 57_245_167_112.jpg', 'similarity: 71.0')
('target file: 137_146_120_74.jpg', 'file: 57_245_167_134.jpg', 'similarity: 61.0')
('target file: 137_146_120_74.jpg', 'file: 57_45_484_334.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 57_45_496_334.jpg', 'similarity: 0.0')
('target file: 137_146_120_74.jpg', 'file: 59_0_197_113.jpg', 'similarity: 78.0')
('target file: 137_146_120_74.jpg', 'file: 70_268_146_110.jpg', 'similarity: 65.0')
('target file: 137_45_404_229.jpg', 'file: 0_0_553_419.jpg', 'similarity: 56.2456140351')
('target file: 137_45_404_229.jpg', 'file: 0_0_599_419.jpg', 'similarity: 56.298245614')
('target file: 137_45_404_229.jpg', 'file: 137_146_120_74.jpg', 'similarity: 116.833333333')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 161_184_89_58.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 178_121_226_133.jpg', 'similarity: 70.6513157895')
('target file: 137_45_404_229.jpg', 'file: 178_45_363_220.jpg', 'similarity: 28.8004385965')
('target file: 137_45_404_229.jpg', 'file: 178_45_363_229.jpg', 'similarity: 21.9671052632')
('target file: 137_45_404_229.jpg', 'file: 227_285_134_108.jpg', 'similarity: 80.0021929825')
('target file: 137_45_404_229.jpg', 'file: 227_285_135_111.jpg', 'similarity: 78.4978070175')
('target file: 137_45_404_229.jpg', 'file: 229_45_312_220.jpg', 'similarity: 33.4649122807')
('target file: 137_45_404_229.jpg', 'file: 229_49_156_125.jpg', 'similarity: 65.6907894737')
('target file: 137_45_404_229.jpg', 'file: 238_49_147_113.jpg', 'similarity: 69.0723684211')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 238_96_63_66.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 273_0_326_365.jpg', 'similarity: 44.8815789474')
('target file: 137_45_404_229.jpg', 'file: 273_174_119_91.jpg', 'similarity: 105.296052632')
('target file: 137_45_404_229.jpg', 'file: 273_8_227_127.jpg', 'similarity: 70.4934210526')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 286_208_84_54.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 286_208_85_55.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 289_210_81_52.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 297_49_88_88.jpg', 'similarity: 90.1622807018')
('target file: 137_45_404_229.jpg', 'file: 301_0_298_268.jpg', 'similarity: 43.5')
('target file: 137_45_404_229.jpg', 'file: 301_0_298_365.jpg', 'similarity: 45.3552631579')
('target file: 137_45_404_229.jpg', 'file: 31_0_100_119.jpg', 'similarity: 84.8530701754')
('target file: 137_45_404_229.jpg', 'file: 31_0_258_143.jpg', 'similarity: 77.9013157895')
('target file: 137_45_404_229.jpg', 'file: 31_0_258_191.jpg', 'similarity: 73.4780701754')
('target file: 137_45_404_229.jpg', 'file: 31_0_529_414.jpg', 'similarity: 54.4583333333')
('target file: 137_45_404_229.jpg', 'file: 31_0_533_416.jpg', 'similarity: 54.9934210526')
('target file: 137_45_404_229.jpg', 'file: 329_45_212_220.jpg', 'similarity: 47.9254385965')
('target file: 137_45_404_229.jpg', 'file: 336_45_205_220.jpg', 'similarity: 49.2609649123')
('target file: 137_45_404_229.jpg', 'file: 379_259_161_122.jpg', 'similarity: 76.2324561404')
('target file: 137_45_404_229.jpg', 'file: 39_112_521_302.jpg', 'similarity: 58.1184210526')
('target file: 137_45_404_229.jpg', 'file: 39_115_521_299.jpg', 'similarity: 58.7565789474')
('target file: 137_45_404_229.jpg', 'file: 405_174_126_94.jpg', 'similarity: 76.0131578947')
('target file: 137_45_404_229.jpg', 'file: 408_303_156_113.jpg', 'similarity: 76.5416666667')
('target file: 137_45_404_229.jpg', 'file: 408_305_156_111.jpg', 'similarity: 76.0592105263')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 525_366_74_53.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 52_184_224_199.jpg', 'similarity: 69.0285087719')
('target file: 137_45_404_229.jpg', 'file: 52_184_311_211.jpg', 'similarity: 66.6228070175')
('target file: 137_45_404_229.jpg', 'file: 52_230_194_153.jpg', 'similarity: 71.7236842105')
('target file: 137_45_404_229.jpg', 'file: 52_230_224_153.jpg', 'similarity: 70.125')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 545_258_54_107.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 56_0_200_113.jpg', 'similarity: 82.5307017544')
('target file: 137_45_404_229.jpg', 'file: 56_0_217_116.jpg', 'similarity: 81.9385964912')
('target file: 137_45_404_229.jpg', 'file: 57_245_167_106.jpg', 'similarity: 74.4868421053')
('target file: 137_45_404_229.jpg', 'file: 57_245_167_112.jpg', 'similarity: 73.6162280702')
('target file: 137_45_404_229.jpg', 'file: 57_245_167_134.jpg', 'similarity: 72.1184210526')
('target file: 137_45_404_229.jpg', 'file: 57_45_484_334.jpg', 'similarity: 47.2412280702')
('target file: 137_45_404_229.jpg', 'file: 57_45_496_334.jpg', 'similarity: 47.7478070175')
('target file: 137_45_404_229.jpg', 'file: 59_0_197_113.jpg', 'similarity: 81.8706140351')
('target file: 137_45_404_229.jpg', 'file: 70_268_146_110.jpg', 'similarity: 80.7171052632')
Traceback (most recent call last):
  File "grouping_image2.py", line 159, in <module>
    main()
  File "grouping_image2.py", line 107, in main
    probability = sum(dist) / len(dist)
ZeroDivisionError: integer division or modulo by zero

Dans le cas d'AKAZE

('target file: 0_0_553_419.jpg', 'file: 0_0_599_419.jpg', 'similarity: 2.26003824092')
('target file: 0_0_553_419.jpg', 'file: 137_146_120_74.jpg', 'similarity: 206.339388145')
('target file: 0_0_553_419.jpg', 'file: 137_45_404_229.jpg', 'similarity: 82.6625239006')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 161_184_89_58.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 178_121_226_133.jpg', 'similarity: 147.791586998')
('target file: 0_0_553_419.jpg', 'file: 178_45_363_220.jpg', 'similarity: 89.1338432122')
('target file: 0_0_553_419.jpg', 'file: 178_45_363_229.jpg', 'similarity: 86.3718929254')
('target file: 0_0_553_419.jpg', 'file: 227_285_134_108.jpg', 'similarity: 158.248565966')
('target file: 0_0_553_419.jpg', 'file: 227_285_135_111.jpg', 'similarity: 157.455066922')
('target file: 0_0_553_419.jpg', 'file: 229_45_312_220.jpg', 'similarity: 95.9445506692')
('target file: 0_0_553_419.jpg', 'file: 229_49_156_125.jpg', 'similarity: 142.497131931')
('target file: 0_0_553_419.jpg', 'file: 238_49_147_113.jpg', 'similarity: 145.26959847')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 238_96_63_66.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 273_0_326_365.jpg', 'similarity: 78.7543021033')
('target file: 0_0_553_419.jpg', 'file: 273_174_119_91.jpg', 'similarity: 195.347036329')
('target file: 0_0_553_419.jpg', 'file: 273_8_227_127.jpg', 'similarity: 132.97418738')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 286_208_84_54.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 286_208_85_55.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 289_210_81_52.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 297_49_88_88.jpg', 'similarity: 175.680688337')
('target file: 0_0_553_419.jpg', 'file: 301_0_298_268.jpg', 'similarity: 95.2007648184')
('target file: 0_0_553_419.jpg', 'file: 301_0_298_365.jpg', 'similarity: 83.5803059273')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 31_0_100_119.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 31_0_258_143.jpg', 'similarity: 175.152963671')
('target file: 0_0_553_419.jpg', 'file: 31_0_258_191.jpg', 'similarity: 135.792543021')
('target file: 0_0_553_419.jpg', 'file: 31_0_529_414.jpg', 'similarity: 13.2705544933')
('target file: 0_0_553_419.jpg', 'file: 31_0_533_416.jpg', 'similarity: 12.9101338432')
('target file: 0_0_553_419.jpg', 'file: 329_45_212_220.jpg', 'similarity: 109.604206501')
('target file: 0_0_553_419.jpg', 'file: 336_45_205_220.jpg', 'similarity: 111.541108987')
('target file: 0_0_553_419.jpg', 'file: 379_259_161_122.jpg', 'similarity: 153.310707457')
('target file: 0_0_553_419.jpg', 'file: 39_112_521_302.jpg', 'similarity: 54.6357552581')
('target file: 0_0_553_419.jpg', 'file: 39_115_521_299.jpg', 'similarity: 55.6969407266')
('target file: 0_0_553_419.jpg', 'file: 405_174_126_94.jpg', 'similarity: 150.287762906')
('target file: 0_0_553_419.jpg', 'file: 408_303_156_113.jpg', 'similarity: 158.07456979')
('target file: 0_0_553_419.jpg', 'file: 408_305_156_111.jpg', 'similarity: 159.051625239')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 525_366_74_53.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 52_184_224_199.jpg', 'similarity: 111.787762906')
('target file: 0_0_553_419.jpg', 'file: 52_184_311_211.jpg', 'similarity: 99.9521988528')
('target file: 0_0_553_419.jpg', 'file: 52_230_194_153.jpg', 'similarity: 133.29541109')
('target file: 0_0_553_419.jpg', 'file: 52_230_224_153.jpg', 'similarity: 126.92543021')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 545_258_54_107.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 56_0_200_113.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 56_0_217_116.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 57_245_167_106.jpg', 'similarity: 165.387189293')
('target file: 0_0_553_419.jpg', 'file: 57_245_167_112.jpg', 'similarity: 165.023900574')
('target file: 0_0_553_419.jpg', 'file: 57_245_167_134.jpg', 'similarity: 157.085086042')
('target file: 0_0_553_419.jpg', 'file: 57_45_484_334.jpg', 'similarity: 44.0621414914')
('target file: 0_0_553_419.jpg', 'file: 57_45_496_334.jpg', 'similarity: 42.3288718929')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_553_419.jpg', 'file: 59_0_197_113.jpg', 'similarity: 100000')
('target file: 0_0_553_419.jpg', 'file: 70_268_146_110.jpg', 'similarity: 189.63001912')
('target file: 0_0_599_419.jpg', 'file: 0_0_553_419.jpg', 'similarity: 7.48818181818')
('target file: 0_0_599_419.jpg', 'file: 137_146_120_74.jpg', 'similarity: 206.030909091')
('target file: 0_0_599_419.jpg', 'file: 137_45_404_229.jpg', 'similarity: 85.08')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 161_184_89_58.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 178_121_226_133.jpg', 'similarity: 147.759090909')
('target file: 0_0_599_419.jpg', 'file: 178_45_363_220.jpg', 'similarity: 91.2090909091')
('target file: 0_0_599_419.jpg', 'file: 178_45_363_229.jpg', 'similarity: 88.5509090909')
('target file: 0_0_599_419.jpg', 'file: 227_285_134_108.jpg', 'similarity: 157.846363636')
('target file: 0_0_599_419.jpg', 'file: 227_285_135_111.jpg', 'similarity: 157.061818182')
('target file: 0_0_599_419.jpg', 'file: 229_45_312_220.jpg', 'similarity: 97.7390909091')
('target file: 0_0_599_419.jpg', 'file: 229_49_156_125.jpg', 'similarity: 142.54')
('target file: 0_0_599_419.jpg', 'file: 238_49_147_113.jpg', 'similarity: 145.282727273')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 238_96_63_66.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 273_0_326_365.jpg', 'similarity: 75.7681818182')
('target file: 0_0_599_419.jpg', 'file: 273_174_119_91.jpg', 'similarity: 195.445454545')
('target file: 0_0_599_419.jpg', 'file: 273_8_227_127.jpg', 'similarity: 133.553636364')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 286_208_84_54.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 286_208_85_55.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 289_210_81_52.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 297_49_88_88.jpg', 'similarity: 175.394545455')
('target file: 0_0_599_419.jpg', 'file: 301_0_298_268.jpg', 'similarity: 93.8972727273')
('target file: 0_0_599_419.jpg', 'file: 301_0_298_365.jpg', 'similarity: 80.3890909091')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 31_0_100_119.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 31_0_258_143.jpg', 'similarity: 175.000909091')
('target file: 0_0_599_419.jpg', 'file: 31_0_258_191.jpg', 'similarity: 136.562727273')
('target file: 0_0_599_419.jpg', 'file: 31_0_529_414.jpg', 'similarity: 16.6936363636')
('target file: 0_0_599_419.jpg', 'file: 31_0_533_416.jpg', 'similarity: 16.3009090909')
('target file: 0_0_599_419.jpg', 'file: 329_45_212_220.jpg', 'similarity: 110.949090909')
('target file: 0_0_599_419.jpg', 'file: 336_45_205_220.jpg', 'similarity: 112.898181818')
('target file: 0_0_599_419.jpg', 'file: 379_259_161_122.jpg', 'similarity: 154.425454545')
('target file: 0_0_599_419.jpg', 'file: 39_112_521_302.jpg', 'similarity: 57.2363636364')
('target file: 0_0_599_419.jpg', 'file: 39_115_521_299.jpg', 'similarity: 58.1736363636')
('target file: 0_0_599_419.jpg', 'file: 405_174_126_94.jpg', 'similarity: 151.476363636')
('target file: 0_0_599_419.jpg', 'file: 408_303_156_113.jpg', 'similarity: 158.858181818')
('target file: 0_0_599_419.jpg', 'file: 408_305_156_111.jpg', 'similarity: 159.827272727')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 525_366_74_53.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 52_184_224_199.jpg', 'similarity: 112.74')
('target file: 0_0_599_419.jpg', 'file: 52_184_311_211.jpg', 'similarity: 101.282727273')
('target file: 0_0_599_419.jpg', 'file: 52_230_194_153.jpg', 'similarity: 133.879090909')
('target file: 0_0_599_419.jpg', 'file: 52_230_224_153.jpg', 'similarity: 127.479090909')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 545_258_54_107.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 56_0_200_113.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 56_0_217_116.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 57_245_167_106.jpg', 'similarity: 165.609090909')
('target file: 0_0_599_419.jpg', 'file: 57_245_167_112.jpg', 'similarity: 165.373636364')
('target file: 0_0_599_419.jpg', 'file: 57_245_167_134.jpg', 'similarity: 157.214545455')
('target file: 0_0_599_419.jpg', 'file: 57_45_484_334.jpg', 'similarity: 48.1954545455')
('target file: 0_0_599_419.jpg', 'file: 57_45_496_334.jpg', 'similarity: 46.5245454545')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 0_0_599_419.jpg', 'file: 59_0_197_113.jpg', 'similarity: 100000')
('target file: 0_0_599_419.jpg', 'file: 70_268_146_110.jpg', 'similarity: 189.44')
('target file: 137_146_120_74.jpg', 'file: 0_0_553_419.jpg', 'similarity: 76.0')
('target file: 137_146_120_74.jpg', 'file: 0_0_599_419.jpg', 'similarity: 76.0')
('target file: 137_146_120_74.jpg', 'file: 137_45_404_229.jpg', 'similarity: 74.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 161_184_89_58.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 178_121_226_133.jpg', 'similarity: 4.0')
('target file: 137_146_120_74.jpg', 'file: 178_45_363_220.jpg', 'similarity: 2.0')
('target file: 137_146_120_74.jpg', 'file: 178_45_363_229.jpg', 'similarity: 2.0')
('target file: 137_146_120_74.jpg', 'file: 227_285_134_108.jpg', 'similarity: 99.0')
('target file: 137_146_120_74.jpg', 'file: 227_285_135_111.jpg', 'similarity: 99.0')
('target file: 137_146_120_74.jpg', 'file: 229_45_312_220.jpg', 'similarity: 113.0')
('target file: 137_146_120_74.jpg', 'file: 229_49_156_125.jpg', 'similarity: 117.0')
('target file: 137_146_120_74.jpg', 'file: 238_49_147_113.jpg', 'similarity: 141.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 238_96_63_66.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 273_0_326_365.jpg', 'similarity: 98.0')
('target file: 137_146_120_74.jpg', 'file: 273_174_119_91.jpg', 'similarity: 190.0')
('target file: 137_146_120_74.jpg', 'file: 273_8_227_127.jpg', 'similarity: 119.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 286_208_84_54.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 286_208_85_55.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 289_210_81_52.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 297_49_88_88.jpg', 'similarity: 144.0')
('target file: 137_146_120_74.jpg', 'file: 301_0_298_268.jpg', 'similarity: 113.0')
('target file: 137_146_120_74.jpg', 'file: 301_0_298_365.jpg', 'similarity: 113.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 31_0_100_119.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 31_0_258_143.jpg', 'similarity: 180.0')
('target file: 137_146_120_74.jpg', 'file: 31_0_258_191.jpg', 'similarity: 134.0')
('target file: 137_146_120_74.jpg', 'file: 31_0_529_414.jpg', 'similarity: 75.0')
('target file: 137_146_120_74.jpg', 'file: 31_0_533_416.jpg', 'similarity: 75.0')
('target file: 137_146_120_74.jpg', 'file: 329_45_212_220.jpg', 'similarity: 104.0')
('target file: 137_146_120_74.jpg', 'file: 336_45_205_220.jpg', 'similarity: 111.0')
('target file: 137_146_120_74.jpg', 'file: 379_259_161_122.jpg', 'similarity: 158.0')
('target file: 137_146_120_74.jpg', 'file: 39_112_521_302.jpg', 'similarity: 75.0')
('target file: 137_146_120_74.jpg', 'file: 39_115_521_299.jpg', 'similarity: 76.0')
('target file: 137_146_120_74.jpg', 'file: 405_174_126_94.jpg', 'similarity: 162.0')
('target file: 137_146_120_74.jpg', 'file: 408_303_156_113.jpg', 'similarity: 168.0')
('target file: 137_146_120_74.jpg', 'file: 408_305_156_111.jpg', 'similarity: 169.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 525_366_74_53.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 52_184_224_199.jpg', 'similarity: 134.0')
('target file: 137_146_120_74.jpg', 'file: 52_184_311_211.jpg', 'similarity: 98.0')
('target file: 137_146_120_74.jpg', 'file: 52_230_194_153.jpg', 'similarity: 149.0')
('target file: 137_146_120_74.jpg', 'file: 52_230_224_153.jpg', 'similarity: 149.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 545_258_54_107.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 56_0_200_113.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 56_0_217_116.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 57_245_167_106.jpg', 'similarity: 156.0')
('target file: 137_146_120_74.jpg', 'file: 57_245_167_112.jpg', 'similarity: 156.0')
('target file: 137_146_120_74.jpg', 'file: 57_245_167_134.jpg', 'similarity: 156.0')
('target file: 137_146_120_74.jpg', 'file: 57_45_484_334.jpg', 'similarity: 74.0')
('target file: 137_146_120_74.jpg', 'file: 57_45_496_334.jpg', 'similarity: 74.0')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_146_120_74.jpg', 'file: 59_0_197_113.jpg', 'similarity: 100000')
('target file: 137_146_120_74.jpg', 'file: 70_268_146_110.jpg', 'similarity: 191.0')
('target file: 137_45_404_229.jpg', 'file: 0_0_553_419.jpg', 'similarity: 13.8429003021')
('target file: 137_45_404_229.jpg', 'file: 0_0_599_419.jpg', 'similarity: 14.3716012085')
('target file: 137_45_404_229.jpg', 'file: 137_146_120_74.jpg', 'similarity: 204.468277946')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 161_184_89_58.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 178_121_226_133.jpg', 'similarity: 141.978851964')
('target file: 137_45_404_229.jpg', 'file: 178_45_363_220.jpg', 'similarity: 25.5438066465')
('target file: 137_45_404_229.jpg', 'file: 178_45_363_229.jpg', 'similarity: 19.8972809668')
('target file: 137_45_404_229.jpg', 'file: 227_285_134_108.jpg', 'similarity: 159.196374622')
('target file: 137_45_404_229.jpg', 'file: 227_285_135_111.jpg', 'similarity: 158.528700906')
('target file: 137_45_404_229.jpg', 'file: 229_45_312_220.jpg', 'similarity: 41.6314199396')
('target file: 137_45_404_229.jpg', 'file: 229_49_156_125.jpg', 'similarity: 134.432024169')
('target file: 137_45_404_229.jpg', 'file: 238_49_147_113.jpg', 'similarity: 139.870090634')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 238_96_63_66.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 273_0_326_365.jpg', 'similarity: 53.2719033233')
('target file: 137_45_404_229.jpg', 'file: 273_174_119_91.jpg', 'similarity: 198.299093656')
('target file: 137_45_404_229.jpg', 'file: 273_8_227_127.jpg', 'similarity: 129.939577039')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 286_208_84_54.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 286_208_85_55.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 289_210_81_52.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 297_49_88_88.jpg', 'similarity: 175.598187311')
('target file: 137_45_404_229.jpg', 'file: 301_0_298_268.jpg', 'similarity: 63.3867069486')
('target file: 137_45_404_229.jpg', 'file: 301_0_298_365.jpg', 'similarity: 60.3141993958')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 31_0_100_119.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 31_0_258_143.jpg', 'similarity: 175.425981873')
('target file: 137_45_404_229.jpg', 'file: 31_0_258_191.jpg', 'similarity: 140.504531722')
('target file: 137_45_404_229.jpg', 'file: 31_0_529_414.jpg', 'similarity: 12.9818731118')
('target file: 137_45_404_229.jpg', 'file: 31_0_533_416.jpg', 'similarity: 12.9093655589')
('target file: 137_45_404_229.jpg', 'file: 329_45_212_220.jpg', 'similarity: 71.9063444109')
('target file: 137_45_404_229.jpg', 'file: 336_45_205_220.jpg', 'similarity: 78.6616314199')
('target file: 137_45_404_229.jpg', 'file: 379_259_161_122.jpg', 'similarity: 159.262839879')
('target file: 137_45_404_229.jpg', 'file: 39_112_521_302.jpg', 'similarity: 81.9637462236')
('target file: 137_45_404_229.jpg', 'file: 39_115_521_299.jpg', 'similarity: 83.8851963746')
('target file: 137_45_404_229.jpg', 'file: 405_174_126_94.jpg', 'similarity: 155.719033233')
('target file: 137_45_404_229.jpg', 'file: 408_303_156_113.jpg', 'similarity: 164.120845921')
('target file: 137_45_404_229.jpg', 'file: 408_305_156_111.jpg', 'similarity: 165.49244713')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 525_366_74_53.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 52_184_224_199.jpg', 'similarity: 126.374622356')
('target file: 137_45_404_229.jpg', 'file: 52_184_311_211.jpg', 'similarity: 120.47734139')
('target file: 137_45_404_229.jpg', 'file: 52_230_194_153.jpg', 'similarity: 140.625377644')
('target file: 137_45_404_229.jpg', 'file: 52_230_224_153.jpg', 'similarity: 137.474320242')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 545_258_54_107.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 56_0_200_113.jpg', 'similarity: 100000')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 56_0_217_116.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 57_245_167_106.jpg', 'similarity: 168.785498489')
('target file: 137_45_404_229.jpg', 'file: 57_245_167_112.jpg', 'similarity: 168.054380665')
('target file: 137_45_404_229.jpg', 'file: 57_245_167_134.jpg', 'similarity: 159.80060423')
('target file: 137_45_404_229.jpg', 'file: 57_45_484_334.jpg', 'similarity: 5.14501510574')
('target file: 137_45_404_229.jpg', 'file: 57_45_496_334.jpg', 'similarity: 5.58006042296')
OpenCV Error: Assertion failed (type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U)) in batchDistance, file /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/stat.cpp, line 3934
('target file: 137_45_404_229.jpg', 'file: 59_0_197_113.jpg', 'similarity: 100000')
('target file: 137_45_404_229.jpg', 'file: 70_268_146_110.jpg', 'similarity: 189.975830816')
Traceback (most recent call last):
  File "grouping_image2.py", line 159, in <module>
    main()
  File "grouping_image2.py", line 107, in main
    probability = sum(dist) / len(dist)
ZeroDivisionError: integer division or modulo by zero

Résumé

―― Plus il est proche de 0, plus la similitude est élevée. ――Le résultat n'est pas bon par rapport à l'histogramme. ――Une petite erreur se produit lors de la lecture de l'image. ――Cette détection semble être similaire à la distance des points caractéristiques, j'ai donc redimensionné la taille de l'image, mais cela n'a pas fonctionné.

Tous les liens de page

Recommended Posts

J'ai essayé de trier les objets de l'image du plat de steak-⑤ Détection de point de fonction d'image similaire
J'ai essayé de trier les objets de l'image du plat de steak-① Détection d'objets
J'ai essayé de trier les objets de l'image du plat de steak-② Tri des numéros de chevauchement
J'ai essayé de couper une image fixe de la vidéo
J'ai essayé de corriger la forme trapézoïdale de l'image
J'ai essayé de détecter l'iris à partir de l'image de la caméra
J'ai essayé de trouver l'entropie de l'image avec python
J'ai essayé de transformer l'image du visage en utilisant sparse_image_warp de TensorFlow Addons
Modifiez le point décimal de la journalisation de, à.
J'ai essayé de prédire le nombre de personnes infectées par le virus corona en tenant compte de l'effet de s'abstenir de sortir
J'ai essayé d'automatiser le travail de masquage du visage de l'image de coordination pour l'usure
J'ai essayé de vectoriser les paroles de Hinatazaka 46!
J'ai essayé d'extraire le texte du fichier image en utilisant Tesseract du moteur OCR
J'ai essayé de résumer la forme de base de GPLVM
J'ai essayé de visualiser les informations spacha de VTuber
J'ai essayé de classer les voix des acteurs de la voix
J'ai essayé de compresser l'image en utilisant l'apprentissage automatique
J'ai essayé de résumer les opérations de chaîne de Python
Je veux découper uniquement le visage d'une image de personne avec Python et l'enregistrer ~ Détection de visage et rognage avec face_recognition ~
J'ai essayé d'afficher les données du groupe de points DB de la préfecture de Shizuoka avec Vue + Leaflet
J'ai essayé d'utiliser PI Fu pour générer un modèle 3D d'une personne à partir d'une image
J'ai essayé de trouver la tendance du nombre de navires dans la baie de Tokyo à partir d'images satellites.
J'ai essayé de découvrir les grandes lignes de Big Gorilla
J'ai essayé la "correction gamma" de l'image avec Python + OpenCV
J'ai essayé d'obtenir les informations de localisation du bus Odakyu
J'ai essayé de trouver la moyenne de plusieurs colonnes avec TensorFlow
[Python] J'ai essayé de visualiser la relation de suivi de Twitter
[Apprentissage automatique] J'ai essayé de résumer la théorie d'Adaboost
J'ai essayé de combattre le minimum local de la fonction Goldstein-Price
J'ai essayé de changer le script python de 2.7.11 à 3.6.0 sur Windows10
J'ai essayé d'obtenir diverses informations de l'API codeforces
[Linux] J'ai essayé de résumer les commandes de confirmation des ressources
J'ai essayé d'obtenir l'index de la liste en utilisant la fonction énumérer
J'ai essayé d'automatiser l'arrosage du pot avec Raspberry Pi
J'ai essayé de traiter l'image en "style croquis" avec OpenCV
J'ai essayé de traiter l'image dans un "style de dessin au crayon" avec OpenCV
J'ai essayé d'agrandir la taille du volume logique avec LVM
J'ai essayé de résumer la méthode de mise en œuvre fréquemment utilisée de pytest-mock
J'ai essayé d'améliorer l'efficacité du travail quotidien avec Python
J'ai essayé de visualiser la condition commune des téléspectateurs de la chaîne VTuber
[Python] J'ai essayé de reproduire le programme d'évacuation d'urgence pour revenir du monde pour revenir du monde modifié de "La disparition de Haruhi Suzumiya"
J'ai essayé de livrer du courrier depuis Node.js et Python en utilisant le service de livraison de courrier (SendGrid) d'IBM Cloud!
J'ai essayé de déplacer le ballon
J'ai essayé d'estimer la section.
[Python] J'ai essayé de résumer le type collectif (ensemble) d'une manière facile à comprendre.
J'ai essayé de déplacer l'image vers le dossier spécifié en faisant un clic droit et un clic gauche
J'ai essayé de visualiser la tranche d'âge et la distribution des taux d'Atcoder
J'ai essayé de transcrire les actualités de l'exemple d'intégration commerciale sur Amazon Transcribe
J'ai essayé d'appeler l'API de prédiction du modèle d'apprentissage automatique de WordPress
zoom J'ai essayé de quantifier le degré d'excitation de l'histoire lors de la conférence
J'ai essayé d'estimer la similitude de l'intention de la question en utilisant Doc2Vec de gensim
J'ai essayé d'améliorer la précision de mon propre réseau neuronal
J'ai essayé de résoudre 100 traitements linguistiques Knock version 2020 [Chapitre 3: Expressions régulières 25-29]
J'ai essayé d'obtenir le code d'authentification de l'API Qiita avec Python.
Je souhaite trier une liste dans l'ordre des autres listes