Dirty Ceramic Floor Detection
This project aims to distinguish between **clean** and **dirty** ceramic floor conditions using digital image processing techniques.
This project aims to distinguish between clean and dirty ceramic floor conditions using digital image processing techniques. The approach is based on pixel intensity analysis and texture variation, without involving machine learning.
Requirements
| Component | Version |
|---|---|
| Python | 3.8 or newer |
| OpenCV | latest |
| NumPy | latest |
| Matplotlib | latest |
All dependencies can be installed via
requirements.txt.
Project Structure
.
├── deteksi_lantai_kotor.py
├── requirements.txt
├── lantai.jpg
└── docs/
└── sequence-diagram.png
System Flow
In short, the system works through five stages:
- Reading the ceramic floor image.
- Converting the image to grayscale and reducing noise.
- Extracting statistical features in the form of mean and standard deviation.
- Comparing the standard deviation value against a threshold.
- Determining the floor condition: clean or dirty.
Decision-Making Basis
The classification decision relies on the standard deviation value of pixel intensity:
The higher the , the greater the texture variation on the surface — which generally indicates the presence of dirt or stains.
How to Run
pip install -r requirements.txt
python deteksi_lantai_kotor.py
Make sure the image file (
lantai.jpg) is located at the path specified in the code.
Output
The program produces two types of output:
- Visual: the original image, preprocessing results, and detection results.
- Terminal: the mean value, standard deviation, and the system’s final decision.
Notes
- The system works optimally under relatively stable lighting conditions.
- The threshold value can be adjusted based on testing results in different environments.