[Image-SIG] Image-SIG Digest, Vol 59, Issue 7
abhishekpathak88 at yahoo.co.in
Tue Mar 11 13:16:05 CET 2008
image-sig-request at python.org wrote: Send Image-SIG mailing list submissions to
image-sig at python.org
To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
image-sig-request at python.org
You can reach the person managing the list at
image-sig-owner at python.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Image-SIG digest..."
1. Area selection marquee (C Krause)
From: C Krause <ckrause at meraka.org.za>
To: image-sig at 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
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.
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.
Get the freedom to save as many mails as you wish. Click here to know how.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Image-SIG