1 | initial version |
The issue is likely your source type. I had the same issue; from the docstring, "src input 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be . CV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U"
try something like
dest = cv2.medianBlur(src.astype(np.float32),3)