0% found this document useful (0 votes)
19 views22 pages

I-Card Scanner Project Acknowledgement

Anurag Sarma acknowledges the support received from his teacher, online programmers, and the principal in completing his Informatics Practices project, which involves an I-Card scanner using Python. The project aims to streamline student attendance tracking by scanning images from a CSV file and visualizing attendance data. It utilizes various Python libraries such as pandas, OpenCV, and matplotlib to enhance functionality and user experience.

Uploaded by

sribashdey1000
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views22 pages

I-Card Scanner Project Acknowledgement

Anurag Sarma acknowledges the support received from his teacher, online programmers, and the principal in completing his Informatics Practices project, which involves an I-Card scanner using Python. The project aims to streamline student attendance tracking by scanning images from a CSV file and visualizing attendance data. It utilizes various Python libraries such as pandas, OpenCV, and matplotlib to enhance functionality and user experience.

Uploaded by

sribashdey1000
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Acknowledgement

I, Anurag Sarma, would like to acknowledge the few


people who helped me throughout the making of
this project.
First and foremost, I would like to thank our subject
teacher Anju Ma’am to allow me to do this project
even though it is a bit different as compared to
others and warn me about following the NCERT
guidelines beforehand so that I wouldn’t have to
redo it.
Secondly, the programmers on Reddit who helped
me by answering my doubts regardless of their
stupidity. Especially the user ‘u/IUseArchBtw’ who
was always there to provide me with suggestions
relating to creating and using virtual environments.
Lastly, respected principal of KV IIT Guwahati, who
had allowed me to do this project as a student of
this school.
CERTIFICATE

This is to certify that Anurag Sarma of Class 12-B


has successfully completed his Informatics
Practices project named I-Card scanner under the
Guidance of Anju Ma’am.

____________________

Internal Examiner Signature

______________________

External Examiner Signature

______________________

Principal’s Signature
INDEX

OBJECTIVE 5
INTRODUCTION 6
SOME DEFINITIONS 7
FUNCTIONS USED 10
FILE ARRANGEMENT 13
CODE 14
OUTPUT.….……………………………………………………….…………………………………..16
RESOURCES..…..…………………………………………………………………………………….19
BIBLIOGRAPHY..………………………..………………………………………………………….20
Objective
The objective of this project is to take attendance of
students by scanning their images provided in a CSV
file by using Python programming language.
This project aims at making attendance easier and
efficient and prevent any mistakes related to the
number of days a student has been present in
school. It also allows for comparing the attendance
of students by visualising them whenever the user
desires.
This project allows for schools to modernise
themselves by implementing new technologies and
raising the efficiency.
This project also allows for easier updating of the
code as per the user requirement.
INTRODUCTION
This project is made using the python programming
language through the conda virtual environment
and python interpreter.
The program is coded in VS code to increase the
compatibility across different devices even without
the necessity of the anaconda software.
This project uses the libraries pandas, matplotlib,
NumPy and OpenCV.
The pandas library has been used here for reading
the CSV file and making it usable for other
functions.
The matplotlib library has been used for creating the
graphs of the student’s attendance.
And, the OpenCV library has been used for using the
webcam and allow for the images of students to be
scanned.
Some Definitions
Python
Python is a widely used programming language that
can be used to make varying softwares ranging from
simple calculators to artificial intelligence. It has
become really popular because of its simple learning
curve and cross compatibility. Some of the most
popular Python libraries are NumPy, pandas,
requests, etc.

Pandas
Pandas is a well-known python library built on top of
NumPy. It is generally used for manipulating data
and data analysis. It is able to take data from CSV
files as well as SQL databases. Pandas is the go-to
library for use in data analysis.
Import syntax: Import pandas
NumPy
NumPy is a sophisticated python library used for
manipulating arrays and matrices. Most libraries use
NumPy is one way or another. Data science,
machine learning, and scientific computing are few
of the many domains it is employed in.
Import syntax: import numpy.
Matplotlib
Matplotlib is a popular python library when it comes
to data visualization. It allows for a great deal of
versatility to the user.
Import syntax: import [Link] as plot
Or
from matplotlib import pyplot as plot
OpenCV
OpenCV is a widely known python library for its
computer vision capabilities. Most modern computer
vision and CCTV softwares are built using this
library. This library has an uneven learning curve as
it can be easy at some parts and complicated at
others.
Import syntax: import cv2

CSV File
CSV stands for Comma Separated Values. It is a
simple way to store data in a table like format. As
per the name suggests, the values of each row are
separated by commas(,). The most common use of
CSV is to export and import data from/into a
database program.
It is usually popular for its simplicity and its
compatibility across different spreadsheet
softwares, making is really useful for data science.
The pandas library provides us two ways to interact
with a CSV file
For import: <df>=pandas.read_csv(<file_path>)
For export: <df>.to_csv(<file_path>)
Functions Used
Pandas
pandas.read_csv(file_path, **kwargs): This function is used
to read CSV file into a DataFrame. It uses the parameters
file_path, sep, header, names, index_col, usecol and dtype; but
only file_path parameter is mandatory.
[Link](): This function is used to create a
DataFrame is pandas.

OpenCV
[Link](device_index/path): This function is used
to take video footage from live webcam or existing video file.
<video>.read(): This function converts the NumPy matrix
created in [Link]() to a visual format.
[Link](source,code): This function converts the colour
type of the video or image. It can convert the colour type by
using the code:
 cv2.COLOR_BGR2GRAY
 cv2.COLOR_BGR2HSV
 cv2.COLOR_HSV2GRAY
 cv2.COLOR_HSV2BGR
 cv2.COLOR_GRAY2BGR
 cv2.COLOR_GRAY2HSV
