Image color detection using python
python
Solution
Use a PIL (Python Image Library) histogram. Loop over the histogram and take the average of pixel color weighed by the pixel count.
Problem
I need to detect the color of an online image and save it in the name of the detected color. ``` imageurl='http://www.example.com/' opener1 = urllib2.build_opener() page1=opener1.open(imageurl) my_picture=page1.read() fout = open('images/tony'+image[s], "wb") fout.write(my_picture) fout.close() ```