Posts Tagged ‘PNG’

July 17, 2014 0

convert png image read using PIL to numpy array

By in python

Beware that conversion of an image with a non-standard format using np.array(Image.open(‘imagefile.png’)) can result in strange behavior. If eg the loaded image have a mode of LA the resulting numpy array are not initiated correctly. Use PIL Image convert function to get a format that you can convert (I expect single and triple channel image […]

Tags: , , ,