Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

generate a random np image array with shape

import numpy as np
from PIL import Image
random_array = np.random.rand(177,284,3)
random_array = np.random.random_sample(random_array.shape) * 255
random_array = random_array.astype(np.uint8)
random_im = Image.fromarray(random_array)
random_im.show()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #generate #random #np #image #array #shape
ADD COMMENT
Topic
Name
4+8 =