median_cut {RImagePalette} | R Documentation |
The median cut algorithm
Description
Cut an rgb cube into two color cubes, each with as imilar number of elements.
Usage
median_cut(image, vbox, iter = 1)
Arguments
image |
List An image in list form, with three components: red, green, blue |
vbox |
List The output of |
iter |
Integer The number attached to the names of the two new images. |
Details
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 vbox()
parameter),
and splits the cube along the median value.
Both halves of the cube are then returned.
Value
Two new images in a list, each separated into rgb components
See Also
[Package RImagePalette version 0.1.1 Index]