Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

image registration

Asked by Sivakumaran Chandrasekaran on 30 Mar 2012

how to register a medical image in matlab


Sivakumaran Chandrasekaran

4 Answers

Answer by Image Analyst on 30 Mar 2012

It's not easy, especially if it's a 3D image. There are lots of complicated papers on the process. For starters, why don't you start with cpselect(), a simple, manual 2D registration using user-selected landmarks. In the help, navigate to this discussion: Image Processing Toolbox -> User's Guide -> Image Registration -> Registering an Image.

Another option is Brett Shoelson's


Image Analyst
Answer by Sivakumaran Chandrasekaran on 30 Mar 2012

Thanks Image Analyst.. I tried the code with cpselect. After running the program, how to find whether the image has been registered.


Image Analyst on 30 Mar 2012

If you can't tell then maybe it didn't matter in the first place.

Image Analyst on 31 Mar 2012

First, exclude all pixels that are at the edges that aren't in both of the images - you know, the black triangles that appear at the outer edges when you rotate, scale, and translate the image to make it align with the reference image. Only consider pixels that are common to both images. Then do a subtraction or PSNR or RMS error or something like that.

Sivakumaran Chandrasekaran
Answer by Alex Taylor on 30 Mar 2012


If you are using R2012a, you might also check out the new function imregister. This function can be used to perform automated image registration:

help imregister

1 Comment

Thanks. Unfortunately i am still using 2008b. I will remember your answer and when i come to use 2012a, i will work it out

Alex Taylor
Answer by Sivakumaran Chandrasekaran on 1 Apr 2012

Image Analyst, Thanks and I shall try your ideas


Sivakumaran Chandrasekaran

Contact us