+1  A: 

Aligning two images of the same scene is called image registration. If you have access to the Image Processing Toolbox, you can find there a number of functions to help you.

Take a look at these demos (image registration section) for examples.

Amro
Hello, I am able to get the change in angle however I can't get the x and y translation. Thanks.
Veronica
perhaps if you update your question to show us what you've done so far, we might be able to help...
Amro
BTW if you reversed the rotation transformation, you can find the translation using the cross-correlation method (check out the third example)
Amro
Cross-correlation will only work if the two images are rotated to the same angle.
endolith
true, I only suggested it since the OP mentioned having solved the rotation problem
Amro
A: 

Cross-correlation (Wikipedia calls it Phase correlation) won't work if the images are rotated. However, there's a related method based on log-polar coordinates that will work regardless of rotation, scale, shear, and translation.

This method would be best if you have to match any arbitrary images. Matching known shapes or dark lines is better done with other methods.

endolith
A: 

If those black lines are always in the images, and they're near perfectly straight (not being distorted into curves), a better method would be to use the Hough transform or Radon transform (kind of different ways to think about doing the same thing) to find just the two black lines, and then compare their positions.

You'd invert the images first, so the lines are bright white (large values), and then do the Hough transform. The output for each image will be two bright white points, from which you can do peak detection. The coordinate of each peak tells you the angle and offset of the line.

I haven't done this in MATLAB, but I see a number of examples and documentation:

endolith
Interesting idea. BTW why post two answers, just edit your first and add the second one as an alternative solution...
Amro
So people can vote on which one is better, leave comments pertaining only to one, etc. Isn't that the point of the site?
endolith