Coders Packet

QR Code Generator and Reader using OpenCV in Python

By Abhishek Joshi

This project aims at Generating QRCODE and Reading it using the OpenCV library in Python.

QRCODE GENERATOR AND READER USINF OPENCV LIBRARY IN PYTHON

REQUIRED LIBRARIES AND MODULES:

1. QRCODE module

2. OpenCV Library

STEP 1 : Installing the Required Libraries 

Open the Terminal and load in the following commands

pip install qrcode

pip install opencv-python

STEP 2 : Importing the Required modules and Libraries

Start writing the code in the text editor

import qrcode

import cv2

STEP 3 : Generation of QRCODE using the MAKE FUNCTION in qrcode Module 

img = qrcode.make("Intern at CodeSpeedy Technolgy Pvt Ltd")
img.save("bio.png")

img = qrcode.make("I am Groot")
img.save("Groot.jpg")

STEP 4 : Reading the QRCODE using detectanddecode function in cv2 module

d = cv2.QRCodeDetector()
value,pts,straight_qrcode = d.detectAndDecode(cv2.imread("Groot.jpg"))
print(value)



After the program has been executed, the generated QRCODE gets stored in the current folder and the decoded data gets flashed on the console as Output
I have attached the QRCODEs that i created along with the Project Files.

Download project

Reviews Report

Submitted by Abhishek Joshi (ABS7781)

Download packets of source code on Coders Packet