views:

197

answers:

2

Hello,

I need to compare 2 or more images to calculate how much a point shifted in the x and y direction. May I know how do I go about doing this in Matlab?

Thanks!

+2  A: 

What you are looking for is an "Optical Flow" algorithm. There are many around, some faster but less accurate, some slower and more accurate.

Click here to find a matlab optical flow implementation (Lucas Kanade)

Gilad
A: 

Gilads suggestion about a Lucas-Kanade tracker/optical flow calculator is really good, and is what I would use. It does however have the drawback of not working very well if the scene has changed too much.

If the scenes are indeed very different (say you moved and rotated the camera quite a lot) you would have to find your corresponding points in some other way. One example could be to use a SIFT descriptor to find image features in the two images and then determine which points correspond to each other. If you know the camera matrices of the two images then it becomes quite easy.

kigurai