10-27-2024, 02:46 PM
Hi,
Thanks all for your help. I tried incorporating the dilation idea into a script, but although ingenious, it ended up being too slow for my application. I ended up using the following method: select by color (white), convert the selections to paths, find the mean of the control points for each path, and use the fuzzy selection tool on each of those mean points with a lenient sample threshold to get the correct blobs. Luckily this isn't too slow, especially since I do some steps beforehand to ensure the number of white selections isn't too large (I only really need the larger blobs).
I can certainly attest to the fact that Gimp 3 code is more verbose than Gimp 2 code, as I am incorporating this script into a larger algorithm (written in Gimp 3 python fu), which currently stands at 2000 lines long!
Thanks all for your help. I tried incorporating the dilation idea into a script, but although ingenious, it ended up being too slow for my application. I ended up using the following method: select by color (white), convert the selections to paths, find the mean of the control points for each path, and use the fuzzy selection tool on each of those mean points with a lenient sample threshold to get the correct blobs. Luckily this isn't too slow, especially since I do some steps beforehand to ensure the number of white selections isn't too large (I only really need the larger blobs).
I can certainly attest to the fact that Gimp 3 code is more verbose than Gimp 2 code, as I am incorporating this script into a larger algorithm (written in Gimp 3 python fu), which currently stands at 2000 lines long!