Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

py draw matrix of black square and white circle

>>> from scipy import misc
>>> import imageio
>>> face = misc.face()
>>> imageio.imsave('face.png', face) # First we need to create the PNG file

>>> face = imageio.imread('face.png')
>>> type(face)      
<class 'imageio.core.util.Array'>
>>> face.shape, face.dtype
((768, 1024, 3), dtype('uint8'))
Source by scipy-lectures.org #
 
PREVIOUS NEXT
Tagged: #py #draw #matrix #black #square #white #circle
ADD COMMENT
Topic
Name
3+7 =