def accumulated_histogram(image, histogram):
hist = list(map(lambda x: cv2.calcHist([image],
[x],
None,
[256],
[0, 256]),
range(3)))
for x in range(3):
histogram[x] = np.add(hist[x].ravel(), histogram[x].ravel())
return histogram
评论列表
文章目录