Python obtenir des données RVB d'image de l'URL
from PIL import Image
from io import BytesIO
# BBC Test Card F image from 1967
url = 'https://upload.wikimedia.org/wikipedia/en/5/52/Testcard_F.jpg'
import requests
response = requests.get(url)
img = Image.open(BytesIO(response.content))
import numpy as np
npimg = np.array(img) # 3 dim array first to dims are pixel x,y
# last dim is color
Fragile Finch