<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Dear Luis and All:</DIV>
<DIV> </DIV>
<DIV>I am woring on EM and MRF for image segmentation. I made the EM clustering working, and then using the segmenation result to perfrom MRF for refinment.</DIV>
<DIV> </DIV>
<DIV>I followed the styles in ITK example <U><FONT color=#800080>ScalarImageMarkovRandomField1.cxx </FONT></U><A name=29634> </A>.</DIV>
<DIV> </DIV>
<DIV>If I use the DistancCentroid as membershim function of the classifier, I can get the segmetation improved after MRF filter.</DIV>
<DIV> </DIV>
<DIV>Since I using EM GaussianMixture model to intial segmentation, I think using itkGaussianDensityFunction as membership function of classifier may give better result.</DIV>
<DIV> </DIV>
<DIV>When I changed the membership function, the result is totally wrong, then I checked the code for itkMRFImageFilter..cxx, I figure out why.</DIV>
<DIV> </DIV>
<DIV>//////////////////////////////////////////////////////////////////////////////////</DIV>
<DIV> </DIV>
<DIV>00625 <SPAN class=keyword>const</SPAN> std::vector<double> & pixelMembershipValue = <BR><A name=l00626></A>00626 m_ClassifierPtr->GetPixelMembershipValue( *inputPixelVec );<BR></DIV>
<DIV>00648 <SPAN class=comment>//Add the prior probability to the pixel probability</SPAN><BR><A name=l00649></A>00649 <SPAN class=keywordflow>for</SPAN>( index = 0; index < m_NumberOfClasses; index++ )<BR><A name=l00650></A>00650 {<BR><A name=l00651></A>00651 m_MahalanobisDistance[index] = m_NeighborInfluence[index] - <BR><A name=l00652></A>00652 pixelMembershipValue[index] ;<BR><A name=l00653></A>00653 }<BR></DIV>
<DIV>////////////////////////////////////////////////////////////////////////////////</DIV>
<DIV> </DIV>
<DIV>In line 651, when calculating the MahaanoistDistance, m_MahalanobisDistance[index] = m_NeighborInfluence[index] - pixelMembershipValue[index] ;</DIV>
<DIV>assuming my weight are all zeros, then class with maximum pdf will give the lowest Distance. As a result, the segmentation is fully wrong.</DIV>
<DIV> </DIV>
<DIV>My question is why the filter was designed in the way, is MRFImageFilter not designed to apply GassianDensityFuncion as membershipfunction.</DIV>
<DIV> </DIV>
<DIV>Can I still use GaussianDensityFunction in this case? Would if work if I change the sign of code 651 to +?</DIV>
<DIV> </DIV>
<DIV>Please give me some guide.</DIV>
<DIV> </DIV>
<DIV>Baoyun<BR></DIV></div><br>
</body></html>