automatic voting system
DESCRIPTION
This Document describe a system made to scan an a voting image detecting votes for every candidate and calculate votes using image processing and neural networks techniquesTRANSCRIPT
dd
Automatic Voting System Counting and classification of candidates votes
Voting is a painful process especially in calculating votes and recognizing the voted candidate
and summing votes to determine the winner of process Due to all this we decided to build a
system to run in parallel with existing voting system to lower the overhead and cost of Voting
Process and increasing accuracy.
2011-2012 Computer Engineering Depart Shoubra Faculty
Project members:
1- Ahmed Rashad Basuony ([email protected])
2- Ahmed Ali Ibrahim ([email protected])
3- Mohab Tarek El-Shishtawy ([email protected])
Automatic Voting System
Contents
Objective
Technology used
Steps of Analysis A. Image processing
1. Resizing
2. Converting To gray
3. Enhancing Edges
4. Thresholding
5. Getting Data
B. Neural Network 1. Logestic Regression Algorithm
2. Cost Function
3. Training and updating Theta
4. Testing
C. GUI
Future Work
Objective
Voting is a painful process especially in calculating votes and recognizing the voted candidate
and summing votes to determine the winner of process.
Due to all this we decided to build a system to run in parallel with existing voting system to
lower the overhead and cost of Voting Process and increasing accuracy.
So it will works as follow it takes ordinary voted paper recognizing where is the check sign
detecting that candidate and increase his votes by one if the correct sign detected, system also
capable of calculating overall votes for every candidate and announce the winner, calculating
correct votes and invalid ones.
The system not only automate the process of calculating votes but also has a high accuracy
ratio for detecting different signs that used to vote whether it’s a check sign, line, reverse signs,
or any correct signs and isolate all noise due to faulted papers or poor scanning condition, it
reached in some cases to 0.999 in accuracy in detecting signs.
Technology Used
We build our system entirely on Java platform , we chose it for its simplicity for using and not
depending on specific OS as it can run anywhere also for high OOP power that enable us to
reuse it object or extending our work in future or modifying the system to adapt any condition.
Using java enabled us from implementing image processing modules from scratch choosing
what is best for our condition for detecting scanned photos and also implementing Neural
Network module reducing complexity for detecting and though time required for overall
process.
Steps of Analysis
The system consist of three main components Image processing module responsible for pre-
processing of scanned image eliminating noise and enhancing edges and reducing amount of
data that used by neural though enhancing its accuracy and speed.
The second module is Neural Network module used to train our network to different valid signs
and calculating percentage of each sign according to trained data and knowing the difference
between a valid sign (correct input) and noise or non-valid sign (incorrect input).
Third module consist of GUI that enable the employee from using the system enabling him form
choosing the database of candidate load and show it then choosing batch directory of scanned
images then it will automatically calculate number of votes, correct ones and invalid ones and
announcing the winner candidate.
A) Image Processing
Our system used multiple image processing techniques for reducing noise we will discuss
them separately showing importance of every one.
1- Resizing
We use resizing technique to unify our work on all images whatever input data or images ;
our system will automatically takes the picture applying resizing with a special technique
without losing any important data to reduce processing image time.
2- Converting To Gray
This part takes the image converting it to gray scaled image by calculating the average of
RGB component of picture taken as we don’t need the complexity of colored image in our
processing.
3- Enhancing Edges
This module enables us from applying a special filter on whole image detect its edges
which is very important in our case as it used for determining vertical and horizontal edges
for the scanned paper return the position of every vertical or horizontal line in picture as
we use this to separate the square containing the check sign
4- Thresholding
Again we use another technique and this one called thresholding it’s used to convert the
gray-scaled image to one bit binary of only black and white enhancing important data and
convert it pure white and all other noise or unwanted data converted to black; this again
reduced complexity one more time that used afterwards to train neural network and used
for detecting when system is running.
5- Getting Data
After applying all this operation on the image we want features of the image in this stage
the square that contain the check sign so we need to convert it to data for using in neural
network as we can’t input pure images to Neural module so we used a technique that
collects pixels of images in one-dimensional array carrying it’s features in another words it
contain only 1’s or 0’s representing every black and white pixels of square that contain the
check sign.
B) Neural Network
As simplicity of our detecting white sign on Black Square we chose a simple neural
technique of Single-neuron.
1- Logistic Regression
Logistic regression low complexity suits the limited nature of problem where time is
critical and output is only 0 (wrong sign) and 1 (valid sign)
Hypothesis
It’s a classification technique where
2- Cost Function
Gradient
3- Training and updating theta
Neural network in this project trained on multiple data-sets of different check signs in
different orientations also reversed signs and for negative output we trained our neural on
empty black boxes and black boxes with noise or incorrect signs to ensure its accuracy, the
training-set (batch) is around 100 different (images) with run learning iterations 100 times
and minimum error of 0.04 also we used technique of randomizing input data to increase
accuracy.
4- Testing
After applying previous training and storing (theta) in separated file our testing hit-ratio of
correct signs to probability of 0.999 and for false or noised signs to 0.02 to 0.03.
C) GUI
This module consists of main screen showing different candidates and their properties from
names, numbers in list, type of candidate, and collected votes it capable of reading from
and comma separated files congaing database of candidates.
With a special screen of navigating user can use select scanned images from anywhere in PC
to start scan and calculate votes.
Also GUI announcing the winner of Elections based on max votes taken and calculates
number of total, correct and incorrect votes for whole scanned images.
Future Work
As the system based on java and OOP modules it can be extended easily adding new features or
modifying the system to run in any environment.
So this can be done in future work:-
1- Decrease reading image time and whole process time by modifying algorithm.
2- Increasing ability to identify multiple columns images that contain wide rand of
candidates.
3- Adding more features to GUI or changing winner methods according to each country
system.
4- Classifying candidates and generating charts of votes correct and incorrect.