Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can we access to an object of a form from another form? Pin
Quintain26-Feb-12 15:03
Quintain26-Feb-12 15:03 
QuestionRegarding AttributeUsageAttribute.AllowMultiple Pin
PIEBALDconsult22-Feb-12 8:11
mvePIEBALDconsult22-Feb-12 8:11 
QuestionHow to check that dsn which is created used for Sql Server or Access using C# Pin
Awadhendra123422-Feb-12 2:16
Awadhendra123422-Feb-12 2:16 
AnswerRe: How to check that dsn which is created used for Sql Server or Access using C# Pin
PIEBALDconsult22-Feb-12 2:56
mvePIEBALDconsult22-Feb-12 2:56 
GeneralRe: How to check that dsn which is created used for Sql Server or Access using C# Pin
Awadhendra123422-Feb-12 3:24
Awadhendra123422-Feb-12 3:24 
GeneralRe: How to check that dsn which is created used for Sql Server or Access using C# Pin
PIEBALDconsult22-Feb-12 4:00
mvePIEBALDconsult22-Feb-12 4:00 
QuestionDetect Marked Checkbox using OCR Pin
Zeyad Jalil22-Feb-12 2:12
professionalZeyad Jalil22-Feb-12 2:12 
AnswerRe: Detect Marked Checkbox using OCR PinPopular
enhzflep22-Feb-12 4:44
enhzflep22-Feb-12 4:44 
Certainly willing to try Smile | :)

If the images will be obtained from a scanner, I'd suggest that you first implement code that will detect the skew angle and correct it. I seem to remember adapting some code with a name of gmeDeskew or something like that.

Next, you'll want to define the areas of interest. That is, the areas that will contain check-boxes that should be examined. Since different skew angles will result in images of slightly different sizes when deskewed, I'd suggest that these areas are defined using percentage of document width/height, as opposed to being defined in terms of number of pixels.

Once you have correctly deskewed the image and identified the areas of interest, you'll want to scan the image line-by-line, row by row to determine areas likely to contain check-boxes within your area of interest. Once done, examine the heck-boxes by simply counting the number of percentage of pixels that are below a certain brightness (you'll have to determine this threshold)



I coded an app once that would take scanned images of (college) attendance sheets, identifying the class name/week from a barcode, the student IDs from barcodes, then finally - the student attendance from manually colored 'radio buttons'

With this method, I was able to take an example image (at 1/4 scale as it happened) then deskew it and draw rectangles around each of the 18 barcodes for student ID, the 18 attendance scores for the students, the class name barcode and the class date barcode.
Then when I used full size images all of my areas of interest remained aligned correctly. (Using percentages of image size GREATLY improved the accuracy of the placement of the areas of interest onto each successive image. Prior to that idea, it was very difficult to be sure that I was going to examine the pixels that made up the parts of the image I was interested in)


Something else to consider is "pattern matching", or put simply - the comparing of pre-existing images with portions of the scanned document. You could simply use two images - one of an empty square and another of a check-box with a cross/dot/dash inside it. This should be effective because regardless of the style of marking, an empty box is always going to more closely resemble the saved image you have of an empty box (rather than the checked-box).

It's an interesting topic, OMR. (optical mark recognition) Enjoy! Smile | :)
GeneralRe: Detect Marked Checkbox using OCR Pin
Zeyad Jalil22-Feb-12 20:29
professionalZeyad Jalil22-Feb-12 20:29 
GeneralRe: Detect Marked Checkbox using OCR Pin
enhzflep22-Feb-12 20:43
enhzflep22-Feb-12 20:43 
Questionsmtp unknown sender Pin
CS3421-Feb-12 23:23
CS3421-Feb-12 23:23 
AnswerRe: smtp unknown sender Pin
Richard MacCutchan22-Feb-12 3:14
mveRichard MacCutchan22-Feb-12 3:14 
Questionadd application to \\root\SecurityCenter2\antispywareproduct as antispyware Pin
abhinish21-Feb-12 23:12
abhinish21-Feb-12 23:12 
Questionhow can i scann image from scanner in C# Pin
A7mad_21-Feb-12 22:55
A7mad_21-Feb-12 22:55 
AnswerRe: how can i scann image from scanner in C# Pin
lukeer22-Feb-12 2:17
lukeer22-Feb-12 2:17 
Questiontrouble in connecting from C# to Postgre SQL. Pin
hellono121-Feb-12 20:46
hellono121-Feb-12 20:46 
AnswerRe: trouble in connecting from C# to Postgre SQL. Pin
BobJanova21-Feb-12 21:42
BobJanova21-Feb-12 21:42 
QuestionIntegration of .NET with retail billing machine Pin
tahernd21-Feb-12 19:14
tahernd21-Feb-12 19:14 
AnswerRe: Integration of .NET with retail billing machine Pin
Richard MacCutchan21-Feb-12 21:24
mveRichard MacCutchan21-Feb-12 21:24 
AnswerRe: Integration of .NET with retail billing machine Pin
Mycroft Holmes21-Feb-12 21:39
professionalMycroft Holmes21-Feb-12 21:39 
GeneralRe: Integration of .NET with retail billing machine Pin
tahernd22-Feb-12 0:26
tahernd22-Feb-12 0:26 
QuestionAny difference between Console App and Windows Service for HttpWebRequest..? [Solved] Pin
Paladin200021-Feb-12 6:38
Paladin200021-Feb-12 6:38 
AnswerRe: Any difference between Console App and Windows Service for HttpWebRequest..? Pin
jschell21-Feb-12 9:41
jschell21-Feb-12 9:41 
GeneralRe: Any difference between Console App and Windows Service for HttpWebRequest..? Pin
Paladin200021-Feb-12 10:10
Paladin200021-Feb-12 10:10 
AnswerRe: Any difference between Console App and Windows Service for HttpWebRequest..? Pin
Dave Kreskowiak21-Feb-12 15:08
mveDave Kreskowiak21-Feb-12 15:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.