[Insight-users] how to extract boundarys from binary image?

Luis Ibanez luis.ibanez at kitware.com
Sat Jul 10 17:27:55 EDT 2004


Hi Yu,

There are currently no filters in ITK for extracting
contours from images, at least not countour represented
as a sequence of points or as a path.

It is relatively simply to implement such a filter by
writing a state machine with 8 inputs. The output of the
state machine is usually a chain code. You can use the
class

http://www.itk.org/Insight/Doxygen/html/classitk_1_1ChainCodePath.html

in order to store / represent the resulting contour.

Please let us know if you need help implementing such algorithm,
we will be happy to assist you in doing so, and of course will
encourage you to contribute the filter back to ITK.


Regards,


   Luis


----------------
Yu Long wrote:

>     Thanks for your reply.I will try your method.I still have two questions.
>   1 Can your method produce */one/* */pixel width/* boundary?
>   2 Is there any filter used to trace the boundary pixels one by one? So 
> that I can convert the boundary pixels to contour points.
>  
> 
>     ----- Original Message -----
>     *From:* salah <mailto:salah at gris.uni-tuebingen.de>
>     *To:* Yu Long <mailto:yulong202 at 263.net>
>     *Sent:* Thursday, July 08, 2004 5:37 PM
>     *Subject:* AW: [Insight-users] how to extract boundarys from binary
>     image?
> 
>     If you want to produce a binary image containing on the boundary, I
>     would suggest:
>     1- let your binary image be   "A"
>     2- erode the image "A" by itk erosion filter, name the result "B"
>      
>     The boundary image is A - B
>      
>     best wishes,
>     Zein
>      
>      
> 
>         -----Ursprüngliche Nachricht-----
>         *Von:* Yu Long [mailto:yulong202 at 263.net]
>         *Gesendet:* Thursday, July 08, 2004 11:33 AM
>         *An:* insight-users at itk.org
>         *Betreff:* [Insight-users] how to extract boundarys from binary
>         image?
> 
> 
>             I have now written a program to convert a RGB image into a
>         binary image using itk. A sample binary image is attached with
>         this email.
>             My question is how to extract the boundary from the binary
>         image with itk? Is there any filter or algorithm than can
>         extract boundarys from binary image in itk?
>          
>          
>          
>          
>         HuaZhong Univ. of Sci. & Tech, China
>         email: yulong202 at 263.net <mailto:yulong202 at 263.net>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users





More information about the Insight-users mailing list