Survey processingv(OMR)

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
BenV
Posts: 2
Joined: 2015-11-03T03:55:29-07:00
Authentication code: 1151

Survey processingv(OMR)

Post by BenV »

Hello everybody,

I just stumbled upon this website because I was looking for software to develop an application that can automaticly process surveys like the one on the picture: https://www.dropbox.com/s/8oxiyg5hn58th ... y.png?dl=0

I only need to know which box is checked, so OMR is enough. Is this solution possible with ImageMagick?
It's important that the source code can run, independtly on a server, on a scheduled basis. So no user interaction.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Survey processingv(OMR)

Post by fmw42 »

IM probably could find the checked boxes via a script, but you would need the OS to do the scheduling. Processing outline might be something like:

1) deskew the image so that the lines are more horizontal and vertical (see -deskew)

2) scale the image down to one row and again to one column (see -scale)

3) convert the one row and one column images to text format (see txt:)

4) process the text data to find the darkest pixels that are spaced fairly evenly. This will tell you the grid size and grid intersections

5) from the grid size and grid intersections, crop out the grid squares (see -crop)

6) shave the grid lines off the grid squares (see -shave)

7) get the average value of each shaved grid square. if below some threshold, then it is checked (use -scale again to average down to 1x1 pixels and use the brightness of that pixel for the average value.
BenV
Posts: 2
Joined: 2015-11-03T03:55:29-07:00
Authentication code: 1151

Re: Survey processingv(OMR)

Post by BenV »

Hey man, thanks for the quick reply and a roadmap!
We have the possibilty to write script that can be scheduled. We were just wondering if IM works when run via an agent, but already expected it to be so :-).

Thanks again.
Post Reply