[Link](window_name, image): This function is used to
make the visual data visible to user by creating a new window.
[Link](path): This function is used to take image from
the path.
[Link](source,dsize,fx=0,fy=0): This function is used to
resize the image.
[Link](image, template, method): This
function is used to match the desired template from the image
by using different methods like:
 cv2.TM_CCOEFF: This method is preferable when
complex transformations occur. The higher the value
the better the match. It scales from -∞to ∞.
 cv2.TM_CCOEFF_NORMED: This method is same as
cv2.TM_CCOEFF but it scales from -1 to 1.
 cv2.TM_SQDIFF: This method is preferable when
illumination changes occur. The lower the value the
better the match. It scales from 0 to ∞.
 cv2.TM_SQDIFF_NORMED: This method is same as
cv2.TM_SQDIFF but it scales from 0 to 1.
 cv2.TM_CCORR: This method is preferable when high
scaling and rotations occur. The higher the value the
better the match. It scales from 0 to ∞.
 cv2.TM_CCORR_NORMED: This method is same as
cv2.TM_CCORR but it scales from -1 to 1.
[Link](result): This gives the minimum value,
maximum value, minimum value location, and maximum value
location from [Link]().
[Link](delay=0): This function is used to wait for a
keyboard even to occur.
<video>.release(): This function is used to release video
capture object, freeing up system resources.
[Link](): This function is used to close all open
windows.

Matplotlib
<plt>.bar(x, height, width=0.8, **kwargs): This function is
used to create a bar chart. It uses the parameters x, height,
width, bottom and align. But, only x and height parameter is
mandatory.
<plt>.xlabel(xlabel, fontsize=None, **kwargs): This
function is used to provide a label to the X-axis. It uses the
parameters xlabel, fontsize, fontdict and labelpad. But only the
xlabel parameter is mandatory.
<plt>.ylabel(ylabel, fontsize=None, **kwargs): This
function behaves the same way as xlabel() but for the Y-axis.
<plt>.title(label, fontsize=None, **kwargs): This function
is used to set the title of the graph. It use the same parameters
as xlabel() and ylabel() with the addition of loc parameter and
the labelpad parameter being changed to pad. And just like the
previous two, only the label parameter is required.
<plt>.grid(axis= ‘both’, which=‘major’, **kwargs): This function is
used to configure the grid lines in a plot. It consists of 2
parameters, axis and which. None of them are mandatory.
<plt>.show(): This function is used to display the plot.
<plt>.savefig(filename, dpi=None, **kwargs): This
function is used to save the plot as an image. It uses
parameters like filename, dpi, transparent, bbox_inches and
facecolor. Among them, only filename parameter is mandatory.
File Arrangement

(Virtual environment)
CODE
#[Link]

#[Link]

#data_visual.py

#[Link]
Student [Link]
Output
Precaution:
Only the [Link] file is required to be run.
There might be instances of the camera to appear behind
the code interface. This does not affect the behaviour of
the code in any way.
The code is made in a way to be easily modifiable.
Minor non-code glitches might occur. This too does not
affect the code and can be ignored.
While closing the camera, the user is required to press ‘x’.
Otherwise, the program won’t stop running.

Running the code:


Choosing option 1

Choosing option 2
Upon choosing option 2, a camera is opened
The user is required to show the Id

Once the ID matches, the following output is shown

The program will keep scanning till all the students are
present and if that happens, the following will show

Otherwise, the user can press ‘x’ to stop the scan.


This will also update the CSV file.
Choosing option 3

After closing the graph

If y is selected, the graph is saved.


Resources
IDs

Folder
[Link]
id=1gIlxIxnbZsdWpSxFuxQDdodyyduWjsx&usp=drive_fs
Bibliography
 OpenCV documentation

 Informatics Practices book by NCERT

 YouTube( Tech with Tim )

 Reddit(r/python)
Programmer’s words( Extra )
This page is just something I chose to add because I felt
my speaking my mind. And maybe also motivate my
juniors if this even manages to reach them that is. This
is not a part of the project by any means and is here for
those interested in my reasoning as to why I chose to
make this.
So, ever since the begging of this class year, I had been
trying to do something different for my IP project and
was actually planning on making a game at first. Of
course, I wanted to do it while also following the NCERT
guidelines. But the thing is, most people don’t know
about the concept of anti-addiction/non-addictive
games. So, the likelihood of my project getting rejected
was high. And using CSV file on a game is unheard of. I
mean, I don’t even know how useful doing that
would’ve been.
Anyways, so I had to drop the idea. And it took me a lot
of time to think about something else that isn’t generic
crap IP students build every year. It is only after the
month of August that I had the idea of making an ID
scanner.
But because of monthly tests and the pointless stress
Business Studies gave me, I couldn’t learn anything
about the necessary library needed. So, after first pre-
boards, I actually stated learning about the library and
the base code on top of which I will work upon.
The most of my free time went on scribbling on paper
about how I should make the code. It was mainly
because the tutorials only showed the basics and the
codes available online were too complicated for me.
So, yeah. I ended up making this and added the CSV
file and Bar graph just to clear the NCERT guidelines.
If any of my junior in the near or maybe not-so-near
future is reading this. My message to you is “Just
because you’re an IP student, that doesn’t mean
you can’t prosper in the field of computers. There
might be some hurdles on the way, but don’t let
it destroy your motivation. Perseverance is key.
Oh, and don’t rely on AI much. It brings more
problems the lengthier your code becomes.”

You might also like