I am trying to extract coordinates for each cell from a tabular image in grayscale using cv2.findContours
But I'm not able to get exact tables due to gaps in between lines. I tried with cv2.dilate followed by cv2.erode with both horizontal and vertical kernels of size (1, 5) and (5, 1) but before filling the gaps lines become thick enough to fill the cell.
Please look at the image to get the idea.