Skip to content

Repository files navigation

Entropy-Based LCD Surface Defect Detection

This project implements a classical computer vision pipeline for detecting subtle surface bump defects on LCD panels using texture-based entropy analysis.

Unlike intensity- or edge-based methods, this approach focuses on local texture irregularities, making it effective under low contrast and non-uniform illumination conditions commonly encountered in industrial inspection.


Why this project matters

In LCD and display manufacturing, surface bumps often differ from the background by less than a few percent in intensity. Traditional thresholding and edge detection fail under these conditions.

This project demonstrates how carefully designed classical CV techniques can:

  • outperform naïve segmentation
  • remain explainable
  • run efficiently on CPU
  • scale to edge and inline inspection systems

No deep learning or large labeled datasets are required.


Pipeline Overview

The detection pipeline consists of the following stages:

1. Preprocessing

  • Grayscale conversion
  • Gaussian smoothing (noise suppression)
  • CLAHE (local contrast enhancement)
  • Gamma correction

2. Illumination Flattening

  • Large-kernel Gaussian background estimation
  • Background subtraction
  • Intensity normalization and inversion

This step removes global lighting gradients while preserving micro-texture.

3. Texture Analysis (Entropy Filtering)

  • Local entropy computed within a sliding window
  • High entropy → surface irregularity
  • Low entropy → smooth background

4. Peak-Based Detection

  • Entropy map treated as a topographic surface
  • Local maxima extracted using peak detection
  • Filters applied:
    • minimum peak distance
    • entropy intensity threshold

5. Post-Processing

  • Morphological cleanup
  • Connected component analysis
  • Bump centroid extraction

Why entropy instead of intensity

Surface bumps do not create strong edges or brightness transitions. Instead, they introduce local texture complexity.

Entropy captures this statistical variation, making it robust to:

  • illumination gradients
  • low-contrast defects
  • smooth background regions

Results Summary

  • Detects ~80–90 surface bumps per LCD image
  • False-positive rate < 5%
  • Recall ≈ 85–90% for visible bumps
  • Runtime ≈ 1.8 seconds per 1 MP image (CPU-only)

The method produces consistent and interpretable detections without training.


How to Run

1️⃣ Install dependencies

pip install numpy opencv-python scikit-image matplotlib
Run the script
python lcd_bump_detection_entropy.py


Outputs typically include:

entropy maps

detection overlays

labeled bump centroids

Limitations and Future Work

Parameter tuning may be required for different resolutions

Does not estimate bump height (2D localization only)

Future extensions:

shape-from-shading

multi-illumination capture

hybrid entropy + CNN attention models

Why classical CV (Edge AI perspective)

Deterministic behavior

No training required

Low compute and memory footprint

Explainable decisions

Suitable for real-time edge deployment

This makes the approach practical for manufacturing inspection pipelines.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages