Mobile app version of vmapp.org
Login or Join
Shelley591

: Remove distinct points from an image by GIMP I want to remove all distinct points from some images, for example like this one: You can see: points have different color so I can not use

@Shelley591

Posted in: #Gimp #ImageEditing #Selections

I want to remove all distinct points from some images, for example like this one:



You can see:


points have different color so I can not use select by color tool.
point are very close to main part of image so it is hard to use free select tool


But if I turn off RGB channels, image looks like this:



You can see distinct points seems black, but again those are not selectable by select by color tool. Is there a way to select points, which like above are distinct from rest of the image or main part of image?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelley591

3 Comments

Sorted by latest first Latest Oldest Best

 

@BetL875

The best way to fix images like this is by using layer a mask: a layer mask is a grayscale drawable that is attached to the image, and when turned on, black points on it imply in transparency on the layer, and lighter gray shades imply more opacity up to white which means full opacity.

The transparency provided with masks is in addition to the transparency provided by the alpha channel. You can paint on it with any tools, and even use selections and filters - if you erase more than you should all you have to do is to paint the over-erased area back with a clear color, or white, and you can "unerase" things in any order (not just undo the last brushstrokes as happen when one combiens painting with using Undo).

To enable the mask, right click on the layer on the layers dialog, and on te context menu, pick Add Layer Mask.... Pick the Full Opacity option.



Now, GIMP creates the mask, and makes it the active drawable - that is visible in the program by showing another thumbnail, just to the left of the Layer thumbnail on the Layer's dialog. The mask will be initially surrounded by a 1px white border, meaning it is the active drawable. If you click on the layer thumbnail or the mask thumbnail, you toggle the active drawable (there are options to make it active or not using the menus, but clicking is the most direct way).

With the mask as the active drawable, select the black color, a paint tool, and paint on your image: the areas convered on the Layer will become transparent (and you can spot the progress on the mask's thumbnail). If you overdoo yor transparency, just paint back with white.

Now, just pick a soft brush, the PaintBrush tool, and fix your image as you desire.

Remember to activate the layer (rather than the mask) prior to exporting your image - IIRC there were GIMP versions that would export just the mask in some situations.)

There is a lot to learn about masks, just check the manual: www.gimp.org/tutorials/Layer_Masks/

10% popularity Vote Up Vote Down


 

@Merenda852

Another solution:


Alpha to selection
Select>Save to channel
Duplicate the channel
Optional but recommended: make your current layer invisible, add a white background, and make the duplicated channel visible
Select the channel copy
Filter>Generic>Erode (this will remove the one-pixels spots)
Add more erode steps if you want to remove bigger spots
Do the exact opposite number of steps with Filter>Generic>Dilate
Right click the original channel and "Channel to selection"
Right click the Eroded/Dilated channel and "Subtract from selection"


You should be left with a selection on your stray pixels.

10% popularity Vote Up Vote Down


 

@Dunderdale640

You should have avoided the problem by using another technique to extract the flower from its background (this would have also avoided the blue rim). Typically on such shapes using a Path gives good results.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme