Student Support Forum: 'mutual information of red andgreen channel of a...' topicStudent Support Forum > General > "mutual information of red andgreen channel of a..."

 Next Comment > Help | Reply To Topic
 Author Comment/Response Matther Fergie 09/17/07 5:16pm Hello I am using the following code to calculate mutual information of red and green channel of an image. I am calculating Ixy= Sum(i)Sum(j) P(REDi,GREENj) Log[P(REDi,GREENj)/P(REDi)/P(GREENj) ] (that is this formula http://upload.wikimedia.org/math/c/b/b/cbb518be041b820958181a932a5cd4ff.png ) I am getting an error of "Indeterminate expression 0(-∞) encountered. " I believe I am getting this because I am taking Probability of Redi from a histogram that I have computed (value of REDi divided by total no of pixels ....as my probability of REDi. ame for GREENj But that histogram has 0 at some places which is leading to divide by zero. (i plotted that histogram to check that) How should I calculated mutual information of red and green channel of an image. ( I use Mathematica 5.2 and dont have image processing package) Thank You Code is below: ----------------------------------------------------------------------------------------------------------------- image=Import["c:/fish.ppm"]; (* Show[image]; *) part=image[[1,1]]; red=part[[All,All,1]]; histRed=Table[0,{256}]; For[i=1,i

 Subject (listing for 'mutual information of red andgreen channel of a...') Author Date Posted mutual information of red andgreen channel of a... Matther Fergie 09/17/07 5:16pm Re: mutual information of red andgreen channel ... yehuda ben-s... 09/18/07 2:08pm Re: mutual information of red andgreen channel ... matt prior 09/21/07 10:09am
 Next Comment > Help | Reply To Topic