NumPy - calculate histogram intersection
Since you have the same number of bins for both of the histograms you can use:
def histogram_intersection(h1, h2):
sm = 0
for i in range(13):
sm += min(h1[i], h2[i])
return sm
Since you have the same number of bins for both of the histograms you can use:
def histogram_intersection(h1, h2):
sm = 0
for i in range(13):
sm += min(h1[i], h2[i])
return sm