python - Opening Images as Arrays -


i have script should open image 2d array can't seem make work. have tried using numpy pil libraries. tried on different computers. issue opens image 2d array on 1 computer opens them ups objects on different compute running same version of python.

the code should open image , store array can seen below:

img = np.array(image.open(imagepath)) 

on 1 computer array on 1 image object this:

array(<pil.tiffimageplugin.tiffimagefile image mode=i;16b size=320x240 @ 0x2289fa8>, dtype=object) 

have tried imread function matplotlib?

from matplotlib.image import imread image = imread(image_path) 

returns numpy array , works fine me (python 3.4).


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -