Skip to main content

Image Clustering using K-Means Algorithm

This package provides an easy-to-use function for clustering pixels in an image using the K-Means algorithm. It requires the OpenCV, Numpy, and Scikit-learn libraries.

Installation

You can install this package using pip:

pip install img_clust 

Usage

from img_clust import image_clustering

# Load and cluster the image with 5 clusters
segmented_image = image_clustering('path/to/image.jpg', 5)

# Display the segmented image
cv2.imshow('Segmented Image', segmented_image)
cv2.waitKey()

The image_clustering function takes two arguments: the path to the image file and the desired number of clusters.

License

MIT.

Release files for img-clust 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for img-clust 1.0.0
File Size Uploaded
img_clust-1.0.0.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for img-clust 1.0.0
File Interpreter ABI Platform
img_clust-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 kB

Release files / img_clust-1.0.0.tar.gz

Download URL img_clust-1.0.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6ac107caa207e3b731cc9f82b3a0e8bd584d090929c7600324fe44f9af78390e
BLAKE2b-256 checksum
How to use checksums
60da1913d458e6b6267692cd91e27a3e20d9acfd6183e52e30b097a57884e67d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / img_clust-1.0.0-py3-none-any.whl

Download URL img_clust-1.0.0-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4493e4c7be13c94c90da186843073a29211b52691da699ee096eba54c651cbc
BLAKE2b-256 checksum
How to use checksums
3abe263f05ce2444778c9d035582cd275eb4e1bedd03c1d77b173e5b5a6d19dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page