How can I find the translations in the x & y coordinates in order to align edge detected images. I have 3 edge detected images and I want to align the second and third parts(G&R) to the first(B).
How can I do this using the 'circshift' function. As I want to Use the sum of squared difference metric to measure how well images match:
Sum of squared differences: sum( (image1-image2).^2 )
I want to record the displacements in x&y that were used to align the parts for each image

답변 (3개)

Image Analyst
Image Analyst 2013년 4월 2일

0 개 추천

Your method will be, well, let's say "suboptimal." You might want to give imregister() a try. You can run it on either on the original images or the edge detected output images.

댓글 수: 1

Image Analyst
Image Analyst 2013년 4월 3일
Here's my demo of normalized cross correlation which can be used to locate one image in another: http://www.mathworks.com/matlabcentral/answers/69245#answer_80505

댓글을 달려면 로그인하십시오.

Sean de Wolski
Sean de Wolski 2013년 4월 2일

0 개 추천

doc imregister
I have also found this one to be very fast and efficient:
It does not minimize the sum of squared differences, though. It instead maximizes the normalized cross power spectrum.
Implementing your own minimization of SSD should be fairly straight forward, simply a for-loop over a few different ranges.

댓글 수: 1

Fabo
Fabo 2013년 4월 9일
How would I do a for-loop for the ssd, Im new to matlab

댓글을 달려면 로그인하십시오.

Isabella Marino
Isabella Marino 2020년 10월 5일

0 개 추천

Q=-6;
P=1;
(Q&P)

질문:

2013년 4월 2일

댓글:

2020년 10월 5일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by