Copy link to clipboard
Copied
Hi!
I have an automation that removes the background of a photo of a framed comic, straightens the image and then resizes to a standard size. This generally works ok - see below before and after.
On a few of the photos the selection doesn't always sucessfully select the frame outline depending on the shadows/lighting. I can fix this by tweaking the tolerance and sampling but then it then works on some and not the others. I have tried "subject select" and "removed background" but neither of these works reliably.
Is there a more robust way to select the frame e.g. using the fact it's always a simple 4 sided polygon
Thanks!
Copy link to clipboard
Copied
Is there a more robust way to select the frame e.g. using the fact it's always a simple 4 sided polygon
It is commendable that you posted meaningful images right away, but that question seems a bit optimistic.
How would you define a »four sided polygon« in a pixel photograph exactly? (Due to the lenses the »lines« connecting the corners aren’t even straight …)
Have you tried involving the Filter »Find Edges«? If the background is always fairly unform this might provide a good basis for differentiating the foreground.
Copy link to clipboard
Copied
Hi! Many thanks and the "Find Edges" tip is great and has got me closer! I can select the non-picture area now a lot cleaner and I'm just working through how to then use this as a mask for the original image - almost there but need more googling!
Copy link to clipboard
Copied
Personally I often like a Work Path approach, because one can get all the points of the path and process them with a Script.
But identifying a rectangle that way seems difficult because a Work Path based on a Selection of the (pre-processed) image will still likely contain dozens (or hundreds or …) of points, so identifying the »exact« corners would probably need employing some heuristics.