Optimal thresholding technique:
In the above two sections we described what global and adaptive thresholding mean. Below we illustrate how to obtain minimum segmentation error.
Let us consider an image with 2 principle gray levels regions. Let z denote the gray level values. Values as random quantities and their histogram may be considered an estimate of probability P(z).
Overall density function is the sum or mixture of two densities, one of them is for the light and other is for the dark region.
The total probability density function is the P(z) = P1 p1(z)+P2 p2(z) ,Where P1 and P2 are the probabilities of the pixel (random).
P1 +P2 =1.
The overall error of probability is E(T) = P2 E1(T) + P1 E2(T), where E1 and E2 are the probability of occurrence of object or background pixels.
We need to find the threshold value of the error E(T) , so by differentiating E w.r.t T we obtain P1p1(T) = P2p2(T).
So we can use Gaussian probability density functions and obtain the value of T.
T = (μ1+μ2)/2 + (σ^2/(μ1-μ2))*ln(P2/P1).
Where μ and σ^2 are the mean and variance of the Gaussian function for the object of a class.
The other method for finding the minimum error is finding the mean square error , to estimate the gray-level PDF of an image from image histogram.
Ems = (1/n)* (∑ (p(zi) –h(zi))^2 ) for i= 1 to n.
Where n is the number of points in the histogram.
The important assumption is that either one of the objects or both are considered.
Probability of classifying the objects and background is classified erroneously.
Region based segmentation.
Share with your friends: |