View gist:8b5518d25f46c9b63ee39b55b59cf45a
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) |