[Gimp-developer] How to get a region of connected pixels?



Hello everybody, let me tell you first that I've never created a plugin yet for GIMP. I want to create a despeckle plugin for GIMP to clean speckles from the thousands of scanned book pages. I think I have to do this because it seems the built-in despeckle/denoise feature of GIMP was not specifically intended for this purpose.

Directly to the point, somewhere in my code, I want to detect existence of isolated pixels.
 
I define an isolated pixels as a region of connected pixels which their colors are contrast enough with the color of previous pixel. I don't know how to explain this further, but I'm sure you know what I mean.

For that purpose, I think I need to get a region of connected pixels using flood-fill algorithm. Anyway, I hope there is/are API function(s) which can simplify my work. Any of you guys would give me a worthy direction, advice, or whatever?

Thanks in advance.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]