What I want to achieve from the given following image

The point id is not important as long as it can detect there are points at these locations and there are lines between them. Would OpenCV help me to achieve that? If so, would you please be a little more specific?
Thanks very much.
As joe said hough transform will help you,i know openCV will help u but i've never used it before,here's a simple Matlab code i wrote to extract lines and coordinate of points.
f=imread("your image without piont ID");
f=rgb2gray(f);
fb=im2bw(f,graythresh(f));
[H,T,R] = hough(not(fb),'RhoResolution',0.5,'Theta',-90:0.5:89.5);
peaks=houghpeaks(H,4,'threshold',ceil(0.3*max(H(:))));
lines = houghlines(not(fb),T,R,peaks); %this will give u start and end point of lines, Rho and tetha (x*cos(tetha)+y*sin(tetha)=Rho) now you can answer to all of your questions
http://en.wikipedia.org/wiki/Hough_transform
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With