Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

%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)