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:
Background subtraction, also known as Foreground detection, is a technique in the fields of image processing and computer vision wherein an image’s foreground is extracted for further processing (object recognition etc.). Generally an image’s regions of interest are objects (humans, cars, text etc.) in its foreground. Background subtraction is a widely used approach for detecting moving objects in videos from static cameras. The rationale in the approach is that of detecting the moving objects from the difference between the current frame and a reference frame, often called “background image”, or “background model.
The basic method of background subtraction is to compare |frame – background| with
a pre-defined threshold (theta). If the difference of a pixel is larger than theta, then classify it as foreground; otherwise, claim that it is background.
Python has a library called turtle that is part of the standard python installation. To use it, you need only type:
from turtle import *
You can type this right in the python interpreter to experiment with turtle graphics or, better yet, include this line at the top of your program and then use turtle drawing commands in your program!
In the turtle package when you run a program with turtle commands, a special window will open where the drawing will take place.
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().
When you don’t have time and money to go for summer vacation, take pictures and show them to your friends. One way is to make your summer vacation pictures at your office!! How? easy, you just need Matlab, pc, part of the two amigos code and creativity!
Here, my summer vacation pictures are ready 😀