Hello!
I present You a simple script, that can help you to scan Game Cards, or Photos, multiple at once. I've made it as a project for my university, it was meant to preserve old images and cards I had.
It basically finds the individual cards/photos, extracts them and rotates them to straight orientation.
I share it with You under Creative Commons Licence. Please respect that.
Few assumptions:
- Place game cards/Photos in ( more or less ) straight orientation, avoid 45° rotation (0° = best quality, 45° = worst quality)
- Scan to multi-page PDF, place the file name in line
93 - DO NOT overlap images, about 3-5 mm margin is safe, otherwise script may detect two images as one!
- Remember - usually scanners are not scanning anything that's placed to about 3 mm from edges
- If you'd like to scan cards with white borders - do not close the lid, change
white_cardstoTrue - For Photos you may need to change the
cv.threshold(...)on line17to something likecv.threshold(gray, 240, 255, cv.THRESH_BINARY_INV)
Needed packages:
pip install opencv-python PyMuPDF numpy



Hi again.
The material is copyrighted... I'am trying to translate it to my language (that game never was translated and it's only available in english.. 13 years ago)
Is only a test with 4 cards
Thank you!
PS: I have all the originals but my little nepews don't understand english yet.