[Insight-users] how to extract the contour in a binary image
Vincent Garcia
vincent.garcia at inria.fr
Sat May 21 03:02:59 EDT 2011
When you don't have specific tools to do that (as proposed in the previous email), an easy and fast way to obtain the contour(s) of a mask image (denoted M) is the following:
Let D be the mask M dilated by one pixel. Then, the points on the contour are the pixel x where D(x)-M(x)=1.
It's not perfect but it's easy and it works everytime, whatever the programming language (ITK, Matlab, etc.).
Cheers,
Vincent Garcia
----- Original Message -----
From: "robert tamburo" <robert.tamburo at gmail.com>
To: "Quan" <mrvillage at 163.com>
Cc: "insight-users" <insight-users at itk.org>
Sent: Saturday, 21 May, 2011 5:49:20 AM
Subject: Re: [Insight-users] how to extract the contour in a binary image
http://www.itk.org/Doxygen318/html/classitk_1_1BinaryContourImageFilter.html
2011/5/20 Quan < mrvillage at 163.com >
hello everyone:
i get a binary image ,the pixels==1 reprensent the foreground and pixels==0 represent background.Now i want to get the contour of the different regions.and i dont wanna use edge detectors like "LOG" or "Sobel".can anybody give me some advice?in addition,it seems that itk::ExtractImageFilter cannot do this task.
thanks
Quan
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110521/1f72596b/attachment.htm>
More information about the Insight-users
mailing list