Page 1 of 1

Finding edges & splitting image into multiple

Posted: 2020-03-14T15:03:21-07:00
by fadams99
I have a large number of scanned images as combined photos (8 photos per file) and I was wondering how I can automate the process of finding the edges of each individual image and splitting it into its own .jpg . Is this possible? Below is an example of the type of thing I am dealing with.https://imgur.com/a/cA4EIG8

Help is appreciated!

Re: Finding edges & splitting image into multiple

Posted: 2020-03-14T18:58:45-07:00
by snibgo
I show some methods at Subimage rectangles.

Re: Finding edges & splitting image into multiple

Posted: 2020-03-14T20:28:40-07:00
by fmw42
If on a Unix-like system, see my scripts: multicrop and multicrop2 at my link below.

Otherwise, convert the image into binary (black where the images exist and white for your background) as a mask. Then use connected components to get the bounding boxes of the black regions from the mask. The use those bounding boxes to crop your actual input image.