How to compare 2 Images?
2 views (last 30 days)
Show older comments
Hi all,
I need to compare 2 multiple choice paper images against each other. One sample with the correct answers and the other that I need to compare and calculate the score. I tried extracting the matrix value for one of the answer on the sample and did a normxcorr on the the other image. However, the program return value at another value. Can someone please help advise where did I go wrong? Or do I need to use another function to compare?
0 Comments
Accepted Answer
Image Analyst
on 6 Oct 2012
Not sure what you did. It should have found the "filled in" circles, so I don't know what went wrong.
Of course you don't even need normxcorr2 for something like filled-in circles - just simply have a template array of masks and look in each mask to see if it's dark or bright. Why did you use normxcorr2? It seems like an overly complicated way of doing it. If you do it that way, even when you have bright spots where all the filled circles are, then you still have to match up their centroid locations with the template - you can't simply just threshold, and run regionprops - you won't have the "question number" - to - "centroid location" correspondence that you need to determine which question went with which blob. Hence my suggestion to use an array of ROI masks as a template, where you do know the correspondence. The only reason I can see for using normxcorr2 is in the registration step where you're looking for the corners or crosses at the outer corners to define the coordinate system so you can register the image. If you really want to use normxcorr2, can you upload the original image and the normxcorr2 output image?
15 Comments
Image Analyst
on 12 Oct 2012
filteredAreas has all the areas that satisfy your constraint: (3200 < allPropArea) &(allPropArea <3800)
I don't know what compare them individually means. I don't know what you are trying to do with those if statements and why you're executing them 20 times. I don't know what MaxDiff is, or what DiffQ1 is. Difference from what to what??? And what is Results???
More Answers (2)
Matt J
on 6 Oct 2012
Edited: Matt J
on 6 Oct 2012
Could you use a 3rd reference image in which all of the answers in the questionnaire are simultaneously selected?
Then you can segment that image to see where all the answer choices are.
Then you can add this reference image to the image of any normal questionnaire (assuming they are co-registered) so that the answers chosen in the normal questionnaire will create a higher intensity region than the other answers.
Finally, search the summed image for the higher intensity answer choices.
4 Comments
Hiren Maniyar
on 18 Feb 2017
hello all,
my name is hiren maniyar. i am working on OMR reorganization so i want help from all of you anyone tell me how to compare circles of two OMR sheet.i have all ready done detection of circles just i want to compare that circles. i there ant algorithm for that or any method are there then please tell me.
1 Comment
Image Analyst
on 18 Feb 2017
Start a new question and insert the two sheet pictures with the green and brown frame icon. We need to know if the two sheets are the same blank form, or different ones. Basically you can use a template of predefined circle locations and look in there. Align the image to the template if you don't have precise control over where the form is in your image.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!