Image thresholding segmentation based on weighted Parzen-window and linear programming techniques

Xiong Fu-song, Zhiqiang Zhang, Yun Ling, Jian ZhangScientific 2022

Abstract

Image segmentation by thresholding is an important and fundamental task in image processing and computer vision. In this paper, a new bi-level thresholding approach based on weighted Parzen-window and linear programming techniques is proposed to use in image thresholding segmentation. First, by proposing a weighted Parzen-window to describe the gray level distribution status, we obtain the boundaries for the foreground and background of the image. Then the image thresholding problem can be transformed into the problem of solving a linear programming problem for computing the coefficient values of weighted Parzen-window. The results of testing on synthetic, NDT and a set of benchmark images indicate that the proposed method can achieve a higher segmentation accuracy and robustness in comparison to some classical thresholding methods, such as inter class variance method (OTSU), Kapur's entropy-based method (KSW), and some state-of-art methods that consider spatial information, such as CHPSO, GLLV histogram method and GABOR histogram method.

Introduction

Image thresholding is a foundational technique in computer vision, used to convert grayscale images into binary representations. Traditional methods like Otsu’s method, which minimizes intra-class variance, or Kapur’s entropy-based method, are widely adopted due to their simplicity and speed. However, these methods often struggle with images characterized by significant noise or overlapping gray-level distributions between the foreground and background. While 2D thresholding methods have been developed to incorporate spatial information, they frequently lack a generic framework or fail to maintain stability across diverse image types, such as industrial Nondestructive Testing (NDT) images versus natural scenes. This research introduces a more robust framework to describe gray-level distributions and identify precise separation boundaries.

Methodology: The WPWLPT Framework

The proposed method, Weighted Parzen-Window and Linear Programming Technique (WPWLPT), treats image thresholding as an optimization problem. The workflow consists of three primary stages:

  1. Weighted Parzen-Window Estimation: Unlike standard Parzen-windows used for density estimation, the authors introduce a "weighted" version designed specifically to describe the boundaries between classes.
  2. Linear Programming (LP) Transformation: The search for an optimal threshold is transformed into a linear programming problem. By defining a separation value ($\rho$), the Simplex method is employed to solve for coefficients that maximize intra-class similarity while clearly delineating the boundary.
  3. Classification via Connection Matrix: Following the LP solution, a connection matrix is constructed to assign pixels to either the foreground ($O$) or background ($B$) based on the optimized boundary parameters.
Flowchart of the proposed WPWLPT image segmentation method.

Experimental Results and Discussion

The WPWLPT method was evaluated against 22 representative images, including synthetic images with Gaussian noise, real-world NDT images (e.g., PCBs, defective tiles), and standard benchmark datasets (e.g., Cameraman, Mandril).

The method demonstrated superior performance in terms of mean Intersection over Union (mIoU). For the combined synthetic and NDT image sets, WPWLPT achieved an average mIoU of 85.3%, outperforming Otsu (78.7%) and the GABOR method (83.7%). Qualitative analysis on synthetic "Circles" and "Squares" images highlights the method's ability to produce clean binary masks even in the presence of heavy noise, where traditional methods often fail.

Segmentation results on synthetic images (circles and squares) with Gaussian noise, including original images, histograms, and final binary outputs.

In noise robustness tests, WPWLPT’s calculated thresholds were consistently closer to the theoretical optimal values. For instance, in the "Circles" test image, it identified a threshold of 110 (optimal 108), whereas Kapur’s method deviated significantly to 82.

Conclusion

WPWLPT offers a mathematically rigorous approach to image thresholding by framing it as an optimization problem. While it is computationally more intensive than 1D methods—taking approximately 6.95 seconds per image compared to Otsu's 0.45 seconds—it provides a significant boost in accuracy and robustness. Future work will focus on incorporating texture and contour information and extending the framework to multi-level thresholding.

Summary updated

BibTeX
@inproceedings{fusong2022image,
  author = {Xiong Fu-song and Zhiqiang Zhang and Yun Ling and Jian Zhang},
  title = {{Image thresholding segmentation based on weighted Parzen-window and linear programming techniques}},
  booktitle = {Scientific},
  year = {2022},
  doi = {10.1038/s41598-022-17818-4},
}
Figure