You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One File in the repository is in python 2 and the other in python 3
How do you suppose to run in in Linux environment ?
the file detect_barcode_opencv.py is in python 3
and the file barcode_detect_and_decode.py is in python 2, due to the zbar dependency.
How do you use this library in production environment ?
The text was updated successfully, but these errors were encountered:
I changed the file and the barcode function as the following
from pyzbar.pyzbar import decode
.
.
.
def decodeBarcode(image_read):
barcodes = decode(image_read)
for barcode in barcodes:
barcode_data = barcode.data.decode("utf-8")
barcode_type = barcode.type
# (x, y, w, h) = barcode.rect #to get the barcode locations
print("[INFO] Found {} barcode: {}".format(barcode_type, barcode_data ))
# print("Location x {} y {} w {} h {}".format(x, y, w, h))
print('-----------------------------------------------------------------------')
del(image_read)
variable image_read is as the follow:
image_read = cv2.imread(args["image"],0)
but you can use also the image you get after the function preprocess.
nivb52
changed the title
One File is in python 2 and the other in python 3
Use pyzbar insted of zbar directly (which is python 2)
Aug 31, 2021
One File in the repository is in python 2 and the other in python 3
How do you suppose to run in in Linux environment ?
the file
detect_barcode_opencv.py
is in python 3and the file
barcode_detect_and_decode.py
is in python 2, due to thezbar
dependency.How do you use this library in production environment ?
The text was updated successfully, but these errors were encountered: