Info

This question is closed. Reopen it to edit or answer.

How do I process scanned images to work with my current code??

1 view (last 30 days)

Hello there! I'm developing a code in MATLAB that automates the process of calculating the defaulters in a class on a certain parameter(say 75%). My code currently works for computer generated images of attendance sheets but wont work for scanned images as it was intended to.(Both are attached below) Can someone please take a look at the code attached below and guide me in the right direction as I'm freaking out.

  2 Comments
Image Analyst
Image Analyst on 17 Apr 2014
Which m-file is the main one? Where does it fail? Are you able to find the boxes inside the grid lines? Or does it do that okay but can't distinguish between a 0 and a 1. Are all your o's guaranteed to be closed? For the 0's and 1's I'd take the convex hull of each and look at the area. If the 0 is rather narrow, then for those "in between areas" you might need to look at other featured, like the Euler number.
Clinton
Clinton on 22 Apr 2014
Thanks for replying. OCR.m is the main file. Anyway I somehow got it working and it executes perfectly with the values being displayed in the Command line. I now have to create a GUI and reading through the guide documentation, nothing is making sense. Do I have to now segment my code into individual functions for callbacks? what about the sequence of my code? Any advice is welcome. Thanks Clinton

Answers (1)

Image Analyst
Image Analyst on 22 Apr 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!