Let`s see how to determine the angle in an image.
cv2.goodFeaturesToTrack () finds the N strongest corners of an image using the Shi-Tomasi method. Note that the image must be a grayscale image. Specify the number of corners you want to find and the quality level (which is in the range 0-1). This denotes the minimum quality of the corner, below which everyone deviates. Then specify the minimum Euclidean distance between the detected corners.
cv2.goodFeaturesToTrack(image, maxCorners, qualityLevel, minDistance [, corners [, mask [, blockSize [, useHarrisDetector [, k]]]]])
Image before corner detection: p >
Image after detection angle —