Challenge

Automatic Certificate Generation Using MATLAB

Aim:

Automatic Certificate Generation Using MATLAB

Significance of your project:

  • This program is used for generating certificates collecting participants' data from excel sheets.
  • This program can help save time and hustles and can arrange and manage certificates in an orderly manner.
  • Analysis and presentation of large data sets is a tedious task in applications such as Big Data, IoT, and sensors-actuators modeling. The project presented here can be extended and customized for analysis and reports generation in these applications.
  • certificates generated by the program can be saved in a folder with a unique filename

Module and libraries used:

  1. xlsread(filename) reads the first worksheet in the Microsoft® Excel® spreadsheet workbook named filename and returns the numeric data in a matrix.
  2. imread(filename) reads the image from the file specified by filename, inferring the format of the file from its contents. If filename is a multi-image file, then imread reads the first image in the file.
  3. insertText(I,position,text) returns a truecolor image with text inserted. The input image, I, can be either a truecolor or grayscale image.
  4. Etc

Procedure:

  1. Read an Excel sheet containing details. Text is read from the file
  2. seperately from numbers
  3. Read blank certificate image
  4. Obtain topics from the txt variable which are in 3rd column
  5. combine names and topics
  6. obtain positions to insert on the image, MSPaint or any image editor
  7. Provide parameters for function inserttext
  8. Font size is 22 and opacity of box is 0 means 100% transparent
  9. generate and save files with .png extension

MATLAB Code:

clc 
clear all 
close all 


filename = 'Registration_Details.xls';
[num,txt] = xlsread(filename)
% Read Excel sheet 
% seperately from numbers
len=length(txt)
blankimage = imread('1.png');
% 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',28,'BoxOpacity',0,'TextColor','white');
        %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 '.png']
        saveas(gcf,lastf)
        % generate and save files with .png extension
end    

Provided Inputs :

  • Excel sheet of registration Details .
  • Blank certificate image

Output:

  • Generated Certificates .
  • Workspace.
  • Command Window.

Errors And Difficulties:

  • Typing mistakes were observed.
  • Using Image Processing tools were hectic.
  • errors in input arguments were found due to being unfamiliar with new functions.
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.