Skip to main content

Image clustering using kmeans alg

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

img_clust-1.0.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

img_clust-1.0.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file img_clust-1.0.0.tar.gz.

File metadata

  • Download URL: img_clust-1.0.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for img_clust-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6ac107caa207e3b731cc9f82b3a0e8bd584d090929c7600324fe44f9af78390e
MD5 bd77ca3382ae33d49d819b41243ca8ff
BLAKE2b-256 60da1913d458e6b6267692cd91e27a3e20d9acfd6183e52e30b097a57884e67d

See more details on using hashes here.

File details

Details for the file img_clust-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: img_clust-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for img_clust-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4493e4c7be13c94c90da186843073a29211b52691da699ee096eba54c651cbc
MD5 9e1b95b0f6fccf345a45b29911317cfb
BLAKE2b-256 3abe263f05ce2444778c9d035582cd275eb4e1bedd03c1d77b173e5b5a6d19dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page