简体   繁体   中英

How to decide the field marked or not (Optical mark recognition)?

I'm making a java OMR (Optical mark recognition) application that let the user design the template he needs( draw the areas of the marks) then when he scan the document the application use the templates to get the coordinates of the areas (check boxes) my question is if I have the Image and the rectangle (X, Y , width , high ) how to decide whether the area marked or not

I'm using Java advanced imaging (JAI)

As I understand your question, you know the position of each check box on the scanned paper. You just need to compute in advance the average pixels intensity of each check box in a non-filled form.

Then for a filled-in and scanned form compute the average pixel insity within each box. Apply a threshold to each set of pixels within each box. Average box checked, average>threshold, box not checked.

I assume that you have a gray-level image (one color band). Otherwise convert your color image to a gray level image (there are standard ways of doing this), and apply the theshold to each check-box pixel average. Voilà!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM