Given two images, we want to “reigster” them.

After resizing (pyramid, to speed-up the algorithm) and normalizing (to improve the registration) I’ve tried to find shift + rotation (3 degrees of freedom) using algorithms in matlab’s global optimization toolbox.

- genetic-algorithm – results are good only if initial guess is good/ image offset is small, even with customized parameters.
- Direct Search – very good results (but the offset is integer, for some reason)
- Simulated Annealing – poor results

In all cases, the following function was used:

%try to make B similar to A
function a = cor(alfa1)
global A B
global roi
b1=imChange(B, alfa1);
a1=imcrop(A, roi);
a = 1-corr2(a1,b1);
end
%vector of form [offset-x, offset-y, angle]
function out = imChange(im, vector)
global roi
alfa = vector(3);
offset = vector(1:2);
B1=imrotate(im, alfa,'bicubic', 'crop');
out=imcrop(B1, roi+[offset 0 0]);
end

### Like this:

Like Loading...

*Related*

Tags: genetic algorithm, genetic algorithms, global optimization, image processing, image registration, image rotation, matlab, optimization toolbox, simulannealbnd, simulated annealing

This entry was posted on 06/28/2013 at 18:46 and is filed under programming. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

## Leave a Reply