RSS/Atom feed Twitter
Site is read-only, email is disabled

How to get a region of connected pixels?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

How to get a region of connected pixels? Astaroth Calibur 26 Jul 17:50
  How to get a region of connected pixels? Rob Antonishen 26 Jul 18:14
How to get a region of connected pixels? Astaroth Calibur 27 Jul 16:07
Astaroth Calibur
2012-07-26 17:50:05 UTC (over 12 years ago)

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.

Rob Antonishen
2012-07-26 18:14:21 UTC (over 12 years ago)

How to get a region of connected pixels?

On Thu, Jul 26, 2012 at 1:50 PM, Astaroth Calibur wrote:

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.

gimp_fuzzy_select

Input:
DRAWABLE drawable The affected drawable FLOAT x x coordinate of initial seed fill point: (image coordinates) FLOAT y y coordinate of initial seed fill point: (image coordinates) INT32 threshold Threshold in intensity levels 0 s origin.

Astaroth Calibur
2012-07-27 16:07:47 UTC (over 12 years ago)

How to get a region of connected pixels?

Thank you very much Rob Antonishen. The gimp_fuzzy_select() is the exactly I want to hear as the answer. Now I'm ready to start hacking. Cheers. :-)

From: Rob Antonishen 
To: Astaroth Calibur  
Cc: "gimp-developer-list@gnome.org"  
Sent: Friday, July 27, 2012 1:14 AM
Subject: Re: [Gimp-developer] How to get a region of connected pixels?
 
On Thu, Jul 26, 2012 at 1:50 PM, Astaroth Calibur wrote:
> 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.


gimp_fuzzy_select

Input:
DRAWABLE    drawable    The affected drawable
FLOAT    x    x coordinate of initial seed fill point: (image coordinates)
FLOAT    y    y coordinate of initial seed fill point: (image coordinates)
INT32    threshold    Threshold in intensity levels 0 s origin.