[][src]Crate kmeans_colors_lib

Structs

KmeansLab

Result of k-means operation in Lab space.

KmeansRgb

Result of k-means operation in Rgb space.

Opt

Enums

Command

Functions

find_colors

Find the image pixels which closest match the supplied colors and save that image as output.

get_closest_centroid_lab

Find a pixel's nearest centroid color in Lab, index the pixel with that centroid.

get_closest_centroid_rgb

Find a pixel's nearest centroid color in Rgb, index the pixel with that centroid.

get_kmeans_lab

Find k-means colors of an image in Lab space.

get_kmeans_rgb

Find k-means colors of an image in Rgb space.

map_indices_to_colors_lab

Map pixel indices to centroid colors for output from Lab to Srgb.

map_indices_to_colors_rgb

Map pixel indices to centroid colors for output in Srgb.

run
sort_indexed_colors_lab

Sorts the centroids by Luminosity and calculates the percentage of each color in the image. Returns both of those results and the index of that element in a tuple.

sort_indexed_colors_rgb

Sorts the centroids by Luminosity and calculates the percentage of each color in the image. Returns both of those results and the index of that element in a tuple.