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

How to perfectly align 2 scanned multiple choice paper images?

Asked by Vic on 11 Jan 2013

I there a way somehow to align 2 scanned multiple choice paper images? Maybe by using a bar code to auto align them or using a specific shape so i can compare or find the differences in the answers between the two papers?

Thanking you in advance.

0 Comments

Vic

1 Answer

Answer by Image Analyst on 11 Jan 2013

Yes. See the imregister() function in the Image Processing Toolbox.

5 Comments

Vic on 12 Jan 2013

ok but I want to aligh this image http://tinypic.com/view.php?pic=2ntjqiq&s=6 to he same position and alignment of this image ( http://tinypic.com/view.php?pic=24pmgbb&s=6 ). I tried the code you have suggested by doing this : fixed = imread('aligned image'); moving = imread('wrongly aligned image');

... but i get some errors

Error using imregister>parseInputs (line 189) Argument 'MovingImage' failed validation with error: Expected input number 2, moving, to be two-dimensional.

Error in imregister (line 92) parsedInputs = parseInputs(varargin{:});

Error in Untitled12 (line 11) movingRegistered = imregister(moving,fixed,'rigid',optimizer,metric);

Any ideas?

Walter Roberson on 12 Jan 2013

Convert the images to grayscale before aligning them.

Image Analyst on 13 Jan 2013

The alignment will probably be the same on a monochrome image as if you could do it on a color image. Just apply the transform you get to all three color channels one at a time and recombine into a color image.

Image Analyst

Contact us