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"><<a href=3D"mailto:luis.ibanez at kitware.com">luis.ibanez@=
kitware.com</a>></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 <<a href=3D"mailto:nelfylee at gmail.com">nelfylee at gmail.com</a>> wr=
ote:<br>
> Dear All,<br>
><br>
> When I use below code to save sampled image as a PNG file (RGBA), and =
then<br>
> read it again, the Hough Circle Filter works!<br>
> I found Hough Filter only support the image pixel has 4 components, we=
ll, if<br>
> so, I will change my image to 4 components first,<br>
> I change it back to Gray image by=C2=A0RGBToLuminanceImageFilter for H=
ough<br>
> filter, however, Hough filter gives wrong result again.<br>
><br>
> typedef itk::Image<itk::RGBAPixel<unsigned char>> RGBAImag=
e;<br>
> typedef itk::ComposeRGBAImageFilter<ImageUChar2D, RGBAImage><br>
> ComposeRGBAImageFilter;<br>
> ComposeRGBAImageFilter::Pointer rgba =3D ComposeRGBAImageFilter::New()=
;<br>
> =C2=A0 rgba->SetInput(0, resampler->GetOutput());<br>
> rgba->SetInput(1, resampler->GetOutput());<br>
> rgba->SetInput(2, resampler->GetOutput());<br>
> rgba->SetInput(3, dup->GetOutput());<br>
> =C2=A0 rgba->Update();<br>
> // typedef itk::ImageFileWriter<RGBAImage> ImageFileWriter2;<br>
> // ImageFileWriter2::Pointer writer =3D ImageFileWriter2::New();<br>
> // writer->SetInput(rgba->GetOutput());<br>
> // writer->SetFileName("E:/Resample.png");<br>
> // writer->Update();<br>
> // typedef itk::ImageFileReader<ImageUChar2D> ImageFileReader;<b=
r>
> // ImageFileReader::Pointer reader =3D ImageFileReader::New();<br>
> // reader->SetFileName("E:/Resample.png");<br>
> // reader->Update();<br>
> typedef itk::RGBToLuminanceImageFilter<RGBAImage, ImageUChar2D><=
br>
> RGBToLuminanceImageFilter;<br>
> RGBToLuminanceImageFilter::Pointer rgba2gray =3D<br>
> RGBToLuminanceImageFilter::New();<br>
> rgba2gray->SetInput(rgba->GetOutput());<br>
> rgba2gray->Update();<br>
> typedef itk::HoughTransform2DCirclesImageFilter<unsigned char, floa=
t><br>
> HoughTransformFilterType;<br>
> HoughTransformFilterType::Pointer hough =3D HoughTransformFilterType::=
New();<br>
> hough->SetInput(rgba2gray->GetOutput());<br>
> hough->SetNumberOfCircles(1);<br>
> hough->SetMinimumRadius(10);<br>
> hough->SetMaximumRadius(300);<br>
> hough->SetVariance(5);<br>
> hough->SetSigmaGradient(1);<br>
> hough->SetDiscRadiusRatio(2);<br>
> hough->Update();<br>
><br>
><br>
> Any ideas? I really need your help. thank you very much !<br>
><br>
> Best Regards!<br>
><br>
><br>
> Jiangtao<br>
> --<br>
> From Jiangtao Li @ Seoul National University<br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.ki=
tware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href=3D"http://www.kitware.com/opensource/opensource.html" target=
=3D"_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href=3D"http://www.kitware.com/products/protraining.html" target=3D=
"_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href=3D"http://www.itk.org/Wiki/ITK_FAQ" target=3D"_blank">http://w=
ww.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href=3D"http://www.itk.org/mailman/listinfo/insight-users" target=
=3D"_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><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