I would like to calculate image histogram with OpenCV's calcHist function with Python
.
But it doesn't work.
Code:
im = cv2.imread(imPath,0)
hist = cv2.calcHist([im],[0],None,[256],[0,256])
And I get error like this:
OpenCV Error: Assertion failed (step(dims[-1] == (size_t) CV_ELEM_SIZE(flags))
in create, file opencv/sources/modules/core/src/matrix.cpp line:236