0.0
No commit activity in last 3 years
No release in over 3 years
Ruby library to calculate the colorfulness of a ChunkyPNG Image
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

~> 1.2.9
~> 1.1.0
 Project Readme

Colorfulness

A Ruby library for calculating the colorfulness of an image, using a technique described in "Measuring colourfulness in natural images" (Hasler and Susstrunk, 2003) (See section 7: 'A More Efficient Metric').

It uses ChunkyPNG to read the pixels of an image, and expects to be passed a ChunkyPNG Image.

For example:

image = ChunkyPNG::Image.from_file(path)
calculator = Colorfulness::Calculator.new(image)
puts image.colorfulness
# 0.3207628365648987