title: Matlab - Determine the probability of an Intensity Value
body: <p>How do you determine the probability that an intensity value appears in an image in Matlab or is there some other way to determine it? The mathematical equation is</p>
  
  <pre><code>Pr = Nk / M*N
  </code></pre>
  
  <p>Where Pr is the probability, Nk is number of times that a Kth intensity appears in the image. M*N represents the MxN image. </p>