loading
 
Align two pictures
DG from United States  [4 posts]
15 year
Hello,
    I am creating a program that grades scantrons.  I use a webcam to capture the image of the scantron, capture the bubbles/answer choices with RoboRealm, and calculate the score with Java API.  
    As of now, I successfully calculated the score of an ideal image of a scantron, shown here: .  However, I want to calculate the score of a real life scantron, shown here: .  To do this, I need the scantron's bubble's x and y coordinates to be the same as that of the ideal image.  Basically, I need to somehow transform the real image so that the layout matches the ideal image.
    The reason I have to make the coordinate correspond is because I figure out whether a bubble/answer is A B C or D based on it's x coordinate and which question it is for.
    If if you have any suggestions on how I can transform the real image to match that of the ideal image, let me know.  So far, I've tinkered with Visual Anchor with little success.  Also, if you have any recommendations/criticism on my general approach to the problem (ex. I should use a scanner instead of a webcam), please tell me.

Thanks.

DG from United States  [4 posts] 15 year
Also, a better image to use a Visual Anchor for would be: .

If if you have any suggestions on how I can transform the real image to match that of the ideal image, let me know.  Also, if you have any recommendations/criticism on my general approach to the problem (ex. I should use a scanner instead of a webcam), please tell me.

pranavtrehun007 from United Kingdom  [33 posts] 15 year
Hi GD,

1) For now, try Auto Threshold with cluster. Alternately, you can also use Contrast.

2) Since you are using vision, why not print the Scantron sheet in color. Then all you have to do is remove that color with thresholding. And you'll be left with the dots. The main advantage of this technique is that even the trickiest shades of pencil color will still be very clear. Tell me you like it :-)


Pranav Trehun
Chris Councilor from United States  [1 posts] 15 year
A form processing SDK can offer bitonal template-based for ID, alignment, form dropout and OMR technology.  
Anonymous 15 year
GD,

Nice project! There are a bunch of ways to do this .. ideally you would just process the image for circles and interpret them based on proximity ... that would eliminate the need for direct image to template comparison and work on any scantron regardless of actual spacing.

But as you had indicated you wanted to do image alignment you can use the affine transform module to do this. Basically the technique uses circle analysis and blob filtering to eliminate all but the four outer circles whose coordinates are then used in the affine transform to align the entire image to those 4. Note that the scale in the affine is set to +100% as we want to reduce the image slightly to include all 4 corner circles as the actual points are the centers of the circles which would cause them to be clipped.

Also note the use of the blob_colorize module which is not needed but is a nice way to detect which circle was filled in ... ie compare the 4 circle values and chose the one with the least intensity as the colored one.

Hope this helps ...

STeven.
program.robo
Anonymous 15 year
Oh, and you will need v2.2.12 for this robofile to work.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index