Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pil normalize image

# load image
image = Image.open('sydney_bridge.jpg')
pixels = asarray(image)

# convert from integers to floats
pixels = pixels.astype('float32')
# normalize to the range 0-1
pixels /= 255.0
 
PREVIOUS NEXT
Tagged: #pil #normalize #image
ADD COMMENT
Topic
Name
5+2 =