Automated Certificate generator using Opencv in Python Last Updated : 12 Jul, 2025 Comments Improve Suggest changes Like Article Like Report Prerequisites: Introduction to OpenCV OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a human. Any event usually involves a lot of participants and generating handwritten certificates for each one of them and sending them digitally is a really tedious task. Automating this job can easily save tons of time and manual work and thus also reducing the error rate. This Python script generates certificates with the persons name, reading from an excel file after loading a template certificate in the script. Below is the implementation. Certificate Template: Python3 1== #import the necessary libraries</pre> import cv2 as cv import openpyxl # template1.png is the template # certificate template_path = 'template12.png' # Excel file containing names of # the participants details_path = 'gsocOrgsList.xlsx' # Output Paths output_path = '/home/nikhil/Desktop/gfg' # Setting the font size and font # colour font_size = 3 font_color = (0,0,0) # Coordinates on the certificate where # will be printing the name (set # according to your own template) coordinate_y_adjustment = 15 coordinate_x_adjustment = 7 # loading the details.xlsx workbook # and grabbing the active sheet obj = openpyxl.load_workbook(details_path) sheet = obj.active # printing for the first 10 names in the # excel sheet for i in range(1,11): # grabs the row=i and column=1 cell # that contains the name value of that # cell is stored in the variable certi_name get_name = sheet.cell(row = i ,column = 1) certi_name = get_name.value # read the certificate template img = cv.imread(template_path) # choose the font from opencv font = cv.FONT_HERSHEY_PLAIN # get the size of the name to be # printed text_size = cv.getTextSize(certi_name, font, font_size, 10)[0] # get the (x,y) coordinates where the # name is to written on the template # The function cv.putText accepts only # integer arguments so convert it into 'int'. text_x = (img.shape[1] - text_size[0]) / 2 + coordinate_x_adjustment text_y = (img.shape[0] + text_size[1]) / 2 - coordinate_y_adjustment text_x = int(text_x) text_y = int(text_y) cv.putText(img, certi_name, (text_x ,text_y ), font, font_size, font_color, 10) # Output path along with the name of the # certificate generated certi_path = output_path + '/certi' + '.png' # Save the certificate cv.imwrite(certi_path,img) Output: Comment More infoAdvertise with us Next Article Animate image using OpenCV in Python Y yathartharora Follow Improve Article Tags : Project Python Python-OpenCV Practice Tags : python Similar Reads Animate image using OpenCV in Python In this article, we will discuss how to animate an image using python's OpenCV module. Let's suppose we have one image. Using that single image we will animate it in such a way it will appear continuous array of the same image. This is useful in animating the background in certain games. For example 3 min read Concatenate images using OpenCV in Python To concatenate images vertically and horizontally with Python, cv2 library comes with two functions as: hconcat(): It is used as cv2.hconcat() to concatenate images horizontally. Here h means horizontal.vconcat(): It is used as cv2.vconcat() to concatenate images vertically. Here v means vertical.Im 3 min read Add image to a live camera feed using OpenCV-Python In this article, we are going to learn how to insert an image in your live camera feed using OpenCV in Python. Stepwise ImplementationStep 1: Importing the libraries CV reads and stores all the images as a NumPy array. We need the NumPy library to manipulate the image and as expected we need the cv2 4 min read Reading an image in OpenCV using Python Prerequisite: Basics of OpenCVIn this article, we'll try to open an image by using OpenCV (Open Source Computer Vision) library.  Following types of files are supported in OpenCV library:Windows bitmaps - *.bmp, *.dibJPEG files - *.jpeg, *.jpgPortable Network Graphics - *.png WebP - *.webp Sun raste 6 min read Changing the contrast and brightness of an image using Python - OpenCV Changing the Brightness and Contrast level of any image is the most basic thing everyone does with an image. It is meant to change the value of each and every pixel of an image it can be done by either multiplying or dividing the pixels value of an image. In this article, we will see how we can impl 6 min read Creating a Slow Motion Video Using OpenCV - Python In this article, we will try to create a slow-motion video using OpenCV( Open Source Computer Vision) library in Python. OpenCV ( is an open-source computer vision and machine learning software library. Now a video is basically a set of moving pictures moving at a rate of about 24 frames per second 4 min read Like