This repository contains a Python script that demonstrates the use of the Mean Shift clustering algorithm for image segmentation. Mean Shift is a non-parametric clustering algorithm widely used in computer vision tasks.
This script requires several dependencies to be installed. Make sure you have Python, NumPy, OpenCV, Matplotlib, Scikit-learn, and PIL installed. You can install the required packages using the following command:
pip install pandas numpy opencv-python matplotlib scikit-learn Pillow
Clone the repository to your local machine:
git clone https://github.com/AHBRIJESH/Mean_Shift_Algorithm.git
cd Mean_Shift_Algorithm.git
Run the notebook using Jupyter notebook:
jupyter notebook
This notebook loads an image from a URL, applies median blur, and then performs Mean Shift clustering. The clustered image is displayed using Matplotlib.
The code includes visualization steps using Matplotlib to show the original image, the image after median blur, and the final clustered result. Each step is shown using plt.imshow()
.
Feel free to experiment with the code and explore the fascinating world of image clustering!
Contributions and suggestions are welcome! Feel free to open issues or submit pull requests to enhance the functionality or documentation of this project.
Enjoy clustering your images with Mean Shift! 😊🌈