Gimp-Forum.net

Full Version: How Do I Change a Background Without Cutting Off 'Borderline' Pixels
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there some sort of way to set a threshold and remove every color on one "side" of that threshold (say the background) and keep that on the other?
There is not much to work on from that tiny clip and is it a one-off or do you plan on many images to process.

Generally I find the best way is a layer mask and paint out any defects around the edge. However there is the gimp_gmic_qt plugin http://www.gmic.eu which has an interactive extract filter. Goes like this https://i.imgur.com/HrP2gjG.mp4
(02-17-2023, 09:05 AM)Ofnuts Wrote: [ -> ]But that's exactly the point!!!

Imagine you have a border between a red and a blue area. The pixels on the border have mix of the red and the blue, depending on the subpixel are that would be of each color:



When you do the Color Erase with blue, the purple pixels become  pure red, but semi transparent:



If you then paint over with green in Behind mode, the transparency in the semi transparent pixels red pixels is replaced by green,, so you red/blue pixels are replaced by red/green pixels where the green exactly replaces the blue: you get the smooth edge back, but between different colors.

This does not work. Everything I touch with color erase becomes some different color on top of a new background. In the case of your example above, the green-red mix would combine into a yellow frame that does not look normal next to the red.
(02-19-2023, 09:40 AM)Taylor-eOS Wrote: [ -> ]
(02-17-2023, 09:05 AM)Ofnuts Wrote: [ -> ]But that's exactly the point!!!

Imagine you have a border between a red and a blue area. The pixels on the border have mix of the red and the blue, depending on the subpixel are that would be of each color:



When you do the Color Erase with blue, the purple pixels become  pure red, but semi transparent:



If you then paint over with green in Behind mode, the transparency in the semi transparent pixels red pixels is replaced by green,, so you red/blue pixels are replaced by red/green pixels where the green exactly replaces the blue: you get the smooth edge back, but between different colors.

This does not work. Everything I touch with color erase becomes some different color on top of a new background. In the case of your example above, the green-red mix would combine into a yellow frame that does not look normal next to the red.

Which is why I rescinded in my previous post and recommended to use a layer mask.

However, if you use AI-generated images:
  • There are also AI-based tools to remove background
  • Maybe the image can be generated on a transparent background directly by just asking a slightly different question?
Pages: 1 2