Enhanced Global Image Segmentation: Addressing Pixel Inhomogeneity and Noise with Average Convolution and Entropy-Based Local Factor
Abstract:
In the field of computer vision and digital image processing, the division of images into meaningful segments is a pivotal task. This paper introduces an innovative global image segmentation model, distinguished for its ability to segment pixels with intensity inhomogeneity and robustly handle noise. The proposed model leverages a combination of randomness measurement and spatial techniques to accurately segment regions within and outside contours in challenging conditions. Its efficacy is demonstrated through rigorous testing with images from the Berkeley image database. The results significantly surpass existing methods, particularly in the context of noisy and intensity inhomogeneous images. The model's proficiency lies in its unique ability to differentiate between minute, yet crucial, details and outliers, thus enhancing the precision of global segmentation in complex scenarios. This advancement is particularly relevant for images plagued by unknown noise distributions, overcoming limitations such as the inadequate handling of convex images at local minima and the segmentation of images corrupted by additive and multiplicative noise. The model's design integrates a region-based active contour method, refined through the incorporation of a local similarity factor, level set method, partial differential equations, and entropy considerations. This approach not only addresses the technical challenges posed by image segmentation but also sets a new benchmark for accuracy and reliability in the field.1. Introduction
Image segmentation, or partition, is the machine-assisted process of dividing a digital image into meaningful objects that tie in with objects or surfaces [1], [2], [3]. It is a fundamental problem in the fields of image processing and computer science, as reconstruction and recognition often depend on this information. To cope with the solution to this problem, researchers contributed their efforts and developed a huge diversity of segmentation frames for image partition [4], [5], [6], [7], [8].
Various active contour (AC) models studied under the level-set techniques can be classified into region-based or statistical-based [9], [10], [11], [12], [13], [14], [15] and edge-based [16], [17], [18] models. The edge- or boundary-based technique uses the function incline information to set up strength to direct the active contour in the direction of edges to desired areas in the image. These proposed methods are not only sensitive to a small amount of noise but even so stuck to catch the thin layer edges of the objects. The region-based framework methods employ image-statistical data to build fidelity constraints that have multiple interests when contrasted with edge-based methods. The region-based approaches don’t rely on the image inline information and can adequately segment the pixels with thin boundaries. Secondly, by employing global region information, the region-based models are generally robust to noise. Image processing must deal with noise and intensity inhomogeneity information. These are basically random and statistical variations of brightness and color information and occur in a random process, as further explained by Eq. (1), where $I(x)$ is the clean image, corrupted by intensity inhomogeneity $h(x)$ and noise $\eta(x)$.
Various techniques have been designed for global segmentation, wherein active contour methods are of particular interest. During the past decades, different framework models have been developed to capture such a task. In the multitude of multiple methods mentioned above, we would like to distinguish the level set variational model introduced by Chan-Vese (CV) [11], categorized as a region-based model. The application simplicity of this variational model covered the novel framework's evolution path. This algorithmic framework causes the partition of multiple phases and their corresponding images. However, the algorithm framework demonstrates that it is very efficient for extracting corresponding and homogeneous regions, and segmenting the regions on the basis of boundaries would fail when there is high noise and an inhomogeneity factor. Images with inhomogeneity and noise factors are still an uphill task for statistical-based frameworks. This algorithm framework [11] was further extended to a new multi-phase algorithm framework [12], where number of level-set functions (LSF) have been utilized for various multiple region partitions. To further improve the algorithm framework [11] for the cases with the noise factor and inhomogeneity pixels, Li et al. [19] developed the algorithm framework and its various-phase functional by producing a kernel operator (smoothing filter) in the energy functional to enhance and demonstrate the working of the CV algorithm [11]. Ali et al. [20] present a prominent algorithm for the partition of images. The core and main approach of this algorithm is to apply signed generalized pressure averages (SGPA) to extract and take out the desired regions. An advantage of this algorithmic method is that it enables it to cope with multiple inhomogeneous regions in an image in the presence of some level of noise. Although it cannot freely analyze homomorphisms like the overlapping and allocating of the evolving curve, multiplying the noise level, etc. Furthermore, recently, Ibrar et al. [14] introduced a new region-based algorithm using the local similarity fidelity term, which segments the rough regions in images with both noise and inhomogeneity. It abstracts the Euler equation and emits the interaction, which is characterized by uncertainty as the contour splitting of the given function, and implements a local denoising constraint. In this model [14], each local region is reflected from the minimized point due to the non-convexity of its functional, which stuck in the local minima and was time-consuming.
In this paper, we propose a new global segmentation algorithm based on average convolution local factor with entropy and pixel differentiation in the entire region. The key contributions are listed below:
- We present a global image segmentation model that uses spatial and relative entropy techniques to segment the image in the local sense.
- We capture all or certain objects of interest from the global segmentation by accurately guiding the level set function using some well-known techniques [14], [19], [21] and their fidelity terms.
- We produce fine and improved results by exploiting the relative entropy technique using the kernel operator and the spatial distance technique in a local sense.
- The relative entropy helps measure the randomness of the region to clear the objects and background of the image, respectively, with a noise factor by employing spatial distances in the local region.
- We evaluate the proposed approaches against the latest competing baselines on out-of-air and medical images-from the Berkeley Image Database and show improved accuracy for global image segmentation.
This research paper is structured in the following ways: Section 2 contains a review of some related existing works. Section 3 reflects the proposed segmentation model. In this section, the derivation of the equation and the corresponding discretization have been presented. In Section 4, we display face-finding comparisons on various sets of data and show the accuracy of the proposed framework with other existing algorithmic methods. We conclude our work in Section 5.
2. Previous Work
To segment images with high noise and intensity inhomogeneity, Niu et al. [10] designed a statistical framework model, which is given by the following minimization eneroy function:
with $M_0(\mathbf{x}, \mathbf{y})$ a logical matrix (mask) defined as:
with $d_0(\mathbf{y}, \mathbf{x})$ the Euclidean distance between two pixels and $r$ is a parameter specifying the maximum size of the local region, and
where, $\varsigma=(\mathbf{y}, \mathbf{x})$. The minimization of Eq. (2) with respect to $\psi(\mathbf{x})$ lead to following gradient descent flow:
$\begin{aligned} \frac{\partial \psi(\mathbf{x})}{\partial t} & =\delta_\epsilon(\zeta(\mathbf{x}))\left[\lambda_2\left(\int_{\left(\mathbf{y} \in \aleph_x\right)} \frac{\left|u_0(\mathbf{y})-l c_2(\mathbf{x})\right|^2}{d_0(\mathbf{y}, \mathbf{x})} d \mathbf{y}\right)\right. \\ & \left.-\lambda_1\left(\int_{\left(\mathbf{y} \in \aleph_x\right)} \frac{\left|u_0(\mathbf{y})-l c_1(\mathbf{x})\right|^2}{d_0(\mathbf{y}, \mathbf{x})} d \mathbf{y}\right)\right] \\ & +\mu \delta_\epsilon(\zeta(\mathbf{x})) \operatorname{div}\left(\frac{\nabla \zeta(\mathbf{x})}{|\nabla \zeta(\mathbf{x})|}\right), \quad \text { in } \quad \Omega,\end{aligned}$
$\frac{\delta_\epsilon(\zeta(\mathbf{x}))}{|\nabla \zeta(\mathbf{x})|} \frac{\partial \zeta(\mathbf{x})}{\partial \vec{n}}=0 \quad on \quad \partial \Omega.$
Even though the RLSF model segments the images in the presence of high noise and intensity, inhomogeneity may be stuck in local minima.
Liu and Peng [22], proposed a local region-based Chan-Vese (LRCV) model to segment images efficiently with intensity inhomogeneity. The energy functional of the LRCV model is given by:
where, $\gamma_1(x)$ and $\gamma_2(x)$ are the functions which are spatially varying.
In above equations $g_k(y-x)$ taken as the weight assigned to each pixel $I_0(x)$ at $x$. Because of localization effects of the kernel $g_k$, the contribution of the pixel $I_0(x)$ to $\gamma_1(x)$ and $\gamma_2(x)$ reduces and approaches to zero as the point $x$ goes away from the centre point $y$.
The minimization of Eq. (5) with respect to $\zeta$ and fixed $c_1(x)$ and $c_2(x)$, leads to the following equation:
For a given image $j_0: \Omega \rightarrow \mathbb{R}$, where $\Omega$ is the domain of image the energyfunctional of the RRBAC model [14], is follow by:
where, $g$ is the average filter which is convolved with image $j_0 . N_x$ is a local window define as a neighborhood of pixels surrounding the pixel $x$, and $d(x, y)$ is the spatial Euclidean distance between any two pixels. $c_1, c_2$ and $d_1, d_2$ are the average intensities inside and outside of the contour.
3. Energy Functional of Proposed Model
Our proposed setup incorporates the principles of entropy and relative entropy. Entropy quantifies the level of disorder in a certain region with identical pixel values within a given system. Primarily, we manipulate an image that possesses identical pixel values (see Figure 1). More precisely, we utilize the Shannon entropy of the probability distribution P as stated in Eq. (9). Furthermore, we employ the concept of relative entropy. Let $A=a_1, a_2, \ldots, a_n$ and $B=b_1, b_2, \ldots, b_n$ be two distinct probability distributions. The Shannon entropy of the probability distribution P is defined as:
The relative entropy between A and B is defined as:
Let $C\left(\xi_1, \xi_2\right)$ such that $\left.\xi_1=1,2, \ldots ., M ; \xi_2=1,2, \ldots ., N\right)$ be the brightness of a pixel located at $\left(\xi_1, \xi_2\right)$ in the given image. $C\left(\xi_1, \xi_2\right) \in(0,1, \ldots, L-1)$. Then local relative entropy (LRE) of the pixel $\left(\xi_1, \xi_2\right)$ is calculated in a $n \times n$ neighborhood as:
where, $C\left(\xi_1, \xi_2\right)$ is the mean gray level value of the pixels in the neighborhood, which is given as:
$C\left(\xi_1, \xi_2\right)=\sum_{i=\frac{n+1}{2}}^{\frac{n-1}{2}} \sum_{j=\frac{-n+1}{2}}^{\frac{n-1}{2}} \operatorname{Img}\left(\xi_1+i, \xi_2+j\right)$
By implementing this concept in the proposed model, it will be able to partition the same pixels region-based (see Figure 2). For a given image, Img: $\Omega \rightarrow \mathbb{R}$, the energy functional of the proposed model is given by:
where, $G_\sigma$ is a Gaussian filter, and defined as:
where, $\varrho=\xi_1-\xi_2$ and with a scale parameter $\sigma>0 .\, N_{\mathbf{x}}$ is a local window defined as a neighborhood of pixels surrounding the pixel $x, d_0\left(\xi_1, \xi_2\right)$ is the Euclidean-distance between any two pixels, $f_1(x)$ and $f_2(x)$ are reflecting the local region mean intensities of the given image $J\left(\xi_1, \xi_2\right), \lambda_1, \lambda_2$ are the parameters that balance the image fidelity terms of the model, and $\mu$ is the rate of the length-term, which balances and control the size of object, such that $\lambda_1, \lambda_2 \in[ 0,1]$ and $\mu$ will be positive.
By minimizing Eq. (12), $f_1(x)$ and $f_2(x)$ are solved as follows:
Minimize Eq. (12) the below variational formulation can be obtained:
To solve the above Eq. (15), we use the central finite differences for discretization as follows:
$\begin{aligned} \frac{\zeta_{i, j}^{n+1}-\zeta_{i, j}^n}{\Delta t} & =\delta_\epsilon\left(\zeta_{i, j}^n\right)\left[\mu \nabla \cdot \frac{\nabla \zeta(x)}{|\nabla \zeta(x)|}+\lambda_1\left(\frac{G_\sigma\left(J\left(\xi_1, \xi_2\right)-f_1(x)\right)^2}{d\left(\xi_1, \xi_2\right)}\right)\right. \\ & -\lambda_2\left(\frac{G_\sigma\left(J\left(\xi_1, \xi_2\right)-f_2(x)\right)^2}{d\left(\xi_1, \xi_2\right)}\right]\end{aligned}$
or
where the curvature term is computed according to the following formula:
where, $\zeta_x, \zeta_y, \zeta_{x x}, \zeta_{y y}$ and $\zeta_{x y}$ are computed as follows:
where, $h$ is the grid size. The algorithm of the proposed method is given by as follows:
Algorithm-1 The Proposed Method Algorithm: $\left.\left(\zeta^{n+1}(\mathbf{x}\right)\right) \leftarrow\left(\zeta^{(n)}, J\left(\xi_1, \xi_2\right), \lambda_1, \lambda_2, \mu\right.$, maxit,tol$)$.
1. Initialize the level set function $\zeta(\mathrm{x})$ with $\zeta^0(\mathrm{x})$.
2. $f_1, f_2$ are updated via (14).
3. Calculate $\zeta^{n+1}(\mathrm{x})$ using Eq. (16).
4. Check weather the solution is stationary, $\left|\zeta_{i, j}^{n+1}-\zeta_{i, j}^n\right| \geq$ tol. If not, repeat step 2 .
4. Experimental Results
The experimental portion includes results demonstrations on outdoor and synthetic images to reveal and show the performance of the proposed model. We have competed with other well-known segmentation models with our proposed method, which contains the region-based local similarity factor (RLSF) segmentation model [10], the local region-based Chan-Vese (LRCV) model [22], and the robust region-based active contour (RRBAC) model [14] on a given image with noise and intensity inhomogeneity at the same time. For a fair comparison of the proposed model with competing methods, we have utilized the parameters that are given in Table 1. In our proposed model, we use these terms to produce the new results of the proposed model. In our case, we use some important parameters in order to finetune the fine and accurate results of the proposed model.
RLSF | LRCV | RRBAC | Proposed Model | ||||
$\lambda_1$ | 1 | $\lambda_1$ | 1 | $\lambda$ | 0.99 | $\lambda_1$ | 1 |
$\lambda_2$ | 1 | $\lambda_2$ | 1 | $\mu$ | 0.001 | $\lambda_2$ | 1 |
$\mu$ | 0.06 | $\mu$ | 500 | $\epsilon$ | 0.06 | $\mu$ | 0.03 |
$\epsilon$ | 0.01 | $\epsilon$ | 0.5 | $\mathrm{r}$ | 10 | $\epsilon$ | 1 |
$\mathrm{r}$ | 7 | h and $\Delta \mathrm{t}$ | 0.01 and 0.1 | $\sigma$ | 5 |
The size of the local window is 5×5 and the image is 110×110, which are used for the proposed model, respectively. All the demonstration experiments and contrast are performed on a 2.0GHz Intel Core i3 PC with 6GB of RAM in Windows 10. In Matlab 7.9, this algorithm was applied. The Matlab running code of our designed model will be provided for research if requested through the email mentioned.
Firstly, the proposed model used the entropy and local relative entropy concepts in energy functionals to measure the disorderliness of the pixels (or the same pixel values) in the image, and it can be seen that local relative entropy (LRE) counts the difference in brightness of the pixels in the image between the mean brightness of pixel $C(x, y)$ and its neighbors in the local sense. If the difference remains the same, then the LRE will be small, and if the difference is not the same between the mean brightness of pixel $C(x, y)$ and its neighbors, then the LRE will be large.
Figure 1 is the adequately explained machine result in the proposed model, and Figure 2 is the typical example of the proposed segmentation model on a synthetic image.
We take the proposed global segmentation model further and compare the segmentation accuracy in contrast with different competing models, as shown in Figure 3. In this figure, the two given images have intensity inhomogeneity, and especially the second row has the same pixels. The images are segmented row-wise from left to right. The second column included in this comparison is the RLSF model. In order to achieve high inhomogeneity intensity in the region, the RLSF algorithm model is poor at segmenting the entire region of the image properly, and with the same pixel intensity in the second row image, the RLSF model can't detect the right boundary of the object. The third column involved in this contrast is the LRCV model, which takes the object region boundary properly, but because of the high inhomogeneity intensity in the background region in the first row image, this model is incapable of segmenting the image adequately, and consequently, various layers have been captured and segmented. The contrast has been chased by the RRBAC algorithm and the further proposed model (Figure 3, columns 4 and 5), respectively. The RRBAC model also stuck in intensity inhomogeneity in the image background due to the non-convexity, and this model also can't detect the right boundary of the object. The proposed model segments the images locally and calculates the difference in brightness of pixels in the image between the mean brightness of pixel $C(x, y)$ and its neighbors in the local sense, and then balances and controls the pixels distance by $d(x, y)$.
Due to the high noise in the images, we contrast the results and performance of the proposed algorithm method with those of other competing models, including the RLSF method, the LRCV method, and the RRBAC method. In the proposed method, we set the choice parameters $\lambda_1=1, \lambda_2=1$, and $\sigma=10$. For a fine and accurate contrast of the proposed model with other competing models, we added Gaussian noise $(\delta)$, which is $\delta$=(0.01, 0.02, 0.02) to the images by putting the imnoise command function and the same initial contour in Figure 4. By adding noise, we can conclude that the noise impacts the segmentation outputs of other methods. In this figure, all the competing models failed to segment the images properly due to intensity inhomogeneity and robust noise.
Furthermore, in Figure 5, we can easily notice that an image has two objects of different pixel inhomogeneity; the competing models are incapable of tackling the intensity inhomogeneity, and the proposed model properly segmented the image. We can see that the RLSF model, LRCV model, and RRBAC model are stuck in robust noise and homogenous intensity to capture the right boundary of the object.
In Figure 6, an image is corrupted by noise $\delta$ = (0.001, 0.01, 0.02). The competing models LRCV and RRBAC segment the images in the first and second rows, respectively, but by increasing the level of noise up to $\delta$ = 0.02, then the LRCV and RRBAC models are incapable of tackling the noisy object boundary. Our proposed model shows fine segmentation in this figure. It shows that the choice of entropy in the regularizing term in the proposed model has a wonderful impact on the segmentation result.
The proposed method has fine accuracy as well as being faster than the already existing competing methods. Table 2 shows the speed comparison of competing models with the proposed model. In Table 2, the efficiency of the proposed model is reflected in the sense of time cost and the counting of iterations of competing models. To further demonstrate the proposed algorithm segmentation demonstration in comparison with competing models, we use the Jaccard similarity coefficient (JSC). The JSC measures the difference and similarity of the data sets, or pixels. The JSC measures values in the given interval [0, 1]. Value 1 reflects perfect and fine segmentation. In Figure 7, the proposed model segmentation accuracy lies in [0.9, 1], which finds that the designed method has satisfactory and fine segmentation accuracy in contrast with competing models.
RLSF | LRCV | RRBAC | Proposed Model | ||||
Iter | CPU | Iter | CPU | Iter | CPU | Iter | CPU |
500 | 80.52 | 150 | 30.91 | 200 | 45.45 | 15 | 6.91 |
500 | 60.87 | 150 | 29.75 | 200 | 42.97 | 15 | 7.34 |
1000 | 117.89 | 300 | 57.71 | 400 | 76.82 | 20 | 9.89 |
1000 | 112.15 | 300 | 59.29 | 400 | 80.52 | 40 | 10.72 |
1000 | 131.49 | 300 | 62.94 | 400 | 85.03 | 40 | 14.61 |
5. Conclusions
This research study presents a new and sophisticated segmentation model that offers precise and validated outcomes for global image segmentation. After comparing the suggested segmentation model with other competing designs, we have confirmed and concluded that our model is capable of effectively processing images that contain gaussian noise and intensity inhomogeneity during the iterative process. While many variational segmentation techniques are susceptible to significant noise, our suggested algorithm excels at accurately refining object edges. The suggested algorithm's excellent accuracy results in enhanced computing efficiency. The proposed approach has the potential to be advantageous for practical applications, such as the segmentation of medical images or the identification of tumors or any cancer-affected regions. The project team is willing to share the code for research purposes upon request through email.
In addition to its robustness, the suggested model has several drawbacks, one of which is its limitation in multi-phase segmentation. By incorporating spatial distance in the suggested model, it disregards numerous pixels, leading to the exclusion of significant regions. If researchers in computation, mathematics, and image processing take into account these limits, they can transform them into valuable future study avenues.
The data used to support the research findings are available from the corresponding author upon request.
The authors declare no conflict of interest.
$\mu$ | Length term parameter |
$\sigma$ | Scale parameter |
$g$ | Average filter |
$\Omega$ | Bounded open subset |
$u_0, I_0, j_0$ | Given images |
$\zeta$ | Level set function |
$\delta$ | Delta function |
$\nabla$ | Gradient |
$\lambda$ | Non-negative parameter of the fidelity term |
$\epsilon$ | Diffusion parameter |