Interactive Python tool to extract LAB color values from images with accurate region-based sampling for color analysis
This project is a Python-based application that allows users to extract LAB color values directly from an image by clicking on specific areas.
The system uses region-based sampling and statistical methods to improve measurement accuracy and provide reliable color analysis.
- Extract accurate L, a, b*** color values from images
- Improve measurement stability using local region sampling
- Provide a simple and interactive tool for color analysis
- Click on image to extract LAB values
- Region-based sampling (instead of single pixel)
- Improved accuracy using median color
- Real-time display of selected points
- Automatic saving of results to Excel
- Load an image
- User clicks on a point
- A small region around the point is analyzed
- RGB values are extracted
- RGB is converted into LAB color space
- Results are saved for analysis
The system saves results into an Excel file:
| X | Y | L | a | b |
|---|
- RGB → LAB conversion using
skimage.color - Median-based region sampling for robustness
- Localized processing to reduce noise impact
- Optional reflection filtering
- Python
- OpenCV
- NumPy
- Scikit-image
- Pandas
- Install required libraries:
- run python script: python main.py
- Click on the image to extract LAB values
- Results will be saved automatically
project/ │ ├── main.py └── README.md ├── requirements.txt ├── sample.jpg ├── lab_color_analysis_example.png
![LAB Color Analyzer] (screenshot.png)
Bilal Lukman Alkrayem
License MIT License