How to calculate 3D histogram in python using open CV
I want to calculate 3D histogram of my Cielab image in python. I am using openCV to calculate my histogram. I want to compare images using compareHist function of openCV, thats why I am using openCV to compute 3D histogram of my image. I tried with the following variables: i_lab = image.copy() i_lab = i_lab.astype(np.uint8) Range_hist = [[0, 100], [-100, 100], [-100, 100]] hist_1 = cv2.calcHist([i_lab], [[0], [1], [2]], None, [[20], [20], [20]], Range_hist) But it gives error SystemError: error return without exception set Please tell me what am I doing wrong and if it is possible to compute