I have a 2D image defined on a region $\Omega$. Let $I: \Omega \to R$ be a gray image. Assume that the region can be separated into $N$ sub-regions $\Omega_i$ such that $$\forall i,j=1,\ldots ,N:\Omega_i \cap\Omega_j=\emptyset$$ and $$\bigcup_{n=1}^{N}\Omega_n =\Omega$$

To simplify, we assume $N=3$ and it shows in below figure.

enter image description here

We denotes $p(x \in \Omega_i|I(x))$ is posteriori probability of region $\Omega_i$ given $I(x)$. Based on the Bayesian rules, we have

$$p\left(x \in \Omega_i|I(x)\right)=\frac{p\left(I(x)|x\in \Omega_i\right)p(x\in \Omega_i)}{p(I(x))}$$

The segmentation try to assign pixel $x$ to each region based on posteriori probability. That goal is that finds maximum a posteriori probability (MAP) of pixel $x$ in each region. It can express by formula

$$\left\{ \Omega_{i,x} \right\}_{i=1}^{N}=\arg \max_{\Omega_i} \left\{\prod_{i=1}^{N} p(I(x)|x \in \Omega_i)p(x \in \Omega_i )\right\} \tag{*}$$

Assuming that the pixels within each region are independent , the MAP will be achieved over all image domain $\Omega$ $$\left\{ \Omega_i \right\}_{i=1}^{N}=\arg \max_{\Omega_i} \left\{\prod_{i=1}^{N}\prod_{x \in \Omega_i} p(I(x)|x \in \Omega_i)p(x \in \Omega_i )\right\} \tag{**}$$

  • Are my formulas $(*)$ and $(**)$ correct?
  • If not, Could you help me to correct them?

The reference is Geodesic Active Regions and Level Set Methods for Supervised Texture Segmentation.


1 Answer 1


I will try to give you some intuition into it by a different example.

Think we have 3 machines which can generate the numbers 1, 2, 3.
The first machine generates the number 1 with 80% and the numbers 2, 3 with 10% each.
The second machine generates the number 2 with 80% and the numbers 1, 3 with 10% each.
The third machine generates the number 3 with 80% and the numbers 1, 2 with 10% each.

One of the machines is chosen, you don't know which and the generated number is 2.
What machine would you bet it would?

The question above is the likelihood with no prior knowledge.
Hence, given the number 2 the most likely is the second machine.

Yet, What happens if you are told that the chosen machine would be chosen following this rules - 98% the first machine, 1% the second and 1% the third.

Now, what are the chances?

Seeing 2 from machine 1 are 0.1 * 0.98 = 0.098.
Seeing 2 from machine 2 are 0.8 * 0.01 = 0.008.
Seeing 2 from machine 3 are 0.1 * 0.01 = 0.001.

Now a better choice would be machine 1.
This is the MAP, because we took into account both the likelihood and the prior knowledge.

  • $\begingroup$ Thank Drazick for a clear example. Based on your example, I corrected my question. Could you careful check equation () and (*) about their correction? $\endgroup$
    – John
    Commented Sep 8, 2015 at 15:14
  • $\begingroup$ It seems OK if you understand that the function is partitioned. Namely you check each hypothesis on it own and see what are the chances. You chose the one which the largest chances. Namely you're looking for the max of a family of functions. $\endgroup$
    – Royi
    Commented Sep 9, 2015 at 12:52
  • $\begingroup$ Thank Drazick for your comment. I accepted it. Anw, I make a final explanation of above problem. Could you look at the more detail in below link and let me know any mistake (if it has)? I highlight the range of argmax by yellow color. Is it correct? dropbox.com/s/9pxxh25wfk2qol3/MAP.JPG?dl=0 $\endgroup$
    – John
    Commented Sep 11, 2015 at 6:09
  • $\begingroup$ It seems the link is broken. $\endgroup$
    – Royi
    Commented Mar 24, 2016 at 17:18
  • $\begingroup$ @John, Could you please mark my answer as you wrote? $\endgroup$
    – Royi
    Commented Feb 14, 2022 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.