def main(): testpic = cv2.imread('canvas.png', cv2.IMREAD_GRAYSCALE) bartype, bardata = passzbar(testpic) print(bardata.decode('utf-8'))