I am looking to write an algorithm to cut rectangular images and straighten them in a new image. The bigger concept is that I will be scanning a bunch of physical pictures (on a physical scanner). They're all the same size (give or take a couple of pixels) and I can make sure they're all separated, so they're absolutely not overlapping or touching each other.
As a result of this, I want to split them up into separate files, so I can easily digitize a load of pictures, whose physical copies belonged to my grandmother and now have to be divided among different families.
Does any algorithm exist for this scenario, or am I forced to think up my own? I was thinking about simply trying to find the corners of the images first, then cutting the squares out using these corners, then simply rotating them. There might be an easier/faster processing time way though (or an existing product!)