Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You have the coordinates of your lines (as p01, p02) and the coordinates of the found lines (as p11, p12). Now, all you need to do is to compute the intersection of the two (that is solving a pair of equations)

But you can also do as following:

  • draw the detected lines (you can use threshold + findContours and then fillPoly)
  • now, that you have the detected lines, you can draw yours (using line function with a larger thick)
  • after that you can do an erode with a cross kernel that will give you the intersection points/area
  • you can use moments (or you can do once more find contours and compute the mean of the contour's points, that is its center)