i need to perform registration to 2D image using"rigid transformation" in matlab .i need this for measuring the similarity between my images .any one know how this can be done using matlab?
an example on my images :
regards
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityA rigid, or isometrie transformation, is a transformation in which the distances between the points that are transformed, are preserved. This means that an object formed by these points will have the same shape and size after transformation. Examples are rotations and translations.
A 2D column vector can be rotated by $\theta$ as follows:
$\left(\begin{array}{c}x' \\ y'\end{array}\right) = \left ( \begin{array}{cc} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{array} \right ) \left(\begin{array}{c}x \\ y\end{array}\right)$
In your case you will probably be seeking a combination of rotation and translation between two images meaning that the relation between the points of these images can be defined as follows:
$\left(\begin{array}{c}x' \\ y' \\ 1\end{array}\right) = \left ( \begin{array}{ccc} \cos \theta & - \sin \theta & t_x\\ \sin \theta & \cos \theta & t_y \\ 0 & 0 & 1 \end{array} \right ) \left(\begin{array}{c}x \\ y \\1\end{array}\right)$
Or short:
$\textbf{x}' = \textbf{A}\textbf{x}$
This particular transformation has 3 degrees of freedom, one for rotation and two for translation. This means that you can solve this matrix for 2 point correspondences $\{ \textbf{x}' \leftrightarrow \textbf{x} \}$. That means in your case that you need two points in the original image and two matching points in the distorted image to ascertain the translation and rotation between them.
Ultimate reference: Multiple View Geometry
EDIT
The deformation between these images is obviously not an isometrie. For one the branches appear and disappear between them. I played a little with a slightly more involved form of feature based registration based on the assumption that the distortion is a similarity transform with 4 degrees of freedom, and the features will make up for the difference in edges. In short:
Results, not brilliant, but here goes
All code on Github, demo file is so_13_02_2012.m
.
For translation only you can use a simple phase correlation technique which is trivial to implement in Matlab.
This can be extended to include rotation and scaling as well by moving to log-polar coordinates (see the links off of the Wikipedia page).
Image processing Toolbox>User's Guide>Image Registration
. This is thoroughly documented. $\endgroup$