Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selecting one pixel from each blob in a binary image
#2
Can't tell for Gimp3, but for Gimp 2.10 I would do something like this:
  • Select by color the white: pdb.gimp_image_select_color()
  • Obtain a path from the selection pdb.plug_in_sel2path()
  • This gives you a path where each stroke is an envelope for each identified white blob
  • You can then use the coordinates of the anchors to compute an approximate centroid and round that value to get the coordinates of a pixel in the blob.
Reply


Messages In This Thread
RE: Selecting one pixel from each blob in a binary image - by Ofnuts - 10-23-2024, 08:28 PM

Forum Jump: