0% found this document useful (0 votes)
1K views7 pages

Mini Project 1.matlab

This MATLAB code automatically generates certificates by inserting text from an Excel sheet onto a blank certificate image template. The text is obtained from the Excel sheet and written onto the blank certificate image at specified pixel positions. The code then saves each completed certificate as a separate image file. This allows for bulk certificate generation in an automated way as opposed to manual creation of each certificate individually.

Uploaded by

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

Mini Project 1.matlab

This MATLAB code automatically generates certificates by inserting text from an Excel sheet onto a blank certificate image template. The text is obtained from the Excel sheet and written onto the blank certificate image at specified pixel positions. The code then saves each completed certificate as a separate image file. This allows for bulk certificate generation in an automated way as opposed to manual creation of each certificate individually.

Uploaded by

Shivansh Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

MINI PROJECT 1

Objective:-Automatic Certificate Generation using matlab.


Software used:-Matlab R2013a
Theory:- MATLAB is a versatile tool that can automate many
tasks. Presented here is a MATLAB code to generate certificates
for workshops, conferences, symposiums, etc. Conventionally,
educational institutions and companies use specialised tools for
report cards and certificates generation on a large scale. This
MATLAB code can be extended to generate analysis reports for
large data sets as well.
The Automatic Certificate Generation project overview is shown
in Fig. 1. File name of the blank certificate (A) is used as input
in the code. Details to be written on the certificate are obtained
from an Excel sheet (B). The data is written over the blank
certificate and many such certificates are generated by the
MATLAB code (C). The certificates generated by the program
can be saved in a folder with a unique file name (D).
Fig. 1: Project overview for Automatic Certificate Generation

The three major steps involved in this project are shown in Fig.
2. Base image can be in any colour and should be in tif, jpg or
png format. The image generated by the program retains
properties of the base image. Source code given here only
inserts text on the image. Data to be written can be in either .xls
or .xlsx format. MS Excel is preferred as it’s a powerful
mathematical and statistical tool. It allows data to be internally
computed and analysed within the file.

Fig. 2: Major steps and procedures in the project


The position at which text is to be inserted can be identified
using simple image editor tools such as MS Paint and Picture
Manager. Pixels or picture elements are the most basic elements
of an image. An image of 1024×768 resolution contains 786,432
pixels or nearly 0.79 megapixels. Pixel positions to be identified
are as many as the number of texts and numbers to be inserted
on the image. The project code can be very easily manipulated
for similar image processing tasks.
The generated MATLAB figures or images can be saved into
separate files or a single file as per requirement. By default, the
code saves the generated image in .tif format with a unique
name. With simple code modifications, images can also be
ported to a PDF file.

MATALAB CODE:-
Clc
%Clea
r
comma
nd
windo
w.
clear all %Clear variables and functions from
memory
close all % closes all the open figure windows
home % Send the cursor home
filename = 'Registration_Details.xls';
[num,txt] = xlsread(filename)
% Read Excel sheet containing details. Text is read
from the file
% seperately from numbers
len=length(txt)
% obtain length of text in excel or number of
certificates to be generated
% This code provides scalability
blankimage = imread('Certificate_Blank.tif');
% Read blank certificate image
for i=1:len
for j= 2:2
text_names(i,j)=txt(i,j)
end
end
% Obtain names from the txt variable which are in
2nd column
for i=1:len
for j= 3:3
text_topic(i,j)=txt(i,j)
end
end
% Obtain topics from the txt variable which are in
3rd column
%Ignore first row which is heading
for i=2:len
text_all=[text_names(i,2) text_topic(i,3)]
% combine names and topics

position = [100 258;120 416];


% obtain positions to insert on image, MSPaint
or any image editor
RGB =
insertText(blankimage,position,text_all,'FontSize',2
4,'BoxOpacity',0);
%Provide parameters for function insertText
%Font size is 22 and opacity of box is 0 means
100% transparent

figure
imshow(RGB)
%Obtain and display figure in color

y=i-1
filename=['Certificate_Topic_' num2str(y)]
lastf=[filename '.tif']
saveas(gcf,lastf)
% generate and save files with .tif extension
end
RESULT:- Automatic Certificate is generated using this
source code.
We can just put the name over it using the excel sheet data.
Excel sheet data and blank certificate are tightly encapsulated to
each other.
Conclusion:-
Students database management:- The database of the students
present in the institution must be maintained in a well organized
way. It is required to send the certificates to the particular
students of the organization.
Certificate access:- The students will be able to access the
certificate online through the use of this system.
Login id:- There will be separate login id that will provide to
the people of the institutions as well as the students to upload
and access the certificates respectively.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy