color_reduce_kmeans(src, num_colors, num_attempts, term_epsilon, term_iterations)ΒΆ

Reduces the number of colors in the image to a specified number.

Inputs

name type default description
src image   Source image
num_colors int 256 Number of colors to reduce the image to. Must be greater than 0
num_attempts int 1 Number of iterations to search for a result
term_epsilon int 50 Termination epsilon
term_iterations int 4 Number of iterations to search for a result

Outputs

name type default description
dst image   Destination image
../../_images/color_reduce_kmeans.png