Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.56 KB

README.md

File metadata and controls

27 lines (21 loc) · 1.56 KB

ColorsOfBerlin

Finds the dominant colors of an image from the Berlin West Skyline webcam and uploads to Instagram @colors.of.berlin. The script runs automatically using Github Actions at 13:00 Berlin time. Dominant colors are extracted using the k-means clustering algorithm. The sky is detected from the image assuming that the variance of sky is smaller than non-sky part. Then 5 dominant colors are selected from the output image without the non-sky elements which is weighted depending on the number of pixels assigned to each of the cluster/color.

Current Setup

The python script runs automatically using Github Actions.

Installation

Credentials Setup

  1. Set up Windy API Key
  2. If wanting to upload palette canvas to Instagram, create a business Instagram account and link it to a Facebook page. Then create a Facebook developer account and you will be able to obtain an access token and an business instagram user id
  3. Set up Cloudinary

Support Modules

Install required packages by running:

pip install -r requirements.txt

How to Run

python ./ColorsOfBerlin/main.py

Credits and Inspiration