Disclaimer: I'm a computer vision rookie.
I have seen a lot of stack overflow posts of how to find a specific sub-image in a larger image.
My usecase is a bit different since I don't want it to be specific and I'm not sure how I can do this (if it's even possible, but I have a feeling it should).
I have a large datasets of images, of sometimes, some of this images are a combination of two or more other images of the dataset. I'd like to automatically crop theses "combinations" to isolate the sub-images.
So the tasks would be to process each image of the dataset, and check if there are abnormal boundaries that could mean the image is a combination.
Example using great stock images:

What I've tried:
I've seen that houghs transform could be used for line detection in images but I'm couldn't achieve anything using this.
cv.Sobel or other derivative kernel (with cv.filter2D) to find edgesnp.sum or np.mean do that.np.argsort and indexing to find best candidates.edge map:

edgy plot:

slices to take:
array([[ 0, 578],
[ 578, 1135],
[1135, 1136]], dtype=int64)
Pictures:

complete notebook: https://gist.github.com/crackwitz/e1ba1ce7a6fba446288275d91f66261c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With