On Sat, 2008-11-01 at 01:02 +1030, David Gowers wrote:
> Hi Adam,
> On Fri, Oct 31, 2008 at 9:51 PM, Adam C Powell IV <[EMAIL PROTECTED]> wrote:
> > Greetings,
> >
> > I am working on an image processing plug-in (which I'll offer for
> > upstream contribution BSD-licensed), and would really like to have a
> > couple of primitives that I can't find.
> >
> > One is finding "islands" in an image: take a channel and create new
> > layers each with one contiguous region in the channel.  So if the
> > channel has ten islands, create ten new layers, each with one of the
> > islands.  Since this could be unwieldy (too many new layers), one new
> > layer with one island would suffice; one could then process that island
> > layer, subtract it from the original, and move on.
> >
> > Another is integrals: zero, first and second moments, or alternatively,
> > integrals/sums of channel intensity, x- and y-weighted intensity, and
> > x^2, y^2 and xy-weighted intensity.  This lets me fit an ellipse to an
> > island, and then display major and minor axes.
> >
> > Finally, opening and storing data files.  I'd like to be able to create
> > a CSV file with statistics of the islands: size, centroid, aspect ratio
> > (major/minor axis ratio), major axis orientation.  One could then
> > further process these statistics in a spreadsheet or other program.
> >
> > I can do the first two in scheme, though it would be slow, but tolerable
> > for my needs.  I don't see a script-fu primitive which would let me do
> > the last.
> >
> > If there are other packages which can do this, that would be helpful.
> > But having it in the same program/UI as GIMP, with all of its other
> > image manipulation tools, and with its presence across platforms, would
> > be even better.  I'd love to have your ideas.
> It sounds like you might find working with the combination of
> Gimp-Python, NumPy and SciPy more effective.
> integration,definitely. Islands, possibly (a browse through
> http://scipy.org/scipy/scipy/browser/trunk might help you to find out.
> And Python has a CSV module as standard.

Okay, thanks for the suggestion.  The downsides seem to be: I and others
need to install these as well as GIMP to use it, I need to learn Python
(yes, I'm one of the tiny handful remaining who know scheme but not
python :-), and converting from a GIMP image to something which
NumPy/SciPy can quickly sum might not be straightforward.

> I had the impression that writing external files was not supported by
> Script-Fu; I'm sure Kevin Cozens could tell you.

Okay, I look forward to hearing from him.  Hmm, I suppose if the output
is small enough, this could return it as a list, and one could run it in
the script-fu console then copy-and-paste the return value...

> Hope that helps,

Yes, thanks much.

GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Engineering consulting with open source tools

Attachment: signature.asc
Description: This is a digitally signed message part

Gimp-developer mailing list

Reply via email to