Advertisement
joaomlo

Exemplo operação pixel-a-pixel

Jan 26th, 2022
682
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def PaintImageWhite(image):
  2.     #A função shape devolve um array [Altura, Largura, Num. Canais]
  3.     altura,largura=image.shape[:2] # Vamos apenas buscar a altura e largura da imagem
  4.     for y in range(altura):
  5.         for x in range(largura):
  6.             image[y,x] = [255,255,255]
  7.     return image
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement