# Two-Dimensional Image Lempel–Ziv Complexity Calculation Method and Its Application in Defect Detection

**Authors:** Jiancheng Yin, Wentao Sui, Xuye Zhuang, Yunlong Sheng, Yongbo Li

PMC · DOI: 10.3390/e27101014 · Entropy · 2025-09-27

## TL;DR

This paper introduces a new method to calculate Lempel–Ziv complexity for 2D images, enabling effective defect detection with high accuracy.

## Contribution

The novel two-dimensional Lempel–Ziv complexity method extends LZC to images using a local receptive field concept.

## Key findings

- The proposed method successfully converts 2D images into vectors for Lempel–Ziv complexity calculation.
- When combined with dilation and Sobel operators, the method achieves 100% accuracy in defect detection.
- The approach effectively identifies changes in independent image patterns for practical applications.

## Abstract

Although Lempel–Ziv complexity (LZC) can reflect changes in object characteristics by measuring changes in independent patterns in the signal, it can only be applied to one-dimensional time series and cannot be directly applied to two-dimensional images. To address this issue, this paper proposed a two-dimensional Lempel–Ziv complexity by combining the concept of local receptive field in convolutional neural networks. This extends the application scenario of LZC from one-dimensional time series to two-dimensional images, further broadening the scope of application of LZC. First, the pixels and size of the image were normalized. Then, the image was encoded according to the sorting of normalized values within the 4 × 4 region. Next, the encoding result of the image was rearranged into a vector by row. Finally, the Lempel–Ziv complexity of the image could be obtained based on the rearranged vector. The proposed method was further used for defect detection in conjunction with the dilation operator and Sobel operator, and validated by two practical cases. The results showed that the proposed method can effectively identify independent pattern changes in images and can be used for defect detection. The accuracy rate of defect detection can reach 100%.

## Full-text entities

- **Diseases:** Type-I RSDDs (MESH:D006969), injury to (MESH:D014947), fabric defects (MESH:D000013)
- **Chemicals:** GABAergic anesthetics (-)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12563774/full.md

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12563774/full.md

## References

61 references — full list in the complete paper: https://tomesphere.com/paper/PMC12563774/full.md

---
Source: https://tomesphere.com/paper/PMC12563774