User:Dfindrik

Texture-based region segmentation is a topic in computer vision  which is discussed in CVonline. Given an image, it can be split into separate regions based on the textures present in the image. These techniques are applied to aid automated segmentation based on image texture  using geometric feature extraction methods.

Early attempts
The topic has started to gain interest in the middle of the 1970s and were mainly considered with the segmentation of low-resolution, grayscale images. An early successful attempt used an estimated gray level for each pixel based on a weighted sum of the neighbouring pixels. The weights are computed to minimise the mean square error  then the regions are defined based on the avarage mean errors and the discrimination algorithm proposed in the paper. It provides a method for region border detection and region labelling.

Supervised approach
A supervised, texture-based segmentation method can be approached either by finding the right textures for an already-known segmentation or by knowing an input frame composed of the patterns. In both cases a list of possible textures is known. In the first attempt, a Markov random field is used to find the best fit of the segmentation. In this case, we assume that we know the parameters about the textures that might be present in the image. This way, the problem of segmentation can be turned into an optimization problem where we seek to find the distribution of textures that provides the maximum likelihood, such that given the data our current distribution is correct. Expressing this mathematically, if the current distribution of textures is $$f$$ and the image is given by $$d$$, we aim to maximize $$P(d|f)$$. This is done by minimizing the posterior energy that is given by

$$ U(f|d) = U(f) + U(d|f) $$

where $$ U(d|f) $$ is the likelihood energy function:

$$ U(d|f) = \sum_{c\in C}V_{c}(d|f) $$

with $$ V_{c}(d|f) $$ being the sum over all possible textures of potential functions for a segment $$c$$.

In the other attempt of supervised segmentation, we calculate for each pixel the probability of it being the border of two different textures. Based on these probabilities, both region-based and boundary-based informations are derived and then the problem is redefined as a Geodesic Active Contour model where the aim is to minimize the length of the curves while maintaining a high probability boundary. This model is called Geodesic Active Region model by the authors of the paper as it actively aims to find the best solution through balancing between two optimization tasks. Mathematically, this task can be expressed by the following equation: $$ E(\partial R_{A}) = (1-\alpha)\int_{0}^{1}g(p(I(\partial R_{A}(P))))|\partial \dot{R}_{A}(p)|dp -  \alpha(\int_R\int_Alog[p_{A}(I(x,y))]dxdy + \int_R\int_Blog[p_B(I(x,y))]dxdy)$$

where $$ \partial R_{A}(p) $$ is the parametrization of the region boundaries in a planar form, $$I(x,y)$$ is the input frame. The conditional boundary denstiy function is then given by $$p(I(s)|B)$$ that calculates the probability of a point being part of the real boundary $$R_{A}$$, while $$g(x)$$ is a decreasing function that tends to 0 as x goes to infinity and $$g(0) = 1$$. For a detailed use of the algorithm, see the paper on Geodesic Active Region model.

Unsupervised approach
In the case of approaching the problem from an unsupervised learning perspective, we have a list of possible textures and want to segment the image into regions without any further available information. One way to approach this problem is to use simultaneous segmentation and estimation using Markov random fields. It is an optimization problem for f and $$\theta_{f}$$ where f is a segmentation of the image and $$\theta_{f}$$ is the state of the Markovian chain. Minimizing over the f-$$\theta_{f}$$space is a hard problem, however, a suboptimal solution can be found if the following two equations are solved alternatively over several iterations:

$$f^{(t+1)} = \underset{f}{\operatorname{arg\,max}} {\operatorname{ln}}P(f|\theta_{f}^{(t+1)})+{\operatorname{ln}}pl(d|f,\hat{\theta}_{d})$$

$$\theta_{f}^{(t+1)} = \underset{\theta_{f}}{\operatorname{arg\,max}} {\operatorname{ln}}P(f^{(t)}|\theta_{f})$$

where $$pl(d|f,\hat{\theta}_{d})$$ is the pseudo-likelihood.

Colour segmentation
As for segmentating colour images based on the texture, we have to take into account that for the same textures the colors might differ slightly due to the lighting conditions and in this case, simple grayscale values cannot be used to discriminate between the same textures but with different colors. An approach to this problem uses several strategies to learn the textures of the image then based on the observed textures, provide a more accurate segmentation.

First, the perceptual edges are calculated for the image that provide a rough division of the image by blurring the image until colors form homogeneous spots and then the colour edges are extracted. Next, the densities of these regions are estimated by using a kernel estimation technique and we get the following equation to compute the probability of a pixel to belong to a region:

$$ P_{R}(j|R_{i}) = \beta P_{R_{c}}(j|R_{i}) + (1-\beta)P_{R_{t}}(j|R_{i})$$

where $$\beta$$ is a weight to balance between color and texture features. Next, the texture boundary information is obtained by the equation:

$$ P_{R}(m|A) \times P_{R}(n|B) $$

where $$m$$ represents one side of the boundary while $$n$$ is the opposite side. $$P_{R}(m|A)$$ is the probability that the $$m$$ side of the boundary belongs to region $$A$$. Finally, the energy function is computed to ensure that the probability of the boundary pixels being real edges and the homogeneity of the region are both optimised. After the optimisation has been finished, the algorithm searches for background regions and if there are any of them left, then the energy minimization is reiterated.

Applications
Texture-based image segmentation has several applications: A simple implementation of applying image segmentation based on the texture properties can be found here.
 * machine vision
 * medical imaging
 * analyzing aerial pictures