The median cut algorithm
Cut an rgb cube into two color cubes, each with as imilar number of elements.
List An image in list form, with three components: red, green, blue
List The output of
Integer The number attached to the names of the two new images.
Represents the rgb colorspace as a cube, with side lengths based on the red, green, and blue extents (difference between maximum and minimum within-color values).
The algorithm takes the side with the largest extent (extent information
is passed in via the
and splits the cube along the median value.
Both halves of the cube are then returned.
Two new images in a list, each separated into rgb components
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.