I’m writing a program that involves using OpenCV to remove lines with arrowheads from an image, and I’m not sure how to detect the full line.
I’m using these lines of code to get a list of all lines in the image:
edges = cv.Canny(img, 50, 150, apertureSize=3)
lines = cv.HoughLinesP(edges, 1, np.pi/180, threshold=100)
After this, I have code to detect which lines have an arrowhead on them, but the line detection stops at the edge of the arrow. This image shows the lines detected from the HoughLinesP in blue displayed over the original image.
Part of the image after going through HoughLinesP
I need for the detected lines to include the arrowhead on them. Is there any way to do this?
Luke Kastner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.