View gist:9b2a66c8f485e25d405a6b98f3ef66a2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%matplotlib inline | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from PIL import Image | |
tokyo_tower = Image.open("tokyo_tower.png") | |
tower_color = np.array(tokyo_tower) | |
rgbcolor = ["red", "green", "blue"] | |
rgb_list = [0] * 3 | |
for i in range(3): | |
rgb0, rgb1 = np.histogram(tower_color[:, :, i].flatten(), bins=256) |