Sunday, 28 March 2021

Python CV Detect different types of Arrows

Is there a Contour Method to detect arrows in Python CV? Maybe with Contours, Shapes, and Vertices.

enter image description here

# find contours in the thresholded image and initialize the shape detector
cnts = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
cnts = imutils.grab_contours(cnts)
perimeterValue = cv2.arcLength(cnts , True)
vertices = cv2.approxPolyDP(cnts , 0.04 * perimeterValue, True)

Perhaps we can look at tips of the contours, and also detect triangles?

Hopefully it can detect arrows among different objects, among squares, rectangles, and circles. (otherwise, will have to use machine learning). Also nice to get these three results if possible (arrow length, thickness, directionAngle)

This question recommends template matching, and doesn't specify any code base. Looking for something workable that can be code created

how to detect arrows using open cv python?

If PythonOpenCV doesn't have capability, open to utilizing another library.



from Python CV Detect different types of Arrows

No comments:

Post a Comment