Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
Hi, I am working on a program which is able to get the answers from a multiple-choices questions just like SAT. So in order to determine which Answer was selected I thought about getting the color of specific pixels
(If pixel color is nearly black that menas this choice is selected...)
But before I do that and since it requires a lot of accuracy to deal with specefic pixels, I am searching for something to help me crop the scanned Answers sheet - by taking advantage of the frame on the page or any other signs. and to make it straight (in case someone scanned it in a wrong way)
So any suggestions?

What I have tried:

I searched a lot of sites for 3 days but found nothing useful to my case!
Posted
Updated 18-Dec-18 8:00am

See these CodeProject articles:
Cropping Images[^]
Image Rotation in .NET[^]

And here's a WPF version: Rotating and cropping an image in WPF - Pete Brown's 10rem.net[^]

And here's a cross platform .NET Core library: GitHub - SixLabors/ImageSharp: A cross-platform library for the processing of image files; written in C#[^]

Here is a C# template matching article: Rapid Object Detection in C#[^]

For template matching you can also use the comprehensive OpenCV library, but this is mostly C++: Template Matching — OpenCV 2.4.13.7 documentation[^]
 
Share this answer
 
v4
Comments
Member 13664349 17-Dec-18 13:59pm    
Hi, I figured out that the pixels method is not reliable, so could you guide me please...
Let’s say I have a SAT exam answer sheet and want to scan it and calculate the mark... so how could I find which circles are filled and to correct the scanned photo if it got scanned in a wring way
RickZeeland 17-Dec-18 14:19pm    
That will not be easy, I updated the solution with some template matching examples.
Good luck, and merry Xmas :)
This is not an easy field and you Need to dive in deep into the theory. I would suggest you this as a start:
Redirect Notice[^]
Please note the above article is only a start and it descibes the "most" complex case.

In case you have not a photography, but a scanned document I suggest to read through what this Google search presents:Google[^]

I am aware that this answer is not really a quick help. But if noone who deals with this topic by chance has read your question, you will get no better answers. Nobody here will be ready to do your job.

Sorry not to have better News.
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900