<div dir="ltr">Correction on the last line of what I sent:<br>    itk.ImageFileWriter.New(myFilter,<wbr>FileName=filename).Update()</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 13, 2017 at 9:06 AM, Francois Budin <span dir="ltr"><<a href="mailto:francois.budin@kitware.com" target="_blank">francois.budin@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello Wang,<br><br></div>One good way to explore the parameters to figure out which set gives you the result you want would be to write a short Python script:<br>reader=itk.ImageFileReader[<wbr>itk.Image[itk.UC,2]].New(<wbr>FileName="/home/fbudin/<wbr>Downloads/chest.png")<br>myFilter=itk.<wbr>AdaptiveHistogramEqualizationI<wbr>mageFilter.New(reader)<br>for alpha in range(0,11):<br></div>  for beta in range(0,11):<br><div>    myFilter.SetAlpha(alpha*.1)<br>    myFilter.SetBeta(beta*.1)<br></div><div>    filename="/tmp/myFilter"+str(<wbr>alpha)+"_"+str(beta)+".png"</div><div>    itk.ImageFileWriter.New(hm,<wbr>FileName=filename).Update()<br><br></div><div>I was not able to generate an image that looked exactly like the "opencv" image you sent, but that may be due to:<br></div><div>-The implementation of this algorithm in OpenCV is different<br></div><div>-The difference of the output is only due to different visualization parameters (Window/Level settings that are different for the different images).<br><br></div><div>Hope this helps,<br></div><div>Francois<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 13, 2017 at 8:25 AM, wangtaoiz <span dir="ltr"><<a href="mailto:wangtao_@sjtu.edu.cn" target="_blank">wangtao_@sjtu.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all<br>
  I want to use itk::AdaptiveHistogramEqualiza<wbr>tionImageFilter to do a<br>
HistogramEqualization filter on a image as follow:<br>
<<a href="http://itk-users.7.n7.nabble.com/file/n38108/snipaste20170413_200959.png" rel="noreferrer" target="_blank">http://itk-users.7.n7.nabble.<wbr>com/file/n38108/snipaste201704<wbr>13_200959.png</a>><br>
So I set the parameters SetAlpha(0.5), SetBeta(0.5), the result is as<br>
follow:<br>
<<a href="http://itk-users.7.n7.nabble.com/file/n38108/snipaste20170413_201446.png" rel="noreferrer" target="_blank">http://itk-users.7.n7.nabble.<wbr>com/file/n38108/snipaste201704<wbr>13_201446.png</a>><br>
but actually the result I want is showed as follow (which is generated by<br>
opencv cvEqualizeHist() function):<br>
<<a href="http://itk-users.7.n7.nabble.com/file/n38108/snipaste20170413_201132.png" rel="noreferrer" target="_blank">http://itk-users.7.n7.nabble.<wbr>com/file/n38108/snipaste201704<wbr>13_201132.png</a>><br>
So I want to ask you if I can get that HistogramEqualization result by ITK?<br>
<br>
Thanks a lot<br>
Wang<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-users.7.n7.nabble.com/HistogramEqualization-in-ITK-tp38108.html" rel="noreferrer" target="_blank">http://itk-users.7.n7.nabble.c<wbr>om/HistogramEqualization-in-IT<wbr>K-tp38108.html</a><br>
Sent from the ITK - Users mailing list archive at Nabble.com.<br>
______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/product<wbr>s/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FA<wbr>Q</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/insight-users</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>