Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to erase (clear) pixels near edges?
#1
When attempting to remove backgrounds from an image, I think, the idea is to select the applicable area and then clear (delete/erase) the selected area.  This makes the selected area transparent.  Select by color can be effective but typically a small area near the edge of the object (i.e., portion of the image being preserved) is NOT handled accurately.  In that, pixels to be removed remain or pixels to be keep get selected for removal.  It becomes quite difficult to use the various selection tools to include these pixels.

It would seem that being able to use the various brush (painting) tools for this task would be desirable.  For example, I tried using the Clone Tool but it appears that transparency cannot be cloned.  In that pixels can be cloned but NOT the absence of pixels.  Setting Hardness to zero is NO help.

Is there a way to use Brush Tools like the Clone Tool to make the target area Transparent?
Reply
#2
Just my thoughts. Using a selection (made somehow - color select / fuzzy select ...)

Pre-process using the quick mask.

   

1) Bottom of the Gimp window is a Quick Mask toggle icon.
2) The default colour is 50% red, if that is difficult to see, right-click on the icon (3) to raise the Quick Mask Attributes and change color / opacity.
4) Paint out selections with a brush and white FG.

Post-process using the eraser.

   

The convention is use a white BG colour. (used by the alpha mask) Use the eraser tool to clear parts of the image not required.

Obviously for small areas close to the selected area, either way, zoom in and use small brush size.
After using say the Foreground selection tool, which typically leaves plenty of semi-opaque border pixels, I often use the eraser tool, small fuzzy brush, and click -click shift for (short) straight lines around a border.
Reply
#3
(08-12-2021, 04:33 PM)ajax Wrote: When attempting to remove backgrounds from an image, I think, the idea is to select the applicable area and then clear (delete/erase) the selected area.  This makes the selected area transparent.  Select by color can be effective but typically a small area near the edge of the object (i.e., portion of the image being preserved) is NOT handled accurately.  In that, pixels to be removed remain or pixels to be keep get selected for removal.  It becomes quite difficult to use the various selection tools to include these pixels.

It would seem that being able to use the various brush (painting) tools for this task would be desirable.  For example, I tried using the Clone Tool but it appears that transparency cannot be cloned.  In that pixels can be cloned but NOT the absence of pixels.  Setting Hardness to zero is NO help.

Is there a way to use Brush Tools like the Clone Tool to make the target area Transparent?

Fuzzy Select and Color select do not do what you think Smile  Typically, you should use color-to-alpha. See here for some explanations/techniques.
Reply
#4
Inference is that the answer to my question is "no"!

However, the lesson appears to be on point and also thorough.  It will take me some time to experiment with and hopefully learn.

Is it possible that this subject is documented somewhere?

Many thanks for the instructions.

(08-12-2021, 07:34 PM)Ofnuts Wrote:
(08-12-2021, 04:33 PM)ajax Wrote: When attempting to remove backgrounds from an image, I think, the idea is to select the applicable area and then clear (delete/erase) the selected area.  This makes the selected area transparent.  Select by color can be effective but typically a small area near the edge of the object (i.e., portion of the image being preserved) is NOT handled accurately.  In that, pixels to be removed remain or pixels to be keep get selected for removal.  It becomes quite difficult to use the various selection tools to include these pixels.

It would seem that being able to use the various brush (painting) tools for this task would be desirable.  For example, I tried using the Clone Tool but it appears that transparency cannot be cloned.  In that pixels can be cloned but NOT the absence of pixels.  Setting Hardness to zero is NO help.

Is there a way to use Brush Tools like the Clone Tool to make the target area Transparent?

Fuzzy Select and Color select do not do what you think Smile  Typically, you should use color-to-alpha. See here for some explanations/techniques.

Whoops!  Looks like I failed to refresh my screen before replying.  That looks like what I had in mind with respect to documentation.  Many thanks!
Reply


Forum Jump: