Hi,
I am not really computer-fit, but I made my own multi-choice marking programme with Python and cv2.
It works OK, does what I want. I use it regularly. I am always trying to make small improvements
In the top right corner of each multi-choice Answer Form I have a QR code containing the name and student number of each student. That’s how the programme knows where to allocate the score.
Recently, I scanned some forms in, one form was upside down. I need all Answer Forms the right way up, or my marking programme will not function properly.
The first thing my programme does is split the given PDF to jpgs, read the QR code and save the jpg as whatever-student-number.jpg, like 1234567890.jpg.
I’m wondering if there is a way to find the location of the QR code within the jpg, and if it is bottom left, not top right, I can rotate the image 180 degrees.
Can I get that info from pyzbar??
Any tips or pointers please?
I read the QR code with pyzbar
These are the modules I import:
import glob
import os
import pdf2image
import csv
import pyzbar.pyzbar as pyzbar
import numpy as np
import cv2
from PIL import Image, ImageOps
import img2pdf