Image color extraction from web image search
Project description
This module uses imagecolor with PIL(Pillow) to extract colors from web image searches.
Available functions
average_image_url(url, name)
Averages a single image from a url into RGB color values. Returns a dictionary with the following keys: name, red, green, blue
url - image url.
name - name to return. Generally passed from the function that generates the url.
_image_search_average(url_list, max_threads=20)
Averages all urls in a list into a singular RGB average.
url_list - path to directory
max_threads - max processes to spawn.
google_average(search_term, num_results, api_key, cse_id, max_threads=20)
Does a Google image search and averages all the images into a singular RGB search average. Returns a dictionary with the following keys: name, red, green, blue
search_term - Google image search term.
num_results - Number of results to include.
api_key - Google API key.
cse_id - Google CSE ID.
max_threads - max processes to spawn. This gets passed to \_image_search_average(max_threads)
Future work
add more information to readme
build offline tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for searchcolor-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47c091343393bedbcc0c55606c35554c14e640b65bb5c0c84c8f199a46d35c61 |
|
MD5 | f83be6af0369fc3163c6002c45b64ef9 |
|
BLAKE2b-256 | f799408c5f7eca426818b64303a36ae143100fa75783d356da73ebfb2b371f0d |