I have the following input image:
I need to get the orientation of the edges of the markers and draw them into the picture. This would be the result I need:
How can I achieve this? I want to use the whole edge instead of only two corner points for calculating the line/orientation of the marker edge for higher accuracy.