A Streamlit-based application for detecting and segmenting specific colors in images using HSV color space.
Color Segmentation App is a simple yet powerful Streamlit application that allows users to upload an image and detect segments of specific colors (Red, Green, Blue) using the HSV color space. The app is ideal for learning about image processing and OpenCV.
This project is designed to be easy to use, educational, and extendable for more advanced color detection or segmentation tasks.
- Upload images in JPG, JPEG, or PNG format.
- Detect and display segments of Red, Green, and Blue colors in the image.
- Visualize the original image alongside segmented color regions.
- Built with Streamlit, OpenCV, and NumPy for performance and clarity.
Before you begin, ensure you have the following installed:
- Python 3.8 or higher
- Streamlit
- OpenCV (cv2)
- NumPy
-
Clone the repository:
git clone https://github.com/your-username/hsv-colorseg.git
-
Navigate to the project directory:
cd hsv-colorseg
-
Install the required dependencies:
pip install streamlit opencv-python numpy
-
Run the Streamlit app:
streamlit run app.py
-
A new browser window will open with the Color Segmentation App.
-
Use the file uploader to select an image (JPG, JPEG, or PNG).
-
The app will display:
- The original image.
- Segmented images for Red, Green, and Blue.
Feature | Description |
---|---|
Image Upload | Users can upload images in JPG, JPEG, or PNG format. |
Color Detection | The app detects segments of Red, Green, and Blue using HSV color space. |
Visualization | Segmented images are displayed alongside the original image for comparison. |
User-Friendly Interface | Built with Streamlit, it provides a simple and interactive experience. |
video-demo.mp4
- Streamlit – for the web interface.
- OpenCV (cv2) – for image processing.
- NumPy – for numerical operations.
This project is licensed under the MIT License — see the LICENSE file for details.