<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi Bradley and All,<br></span></div><div><br><span></span></div><div><span> Thank you for your reply. But Laplacian is also not doing a good job. I have played around with a few values, but no luck. I finallly tried Canny, But not sure what my threshold should be. I apply the Canny filter to a image of type 'double'. The min and max value in my image is -4.0 to +4.0 . The necessary edges are seen as weak edges by canny. Not sure how to workaround this.</span></div><div><br><span></span></div><div><span>Any suggestions ?</span></div><div><br><span></span></div><div><span>Thank you,</span></div><div><span>Emma</span></div><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times,
serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Bradley Lowekamp <blowekamp@mail.nih.gov><br> <b><span style="font-weight: bold;">To:</span></b> Sergio Vera <sergio.vera@alma3d.com> <br><b><span style="font-weight: bold;">Cc:</span></b> Emma Ryan <eryanvtk@yahoo.com>; "insight-users@itk.org" <insight-users@itk.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, March 14, 2012 6:59 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Insight-users] Sobel operator gives fat edges<br> </font> </div> <br>
<div id="yiv412603846"><div>I would also suggest looking at the ZeroCrossingBasedEdgeDetectionImageFilter. This extracts where the laplacian of the image crosses zero.<div><br></div><div><br><div><div>On Mar 14, 2012, at 4:22 AM, Sergio Vera wrote:</div><br class="yiv412603846Apple-interchange-newline"><blockquote type="cite">Have you tried CannyEdge Detection Filter? Canny always returns the thinnest edges.<div><br></div><div>Hope to help Regards<br><br><div class="yiv412603846gmail_quote">On Wed, Mar 14, 2012 at 2:59 AM, Emma Ryan <span dir="ltr"><<a rel="nofollow" ymailto="mailto:eryanvtk@yahoo.com" target="_blank" href="mailto:eryanvtk@yahoo.com">eryanvtk@yahoo.com</a>></span> wrote:<br>
<blockquote class="yiv412603846gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size:12pt;font-family:times new roman, new york, times, serif;"><br> <div style="font-family:times new roman, new york, times, serif;font-size:12pt;">
Hi ,<br><br> I am using the sobelOperator provided in itk. The following is my code snippet. I would like to understand<br><br>1. the default setting of the sobel and <br>2. how I can tune it. There dont seem to be too many member functions to manipulate the sobel.<br>
3. If I need to use Erosion filter to thin the edges, how do I design a 'line' structuring element. My code ( also added below) does not seem to allow line (which I am guessing derives from Box, line = 1-D Box)<br>
<br>Any help/suggestions is truly appreciated.<br><br>Thank you,<br>Emma<br><br><br>typedef itk::ConstNeighborhoodIterator<ImageType> NeighborhoodIteratorType;<br> typedef itk::ImageRegionIterator<
ImageType> IteratorType;<br><br> itk::SobelOperator<PixelType, 2> sobel;<br> sobel.SetDirection(1); <br> itk::Size<2> radius_s;<br> radius_s.Fill(1);<br> sobel.CreateToRadius(radius_s);<br>
<br> <br> NeighborhoodIteratorType::RadiusType radius = sobel.GetRadius();<br> NeighborhoodIteratorType it( radius, my_image, my_image->GetRequestedRegion() );<br> itk::NeighborhoodInnerProduct<ImageType> inner_product;<br>
<br> ImageType::Pointer output = ImageType::New();<br> output->SetRegions(my_image->GetRequestedRegion());<br> output->Allocate();<br> <br> IteratorType out(output, my_image->GetRequestedRegion());<br>
<br> for (it.GoToBegin(), out.GoToBegin(); !it.IsAtEnd(); ++it, ++out)<br> {<br> out.Set( inner_product( it, sobel ) );<br> }<br><br> output->Update();<br> <br><br>//Erosion Structuring Element: The following fails to compile if I use '1' instead of '2'<br>
typedef itk::FlatStructuringElement<2> StructuringElementType;<br> StructuringElementType::RadiusType element_radius;<br> element_radius.Fill(5);<br> <br> StructuringElementType strel = StructuringElementType::Box(element_radius);<br>
</div> </div></div><br>_____________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com/">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
http://www.kitware.com/opensource/opensource.html<br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
http://www.kitware.com/products/protraining.php<br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
http://www.itk.org/Wiki/ITK_FAQ<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.itk.org/mailman/listinfo/insight-users<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a rel="nofollow" target="_blank" href="http://www.alma3d.com/">www.alma3d.com</a><br>
</div>
_____________________________________<br>Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote></div><br><div>
<span class="yiv412603846Apple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;font-size:medium;"><span class="yiv412603846Apple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><div style="word-wrap:break-word;"><span class="yiv412603846Apple-style-span" style="border-collapse:separate;color:rgb(0, 0,
0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;"><font style="font:normal normal normal 12px/normal Helvetica;" size="3">========================================================</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;"><font style="font:normal normal normal 12px/normal Helvetica;" size="3">Bradley Lowekamp<span class="yiv412603846Apple-converted-space"> </span><span class="yiv412603846Apple-converted-space"> </span></font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;"><font style="font:normal normal normal 12px/normal Helvetica;" size="3">Medical Science and Computing for</font></div><div
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;"><font style="font:normal normal normal 12px/normal Helvetica;" size="3">Office of High Performance Computing and Communications</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;"><font style="font:normal normal normal 12px/normal Helvetica;" size="3">National Library of Medicine<span class="yiv412603846Apple-converted-space"> </span></font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;"><font style="font:normal normal normal 12px/normal Helvetica;" size="3"><a rel="nofollow" ymailto="mailto:blowekamp@mail.nih.gov" target="_blank" href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></div><br class="yiv412603846Apple-interchange-newline"></span></div></span></span><br class="yiv412603846Apple-interchange-newline">
</div>
<br></div></div></div><br><br> </div> </div> </div></body></html>