Reputation: 3580
Original image:
I want to isolate and remove (i.e. turn to white) small clumps of pixels with large amounts of white space around them. Examples of pixel areas I would like to turn to white:
The goal is to get larger unbroken areas of white space. Example of the final result:
Upvotes: 3
Views: 2593
Reputation: 1568
Small clusters of pixels can be filtered out using the median filter with imagemagick like this:
convert gmyjf.jpg -median 5 gmyjf2.jpg
(where gmyjf.jpg would be the path to the original file)
Upvotes: 2