How can I solve the below error? import cv2 img= cv2.imread('/home/monojit/Desktop/crop.jpg') hsv= cv2.cvtColor(img, cv2.COLOR_BGR2HSV) hist= cv2.calcHist([hsv],[0,1],None,[256],[0,256]) print(hist) cv2.imshow('img',hsv) cv2.waitKey(0) cv2.destroyAllWindows() But on execution the get the following error: Traceback (most recent call last): File "/home/monojit/Desktop/hisCalc.py", line 6, in <module> hist= cv2.calcHist([hsv],[0,1],None,[256],[0,256]) error: OpenCV(3.4.1) /home/monojit/Desktop/OpenCV/modules/imgproc/src/histogram.cpp:1782: error: (-215) csz == 0 || csz == dims in function calcHist How do I solve the error? Continue reading...