[EMAIL PROTECTED] wrote: Send Image-SIG mailing list submissions to
image-sig@python.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.python.org/mailman/listinfo/image-sig
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Image-SIG digest..."
Today's Topics:
1. Area selection marquee (C Krause)
From: C Krause <[EMAIL PROTECTED]>
To: image-sig@python.org
Date: Mon, 10 Mar 2008 11:07:02 +0200
Subject: [Image-SIG] Area selection marquee
I am programming a colouring book and need to identify all the distinct
bound areas on an image so that i can cycle through them (and if
possible convert them to separe image objects. (see the magic wand
selector in any paint application) I also need a flodd fill routine -
please help me as I am a newbie with Python - Thaks Chris Krause
Hi,
I can't help you with python code, but I can definitely tell you the solution
in general terms. My reply is:
1. For extracting the distinct areas in the image, use either (a)segmentation
approach, or (b) edge detection approach (c) Morphological boundary extraction.
I will detail on (b) & (c)
(b) Use either of the following convolution masks :
Sobel, Prewitt, Robert-Cross (only 2x2 exists), or make your own
Sobel is by far the best, as per what I have seen. You may choose a 3x3 mask
for sharper edge-detection, or a 5x5 or 7x7 mask for thicker detection with
heavier response.
A 9x9 mask also exists, which you may try i9f Sobel doesn't work. It is
Laplacian of Gaussian.
(c)
Step1 : represent the object/image using any set representation, (see Set
Theory in case of doubts),
Step 2: take the dilation of the image,
Step 3 : subtract (***Set Subtraction***), from it the image, and you got the
boundary.
This method of morphology is for binary image only, and for grayscale/colour
images, it is far more complex than this one.
This is the theory of the technical stuff. I haven't done much programming in
python, so can't give code for that, except for representation and basic
operation on sets.
Bye.
---------------------------------
Get the freedom to save as many mails as you wish. Click here to know how.
_______________________________________________
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig