Program possibilities

Hey, I am just starting in python but I would like to know if it is possible (& how could be done) any type of program that lets me separate some negatives from a scanner. The files I have are images that have other photos inside of them. I would aim to export each individual sub photo in a new document.

I leave here an example (blank spaces represents different photos: