Sunday, October 2, 2016

gimp - How can I select the convex hull of an existing selection?


I'm trying to remove blue skies with clouds quickly from many images. I've used gimp's Color Selection Tool, which selects the sky but not the clouds. Since all clouds are in the sky, if I could expand the selection to encompass everything within the area, I'd be done. Does gimp have a tool for this?



Additionally, it would be great if someone can recommend a way to automate this process, possibly using python scripting for gimp, because I need to do it for a couple of hundred images.


example photo



Answer




Note: Remove Holes is now included in selection tools of recent versions of Gimp. Older versions may use the approach below:




There is an external script for Gimp which removes holes from a selection. We can download the script (also available from the Gimp Plugin Registry*) and unzip it to the scripts directory we had defined in our Gimp preferences.


*Gimp Plugin Registry is deprecated. A mirrored archive is kept on GitHub


After restarting Gimp we can access the script from Selection > Remove holes... menu.



enter image description here


enter image description here
Selection with holes


enter image description here
Holes removed


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...