I have a photo like this
And I want to create a mask for every images in this photo, so that I can cut it and have single photos. I hope you could understand my intention.
How can I do this in python?
My goals are:
- Step create mask for this image in python if possible (So I think I have to write a function which can detect the edges and create a mask. Is that a good idea or should the masking process be done with Photoshop or GIMP?)
- Define a python function to cut images based on the mask with opencv (Yeah I could do the cutting process with Photoshop as well but I have like 10 different images and I want to automate this process.)
This answer here 'How do I crop an image based on custom mask in python?' is already good but not exactly what I want, how can I extend the function?