JuliaImages / ColorQuantization.jl

Color Quantization Algorithms in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ColorQuantization.jl

Stable Dev Build Status Aqua QA Coverage

A Julia package to generate color palettes from images.

Installation

To install this package and its dependencies, open the Julia REPL and run

julia> ]add ColorQuantization

Examples

To extract a color palette from an image, call quantize with a quantization method of your choice.

using ColorQuantization
using TestImages

img = testimage("peppers")

quantize(img, KMeansQuantization(256))  # quantize to 256 colors
quantize(img, UniformQuantization(8))   # quantize to an 8x8x8 grid

The generated color schemes can be viewed in the documentation.

Related packages

ColorSchemeTools.jl provides extract to generate weighted colorschemes from images using K-means clustering.

About

Color Quantization Algorithms in Julia

License:MIT License


Languages

Language:Julia 100.0%