Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selecting Single Pixels of the Same Color
#1
I have several large (10800x7200) 1 bit images that have many single black pixels scattered all over the images. What is the easiest way to select ONLY these single black pixels and nothing else?

Thanks Fred
Reply
#2
(01-17-2017, 11:27 PM)Just Fred Wrote: I have several large (10800x7200) 1 bit images that have many single black pixels scattered all over the images. What is the easiest way to select ONLY these single black pixels and nothing else?

Thanks Fred

If these black pixels are the only black within the image.
This may not be the case.
However,
 if it is you could use the Select By Color Tool.
Reply
#3
(01-18-2017, 05:25 AM)Wallace Wrote:
(01-17-2017, 11:27 PM)Just Fred Wrote: I have several large (10800x7200) 1 bit images that have many single black pixels scattered all over the images. What is the easiest way to select ONLY these single black pixels and nothing else?

Thanks Fred

If these black pixels are the only black within the image.
This may not be the case.
However,
 if it is you could use the Select By Color Tool.

All the other lines and shapes within the image are black also.
Thanks Fred
Reply
#4
- Select by color
- Select>Save to channel
- Enter quick mask
- Filter>Generic>Erode (this will remove all the single-pixel items)
- Filter>Generic>Dilate (twice!), to get a selection slightly larger than original
- Exit quickmask
- In the Channels list, right click the save selection and "Intersect with selection".

The problem with the technique above is that very thin lines may be removed as well, so a more accurate technique using
with a filter of mine: ofn-path-filter-strokes (Read the HTML included in the ZIP).

- Select by color on black
- Select>Save to channel
- Select>To path
- Open the path list, right click the path, and Tools>Filter strokes on size
- Keep large strokes, measure segment count, threshold 4 (it seems that the single-pixel selection is always translated into a 3-segments path.
- At that point your path should have been vastly simplified, with only the big chunks remaining
- On the new path: Right click and "Path to selection"
- Select>Grow by one pixel
- Open the Channels list, right click on the save selection, and "Intersect with selection"

You should now have a selection on everything that is bigger than a pixel.
Reply
#5
Another, very "hardcore" solution:

- Color select and save selection as usual
- Enter quickmask
- Filter>Generic convolve
- Set all square surrounding the central one to 1, everything else (including the central square) to 0. Check the "normalise" option:

   

- this will replace all pixels in the selection mask by the sum of their surroundings, so isolated pixels disappear.
- then exit quickmask, Select>Grow, and intersect with save selection.
Reply


Forum Jump: