For coding purpose read original article barcode reader or scanner using python
Barcode represents data in graphical representation and machine-readable. For making Barcode Reader in Python we are using pyzbar library. Using pyzbar we can decode the one-dimensional barcode and QR-code.

This pyzbar can return 3 fields based on the barcode object:

Type: There are several kinds of barcodes are available. Which are differentiated by unique code names like CODE-128, Code-11, CODE-39, etc. If the symbol detected by pyzabr then is QRcode for that type is QR-CODE.
Data: This is data that is embedded inside the barcode. This data is of various kinds ( alphanumerical, numerical, binary, etc…) depending upon the type of barcode.
Location: This is the collection of points that are located in the code. For barcodes, these points are starting and ending line boundaries. and for QRcode, it is a list of four points corresponding to the four corners of the QR code quad.
Resources : https://pythonslearning.com/2021/04/how-to-build-real-time-opencv-barcode-reader-or-scanner-using-python.html

How to Build real-time OpenCV barcode reader or scanner using python
2.45 GEEK