Skip to content

An HSV-based Image Segmentation Web App using Flask, enabling users to explore color boundaries for precise segmentation.

License

Notifications You must be signed in to change notification settings

amedsalim/Color-Based-Image-Segmentation

Repository files navigation

img1

img2

This repository contains a Python tool that utilizes OpenCV for real-time color-based image segmentation and filtering. It enhances the contrast of an image using CLAHE before performing color thresholding.

It provides a simple graphical interface with trackbars for adjusting the color range in terms of hue, saturation, and value (HSV). The program loads an image, applies the selected color range as a mask, and displays the original image, the HSV representation, the mask, and the filtered image in a stacked layout. Users can fine-tune the color filtering settings with the trackbars.

Features

  • Contrast Enhancement: Utilizes CLAHE with a default clip limit of 1 to enhance image contrast and improve visibility without compromising specific regions' brightness or darkness.
  • Real-time Color Filtering: Adjust color filtering settings using trackbars.
  • Visualization: Displays the original image, HSV representation, color mask, and filtered result.
  • Interactive Image Editing: Supports computer vision and image processing tasks with an intuitive interface.
  • Deployment: Application deployment using Flask framework with an HTML frontend for user-friendly image processing tasks.

Getting Started

To use the tool:

  1. Clone the repository to your local machine.
  2. Ensure you have PyCharm installed.
  3. Install the required dependencies using the requirements.txt file.
  4. To run the tool, open test.py, change the image path, and run the script.
  5. To deploy the application using Flask, run app.py and navigate to http://127.0.0.1:5000.

About

An HSV-based Image Segmentation Web App using Flask, enabling users to explore color boundaries for precise segmentation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published