No subject


Fri Mar 19 13:53:46 EDT 2010


--001636426e35c684060486a0968a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi, all,<div><br></div><div>For this topic, I need to say that this is the =
problem of my BMP file which is Black circle with While white outside, so w=
hen using Hough Filter, please make sure that Intensity values of Feature p=
arts should above the value of outside part.</div>

<div><br></div><div><br></div><div>Regards!</div><div><br></div><div>Jiangt=
ao Li</div><div><br><br><div class=3D"gmail_quote">2010/5/10 Luis Ibanez <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:luis.ibanez at kitware.com">luis.ibanez@=
kitware.com</a>&gt;</span><br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">Hi Jiangtao,<br>
<br>
Thanks for sharing your findings.<br>
<br>
Hoever, they seen quite strange.<br>
<br>
The Hough filter works with an image of scalars,<br>
so your conversion from RGBA is changing some<br>
secondary characteristic of the image.<br>
<br>
Can you please post that input image in a public<br>
web site ?<br>
<br>
We need to look at the image in order to figure<br>
out the source of the problem,<br>
<br>
<br>
 =C2=A0 =C2=A0 =C2=A0Thanks<br>
<br>
<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Luis<br>
<br>
<br>
--------------------------------------------------<br>
<div><div></div><div class=3D"h5">On Wed, May 5, 2010 at 12:00 AM, Jiangtao=
 Li &lt;<a href=3D"mailto:nelfylee at gmail.com">nelfylee at gmail.com</a>&gt; wr=
ote:<br>
&gt; Dear All,<br>
&gt;<br>
&gt; When I use below code to save sampled image as a PNG file (RGBA), and =
then<br>
&gt; read it again, the Hough Circle Filter works!<br>
&gt; I found Hough Filter only support the image pixel has 4 components, we=
ll, if<br>
&gt; so, I will change my image to 4 components first,<br>
&gt; I change it back to Gray image by=C2=A0RGBToLuminanceImageFilter for H=
ough<br>
&gt; filter, however, Hough filter gives wrong result again.<br>
&gt;<br>
&gt; typedef itk::Image&lt;itk::RGBAPixel&lt;unsigned char&gt;&gt; RGBAImag=
e;<br>
&gt; typedef itk::ComposeRGBAImageFilter&lt;ImageUChar2D, RGBAImage&gt;<br>
&gt; ComposeRGBAImageFilter;<br>
&gt; ComposeRGBAImageFilter::Pointer rgba =3D ComposeRGBAImageFilter::New()=
;<br>
&gt; =C2=A0 rgba-&gt;SetInput(0, resampler-&gt;GetOutput());<br>
&gt; rgba-&gt;SetInput(1, resampler-&gt;GetOutput());<br>
&gt; rgba-&gt;SetInput(2, resampler-&gt;GetOutput());<br>
&gt; rgba-&gt;SetInput(3, dup-&gt;GetOutput());<br>
&gt; =C2=A0 rgba-&gt;Update();<br>
&gt; // typedef itk::ImageFileWriter&lt;RGBAImage&gt; ImageFileWriter2;<br>
&gt; // ImageFileWriter2::Pointer writer =3D ImageFileWriter2::New();<br>
&gt; // writer-&gt;SetInput(rgba-&gt;GetOutput());<br>
&gt; // writer-&gt;SetFileName(&quot;E:/Resample.png&quot;);<br>
&gt; // writer-&gt;Update();<br>
&gt; // typedef itk::ImageFileReader&lt;ImageUChar2D&gt; ImageFileReader;<b=
r>
&gt; // ImageFileReader::Pointer reader =3D ImageFileReader::New();<br>
&gt; // reader-&gt;SetFileName(&quot;E:/Resample.png&quot;);<br>
&gt; // reader-&gt;Update();<br>
&gt; typedef itk::RGBToLuminanceImageFilter&lt;RGBAImage, ImageUChar2D&gt;<=
br>
&gt; RGBToLuminanceImageFilter;<br>
&gt; RGBToLuminanceImageFilter::Pointer rgba2gray =3D<br>
&gt; RGBToLuminanceImageFilter::New();<br>
&gt; rgba2gray-&gt;SetInput(rgba-&gt;GetOutput());<br>
&gt; rgba2gray-&gt;Update();<br>
&gt; typedef itk::HoughTransform2DCirclesImageFilter&lt;unsigned char, floa=
t&gt;<br>
&gt; HoughTransformFilterType;<br>
&gt; HoughTransformFilterType::Pointer hough =3D HoughTransformFilterType::=
New();<br>
&gt; hough-&gt;SetInput(rgba2gray-&gt;GetOutput());<br>
&gt; hough-&gt;SetNumberOfCircles(1);<br>
&gt; hough-&gt;SetMinimumRadius(10);<br>
&gt; hough-&gt;SetMaximumRadius(300);<br>
&gt; hough-&gt;SetVariance(5);<br>
&gt; hough-&gt;SetSigmaGradient(1);<br>
&gt; hough-&gt;SetDiscRadiusRatio(2);<br>
&gt; hough-&gt;Update();<br>
&gt;<br>
&gt;<br>
&gt; Any ideas? I really need your help. thank you very much !<br>
&gt;<br>
&gt; Best Regards!<br>
&gt;<br>
&gt;<br>
&gt; Jiangtao<br>
&gt; --<br>
&gt; From Jiangtao Li @ Seoul National University<br>
&gt;<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.ki=
tware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href=3D"http://www.kitware.com/opensource/opensource.html" target=
=3D"_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href=3D"http://www.kitware.com/products/protraining.html" target=3D=
"_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href=3D"http://www.itk.org/Wiki/ITK_FAQ" target=3D"_blank">http://w=
ww.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href=3D"http://www.itk.org/mailman/listinfo/insight-users" target=
=3D"_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br><br clear=3D"all"><br>-- <br>From Jiangtao Li @ Seou=
l National University<br>
</div>

--001636426e35c684060486a0968a--


More information about the Insight-users mailing list