How can I make these lines connect at the target points? The image is a result of a skeletonization process.
Since the image is already monochromatic, you can use morphological transformations to close broken lines.
In case you need an example, you can find it in the documentation here: http://docs.opencv.org/2.4/doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.html#closing
It works by first dilating the white areas in the image and then eroding back by the same amount. Effectively closing any holes in the white areas. More details and examples can be found here: http://docs.opencv.org/2.4/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.html
This strategy requires that the gap in the broken line is smaller than the distance between neighboring lines.
It will not work, if the lines cross, or if the lines are too close to each other. However I think it will work quite nicely in your example.
You can also remove the artifacts below the third line using the erode function.