For solving part of my problem I needed to find the transformation matrix between the rotated image and its original so I told myself why not write the post in my blog about this problem. For this post I am going to show you how we can transform rotated image to the original image. Let’s start:
%% Input images.
Detect features in both images and match the features:
The Canny Edge Detection is a popular edge detection algorithm. It was developed by John F. Canny in 1986. It is a multi-stage algorithm. Also known to many as the optimal detector, Canny algorithm aims to satisfy three main criteria:
- Low error rate: Meaning a good detection of only existent edges.
- Good localization: The distance between edge pixels detected and real edge pixels have to be minimized.
- Minimal response: Only one detector response per edge.
Canny Edge Detection in OpenCV: cv2.Canny().