helper/helper.py
def compare_imgs_by_hist(img1, img2):
    """
    Compare two images by their histograms.
    The histograms are compared by their correlation.
    :param img1: 
    :param img2: 
    :return: 1.0 if images are identical, <1.0 if not, 0 if histograms
    have different shapes (e. g. because of gray to RGB comparison)
    """
    hist1 = get_histogram(img1)
    hist2 = get_histogram(img2)
    if hist1.shape != hist2.shape:
        return 0
    return cv2.compareHist(hist1, hist2, cv2.HISTCMP_CORREL)

    Compare two images by their histograms.
    The histograms are compared by their correlation.
    :param img1: 
    :param img2: 
    :return: 1.0 if images are identical, <1.0 if not, 0 if histograms
    have different shapes (e. g. because of gray to RGB comparison)
    
Compare two images by their histograms.
The histograms are compared by their correlation.
Compare two images by their histograms . The histograms are compared by their correlation .
def compare_imgs_by_hist(img1, img2):
    hist1 = get_histogram(img1)
    hist2 = get_histogram(img2)
    if hist1.shape != hist2.shape:
        return 0
    return cv2.compareHist(hist1, hist2, cv2.HISTCMP_CORREL)
def compare_imgs_by_hist ( img1 , img2 ) : hist1 = get_histogram ( img1 ) hist2 = get_histogram ( img2 ) if hist1 . shape != hist2 . shape : return 0 return cv2 . compareHist ( hist1 , hist2 , cv2 . HISTCMP_CORREL )
Compare two images by their histograms.
Compare two images by their histograms .
"""
    Compare two images by their histograms.
    The histograms are compared by their correlation.
    :param img1: 
    :param img2: 
    :return: 1.0 if images are identical, <1.0 if not, 0 if histograms
    have different shapes (e. g. because of gray to RGB comparison)
    """
1.0 if images are identical, <1.0 if not, 0 if histograms
have different shapes (e. g. because of gray to RGB comparison)
1 . 0 if images are identical <1 . 0 if not 0 if histograms have different shapes ( e . g . because of gray to RGB comparison )
img1
None
img2
None