Well, if you detected the shapes, then it’s almost ready.
Subtract those from the image (set the pixels covered by the shapes to the background color).
Then, you should have only the arrows. Binarize the image (arrows white, background black), run a skeleton thinning (if the arrow is more than 1 pixel wide).
Now, for every active (white) pixel check the number of active neighbors. If it has 2 neighbors, it lies on a line. If it has more than 2 (noted A below), it should be the arrow end of a line. If it has only 1 neighbor, (noted B) it’s the other end of a line. Just eliminate the ends that are close to the arrow end (noted C).
we appreciate code being posted as code. that’s not even a screenshot (every operating system understands the Print Screen key), that is a poor picture taken of a screen.