Friday, November 22, 2024

Automatic Certificate Generation Using MATLAB

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.

Overview

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).

Project overview for Automatic Certificate Generation
Fig. 1: Project overview for Automatic Certificate Generation

Description

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.

- Advertisement -
Major steps and procedures in the project
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.

- Advertisement -

Working environment

Fig. 3 shows folder contents of the MATLAB working directory. MainCode.m, Certificate_Blank.tif and Registration_Details.xls files should be saved in the same folder.

MATLAB working environment
Fig. 3: MATLAB working environment for Automatic Certificate Generation

MainCode.m is the MATLAB M-file containing the main code, Certificate_Blank.tif is the base image, and Certificate_Topic from 1 through 6 are certificates generated from the data in Registration_Details.xls. While running M-file, MATLAB should be permitted to change directory to the location where the main folder is saved.

Future scope

Analysis and presentation of large data sets is a tedious task in applications such as Big Data, IoT and sensors-actuators modelling. The project presented here can be extended and customised for analysis and reports generation in these applications.

Download source folder


This project was first published on 1 May 2018 and was updated on 7 April 2020.

17 COMMENTS

  1. Very interesting project. To do this, The Computer Vision System Toolbox must be licensed and installed.. Is it possible to get this toolbox for free or do it could be replaced with a different toolbox? Thanks.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics