f

#### binary image registration

```hi all:

i need some advice on how to register two binary images. i will use a rigid transformation (translation, rotation and scale) for that purpose. i am used to register grayscale images but now things are very different.

i used to code a cost function, define the transformation model and then let, for instance, fmincon get the optimum.

for my present goal i tried the same approach, but when it comes to interpolate the image to register for the cost function value calculation, i could not use linear or bicubic it wouldn't make sense having, for example, .5 bit values...  so i changed the interpolation method to nearest but other problems appeared. i could not make fmincon to vary the optimization variable so it would check the cost function value somewhere else besides the on its initial value. besides this, due to the nearest interpolation method, i don't know if it is very orthodox to use fmincon on a non differentiable cost function.

i would appreciate comments on this, references and anything you would like to add.

mut
```
 0
mutante51 (114)
12/2/2008 12:29:02 PM
comp.soft-sys.matlab 211266 articles. 18 followers. lunamoonmoon (258) is leader.

1 Replies
835 Views

Similar Articles

[PageSpeed] 43

```> but when it comes to interpolate the image to register for the cost function value calculation, i could not use linear or bicubic it wouldn't make sense having, for example, .5 bit values...

Why not? The interpolation is only meant to serve the registration operation.

In any case, some non-iterative methods you might want to try, discussed in previous threads, are based on the Fourier and Radon transforms ( the latter requires the Image Proc. Toolbox)

If your two images are X and Y, then you can estimate the rotation by comparing

One of them will appear shifted with respect to the other in an amount corresponding to the rotation angle. By measuring the shift using your favorite method (e.g. cross-correlation), you get an estimate of rotation.

After undoing rotation, you can like at the phase plots to get the translation

angle(fft2(Y)/fft2(X))

or you can do a centroid measurement.

Another way to estimate rotation is to calculate an edge map of your two images and take their gradient vectors [gx,gy]using diff(). If you then histogram the angles of the gradient vectors atan2(gy,gx), you will see a shift in the histogram of one image with respect to the other. The shift again corresponds to the rotation angle and can again be extracted using your favorite method.

```
 0
12/2/2008 2:51:02 PM