Skip to main content

Average pixels from multiple images off Bing Image Search

Project description

# Average Pixels [![Build Status](https://travis-ci.org/liviu-/average-pixels.svg?branch=develop)](https://travis-ci.org/liviu-/average-pixels)

Command line tool which takes a bunch of images, and outputs a JPEG combining the images using a weighted average where the weights are samples drawn from the Dirichlet distribution.

`sh $ average-pixels download "party explosions boom" --offset 90 --count 30 `

![party_explosions_boom](images/party_explosions_boom.jpg)

## Installation

`sh $ python3 -m pip install average-pixels `

## Configuration The application in download mode uses [Bing Search API](https://www.microsoft.com/cognitive-services/en-us/bing-image-search-api) to search for images so it requires the user to have an API key activated for Bing’s search service. To obtain one:

Once obtained, the key may be provided through various methods:

  • When prompted by the application

  • By storing it in ~/.average_pixels_api

  • Or via the AVERAGE_PIXELS_API environment variable (e.g. $ export AVERAGE_PIXELS_API=$key)

## Example usage:

The application has 2 modes:

  • local: Combines local files and outputs the combined image

  • download: Takes keywords from the user, and combines images from Bing Image Search

`sh $ average-pixels download "black cats" `

![black_cats](images/black_cats.jpg)

`sh $ average-pixels download "green field blue sky" `

![green_field_blue_sky](images/green_field_blue_sky.jpg)

`sh $ average-pixels download "just give me some random photo" `

![just_give_me_some_random_photo](images/just_give_me_some_random_photo.jpg)

`sh $ average-pixels download "no" `

![no](images/no.jpg)

`sh $ average-pixels download "insects" --count 30 `

![insects](images/insects.jpg)

`sh $ average-pixels local /tmp/average_images --offset 40 `

![existing_dir](images/existing_dir.jpg)

`sh $ average-pixels download "turner" --count 20 `

![turner](images/turner.jpg)

`sh $ average-pixels download "jackson pollock painting" --count 10 --offset 30 `

![jackson_pollock](images/jackson_pollock_painting.jpg)

`sh $ average-pixels download "green" --count 100 `

![green](images/green.jpg)

`sh $ average-pixels local images/ `

![local_dir](images/output.jpg)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

average-pixels-1.1.0.tar.gz (349.8 kB view details)

Uploaded Source

Built Distribution

average_pixels-1.1.0-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file average-pixels-1.1.0.tar.gz.

File metadata

File hashes

Hashes for average-pixels-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f22bc119b1b940e8b41389134f04c8beb29f929b2627898bcba93b9a52fb54d8
MD5 513c75209655352614793b6ae8e42420
BLAKE2b-256 b9a6f3de66da93a784139a7bdacb4bbf4beefc031856d8ac90e711170c45e3db

See more details on using hashes here.

File details

Details for the file average_pixels-1.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for average_pixels-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5ccc9b63daadd07e56acbef5b10978865840705801a4d13f728486889a54450d
MD5 a0867b8aec505f699a33353420df2a45
BLAKE2b-256 690dc6dc05813de8a44b82956e492cd98be020fcbcf156e71dea44a4d1f6b077

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page