Giter Site home page Giter Site logo

color_summarizer_sensory_research's Introduction

Image Color Cluster Summarizer

Goal of the Notebook:

The Color Cluster Summarizer will produce descriptive statistics about the color spectrum of an image. After loading an image, the summarizer will split the pixels into 5 distinct channels, based on their RGB colors.

The average color of each cluster will be reported via its Common Color Name, Hex code, RGB value, and HSV value.

The summarizer also reports the breakdown of colors within each cluster, based on the nearest Common Color Name from a pixel's RGB value

Steps Taken:

  • Defining all functions used prior to beginning
  • Loading the image using Python Imaging Library (PIL)
  • Clustering the pixels into 5 groups using K-Means Clustering Algorithm
  • Obtain the names of all the colors associated with the pixel clusters
  • Find the average color in each cluster using the mean RGB value
  • Create the image cluster partitions
  • Present the data in a tidy HTML table

Issues:

  • HTML table does not load properly on Jupyter Notebook viewed through Github (To be fixed)
  • Images with less than 5 distinct colors will cause errors in K-Means Clustering

The image used in this example:

ColoredPDF

Image Cluster Partitions

Each pixel in the image is assigned to one of five groups based on the RGB value. These are called the Cluster Partitions. For each cluster partition, we turn hide the pixels of other partitions and reconstruct the image using only the pixel of the specific partition.

The border around each cluster partition represents the average color of the partition. This is calculated as the average RGB values of the partition. partition

Cluster Breakdown

Next, we investigate the specifics of the cluster partitions. The cluster bar represents the proportion of pixels from the image that are in each cluster (Pixels)

In the table below, we report the average color of each cluster via its Common Color Name, Hex code, RGB value, and HSV value.

We also list the unique color name of each individual pixel in the partitions (Tags)

image


Required Libraries

  • Pillow
  • numpy
  • pandas
  • scikit-learn
  • colormaps
  • webcolors
  • Matplotlib

color_summarizer_sensory_research's People

Contributors

xevor11 avatar

Stargazers

BEERPAL SINGH avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.