# how to find coordinates of intersection of lines after using "houghlines"

Hello dears,

As you can see,i would like to find the coordinates of lines,but unfortunately i could not do it. i used this code for drawing the lines:

```
Canny(result , can , 50 , 200 , 3);
imshow("can",can);
vector<Vec2f> lines;
HoughLines(can,lines ,1,CV_PI/180,75,0,0);
for( size_t i = 0; i < lines.size(); i++ )
{
float rho = lines[i][0], theta = lines[i][1];
Point pt1, pt2;
double a = cos(theta), b = sin(theta);
double x0 = a*rho, y0 = b*rho;
pt1.x = cvRound(x0 + 1000*(-b));
pt1.y = cvRound(y0 + 1000*(a));
pt2.x = cvRound(x0 - 1000*(-b));
pt2.y = cvRound(y0 - 1000*(a));
line( can, pt1, pt2, Scalar(255), 2, CV_AA);
}
cvtColor(can,can,CV_GRAY2RGB);
imshow("cdst",can);
```

in continue, i do not know how i can find the coordinate.Please help me,thank you.

Best, Arash

take a look at this tutorial (it seems that the site is down web.archive link )