Thanks for your reply!
It was easier than I thought!
def checkImageOrentation(path):
files = glob.glob(path + '*.jpg')
for f in files:
print('file is', f)
original = cv2.imread(f)
decodedObjects = pyzbar.decode(original)
# decodedObjects[0][2][0] is the top left x value, should be about 667
# if it is less than 500, the page must be upside down, rotate the image
if decodedObjects[0][2][0] < 500:
rotateImage(original, f)
decodedObjects[0][2][0] is the top left x value of the QR code.
If the page is the right way up, decodedObjects[0][2][0] should be about 667, depending on the printer.
If a page is upside down, decodedObjects[0][2][0] is only about 47