OpenCV Python: can not pass UMat to calcHist
Hello, everyone!
I'm trying to pass cv2.UMat object to cv2.calcHist function:
a = np.arange(10, dtype=np.uint8)
b = cv2.UMat(a)
cv2.calcHist([b], [0], None, [10], [0, 10])
and I'm getting the error
TypeError: images is not a numpy array, neither a scalar
but it seems like cpp version of OpenCV allows using UMat as source image.
Is it me doing something wrong or python OpenCV doesn't allow using UMat as source image for calcHist?
which opencv version, exactly ?
hmm, looks like a bug to me !
error is from here
and it seems, we need a UMat counterpart for this
would you be able to rebuild the cv2 bindings locally ?
hi there, the version is 3.4.3. I've installed opencv using pip package opencv-python, do you think it can be the case?