I had used this link - How to remove line from captcha completely and edited the code provided to remove lines from a dummy captcha that I have given below
In this special case it seems density of lines is less than characters density. so by applying some thresholding methods you can remove line:
For example the following line give you this:
retval, image = cv2.threshold(image, 12, 255, cv2.THRESH_BINARY)
later by applying some noise removal methods, like median (from your own code), you can get this result: