Mybe bug in OpenCV algorithm for method cv2.erode()

MRE required.

when asking for BORDER_CONSTANT, you also have to pass a borderValue. the default does not appear to be sensible in this case.