Please, see attached image.
I already, tried bwmorph(img,'bridge'); but it couldn't connect the detached lines.
I don't want to use extreme values of imdilate() since then the original shape and direction of the lines is lost. With extreme values of imdilate() I get thicker lines and this is not something I want to. I want to retain the same thickness but to get them elongated in a way so they can connect.
Any advice please?